lkml.org 
[lkml]   [2012]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH] perf: Add a few generic stalled-cycles events
On 11.10.12 18:28:39, Sukadev Bhattiprolu wrote:
> + { .type = PERF_TYPE_HARDWARE, .config = PERF_COUNT_HW_STALLED_CYCLES_FIXED_POINT },
> + { .type = PERF_TYPE_HARDWARE, .config = PERF_COUNT_HW_STALLED_CYCLES_LOAD_STORE },
> + { .type = PERF_TYPE_HARDWARE, .config = PERF_COUNT_HW_STALLED_CYCLES_INSTRUCTION_FETCH },
> + { .type = PERF_TYPE_HARDWARE, .config = PERF_COUNT_HW_STALLED_CYCLES_BRANCH },

Instead of adding new hardware event types I would prefer to use raw
events in conjunction with sysfs, see e.g. the intel-uncore
implementation. Something like:

$ find /sys/bus/event_source/devices/cpu/events/
...
/sys/bus/event_source/devices/cpu/events/stalled-cycles-fixed-point
/sys/bus/event_source/devices/cpu/events/stalled-cycles-load-store
/sys/bus/event_source/devices/cpu/events/stalled-cycles-instruction-fetch
/sys/bus/event_source/devices/cpu/events/stalled-cycles-branch
...
$ cat /sys/bus/event_source/devices/cpu/events/stalled-cycles-fixed-point
event=0xff,umask=0x00

Perf tool works then out-of-the-box with:

$ perf record -e cpu/stalled-cycles-fixed-point/ ...

The event string can easily be reused by other architectures as a
quasi standard.

-Robert

--
Advanced Micro Devices, Inc.
Operating System Research Center



\
 
 \ /
  Last update: 2012-10-15 18:41    [W:0.159 / U:0.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site