Potential interface and potential counter groups for topdown tool
I have looked through the Family 19h PPR reference, output from “perf list -v –detail” and also some likwid counter groups to figure out combinations of counters I might be able to add as instrumentation options for a topdown command. Based on these, I have a potential combination of options to consider and a mocked up usage model as follows:
./topdown: invalid option -- '?'
warning: unknown option: ?
fatal error: usage: ./topdown -[abcistv][-o <file>] <cmd><args>...
--per-core or -a - metrics per core
--rusage or -r - show getrusage(2) information
--tree - print process tree
-o <file> - send output to file
--csv - create csv output
--verbose or -v - print verbose information
--software or -s - software counters
--ipc or i - IPC counters
--branch or -b - branch counters
--dcache - L1 dcache counters
--icache - L1 icache counters
--cache2 or -c - L2 cache counters
--cache3 - L3 cache counters
--memory - memory counters
--opcache - opcache counters
--tlb - TLB counters
--topdown or -t - topdown counters, level 1
--topdown2 - topdown counters, level 2
The first section is more generic control, e.g. CSV vs tabular, redirected to a file, all cores together vs. core by core, etc. The section below that are all various combinations of performance counters (typically five or less so we don’t need to multiplex just that option. These include the software, topdown and ipc metrics I’ve already implemented and then the following examples:
- branch miss rate and frequency branches occur
- dcache – L1 data cache rates and miss percentage
- icache – L1 icache rates and misses
- cache2 – L2 cache rates and misses
- cache3 – L3 cache rates and misses
- opcache – op cache rates and misses
- memory – memory bandwidth counters
- tlb – TLB misses for both ITLB and DTLB
- topdown – topdown level 1 metrics – standardized with Intel and AMD into <retiring, frontend, backend and bad-speculation>; this means taking the smt-contention out of the calculation on AMD
- topdown2 – topdown level 2 metrics; bring back SMT contention and then go the next level: frontend bandwith vs. latency, backend cpu vs. memory, speculation mispredict vs. machine clears and retiring heavy ops vs light ops.
This now gives me a set to slowly look at implementing and adding to the topdown tool.

Comments
Potential interface and potential counter groups for topdown tool — No Comments
HTML tags allowed in your comment: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>