|
|
c532ac |
From 0246c6ba4a08378c46c17617d831d6baf0f44989 Mon Sep 17 00:00:00 2001
|
|
|
c532ac |
From: William Cohen <wcohen@redhat.com>
|
|
|
c532ac |
Date: Fri, 9 Jan 2015 16:44:09 -0500
|
|
|
c532ac |
Subject: [PATCH] Allow operf to track anon_hugepage mmap entries
|
|
|
c532ac |
|
|
|
c532ac |
The perf mmap information for anon_huge pages has a different filename
|
|
|
c532ac |
("/anon_hugepage") than the mmap information for regions composed of
|
|
|
c532ac |
normal sized pages ("//anon"). This results in opreport not being
|
|
|
c532ac |
able to map samples collected by operf to Java methods when the Java
|
|
|
c532ac |
VM uses statically allocated huge pages (rhbz1180512 and rhbz1180513).
|
|
|
c532ac |
|
|
|
c532ac |
Signed-off-by: William Cohen <wcohen@redhat.com>
|
|
|
c532ac |
---
|
|
|
c532ac |
libperf_events/operf_utils.cpp | 4 ++++
|
|
|
c532ac |
1 file changed, 4 insertions(+)
|
|
|
c532ac |
|
|
|
c532ac |
diff --git a/libperf_events/operf_utils.cpp b/libperf_events/operf_utils.cpp
|
|
|
c532ac |
index a87524b..90a0765 100644
|
|
|
c532ac |
--- a/libperf_events/operf_utils.cpp
|
|
|
c532ac |
+++ b/libperf_events/operf_utils.cpp
|
|
|
c532ac |
@@ -295,6 +295,10 @@ static void __handle_mmap_event(event_t * event)
|
|
|
c532ac |
strlen("//anon")) == 0)) {
|
|
|
c532ac |
mapping->is_anon_mapping = true;
|
|
|
c532ac |
strcpy(mapping->filename, "anon");
|
|
|
c532ac |
+ } else if ((strncmp(mapping->filename, "/anon_hugepage",
|
|
|
c532ac |
+ strlen("/anon_hugepage")) == 0)) {
|
|
|
c532ac |
+ mapping->is_anon_mapping = true;
|
|
|
c532ac |
+ strcpy(mapping->filename, "anon");
|
|
|
c532ac |
}
|
|
|
c532ac |
mapping->end_addr = (event->mmap.len == 0ULL)? 0ULL : mapping->start_addr + event->mmap.len - 1;
|
|
|
c532ac |
mapping->pgoff = event->mmap.pgoff;
|
|
|
c532ac |
--
|
|
|
c532ac |
2.1.0
|
|
|
c532ac |
|