aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJoshua Zhu <zhu.wen-jie@hp.com>2013-01-05 13:29:57 +0800
committerBen Hutchings <ben@decadent.org.uk>2013-09-10 01:57:05 +0100
commit6fb06654d8b1b3e64a28765c103846852e475e9b (patch)
tree944acaf4b7a755d0bfb77205484b3df3375aaf9b /tools
parent6c660b2a49d3ac2f09b75002aff43077b7ef9de6 (diff)
downloadkernel_samsung_smdk4412-6fb06654d8b1b3e64a28765c103846852e475e9b.zip
kernel_samsung_smdk4412-6fb06654d8b1b3e64a28765c103846852e475e9b.tar.gz
kernel_samsung_smdk4412-6fb06654d8b1b3e64a28765c103846852e475e9b.tar.bz2
perf tools: Add anonymous huge page recognition
commit d0528b5d71faf612014dd7672e44225c915344b2 upstream. Judging anonymous memory's vm_area_struct, perf_mmap_event's filename will be set to "//anon" indicating this vma belongs to anonymous memory. Once hugepage is used, vma's vm_file points to hugetlbfs. In this way, this vma will not be regarded as anonymous memory by is_anon_memory() in perf user space utility. Signed-off-by: Joshua Zhu <zhu.wen-jie@hp.com> Cc: Akihiro Nagai <akihiro.nagai.hw@hitachi.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: David Ahern <dsahern@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Joshua Zhu <zhu.wen-jie@hp.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1357363797-3550-1-git-send-email-zhu.wen-jie@hp.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/map.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
index 78284b1..42dffa0 100644
--- a/tools/perf/util/map.c
+++ b/tools/perf/util/map.c
@@ -15,7 +15,8 @@ const char *map_type__name[MAP__NR_TYPES] = {
static inline int is_anon_memory(const char *filename)
{
- return strcmp(filename, "//anon") == 0;
+ return !strcmp(filename, "//anon") ||
+ !strcmp(filename, "/anon_hugepage (deleted)");
}
static inline int is_no_dso_memory(const char *filename)