Re: callchain sampling bug in perf?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Frederic Weisbecker
Date: Friday, August 20, 2010 - 7:47 pm

On Fri, Aug 20, 2010 at 05:16:45AM -0400, Christoph Hellwig wrote:
  ^^
  you meant "without", right?




Right. So this is due to the roots of the callchains that have uninitialized
values for their children hits.

To summarize, you enter a percentage (or you keep the default 0.5%) and it gets
multiplied by a random number. The result is supposed to be the minimum hits
a branch should have to be displayed. But it often produced a huge number due
to the unintialization randomness. Hence some callchains were not displayed.

The following patch solves that particular problem, I'll push it to Ingo for .36
(and -stable):

diff --git a/tools/perf/util/callchain.h b/tools/perf/util/callchain.h
index 624a96c..d1349d0 100644
--- a/tools/perf/util/callchain.h
+++ b/tools/perf/util/callchain.h
@@ -51,6 +51,7 @@ static inline void callchain_init(struct callchain_node *node)
 	INIT_LIST_HEAD(&node->val);
 
 	node->parent = NULL;
+	node->children_hit = 0;
 	node->hit = 0;
 }
 





I'm not sure what you mean. The flat format is a pure dump of every callchains
that belong to a single process (or whatever kind of histogram source...).

What do you mean by separating them in the rendering?

OTOH I see another bug:

    61.70%        python  [kernel.kallsyms]  [k] xlog_sync
             0.03%
                xlog_sync
                xlog_write
                xlog_cil_push
                _xfs_log_force
                xfs_log_force
                xfs_commit_dummy_trans
                xfs_quiesce_data
                xfs_fs_sync_fs
                __sync_filesystem
                sync_one_sb
                iterate_supers
                sync_filesystems
                sys_sync
                system_call_fastpath
                0x334f0d72e7

             0.01%
                xlog_sync
                _xfs_log_force
                xfs_log_force
                xfs_commit_dummy_trans
                xfs_quiesce_data
                xfs_fs_sync_fs
                __sync_filesystem
                sync_one_sb
                iterate_supers
                sync_filesystems
                sys_sync
                system_call_fastpath
                0x334f0d72e7

I think that's what you said previously: they sometimes don't add up correctly.
The total of hit percentages from callchains should equal the total
percentage of the process they belong to.

I'm investigating to find the reason.

Thanks a lot of your reports!

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
callchain sampling bug in perf?, Christoph Hellwig, (Sun Aug 15, 3:53 pm)
Re: callchain sampling bug in perf?, Frederic Weisbecker, (Wed Aug 18, 5:57 pm)
Re: callchain sampling bug in perf?, Arnaldo Carvalho de Melo, (Thu Aug 19, 8:04 am)
Re: callchain sampling bug in perf?, Christoph Hellwig, (Fri Aug 20, 2:16 am)
Re: callchain sampling bug in perf?, Arnaldo Carvalho de Melo, (Fri Aug 20, 12:12 pm)
Re: callchain sampling bug in perf?, Frederic Weisbecker, (Fri Aug 20, 7:29 pm)
Re: callchain sampling bug in perf?, Frederic Weisbecker, (Fri Aug 20, 7:47 pm)
Re: callchain sampling bug in perf?, Christoph Hellwig, (Sat Aug 21, 7:42 am)
Re: callchain sampling bug in perf?, Christoph Hellwig, (Sat Aug 21, 7:44 am)
Re: callchain sampling bug in perf?, Christoph Hellwig, (Sat Aug 21, 7:46 am)
Re: callchain sampling bug in perf?, Frederic Weisbecker, (Sat Aug 21, 5:49 pm)
Re: callchain sampling bug in perf?, Frederic Weisbecker, (Sat Aug 21, 10:20 pm)
Re: callchain sampling bug in perf?, Christoph Hellwig, (Sun Aug 22, 1:11 am)