perf scripts python: add alpha-profileme.py

perf report shows where Alpha ProfileMe samples land but cannot
aggregate the raw status attached to them.

Add a script that summarizes it by symbol or, with --pc, by instruction,
in the style of DCPI: the fraction of samples killed on a wrong path,
not retired, mispredicted, taken or stalled, the mean PCTR1 window
count, and trap counts by type. Mispredict and trap types are only
counted when I_STAT[TRP] is set, since they are stale otherwise.
Redirect traps are counted by their PALcode entry offset in PMPC.

On an EV7, sampling a loop whose branch tests random data reports that
branch mispredicted in 21% of its samples, and 0% with sorted data.

Signed-off-by: Matt Turner <mattst88@gmail.com>
3 files changed