1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef BASE_TRACE_EVENT_PROCESS_MEMORY_DUMP_H_
6 #define BASE_TRACE_EVENT_PROCESS_MEMORY_DUMP_H_
8 #include "base/base_export.h"
9 #include "base/trace_event/process_memory_maps.h"
10 #include "base/trace_event/process_memory_totals.h"
13 namespace trace_event
{
15 class ConvertableToTraceFormat
;
17 // ProcessMemoryDump is as a strongly typed container which enforces the data
18 // model for each memory dump point and holds the dumps produced by the
19 // MemoryDumpProvider(s) for a specific process.
20 // At trace generation time (i.e. when AsValue() is called), ProcessMemoryDump
21 // will compose a key-value dictionary of the various dumps obtained at trace
23 class BASE_EXPORT ProcessMemoryDump
{
28 // Called at trace generation time to populate the TracedValue.
29 void AsValueInto(TracedValue
* value
) const;
31 ProcessMemoryTotals
* process_totals() { return &process_totals_
; }
32 bool has_process_totals() const { return has_process_totals_
; }
33 void set_has_process_totals() { has_process_totals_
= true; }
35 ProcessMemoryMaps
* process_mmaps() { return &process_mmaps_
; }
36 bool has_process_mmaps() const { return has_process_mmaps_
; }
37 void set_has_process_mmaps() { has_process_mmaps_
= true; }
40 ProcessMemoryTotals process_totals_
;
41 bool has_process_totals_
;
43 ProcessMemoryMaps process_mmaps_
;
44 bool has_process_mmaps_
;
46 DISALLOW_COPY_AND_ASSIGN(ProcessMemoryDump
);
49 } // namespace trace_event
52 #endif // BASE_TRACE_EVENT_PROCESS_MEMORY_DUMP_H_