[pcp:master] reported: perfevent_pmda: Add PMU events exported from kernel #github

[email protected] Integration <[email protected]> Mon, 20 Feb 2017 22:39:09 -0800
Newsgroups gmane.comp.sysutils.pcp
Message-ID <[email protected]>
--yabbadabbadoo
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable



[pcp:master] New Comment on Pull Request #277 perfevent_pmda: Add PMU event=
s exported from kernel ( https://github.com/performancecopilot/pcp/pull/277=
 )
By natoscott ( https://github.com/natoscott ) :

The approach used seems valid to me @hkshaw1990

For testing, esp. fetch_events, parse_event_string and friends - we could =
have a testing mode where we prefix DEV_DIR ("/sys/bus/event_source/devices=
/") with a path, allowing injection of test paths/files. See the Linux PMDA=
 and the LINUX_STATSPATH env variable which is used by a number of tests.

In this case, a LD_LIBRARY_PATH interceptor for perf_event_open so that ac=
tual kernel calls are not made for the faked event counters would be needed=
 too I think.

Unrelated note, but this part may not be valid ...

--- a/src/pmdas/perfevent/pmda.c +++ b/src/pmdas/perfevent/pmda.c @@ -543,=
7 +545,7 @@ static char normalize metric_name(const char *name) { for(p =3D=
 res; *p !=3D '\0'; p++) { - if( !isalnum((int)*p) && *p !=3D ' ') + if( !i=
salnum((int)*p) && *p !=3D ' ' && *p !=3D '.' && *p !=3D '-') { *p =3D ' ';=
 / "underscore" - new name */ }

The metric name components should not contain dots or hyphens - see the SY=
NTAX section on pmns(5) man page.



--yabbadabbadoo
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable





[pcp:master] New Comment on Pull Request <a href=3D"https://github.com/per=
formancecopilot/pcp/pull/277">#277 perfevent_pmda: Add PMU events exported =
from kernel</a><br>
By <a href=3D"https://github.com/natoscott">natoscott</a>:<p>
<p>The approach used seems valid to me @hkshaw1990</p>

<p>For testing, esp. fetch_events, parse_event_string and friends - we cou=
ld have a testing mode where we prefix DEV_DIR (&quot;/sys/bus/event_source=
/devices/&quot;) with a path, allowing injection of test paths/files.  See =
the Linux PMDA and the LINUX_STATSPATH env variable which is used by a numb=
er of tests.</p>

<p>In this case, a LD_LIBRARY_PATH interceptor for perf_event_open so that=
 actual kernel calls are not made for the faked event counters would be nee=
ded too I think.</p>

<p>Unrelated note, but this part may not be valid ...</p>

<p>--- a/src/pmdas/perfevent/pmda.c
+++ b/src/pmdas/perfevent/pmda.c
@@ -543,7 +545,7 @@ static char <em>normalize<em>metric_name(const char *n=
ame)
     {
         for(p =3D res; *p !=3D '\0'; p++)
         {
-            if( !isalnum((int)*p) &amp;&amp; *p !=3D '</em>')
+            if( !isalnum((int)*p) &amp;&amp; *p !=3D '<em>' &amp;&amp; *p=
 !=3D '.' &amp;&amp; *p !=3D '-')
             {
                 *p =3D '</em>'; /</em> &quot;underscore&quot; - new name =
*/
             }</p>

<p>The metric name components should not contain dots or hyphens - see the
SYNTAX section on pmns(5) man page.</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/15234">View/R=
eply Online (#15234)</a> |


  <a target=3D"_blank" href=3D"mailto:[email protected]?subject=3DRe:%20%5Bpcp=
%5D%20%5Bpcp%3Amaster%5D%20reported%3A%20perfevent_pmda%3A%20Add%20PMU%20ev=
ents%20exported%20from%20kernel%20%23github">Reply To Group</a>
  
    | <a target=3D"_blank" href=3D"mailto:?subject=3DRe:%20%5Bpcp%5D%20%5B=
pcp%3Amaster%5D%20reported%3A%20perfevent_pmda%3A%20Add%20PMU%20events%20ex=
ported%20from%20kernel%20%23github">Reply To Sender</a>
  


|


  <a target=3D"_blank" href=3D"https://groups.io/mt/4404698?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--