2 Nov 2011 16:10
[PATCH 2/2] S/390: Enhance the user space tools for System z hardware sampling
Andreas Krebbel <krebbel <at> linux.vnet.ibm.com>
2011-11-02 15:10:58 GMT
2011-11-02 15:10:58 GMT
This patch makes use of the event mechanism to allow for dynamic enabling and disabling of the System z hardware sampling facility with the OProfile user space tools. A single virtual counter is created which can be used to enable/disable hardware sampling dynamically from user space. The counter can be used with the two events 0 and 1. Using event 0 enables use of timer based sampling while event 1 turns on hardware sampling. These values have to stay like this since the /dev/oprofile/0/event always has to match /dev/oprofile/hwsampling/hwsampler content in order to support the existing interface in parallel. Apart from 'event' only the 'kernel' and 'user' flags are evaluated by the kernel code. This adds two new opcontrol options --s390hwsampbufsize and --s390hwsamprate which can be used to set the two hardware sampling specific values at opcontrol cmdline. Signed-off-by: Andreas Krebbel <krebbel <at> linux.vnet.ibm.com> --- doc/oprofile.xml | 62 ++++++++++++++++++ events/Makefile.am | 4 - events/s390x/basic_mode_sampling_v1/events | 8 ++ events/s390x/basic_mode_sampling_v1/unit_masks | 8 ++ libop/op_cpu_type.c | 1 libop/op_cpu_type.h | 1 libop/op_events.c | 3 libpp/op_header.cpp | 10 +- utils/opcontrol | 84 +++++++++++++++++++++++++ utils/ophelp.c | 4 +(Continue reading)
RSS Feed