lkml.org 
[lkml]   [2014]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf tools: Synthesize anon MMAP records on the heap
On Sat, Jan 11, 2014 at 08:32:14PM -0800, Gaurav Jain wrote:
> 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.

I guess I don't understand the need for this fix. It seems breaking out
//anon vs. [heap] would be useful. Your patch is saying otherwise. Can
give a description of the problem you are trying to solve?

Also style issue below..

>
> 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]")) {

The '} if' part should seperate the 'if' on to its own line (unless you
meant an 'else' in there).

Cheers,
Don


\
 
 \ /
  Last update: 2014-01-13 18:41    [W:0.156 / U:2.740 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site