[PATCH] perf, tools: Add script to easily decode addresses

2014-11-13 Thread Andi Kleen
From: Andi Kleen [This is an older patch, still applies and is still useful] Haswell has the nice ability to record addresses and l1 hits for cycles:pp and several other PEBS events. Normally we just throw this data away. It can be already record with -d, but perf was lacking a nice way to disp

Re: [PATCH] perf, tools: Add script to easily decode addresses

2014-03-16 Thread Namhyung Kim
Hi Andi, On Thu, 13 Mar 2014 12:53:58 -0700, Andi Kleen wrote: > +def MASK(bits): > +return (1 << bits) - 1 > + > +def decode_bits(val, names, bits, shift): > +v = (val >> shift) & MASK(bits) > +s = "" > +for name, index in zip(names, range(0, len(names))): > +if v & (1 <<

[PATCH] perf, tools: Add script to easily decode addresses

2014-03-13 Thread Andi Kleen
From: Andi Kleen Haswell has the nice ability to record addresses and l1 hits for cycles:pp and several other PEBS events. Normally we just throw this data away. It can be already record with -d, but perf was lacking a nice way to display it. This patch adds a perf script to display this data.