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