public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>,
	jolsa@kernel.org, linux-kernel@vger.kernel.org,
	Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH] perf, tools, report: Add support for srcfile sort key
Date: Tue, 11 Aug 2015 11:28:07 +0900	[thread overview]
Message-ID: <20150811022807.GD2488@sejong> (raw)
In-Reply-To: <20150810203740.GG2521@kernel.org>

On Mon, Aug 10, 2015 at 05:37:40PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Mon, Aug 10, 2015 at 03:32:47PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Mon, Aug 10, 2015 at 01:12:41PM -0300, Arnaldo Carvalho de Melo escreveu:
> > > (gdb) fr 2
> > > #2  0x00000000004bb812 in sort__srcline_cmp (left=0x1bfa090, right=0x7fffffffc0a0) at util/sort.c:306
> > > 306				hists__new_col_len(right->hists, HISTC_SRCLINE,
> > > (gdb) p right->hists
> > > $7 = (struct hists *) 0x0
> > > (gdb) p left->hists
> > > $8 = (struct hists *) 0x18d66e0
> 
> > > Due to this both "-s srcline" and "-s srcfile" crashes here.
>  
> > Ok, this one needs to be applied before yours and Andi's:
>  
> > +++ b/tools/perf/util/hist.c
> > @@ -761,6 +761,7 @@ iter_add_next_cumulative_entry(struct hist_entry_iter *iter,
> >  	struct hist_entry **he_cache = iter->priv;
> >  	struct hist_entry *he;
> >  	struct hist_entry he_tmp = {
> > +		.hists = evsel__hists(evsel),
> >  		.cpu = al->cpu,
> > ---------
> 
> > Because you will use that stack synthesized he_tmp entry as a parameter
> > to the cmp() function, that will end up trying to access he_tmp->hists,
> > that was NULL, b00m.
> 
> all this is moot, as we need to update that column length elsewhere,
> together with all the other fileds, please see:
> 
>   ://git.kernel.org/cgit/linux/kernel/git/acme/linux.git/commit/?h=perf/core&id=e8e6d37e73e6b950c891c780745460b87f4755b6

Looks good to me.

> 
> And now, with it really updating the width, we get to another problem,
> in one case I got a line like:
> 
>   0.00%  JS_GetInstancePrivate(JSContext*, JSObject*, JSClass*, JS /usr/lib64/libmozjs-24.so 0x1a0bd1 d [.] JS_GetInstancePrivate(JSContext*, JSObject*, JSClass*, JS::Value*)

It seems like ':' character in the symbol name affects the result for some reason.

Thanks,
Namhyung


> 
> Which is really strange, i.e. it mixed up demangled stuff with the
> srcfile, i.e. normal lines for:
> 
>  perf report -v -s srcfile,dso,symbol --stdio
> 
> Look like:
> 
>      1.94%  malloc.c    /usr/lib64/libc-2.20.so   0x80f91 d [.] _int_malloc
> 
> Anyway, will continue this later, together with checking why it doesn't resolve
> many things, that one may be related, in some cases, to functions in assembly
> source files, for now it updates correctly the column width for "srcline" and
> "srcfile".
> 
> - Arnaldo

  reply	other threads:[~2015-08-11  2:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-07 22:54 [PATCH] perf, tools, report: Add support for srcfile sort key Andi Kleen
2015-08-07 23:51 ` Arnaldo Carvalho de Melo
2015-08-08  0:02   ` Arnaldo Carvalho de Melo
2015-08-08  2:27     ` Andi Kleen
2015-08-08 17:28       ` Arnaldo Carvalho de Melo
2015-08-09  3:30       ` Namhyung Kim
2015-08-09 16:03         ` Andi Kleen
2015-08-10 14:51           ` Arnaldo Carvalho de Melo
2015-08-10 16:12         ` Arnaldo Carvalho de Melo
2015-08-10 18:32           ` Arnaldo Carvalho de Melo
2015-08-10 20:37             ` Arnaldo Carvalho de Melo
2015-08-11  2:28               ` Namhyung Kim [this message]
2015-08-12 12:30 ` [tip:perf/core] perf " tip-bot for Andi Kleen

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=20150811022807.GD2488@sejong \
    --to=namhyung@kernel.org \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=andi@firstfloor.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.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