perf/amd/uncore: Allow F19h user coreid, threadmask, and sliceid specification
authorKim Phillips <kim.phillips@amd.com>
Mon, 21 Sep 2020 14:43:29 +0000 (09:43 -0500)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 24 Sep 2020 13:55:50 +0000 (15:55 +0200)
commit87a54a1fd525f2af8d82becf583c7e836918cf22
treec6f96b406b2b1c1c8502e606a7dd62e72f9fdd9d
parent8170f386f19ca7120393c957d4bfbdc07f964ab6
perf/amd/uncore: Allow F19h user coreid, threadmask, and sliceid specification

On Family 19h, the driver checks for a populated 2-bit threadmask in
order to establish that the user wants to measure individual slices,
individual cores (only one can be measured at a time), and lets
the user also directly specify enallcores and/or enallslices if
desired.

Example F19h invocation to measure L3 accesses (event 4, umask 0xff)
by the first thread (id 0 -> mask 0x1) of the first core (id 0) on the
first slice (id 0):

perf stat -a -e instructions,amd_l3/umask=0xff,event=0x4,coreid=0,threadmask=1,sliceid=0,enallcores=0,enallslices=0/ <workload>

Signed-off-by: Kim Phillips <kim.phillips@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20200921144330.6331-4-kim.phillips@amd.com
arch/x86/events/amd/uncore.c