From: Gaurav Jain <gjain@fb.com>
To: <linux-kernel@vger.kernel.org>
Cc: Gaurav Jain <gjain@fb.com>, Ingo Molnar <mingo@kernel.org>,
Jiri Olsa <jolsa@redhat.com>, Paul Mackerras <paulus@samba.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Don Zickus <dzickus@redhat.com>, Arun Sharma <asharma@fb.com>
Subject: [PATCH] perf tools: Synthesize anon MMAP records on the heap
Date: Sat, 11 Jan 2014 20:32:14 -0800 [thread overview]
Message-ID: <1389501134-13116-1-git-send-email-gjain@fb.com> (raw)
Anon records usually do not have the 'execname' entry. However if they are on
the heap, the execname shows up as '[heap]'. The fix considers any executable
entries in the map that do not have a name or are on the heap as anon records
and sets the name to '//anon'.
This fixes JIT profiling for records on the heap.
Signed-off-by: Gaurav Jain <gjain@fb.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Arun Sharma <asharma@fb.com>
---
tools/perf/util/event.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index bb788c1..ae9c55b 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -224,10 +224,9 @@ static int perf_event__synthesize_mmap_events(struct perf_tool *tool,
continue;
event->header.misc |= PERF_RECORD_MISC_MMAP_DATA;
- }
-
- if (!strcmp(execname, ""))
+ } if (!strcmp(execname, "") || !strcmp(execname, "[heap]")) {
strcpy(execname, anonstr);
+ }
size = strlen(execname) + 1;
memcpy(event->mmap.filename, execname, size);
--
1.8.1
next reply other threads:[~2014-01-12 4:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-12 4:32 Gaurav Jain [this message]
2014-01-13 8:59 ` Namhyung Kim
2014-01-13 16:54 ` Don Zickus
2014-01-14 20:48 ` Gaurav Jain
2014-01-15 5:46 ` Namhyung Kim
2014-01-15 6:44 ` Gaurav Jain
2014-01-16 1:01 ` Namhyung Kim
2014-01-16 2:40 ` Gaurav Jain
2014-01-15 14:27 ` Don Zickus
2014-01-16 1:03 ` Namhyung Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1389501134-13116-1-git-send-email-gjain@fb.com \
--to=gjain@fb.com \
--cc=a.p.zijlstra@chello.nl \
--cc=asharma@fb.com \
--cc=dzickus@redhat.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®