ozone: evdev: Sync caps lock LED state to evdev
[chromium-blink-merge.git] / base / trace_event / process_memory_maps.cc
blobbf3c5a00f15926b9331034e1c74f8afaf063ae10
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 #include "base/trace_event/process_memory_maps.h"
7 #include "base/trace_event/trace_event_argument.h"
9 namespace base {
10 namespace trace_event {
12 // static
13 const uint32 ProcessMemoryMaps::VMRegion::kProtectionFlagsRead = 4;
14 const uint32 ProcessMemoryMaps::VMRegion::kProtectionFlagsWrite = 2;
15 const uint32 ProcessMemoryMaps::VMRegion::kProtectionFlagsExec = 1;
17 ProcessMemoryMaps::ProcessMemoryMaps() {
20 ProcessMemoryMaps::~ProcessMemoryMaps() {
23 void ProcessMemoryMaps::AsValueInto(TracedValue* value) const {
24 value->BeginArray("vm_regions");
25 for (const auto& region : vm_regions_) {
26 value->BeginDictionary();
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);
34 value->BeginDictionary("byte_stats");
35 value->SetDouble("resident", region.byte_stats_resident);
36 value->SetDouble("anonymous", region.byte_stats_anonymous);
37 value->EndDictionary();
39 value->EndDictionary();
41 value->EndArray();
44 } // namespace trace_event
45 } // namespace base