Changes committed to git://git.pcp.io/pcp.git master
Hemant Kumar (5):
perfevent_pmda: Add capability for alternate event groups for derived
events
perfevent_pmda: Add capability to scale perf derived events
perfevent_pmda: Add capability for perf_scale
qa/perfevent_pmda: Add tests for alternate perf derived events and scale
man5/perfevent: Added documentation for perfevent.conf
Nathan Scott (1):
qa: update perfevent test 756 output for unit test additions
man/man5/perfevent.conf.5 | 36 +
qa/756.out | 11
qa/perfevent/config/test_alternate_derived_groups.txt | 12
qa/perfevent/config/test_derived_events_scale.txt | 9
qa/perfevent/perf_event_test.c | 95 +++
src/pmdas/perfevent/configparser.h | 12
src/pmdas/perfevent/configparser.l | 135 ++++-
src/pmdas/perfevent/perfevent.conf | 41 +
src/pmdas/perfevent/perfinterface.c | 463 ++++++++++++++++--
src/pmdas/perfevent/perfinterface.h | 3
10 files changed, 737 insertions(+), 80 deletions(-)
commit 9335cb8b1b3f2aa3098d3c1a02e22eb25492f3eb
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date: Fri Apr 22 12:47:43 2016 +1000
qa: update perfevent test 756 output for unit test additions
commit 97d4ab246a614c9784060c8f1270e3152ce42cc6
Author: Hemant Kumar <hemant@xxxxxxxxxxxxxxxxxx>
Date: Fri Apr 22 11:58:07 2016 +1000
man5/perfevent: Added documentation for perfevent.conf
This patch adds documentation for alternate group events and scaling
support for the base events in derived events.
Signed-off-by: Hemant Kumar <hemant@xxxxxxxxxxxxxxxxxx>
commit b127afdbd37ead856eebab14cf284da10e944f92
Author: Hemant Kumar <hemant@xxxxxxxxxxxxxxxxxx>
Date: Fri Apr 22 11:53:45 2016 +1000
qa/perfevent_pmda: Add tests for alternate perf derived events and scale
This patch has qa test additions to the perfevent_pmda for the new
features : alternate event groups and scaling support for derived
events.
Signed-off-by: Hemant Kumar <hemant@xxxxxxxxxxxxxxxxxx>
commit 309d024bd88f9dfaa707f5456728afd222598ca2
Author: Hemant Kumar <hemant@xxxxxxxxxxxxxxxxxx>
Date: Fri Apr 22 11:51:33 2016 +1000
perfevent_pmda: Add capability for perf_scale
This patch extends the capability of scaling for counters in derived
events. The exact scale had to be mentioned in the perfevent.conf for
the previous patch. For counters whose scale is provided by the kernel,
we can use that scale directly to scale the counters. All we have to do
is mention "perf_scale" after the counter name. However, there are
counters whose scale may not be exported by the kernel. For them, we can
just use the floating point value of the scale.
An example :
In perfevent.conf file, specify :
[write_bandwidth:derived]
snbep_unc_imc0::UNC_M_CAS_COUNT:WR node perf_scale
snbep_unc_imc1::UNC_M_CAS_COUNT:WR node perf_scale
snbep_unc_imc2::UNC_M_CAS_COUNT:WR node perf_scale
snbep_unc_imc3::UNC_M_CAS_COUNT:WR node perf_scale
# pminfo | grep bandwidth
perfevent.derived.write_bandwidth.value
# pmval perfevent.derived.write_bandwidth.value
metric: perfevent.derived.write_bandwidth.value
host: <host>
semantics: cumulative counter (converting to rate)
units: count (converting to count / sec)
samples: all
cpu0 cpu8
22.56 11.11
22.59 11.10
22.53 10.98
This is the memory write bandwidth per node in MiB/s.
Scale is taken from
/sys/bus/event_source/devices/<device>/events/<event_name>.scale .
The config value of the event is taken from the libpfm library for
that event and it is searched inside the sysfs/devices/events/
directory to find a match. Once a match is found, the corresponding
event scale is fetched.
Signed-off-by: Hemant Kumar <hemant@xxxxxxxxxxxxxxxxxx>
commit cafa12f8e3096c38d3de463963fdb96380a1ac18
Author: Hemant Kumar <hemant@xxxxxxxxxxxxxxxxxx>
Date: Fri Apr 22 11:48:34 2016 +1000
perfevent_pmda: Add capability to scale perf derived events
This patch adds the basic capability to scale the perf counters for
perf derived events. Many of the hardware counters don't make sense if
the raw value is directly used. If a scale is known for a counter, it
should be given with the counter name in perfevent.conf. The scale is
a simple floating point value.
[read_bandwidth:derived]
snbep_unc_imc0::UNC_M_CAS_COUNT:RD node 0.000061
snbep_unc_imc1::UNC_M_CAS_COUNT:RD node 0.000061
snbep_unc_imc2::UNC_M_CAS_COUNT:RD node 0.000061
snbep_unc_imc3::UNC_M_CAS_COUNT:RD node 0.000061
# pmval perfevent.derived.read_bandwidth.value
metric: perfevent.derived.read_bandwidth.value
host: <host>
semantics: cumulative counter (converting to rate)
units: count (converting to count / sec)
samples: all
cpu0 cpu8
37.46 18.30
37.67 20.08
37.53 19.72
The above shows the memory read bandwidth per node on a x86
machine scaled to MiB/s.
Signed-off-by: Hemant Kumar <hemant@xxxxxxxxxxxxxxxxxx>
commit 9c3d9dd5d64c81ca4e2c0f2fb92e30bf326bc8c6
Author: Hemant Kumar <hemant@xxxxxxxxxxxxxxxxxx>
Date: Fri Apr 22 11:47:12 2016 +1000
perfevent_pmda: Add capability for alternate event groups for derived events
This patch adds a capability to the perf derived events by giving them
a layer of abstraction. A perf derived event can be generated from a
group of base counters. The derived event can be a generic metric
whereas, the base counters are specific to hardware. For e.g., say a
metric called "memory_bandwidth" is defined as a derived metric. This
is obtained by looking at the base counters. These base counters will
be different for intel and other architectures. This patch gives the
perf derived events a layer of abstraction and ensures freedom in the
naming of the derived event. They can be defined in the perfevent.conf
file as :
...
[derived_perf_event:derived]
counter1_x86
counter2_x86
counter3_x86
counter4_x86
||
counter1_ppc
counter2_ppc
counter3_ppc
||
...
Note that the counters in derived group should have been defined in
perfevent.conf. The first group where all the counters are available
will be activated and rest won't be checked. If any counter in a group
is not available, entire group is discarded and the next group is
checked. Correct syntax has been specified in the perfevent.conf file.
Signed-off-by: Hemant Kumar <hemant@xxxxxxxxxxxxxxxxxx>
|