| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef BASE_TRACE_EVENT_PROCESS_MEMORY_MAPS_H_ | 5 #ifndef BASE_TRACE_EVENT_PROCESS_MEMORY_MAPS_H_ |
| 6 #define BASE_TRACE_EVENT_PROCESS_MEMORY_MAPS_H_ | 6 #define BASE_TRACE_EVENT_PROCESS_MEMORY_MAPS_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/base_export.h" | 13 #include "base/base_export.h" |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 | 15 |
| 16 namespace base { | 16 namespace base { |
| 17 namespace trace_event { | 17 namespace trace_event { |
| 18 | 18 |
| 19 class TracedValue; | 19 class TracedValue; |
| 20 | 20 |
| 21 // Data model for process-wide memory stats. | 21 // Data model for process-wide memory stats. |
| 22 class BASE_EXPORT ProcessMemoryMaps { | 22 class BASE_EXPORT ProcessMemoryMaps { |
| 23 public: | 23 public: |
| 24 struct BASE_EXPORT VMRegion { | 24 struct BASE_EXPORT VMRegion { |
| 25 static const uint32_t kProtectionFlagsRead; | 25 static const uint32_t kProtectionFlagsRead; |
| 26 static const uint32_t kProtectionFlagsWrite; | 26 static const uint32_t kProtectionFlagsWrite; |
| 27 static const uint32_t kProtectionFlagsExec; | 27 static const uint32_t kProtectionFlagsExec; |
| 28 static const uint32_t kProtectionFlagsMayshare; |
| 28 | 29 |
| 29 VMRegion(); | 30 VMRegion(); |
| 30 | 31 |
| 31 uint64_t start_address; | 32 uint64_t start_address; |
| 32 uint64_t size_in_bytes; | 33 uint64_t size_in_bytes; |
| 33 uint32_t protection_flags; | 34 uint32_t protection_flags; |
| 34 std::string mapped_file; | 35 std::string mapped_file; |
| 35 | 36 |
| 36 // private_dirty_resident + private_clean_resident + shared_dirty_resident + | 37 // private_dirty_resident + private_clean_resident + shared_dirty_resident + |
| 37 // shared_clean_resident = resident set size. | 38 // shared_clean_resident = resident set size. |
| (...skipping 23 matching lines...) Expand all Loading... |
| 61 private: | 62 private: |
| 62 std::vector<VMRegion> vm_regions_; | 63 std::vector<VMRegion> vm_regions_; |
| 63 | 64 |
| 64 DISALLOW_COPY_AND_ASSIGN(ProcessMemoryMaps); | 65 DISALLOW_COPY_AND_ASSIGN(ProcessMemoryMaps); |
| 65 }; | 66 }; |
| 66 | 67 |
| 67 } // namespace trace_event | 68 } // namespace trace_event |
| 68 } // namespace base | 69 } // namespace base |
| 69 | 70 |
| 70 #endif // BASE_TRACE_EVENT_PROCESS_MEMORY_MAPS_H_ | 71 #endif // BASE_TRACE_EVENT_PROCESS_MEMORY_MAPS_H_ |
| OLD | NEW |