| Newsgroups |
gmane.comp.sysutils.pcp |
| Message-ID |
<[email protected]> |
--yabbadabbadoo
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
[performancecopilot/pcp] Pull request updated by hkshaw1990 ( https://githu=
b.com/hkshaw1990 ) :
#277 perfevent_pmda: Add PMU events exported from kernel ( https://github.=
com/performancecopilot/pcp/pull/277 )
The perfevent pmda gets the event definitions from the libpfm library. So,=
to add a new platform counter, we need to add its definition to the libpfm=
library and use it here. This patch is the first step towards removing tha=
t dependency. It parses the kernel exported PMUs and their events from /sys=
/bus/event_source/devices, and calculates the config values for each of the=
se events. However, we don't want to open all the events at once. Only the =
events which are mentioned in perfevent.conf under [dynamic] section will b=
e opened. But, all the dynamic events will be listed with pminfo. For e.g. =
: $ pminfo [...] perfevent.hwcounters.software.context-switches.dutycycle p=
erfevent.hwcounters.software.context-switches.value perfevent.hwcounters.so=
ftware.page-faults.dutycycle perfevent.hwcounters.software.page-faults.valu=
e [...] perfevent.hwcounters.power.energy-cores.dutycycle perfevent.hwcount=
ers.power.energy-cores.value perfevent.hwcounters.power.energy-ram.dutycycl=
e perfevent.hwcounters.power.energy-ram.value [...] perfevent.hwcounters.ms=
r.mperf.dutycycle perfevent.hwcounters.msr.mperf.value perfevent.hwcounters=
.msr.aperf.dutycycle perfevent.hwcounters.msr.aperf.value [...] perfevent.h=
wcounters.cpu.mem-stores.dutycycle perfevent.hwcounters.cpu.mem-stores.valu=
e perfevent.hwcounters.cpu.tx-capacity.dutycycle perfevent.hwcounters.cpu.t=
x-capacity.value perfevent.hwcounters.cpu.mem-loads.dutycycle perfevent.hwc=
ounters.cpu.mem-loads.value perfevent.hwcounters.cpu.branch-misses.dutycycl=
e perfevent.hwcounters.cpu.branch-misses.value [...]
Now, say only the event cpu.branch-instructions is mentioned under [dynami=
c] section in the perfevent.conf file. In this case, we can only read the v=
alues for this event, all other dynamic events are disabled and will return=
invalid value.
$ pmval perfevent.hwcounters.cpu.branch-misses.value
metric: perfevent.hwcounters.cpu.branch-misses.value host: <> semantics: c=
umulative counter (converting to rate) units: count (converting to count / =
sec) samples: all
cpu0 cpu1 cpu2 cpu3 3.028E+05 3.772E+05 3.757E+05 2.638E+05 4.382E+05 2.71=
6E+05 2.888E+05
cpu.mem-loads is not added in the perfevent.conf file, so we won't be able=
to get any values out of it, even though, we can see it under pminfo.
$ pmval perfevent.hwcounters.cpu.mem-loads.value
metric: perfevent.hwcounters.cpu.mem-loads.value host: <> semantics: cumul=
ative counter (converting to rate) units: count (converting to count / sec)=
samples: all No values available No values available
This patch also adds software events whose configuration values are availa=
ble under linux/perf_event.h : [...] perfevent.hwcounters.software.cpu-migr=
ations.dutycycle perfevent.hwcounters.software.cpu-migrations.value perfeve=
nt.hwcounters.software.context-switches.dutycycle perfevent.hwcounters.soft=
ware.context-switches.value perfevent.hwcounters.software.page-faults.dutyc=
ycle perfevent.hwcounters.software.page-faults.value [...]
--yabbadabbadoo
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
[performancecopilot/pcp] Pull request updated by <a href=3D"https://github=
.com/hkshaw1990">hkshaw1990</a>:<p>
<a href=3D"https://github.com/performancecopilot/pcp/pull/277">#277 perfev=
ent_pmda: Add PMU events exported from kernel</a><br>
<p>The perfevent pmda gets the event definitions from the libpfm
library. So, to add a new platform counter, we need to add its
definition to the libpfm library and use it here. This patch is the
first step towards removing that dependency. It parses the kernel
exported PMUs and their events from /sys/bus/event_source/devices, and
calculates the config values for each of these events. However, we don't
want to open all the events at once. Only the events which are mentioned
in perfevent.conf under [dynamic] section will be opened. But, all the
dynamic events will be listed with pminfo.
For e.g. :
$ pminfo
[...]
perfevent.hwcounters.software.context-switches.dutycycle
perfevent.hwcounters.software.context-switches.value
perfevent.hwcounters.software.page-faults.dutycycle
perfevent.hwcounters.software.page-faults.value
[...]
perfevent.hwcounters.power.energy-cores.dutycycle
perfevent.hwcounters.power.energy-cores.value
perfevent.hwcounters.power.energy-ram.dutycycle
perfevent.hwcounters.power.energy-ram.value
[...]
perfevent.hwcounters.msr.mperf.dutycycle
perfevent.hwcounters.msr.mperf.value
perfevent.hwcounters.msr.aperf.dutycycle
perfevent.hwcounters.msr.aperf.value
[...]
perfevent.hwcounters.cpu.mem-stores.dutycycle
perfevent.hwcounters.cpu.mem-stores.value
perfevent.hwcounters.cpu.tx-capacity.dutycycle
perfevent.hwcounters.cpu.tx-capacity.value
perfevent.hwcounters.cpu.mem-loads.dutycycle
perfevent.hwcounters.cpu.mem-loads.value
perfevent.hwcounters.cpu.branch-misses.dutycycle
perfevent.hwcounters.cpu.branch-misses.value
[...]</p>
<p>Now, say only the event cpu.branch-instructions is mentioned under
[dynamic] section in the perfevent.conf file. In this case, we can only
read the values for this event, all other dynamic events are disabled
and will return invalid value.</p>
<p>$ pmval perfevent.hwcounters.cpu.branch-misses.value</p>
<p>metric: perfevent.hwcounters.cpu.branch-misses.value
host: <>
semantics: cumulative counter (converting to rate)
units: count (converting to count / sec)
samples: all</p>
<pre><code> <span class=3D"pln">cpu0</span> <spa=
n class=3D"pln">cpu1</span> <span class=3D"pln">cpu2</span=
> <span class=3D"pln">cpu3</span>
<span class=3D"dec">3.028E+05</span> <span class=3D"de=
c">3.772E+05</span> <span class=3D"dec">3.757E+05</span> =
<span class=3D"dec">2.638E+05</span>
<span class=3D"dec">4.382E+05</span> <span class=3D"de=
c">2.716E+05</span> <span class=3D"dec">2.888E+05</span>
</code></pre>
<p>cpu.mem-loads is not added in the perfevent.conf file, so we won't be
able to get any values out of it, even though, we can see it under pminfo.=
</p>
<p>$ pmval perfevent.hwcounters.cpu.mem-loads.value</p>
<p>metric: perfevent.hwcounters.cpu.mem-loads.value
host: <>
semantics: cumulative counter (converting to rate)
units: count (converting to count / sec)
samples: all
No values available
No values available</p>
<p>This patch also adds software events whose configuration values are
available under linux/perf_event.h :
[...]
perfevent.hwcounters.software.cpu-migrations.dutycycle
perfevent.hwcounters.software.cpu-migrations.value
perfevent.hwcounters.software.context-switches.dutycycle
perfevent.hwcounters.software.context-switches.value
perfevent.hwcounters.software.page-faults.dutycycle
perfevent.hwcounters.software.page-faults.value
[...]</p>
<p>
<div width=3D"1" style=3D"color:white;clear:both">_._,_._,_</div>
<hr>
Groups.io Links:<p>
You receive all messages sent to this group.
<p>
<a target=3D"_blank" href=3D"https://groups.io/g/pcp/message/15295">View/R=
eply Online (#15295)</a> |
<a target=3D"_blank" href=3D"mailto:[email protected]?subject=3DRe:%20%5Bpcp=
%5D%20Pull%20Request%20Updated%20%23github">Reply To Group</a>
| <a target=3D"_blank" href=3D"mailto:?subject=3DRe:%20%5Bpcp%5D%20Pul=
l%20Request%20Updated%20%23github">Reply To Sender</a>
|
<a target=3D"_blank" href=3D"https://groups.io/mt/4429525?uid=3D174580">=
Mute This Topic</a>
=20
| <a href=3D"https://groups.io/g/pcp/post">New Topic</a><br>
<a href=3D"https://groups.io/mk?hashtag=3Dgithub&subid=3D354243">Mute #git=
hub</a>
<p>
<p>pcp mailing list<br />[email protected]<br /><a href=3D"https://groups.io/g=
/pcp/messages" target=3D"_blank">https://groups.io/g/pcp/messages</a></p>
<a href=3D"https://groups.io/g/pcp/editsub?uid=3D174580">Change Your Subsc=
ription</a><br>
<a href=3D"https://groups.io/g/pcp">Group Home</a><br>
<a href=3D"mailto:[email protected]">Contact Group Owner</a><br>
<a href=3D"https://groups.io/static/tos">Terms Of Service</a><br>
<a href=3D"https://groups.io/g/pcp/leave/354243/563757577/xyzzy">Unsubscri=
be From This Group</a><br>
<div width=3D"1" style=3D"color:white;clear:both">_._,_._,_</div>
--yabbadabbadoo--