diff options
author | youngmin.yoo <youngmin.yoo@samsung.com> | 2016-02-16 22:10:14 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-17 06:11:24 +0000 |
commit | 7a187c6baf50ff6819ff73b3c094f2affd2f233d (patch) | |
tree | 2e0658690a563a88f7d7f6486cc7ac887f7cb1a2 | |
parent | 505cf01d5f6d69360bb730ebd191f3f63230a9ef (diff) | |
download | chromium_src-7a187c6baf50ff6819ff73b3c094f2affd2f233d.zip chromium_src-7a187c6baf50ff6819ff73b3c094f2affd2f233d.tar.gz chromium_src-7a187c6baf50ff6819ff73b3c094f2affd2f233d.tar.bz2 |
[tracing] Support shared and private permission. (missing perm flag)
following /proc/[pid]/maps perm field:
r = read
w = write
x = execute
s = shared
p = private (copy on write)
BUG=584161
Review URL: https://codereview.chromium.org/1663533005
Cr-Commit-Position: refs/heads/master@{#375807}
-rw-r--r-- | base/trace_event/process_memory_maps.cc | 1 | ||||
-rw-r--r-- | base/trace_event/process_memory_maps.h | 1 | ||||
-rw-r--r-- | components/tracing/process_metrics_memory_dump_provider.cc | 10 |
3 files changed, 9 insertions, 3 deletions
diff --git a/base/trace_event/process_memory_maps.cc b/base/trace_event/process_memory_maps.cc index 31083a8..0eb140c 100644 --- a/base/trace_event/process_memory_maps.cc +++ b/base/trace_event/process_memory_maps.cc @@ -15,6 +15,7 @@ namespace trace_event { const uint32_t ProcessMemoryMaps::VMRegion::kProtectionFlagsRead = 4; const uint32_t ProcessMemoryMaps::VMRegion::kProtectionFlagsWrite = 2; const uint32_t ProcessMemoryMaps::VMRegion::kProtectionFlagsExec = 1; +const uint32_t ProcessMemoryMaps::VMRegion::kProtectionFlagsMayshare = 128; ProcessMemoryMaps::VMRegion::VMRegion() : start_address(0), diff --git a/base/trace_event/process_memory_maps.h b/base/trace_event/process_memory_maps.h index 3dfcc0c..2c8191b 100644 --- a/base/trace_event/process_memory_maps.h +++ b/base/trace_event/process_memory_maps.h @@ -25,6 +25,7 @@ class BASE_EXPORT ProcessMemoryMaps { static const uint32_t kProtectionFlagsRead; static const uint32_t kProtectionFlagsWrite; static const uint32_t kProtectionFlagsExec; + static const uint32_t kProtectionFlagsMayshare; VMRegion(); diff --git a/components/tracing/process_metrics_memory_dump_provider.cc b/components/tracing/process_metrics_memory_dump_provider.cc index e73ea78..141764b 100644 --- a/components/tracing/process_metrics_memory_dump_provider.cc +++ b/components/tracing/process_metrics_memory_dump_provider.cc @@ -60,15 +60,19 @@ bool ParseSmapsHeader(const char* header_line, region->protection_flags = 0; if (protection_flags[0] == 'r') { region->protection_flags |= - base::trace_event::ProcessMemoryMaps::VMRegion::kProtectionFlagsRead; + base::trace_event::ProcessMemoryMaps::VMRegion::kProtectionFlagsRead; } if (protection_flags[1] == 'w') { region->protection_flags |= - base::trace_event::ProcessMemoryMaps::VMRegion::kProtectionFlagsWrite; + base::trace_event::ProcessMemoryMaps::VMRegion::kProtectionFlagsWrite; } if (protection_flags[2] == 'x') { region->protection_flags |= - base::trace_event::ProcessMemoryMaps::VMRegion::kProtectionFlagsExec; + base::trace_event::ProcessMemoryMaps::VMRegion::kProtectionFlagsExec; + } + if (protection_flags[3] == 's') { + region->protection_flags |= + base::trace_event::ProcessMemoryMaps::VMRegion::kProtectionFlagsMayshare; } region->mapped_file = mapped_file; |