Re: [PATCH 0/2] perfcounter: callchains with perf report
From: Paul Mackerras
Date: Sun Jun 28 2009 - 19:41:18 EST
Frederic Weisbecker writes:
> On Sat, Jun 27, 2009 at 11:12:47AM +1000, Paul Mackerras wrote:
>
> > That means I need to make some changes to builtin-report.c to ignore
> > zero addresses. I may need to add stuff to look for and use unwind
> > tables as well, if we want completely accurate call chains.
>
>
> Well, I guess I can ignore them in my further patches.
> But wouldn't it be better to discard them from the kernel?
> Unless it's somewhat useful to know we had an unknown entry?
If we discard the entries then userspace doesn't know which entries
were discarded, or whether any were discarded. As it is, userspace
can know that the second value after PERF_CONTEXT_KERNEL/USER is a LR
value or zero, and the third value is from the second stack frame (or
zero). If we discarded the entries then userspace wouldn't know
exactly where the second and third values came from, which would make
it harder to use unwind or traceback tables to work out more
accurately what the call chain was.
I would be open to replacing the bogus entries with some other
distinguishable value rather than zero if you think that would be
better.
Paul.
--
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/