Re: [PATCH 03/28] perf tools: Remove symbol_conf.use_callchaincheck

From: Namhyung Kim
Date: Thu Jan 09 2014 - 08:16:55 EST


2014-01-08 (ì), 09:57 -0300, Arnaldo Carvalho de Melo:
> Em Wed, Jan 08, 2014 at 05:46:08PM +0900, Namhyung Kim escreveu:
> > The machine__resolve_callchain() is called only if symbol_conf.
> > use_callchain is set so no need to check it again.
>
> Not really it may be called with use_callchain not set, I'm checking if
> the logic is needed (doesn't look like).

To be more precise, it's called with use_callchain not set - if "--sort
parent" was given on the command line. But even in this case we need to
proceed the callchain traversal, if not the parent column will have
invalid results since it only sees the first entry (usually itself) and
then stops.

$ perf report -s sym,parent
+ 2.66% [k] rb_next sys_ioctl
+ 1.52% [.] pthread_mutex_lock [other]
+ 0.92% [k] page_fault [other]
+ 0.92% [.] 0x00000000008dca3f [other]
+ 0.86% [.] 0x0000000000a052e9 [other]
+ 0.76% [.] pthread_mutex_unlock [other]
+ 0.73% [.] 0x0000000000976361 [other]
+ 0.69% [k] find_vma sys_mmap_pgoff

$ perf report -s sym,parent -g none
+ 2.66% [k] rb_next [other]
+ 1.52% [.] pthread_mutex_lock [other]
+ 0.92% [k] page_fault [other]
+ 0.92% [.] 0x00000000008dca3f [other]
+ 0.86% [.] 0x0000000000a052e9 [other]
+ 0.76% [.] pthread_mutex_unlock [other]
+ 0.73% [.] 0x0000000000976361 [other]
+ 0.69% [k] find_vma [other]


With --children patchset, we'll need to traverse the callstack
regardless of the use_callchain anyway. So we need this patch.

Thanks,
Namhyung


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/