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

Side by Side Diff: base/trace_event/process_memory_maps.cc

Issue 960873002: Update from https://crrev.com/318214 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #include "base/trace_event/process_memory_maps.h"
6
7 #include "base/trace_event/trace_event_argument.h"
8
9 namespace base {
10 namespace trace_event {
11
12 // static
13 const uint32 ProcessMemoryMaps::VMRegion::kProtectionFlagsRead = 4;
14 const uint32 ProcessMemoryMaps::VMRegion::kProtectionFlagsWrite = 2;
15 const uint32 ProcessMemoryMaps::VMRegion::kProtectionFlagsExec = 1;
16
17 ProcessMemoryMaps::ProcessMemoryMaps() {
18 }
19
20 ProcessMemoryMaps::~ProcessMemoryMaps() {
21 }
22
23 void ProcessMemoryMaps::AsValueInto(TracedValue* value) const {
24 value->BeginArray("vm_regions");
25 for (const auto& region : vm_regions_) {
26 value->BeginDictionary();
27
28 value->SetDouble("start_address", region.start_address);
29 value->SetDouble("size_in_bytes", region.size_in_bytes);
30 value->SetInteger("protection_flags", region.protection_flags);
31 value->SetString("mapped_file", region.mapped_file);
32 value->SetDouble("mapped_file_offset", region.mapped_file_offset);
33
34 value->BeginDictionary("byte_stats");
35 value->SetDouble("resident", region.byte_stats_resident);
36 value->SetDouble("anonymous", region.byte_stats_anonymous);
37 value->EndDictionary();
38
39 value->EndDictionary();
40 }
41 value->EndArray();
42 }
43
44 } // namespace trace_event
45 } // namespace base
OLDNEW
« no previous file with comments | « base/trace_event/process_memory_maps.h ('k') | base/trace_event/process_memory_maps_dump_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698