Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(917)

Unified Diff: base/trace_event/process_memory_maps.cc

Issue 1180693002: Update from https://crrev.com/333737 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/trace_event/process_memory_maps.h ('k') | base/trace_event/process_memory_maps_dump_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/process_memory_maps.cc
diff --git a/base/trace_event/process_memory_maps.cc b/base/trace_event/process_memory_maps.cc
index d553ee88e8041d92c525dd77554179b889721c39..bb400de1743c851edb7435a123ef3e6c705841a1 100644
--- a/base/trace_event/process_memory_maps.cc
+++ b/base/trace_event/process_memory_maps.cc
@@ -16,6 +16,18 @@ const uint32 ProcessMemoryMaps::VMRegion::kProtectionFlagsRead = 4;
const uint32 ProcessMemoryMaps::VMRegion::kProtectionFlagsWrite = 2;
const uint32 ProcessMemoryMaps::VMRegion::kProtectionFlagsExec = 1;
+ProcessMemoryMaps::VMRegion::VMRegion()
+ : start_address(0),
+ size_in_bytes(0),
+ protection_flags(0),
+ byte_stats_private_dirty_resident(0),
+ byte_stats_private_clean_resident(0),
+ byte_stats_shared_dirty_resident(0),
+ byte_stats_shared_clean_resident(0),
+ byte_stats_swapped(0),
+ byte_stats_proportional_resident(0) {
+}
+
ProcessMemoryMaps::ProcessMemoryMaps() {
}
@@ -38,10 +50,15 @@ void ProcessMemoryMaps::AsValueInto(TracedValue* value) const {
value->BeginDictionary("bs"); // byte stats
value->SetString(
"pss", StringPrintf(kHexFmt, region.byte_stats_proportional_resident));
- value->SetString("prv",
- StringPrintf(kHexFmt, region.byte_stats_private_resident));
- value->SetString("shr",
- StringPrintf(kHexFmt, region.byte_stats_shared_resident));
+ value->SetString(
+ "pd", StringPrintf(kHexFmt, region.byte_stats_private_dirty_resident));
+ value->SetString(
+ "pc", StringPrintf(kHexFmt, region.byte_stats_private_clean_resident));
+ value->SetString(
+ "sd", StringPrintf(kHexFmt, region.byte_stats_shared_dirty_resident));
+ value->SetString(
+ "sc", StringPrintf(kHexFmt, region.byte_stats_shared_clean_resident));
+ value->SetString("sw", StringPrintf(kHexFmt, region.byte_stats_swapped));
value->EndDictionary();
value->EndDictionary();
@@ -49,5 +66,9 @@ void ProcessMemoryMaps::AsValueInto(TracedValue* value) const {
value->EndArray();
}
+void ProcessMemoryMaps::Clear() {
+ vm_regions_.clear();
+}
+
} // namespace trace_event
} // namespace base
« no previous file with comments | « base/trace_event/process_memory_maps.h ('k') | base/trace_event/process_memory_maps_dump_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698