[1/5] powerpc/perf: Drop the branch sample when 'from' cannot be fetched

Michael Ellerman mpe at ellerman.id.au
Mon Jul 27 14:19:15 AEST 2015

On Tue, 2015-30-06 at 08:20:27 UTC, Anshuman Khandual wrote:
> BHRB (Branch History Rolling Buffer) is a rolling buffer. Hence we
> might end up in a situation where we have read one target address
> but when we try to read the next entry indicating the from address
> of the target address, the buffer just overflows. In this case, the
> captured from address will be zero which indicates the end of the
> buffer.

Right. But with SMT8 the size of the buffer is very small, so we will actually
hit this case somewhat often. When we originally wrote this we decided it was
better to get some information, ie. the from address, than no information at

> 	This patch drops the entire branch record which would have
> otherwise confused the user space tools.

Does it confuse the tools? Can you show me before/after output from perf?

I'm not opposed to changing this but we need to be 100% sure it's the best


More information about the Linuxppc-dev mailing list