Hi,
The PAPI pmda has gone through a fair bit of work. The changes can be
found at: git://sourceware.org/git/pcpfans.git lberk/papi or gitweb:
https://www.sourceware.org/git/gitweb.cgi?p=pcpfans.git;a=shortlog;h=refs/heads/lberk/papi
This iteration features much improved internals, additional qa,
dynamically generated pmns and auto_enable functionality (complimentary
to the standard, and expected control.{enable,disable} metrics). As
discussed on the list I've added qa cases which take the traditional
route of using dbpmda, as well as a case which uses -hlocal: to track
stateful changes. qa/967 in particular tests the auto_enable work with
dbpmda, ensuring the it can be turned off (if desired), in addition to
timeout's as described by the accompanied documentation. If anybody has
suggestions or constructive criticism I'd be happy to work those in as
well.
One area I'd appreciate second opinions on, is how to deal with the
variable number of metrics available on different hardware. I've
attempted to keep qa tests to the 'basic' counters (TOT_INS as an
example) for the most part. However, in the case of testing for
ECNFLCT errors with/without multiplexing, this may require enumerating
through metrics with a less common overlap in hardware. As a starting
point I've simply used 799 with the counters that would have caused an
error on my machine, however I'm aware this is not the case for others.
Thoughts appreciated.
diffstat and commit logs attached below,
Cheers,
Lukas
build/rpm/fedora.spec | 8
man/man1/pmdapapi.1 | 22
qa/799 | 385 ++
qa/799.out | 153 +
qa/813 | 118
qa/813.out | 84
qa/903 | 6
qa/914 | 23
qa/914.out | 43
qa/967 | 172 +
qa/967.out | 186 +
qa/group | 12
src/pmdas/papi/Install | 8
src/pmdas/papi/help | 116
src/pmdas/papi/papi.c | 6928 ++++++++++++++++++++--------------------------
src/pmdas/papi/pmdapapi.1 | 116
src/pmdas/papi/pmns | 1631 ++++------
17 files changed, 4910 insertions(+), 5101 deletions(-)
commit b6f75582968a4d3e0ec377af95675127ece7da6c
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Nov 12 09:16:46 2014 -0500
Update qa/914 and respective output
We've added new metrics to the papi.control group. Updating the
testcase to reflect these changes.
commit b89820cb1c54b66333c9b7706089ca1fe96b80e9
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Nov 5 23:03:53 2014 -0500
Add qa/967 to test the pmdapapi auto_enable functionality
In this testcase we take two dbpmda runs;
First, we run a check that the existing enable/disable functionality
works normally when papi.control.auto_enable is disabled (set to 0)
Second, we check that the auto_enable timeout works by setting it to
a low timeout (5 seconds), fetching a value, checking that
papi.control.status reports the correct timeout and a valid papi
VALUE. After which we wait just over 5 seconds and re-fetch the
papi.control.status value, which (should) show the metric is no
longer being counted and that papi has stopped.
This second test implicitly checks the functionality of dynamically
starting a counter.
commit fcee1e2342ed3788a30ec91951051288b5f12aa2
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Nov 5 12:31:57 2014 -0500
Add helppath variable
helppath is used in various locations throughout the pmda, dropped
by accident when merging the branches.
commit a6cbff6790ba51932f59b6d6a8e6544debf23e7f
Author: Frank Ch. Eigler <fche@xxxxxxxxxx>
Date: Mon Nov 3 21:48:55 2014 -0500
papi pmda: tweak auto_afid name & commentary
commit 9b4654d00873cdb03c611a282574018634596397
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Nov 3 21:47:34 2014 -0500
Tweak pmdapapi docs
Add the unit (seconds) to the papi.control.auto_enable metric and
mention how one would disable the auto_enable functionality if needed
in the man page.
Signed-off-by: Lukas Berk <lberk@xxxxxxxxxx>
commit 2f3729268714c8bce74906242350d0277410de82
Author: Frank Ch. Eigler <fche@xxxxxxxxxx>
Date: Mon Nov 3 15:55:41 2014 -0500
papi pmda: add counter auto-enable on fetch
By reinterpreting the papi_info[].metric_enabled as a timestamp rather
than a boolean, and a small bit of logic, we get automatic enablement
of PAPI metric/counters upon pmfetch. This allows PAPI metrics to be
used with plain old pmlogger, pmval, etc., without necessary manual
pmstore's. Counters are retired based on a timeout mechanism,
assisted by pmaf(3). The papi.control.status metric is enhanced to
show the remaining lifespan of the counters, and to make it more safe
& reliable.
A new papi.control.auto_enable metric is available to set the timeout
(default 120 seconds). The Install script runs a papi.control.reset
operation to avoid leaving the counters running for even that long
after the post-install metric/value checks.
The previous pmstore mechanism is left in place unchanged, and
overrides the automatic scheme.
commit 61111a6b50224db18e6a9e5da211e4558ec933f4
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Nov 5 11:49:57 2014 -0500
Add pmdaText call in papi_text
Somewhere along the way, rebasing ate the call
commit 4ae54fc9bcf2a56bace14e7166b126fccbf31284
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Nov 5 10:40:47 2014 -0500
Update qa/799 with -hlocal: test against real values
799 will now grab 'real' values from the current papi install.
This testcase now also includes installing and uninstalling
the pmda.
commit ce8a1aecca93352d56af89de4de96a951ee1fc40
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Nov 5 10:34:18 2014 -0500
Add dbpmda testcase for pmdapapi
Add an additional testcase for pmdapapi, ensure a value can be
enabled, checked, and disabled through dbpmda
commit 27f2f6ee11dc7d596fb5304bb1d7bf9ed81636c4
Author: Frank Ch. Eigler <fche@xxxxxxxxxx>
Date: Tue Oct 14 17:16:53 2014 -0400
papi/pmda: collapse metric addition/removal path
The add- and remove-metric operations are almost identical, with
respect to the need to save previous counter values, pause, then
restart with newborn/surviving metrics. With the recent
metric_enabled flag, the two code paths can be effectively merged.
Gone are add_metric(), remove_metric(), setup_eventset(), stop_papi(),
and the number_of_active_counters global. Left notes for a few more
candidates.
Welcome refresh_metrics() and a collapsed-case .enable/.disable
pmstore handler, a trivial .reset handler.
Tested by hand, running pmstore ops to enable/disable multiple
individual counters, including erroneous names, while monitoring the
valid counters for consistent progress. Mechanical testing
forthcoming.
commit 6de78cfc602149252a7d048192be165ea54a88e2
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Tue Oct 14 14:16:49 2014 -0400
Make status_string[] variable static
Avoid any type of memory corruption bug by ensuring the variable
won't already be unwound.
commit 5a4ac8644992dd28bdfcf7bcab6f2f324df1aef8
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Tue Oct 14 11:27:40 2014 -0400
Fix a papi_info.position bug in remove_metric
Include a new papi.info var (metric_enabled) to track if the metric
was enabled. This leaves us to simply assign the position in the
order we (re)add the metric to the eventset
commit aed29825b29a913b6558a4c609f04aed85e85a3a
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Thu Oct 9 16:16:07 2014 -0400
Tidy up setup_eventset()
Pick a style of retval assignment/comparison and stick with it.
Report papi errors in a uniform way
commit 9390154052416c87d9b7153cb20d89a0d412de93
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Thu Oct 9 16:02:56 2014 -0400
Refactor the eventset setup which is done in papi_internal_init and
remove_metric
We were only partially setting up the eventset in remove_metric (due
to working around papi bug). Refactor this and ensure it's done properly
both times.
commit 57deba3642bb8a29f01706d8f7e83bfad482c717
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Thu Oct 9 13:39:24 2014 -0400
Refactor {add,remove}_metric functions
We can refactor the functions to put stopping and saving the values
in its own function, while making the return values consistent.
commit b1fe23bd105de11de1d35c1b9cd24c68817d1ece
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Oct 6 19:06:18 2014 -0400
Reduce the string manipulation functions usage in papi_internal_init
By reusing the same data structures and sizes that papi defines for
symbols we can directly memcpy the values in without having to loop
so many times and tokenizing everything.
commit f649a825fa3a0984d1eba2abaea7a637f31ca0f9
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Oct 6 12:20:59 2014 -0400
Switch to local, stack allocated string for papi.control.status metric
Instead of realloc'ing multiple times a call, lets instead, allocate
one string (once) and simplify the process
commit 95792977870c1b681d88d04480c78b0c69e6298d
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Oct 6 09:44:56 2014 -0400
Enable papi multiplexing
Enabling multiplexing will make the pmda a bit more flexible for counting
metrics for longer periods of time and for hardware with fewer hardware
counters
commit d74f1ed49d2c4824262ba2edbfe23931f5b0f79c
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Fri Oct 3 15:20:44 2014 -0400
Remove check_event_exists function
If the event requested isn't in already in papi_info, add_metric
and remove metric won't get called at all anyways, this check is
redundant
commit 85e84ac0eb4a23d96a45b5135e18718d1e16398b
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Fri Oct 3 15:08:31 2014 -0400
Shift papi_event_code variable into papi_event_type_t var in papi_info
We can reduce the number of variables we need and simply use the data
structures already there.
commit e3ef5fa7990901b13006abec8194fd9f8eea4edb
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Thu Oct 2 15:02:56 2014 -0400
Add skeleton of new pmdapapi qa test - qa/799
Base for new pmdapapi test
commit 23a5321803f6d5169f0953ddf8efd83d0ae8fcd6
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Thu Oct 2 12:04:37 2014 -0400
Make adding metrics to the current eventset more robust
If we attempt to add an event that cannot be added (for example,
if two metrics can't be counted at the same time), we should make
the attempt, but still restart papi and run the other metrics if
possible. If debugging is turned on, output the error message to
the log file.
commit 767e9f831b19da0f5ff385d633649baf9399656b
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Oct 1 19:13:59 2014 -0400
Change papi.control.status to include metric values and fix papi_children
Several smaller nits. papi.control.status should now include the current
values being counted. We also now use a __pmnsTree var to keep track
of the dynamic metrics we've added. This makes both papi_children much
eaiser to manage as well as papi_name_lookup.
commit c96c3a12d8702a2b452fff7a393af07b143641b6
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Tue Sep 23 12:17:17 2014 -0400
Refactor bits of {add,remove}_metric and small cleanups
We can move the check to see if the event specified is valid outside
the function and reduce the repeated code. Also remove a loop that
we no longer need.
commit cd7c33f08b8c757fdd48db5d3f4c26392506ad99
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 22 16:16:59 2014 -0400
papi_state returns a bitmask, so do a bitwise comparison, not direct
compare.
instead of a direct comparison with PAPI_<state> we should just do a bitwise
AND to confirm the state
commit 93bed08ea89700c946c85c0ad92dfbba4d80d2d3
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 22 14:50:03 2014 -0400
Remove papi_string_status and inline the former function
The aforementioned function was incorrect in using a case statement
and assuming only one would be hit. The papi state is a bitmask,
and we should be able to return more than one condition. It is
also potentially useful to output the last known values of each active
metric.
commit 90707b3d01de01592e796f3c45127261dfbf2fc7
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 22 14:48:45 2014 -0400
Add checks around papi_children realloc statements
realloc's need a check to ensure the allocation returned with no errors.
If an error was found, throw __pmNoMem
commit 86249c03ec18e4a8a7ebd5cbb2f7d773d4f13d32
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Fri Sep 19 18:07:05 2014 -0400
Remove internal enable and disable strings for papi metrics
We shouldn't require the use of these strings to pass back and forth.
commit 068f07ee2e87a28446fb0fe123d62cb5b049ab9f
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Fri Sep 19 14:14:18 2014 -0400
Implement papi.control.reset metric
papi.control.reset will zero the current papi values being counted
one must use papi.control.disable if they'd like the values to no
longer be in the active eventset
commit e8875700ab017c10bf655e8649233d97eaf730e9
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Thu Sep 18 21:18:40 2014 -0400
Remove remove second function paramter from remove_metric
Both parameters being passed were values from papi_info, if we
instead pass the specific position within the papi_info array,
we can determine the other values we need without passing extra
arguments
commit 85e9d659d660ca1c4683546bec67fe9b0f310d6e
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Thu Sep 18 18:36:10 2014 -0400
Assign papi help text in papi_internal_init and only lookup values in
papi_text
Assigning the values of {short,long}_descr can be done within
papi_internal_init,
which allows us to simply recall the values in papi_text.
commit f4ecd6d059fa3b746ec4b3e71342c57e1ea07c4e
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Sep 17 18:30:20 2014 -0400
Drop unneeded parameter from check_papi_state
Drop unneeded parameter from the check_papi_state() function, and
don't mix up papi error values and pcp error values that we could
return. Stick to papi.
commit 4445ecb274827a9bf3370147b6af5f5ed7c6e7cd
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Sep 17 11:59:46 2014 -0400
Rename papi_pmid function to papi_name_lookup as requested
Rename function to be more descriptive
commit 8866f8e5ad64ac377a31f76aa981350c2fdb0e27
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Sep 17 11:51:19 2014 -0400
Update the papi_fetchcallback mechanism for passing metric data
No longer loop through all the available events (as we generate the
pmns dynamically now), just use the idp->item that we're passed
commit 16f79091795539f5abce73fe9ef5a728674796c4
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Tue Sep 16 11:46:56 2014 -0400
Add papi_children callback for generating the pmns dynamically
Order the papi metrics under papi.system.metric (expecting expansion
of metrics to capture pid/tid specifics later) and dynamically
generate the list of metrics based on what's actually available on
the current hardware.
commit 7d21807bf0a41234a273b6784c2f00b5cc8349a7
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Sep 10 10:38:15 2014 -0400
Make use of strtok in papi_pmid
Use strtok in pmda_papi function for a cleaner function
commit b5601e2944328174dc37f22da355187ba7fbc5d5
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Tue Sep 9 18:58:45 2014 -0400
Move PAPI_event_info_t var into papi_info for metric descriptions
By moving the PAPI_event_info_t varible into the papi_info struct
we can ensure the references to the descriptions are persistent.
commit c23abe1f5f47feb3512fbd4a3e78060b9f907bc0
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Tue Sep 9 18:26:11 2014 -0400
First step towards a fully dynamic papipmda (including pmns)
Remove the papi_info[].pmns_position variable and set_pmns_position
fuction. Likewise, only add papi metrics to papi_info if they're
actually present on the current hardware. In the future we might
need to add in another papi.'system'.metric to make the pmns fully
automatically generated and match with the various userspace programs
commit 7cfc4eeb7a6cf0741da71ea33d7696009201cc1b
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 8 12:22:33 2014 -0400
Rework saving previous papi values when adding/removing metrics
Previously, when we added or removed a metric that we were
tracking, we'd lose the previous values and all metrics would
restart from zero. By adding a prev_metric value in papi_info,
we can systematically save the values, and add it to the atom->ull
in the fetchcallback
commit f8a41d7eda518a8b4f6d980f0b78e52ecbe39472
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 8 10:10:40 2014 -0400
Be more consistent with internal use of variable names
Remove all mentions of 'sts' and consistenly use retval
commit 82bb1916134d1a8895e626e1ed83f70e08de2975
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 8 09:45:47 2014 -0400
Account for control and available clusters in papi_text
papi_text was returning results from PAPI_enum_event which matched
the pcp item number, even when the metrics were in different cluters
(control and available, respectively).
commit 5c8637452f2696afb5bccd2005841a2a0c8695d1
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Fri Sep 5 15:34:56 2014 -0400
Add debug warning and return PM_ERR_CONV to papi.control.enable
Currently papi.control.enable will just silently fail if presented
with metrics it can't add, fix that.
*src/pmdas/papi/papi.c - add debug warning and return the error in
papi_store for enable
commit 1ad8894cd9ab9e78a6e09dea615d346a1d82b4a8
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Tue Sep 23 12:17:17 2014 -0400
Refactor bits of {add,remove}_metric and small cleanups
We can move the check to see if the event specified is valid outside
the function and reduce the repeated code. Also remove a loop that
we no longer need.
commit d45b7a5a69b0bb78d35769a1f88dac41e35609ab
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 22 16:16:59 2014 -0400
papi_state returns a bitmask, so do a bitwise comparison, not direct
compare.
instead of a direct comparison with PAPI_<state> we should just do a bitwise
AND to confirm the state
commit 785be8d59b21da97ce8ec460a858774eb9884c7f
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 22 14:50:03 2014 -0400
Remove papi_string_status and inline the former function
The aforementioned function was incorrect in using a case statement
and assuming only one would be hit. The papi state is a bitmask,
and we should be able to return more than one condition. It is
also potentially useful to output the last known values of each active
metric.
commit 08d6fd7ed266ab1cd22b6eeac23e0ed526a3cf9b
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 22 14:48:45 2014 -0400
Add checks around papi_children realloc statements
realloc's need a check to ensure the allocation returned with no errors.
If an error was found, throw __pmNoMem
commit 234c037734ec2f62b5cfb721591b503584d95aa7
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Fri Sep 19 18:07:05 2014 -0400
Remove internal enable and disable strings for papi metrics
We shouldn't require the use of these strings to pass back and forth.
commit 5242fa14be6e4e14e266f4d96bf730068fc77497
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Fri Sep 19 14:14:18 2014 -0400
Implement papi.control.reset metric
papi.control.reset will zero the current papi values being counted
one must use papi.control.disable if they'd like the values to no
longer be in the active eventset
commit 4e50f21254b62781dfed420634aeb19401b878ba
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Thu Sep 18 21:18:40 2014 -0400
Remove remove second function paramter from remove_metric
Both parameters being passed were values from papi_info, if we
instead pass the specific position within the papi_info array,
we can determine the other values we need without passing extra
arguments
commit 55c19eb5d1e82fb9044bb6c23343eda936a1b795
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Thu Sep 18 18:36:10 2014 -0400
Assign papi help text in papi_internal_init and only lookup values in
papi_text
Assigning the values of {short,long}_descr can be done within
papi_internal_init,
which allows us to simply recall the values in papi_text.
commit 20adda001f11c425000ae46698d9c046dfc8c996
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Sep 17 18:30:20 2014 -0400
Drop unneeded parameter from check_papi_state
Drop unneeded parameter from the check_papi_state() function, and
don't mix up papi error values and pcp error values that we could
return. Stick to papi.
commit c2041d73e3be8fc913fdca84900dca6766213b13
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Sep 17 11:59:46 2014 -0400
Rename papi_pmid function to papi_name_lookup as requested
Rename function to be more descriptive
commit 074c27041db9840051478a6b3c5f0cf68725b8aa
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Sep 17 11:51:19 2014 -0400
Update the papi_fetchcallback mechanism for passing metric data
No longer loop through all the available events (as we generate the
pmns dynamically now), just use the idp->item that we're passed
commit 67b79c8130881c6ec5d2f669adaa6fbdae637419
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Tue Sep 16 11:46:56 2014 -0400
Add papi_children callback for generating the pmns dynamically
Order the papi metrics under papi.system.metric (expecting expansion
of metrics to capture pid/tid specifics later) and dynamically
generate the list of metrics based on what's actually available on
the current hardware.
commit 9ce332107ea024e77f3765f2deb36b8f9ff438a4
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Sep 10 10:38:15 2014 -0400
Make use of strtok in papi_pmid
Use strtok in pmda_papi function for a cleaner function
commit f5ee043d7ea06888e133ffab917ac33239780316
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Tue Sep 9 18:58:45 2014 -0400
Move PAPI_event_info_t var into papi_info for metric descriptions
By moving the PAPI_event_info_t varible into the papi_info struct
we can ensure the references to the descriptions are persistent.
commit bc5ab4ca60a0152c74ef345125ce78f56284c908
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Tue Sep 9 18:26:11 2014 -0400
First step towards a fully dynamic papipmda (including pmns)
Remove the papi_info[].pmns_position variable and set_pmns_position
fuction. Likewise, only add papi metrics to papi_info if they're
actually present on the current hardware. In the future we might
need to add in another papi.'system'.metric to make the pmns fully
automatically generated and match with the various userspace programs
commit dcb2d35c53edbbefeba46b9c332915d090226d8f
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 8 12:22:33 2014 -0400
Rework saving previous papi values when adding/removing metrics
Previously, when we added or removed a metric that we were
tracking, we'd lose the previous values and all metrics would
restart from zero. By adding a prev_metric value in papi_info,
we can systematically save the values, and add it to the atom->ull
in the fetchcallback
commit c52ebc9d02d82c13196b9f9145055e83eafaa4b2
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 8 10:10:40 2014 -0400
Be more consistent with internal use of variable names
Remove all mentions of 'sts' and consistenly use retval
commit f37259dd1cf8675c4b02d08d69e2a15dd0587969
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 8 09:45:47 2014 -0400
Account for control and available clusters in papi_text
papi_text was returning results from PAPI_enum_event which matched
the pcp item number, even when the metrics were in different cluters
(control and available, respectively).
commit c618fade0c63f843d9af42120520a4ac44adaa0c
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Fri Sep 5 15:34:56 2014 -0400
Add debug warning and return PM_ERR_CONV to papi.control.enable
Currently papi.control.enable will just silently fail if presented
with metrics it can't add, fix that.
*src/pmdas/papi/papi.c - add debug warning and return the error in
papi_store for enable
commit 5640a0d81a9ba23a914efc4eff92a2e299c95f4e
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Nov 5 10:43:02 2014 -0500
tweak qa/903 to account for lower papi metric output
pmdapapi only creates metrics dynamically based on the system hardware.
This means the number of metrics by default is much lower, tweak the
awk statement to reflect that
commit f9aa390ae8440ae3691c8e44f2d2637839de488f
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Nov 5 10:40:47 2014 -0500
Update qa/799 with -hlocal: test against real values
799 will now grab 'real' values from the current papi install.
This testcase now also includes installing and uninstalling
the pmda.
commit 50de988dcdac24021f937d24e33f6857c19ef8c7
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Nov 5 23:03:53 2014 -0500
Add qa/967 to test the pmdapapi auto_enable functionality
In this testcase we take two dbpmda runs;
First, we run a check that the existing enable/disable functionality
works normally when papi.control.auto_enable is disabled (set to 0)
Second, we check that the auto_enable timeout works by setting it to
a low timeout (5 seconds), fetching a value, checking that
papi.control.status reports the correct timeout and a valid papi
VALUE. After which we wait just over 5 seconds and re-fetch the
papi.control.status value, which (should) show the metric is no
longer being counted and that papi has stopped.
This second test implicitly checks the functionality of dynamically
starting a counter.
commit 9acbf877443e918cdc3bc6a4136dca9a5bc4ab10
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Nov 5 12:31:57 2014 -0500
Add helppath variable
helppath is used in various locations throughout the pmda, dropped
by accident when merging the branches.
commit 67b1360e43ba136d34f661602afd6bf65b6cde17
Author: Frank Ch. Eigler <fche@xxxxxxxxxx>
Date: Mon Nov 3 21:48:55 2014 -0500
papi pmda: tweak auto_afid name & commentary
commit f9791a2814e055c497c90dfc4913c9121d2639ef
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Nov 3 21:47:34 2014 -0500
Tweak pmdapapi docs
Add the unit (seconds) to the papi.control.auto_enable metric and
mention how one would disable the auto_enable functionality if needed
in the man page.
Signed-off-by: Lukas Berk <lberk@xxxxxxxxxx>
commit 940a38a7e32c3a287a226755a96d5a1df1da287b
Author: Frank Ch. Eigler <fche@xxxxxxxxxx>
Date: Mon Nov 3 15:55:41 2014 -0500
papi pmda: add counter auto-enable on fetch
By reinterpreting the papi_info[].metric_enabled as a timestamp rather
than a boolean, and a small bit of logic, we get automatic enablement
of PAPI metric/counters upon pmfetch. This allows PAPI metrics to be
used with plain old pmlogger, pmval, etc., without necessary manual
pmstore's. Counters are retired based on a timeout mechanism,
assisted by pmaf(3). The papi.control.status metric is enhanced to
show the remaining lifespan of the counters, and to make it more safe
& reliable.
A new papi.control.auto_enable metric is available to set the timeout
(default 120 seconds). The Install script runs a papi.control.reset
operation to avoid leaving the counters running for even that long
after the post-install metric/value checks.
The previous pmstore mechanism is left in place unchanged, and
overrides the automatic scheme.
commit 92faaee4bc303f3be12bf62578dea2ce20a6f531
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Nov 5 11:49:57 2014 -0500
Add pmdaText call in papi_text
Somewhere along the way, rebasing ate the call
commit 5fda674535f7a9ee60abd9a16d1944fa1bbf944d
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Nov 5 10:43:02 2014 -0500
tweak qa/903 to account for lower papi metric output
pmdapapi only creates metrics dynamically based on the system hardware.
This means the number of metrics by default is much lower, tweak the
awk statement to reflect that
commit a6e8ac926ad750deaafbf1710e94b67d53abc1e2
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Nov 5 10:40:47 2014 -0500
Update qa/799 with -hlocal: test against real values
799 will now grab 'real' values from the current papi install.
This testcase now also includes installing and uninstalling
the pmda.
commit 4368b37fce067e7854d724adb630e027a0dad3dd
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Nov 5 10:34:18 2014 -0500
Add dbpmda testcase for pmdapapi
Add an additional testcase for pmdapapi, ensure a value can be
enabled, checked, and disabled through dbpmda
commit 2cc4519ce51c6d3177d1d2c7d1b2520b001534bb
Author: Frank Ch. Eigler <fche@xxxxxxxxxx>
Date: Tue Oct 14 17:16:53 2014 -0400
papi/pmda: collapse metric addition/removal path
The add- and remove-metric operations are almost identical, with
respect to the need to save previous counter values, pause, then
restart with newborn/surviving metrics. With the recent
metric_enabled flag, the two code paths can be effectively merged.
Gone are add_metric(), remove_metric(), setup_eventset(), stop_papi(),
and the number_of_active_counters global. Left notes for a few more
candidates.
Welcome refresh_metrics() and a collapsed-case .enable/.disable
pmstore handler, a trivial .reset handler.
Tested by hand, running pmstore ops to enable/disable multiple
individual counters, including erroneous names, while monitoring the
valid counters for consistent progress. Mechanical testing
forthcoming.
commit 7b73c86f0ca5bf105d43fa05cb797a47691d25b7
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Tue Oct 14 14:16:49 2014 -0400
Make status_string[] variable static
Avoid any type of memory corruption bug by ensuring the variable
won't already be unwound.
commit 5d2d7bf25e27b6b93f73e9fa58e17e62c6d8b5dc
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Tue Oct 14 11:27:40 2014 -0400
Fix a papi_info.position bug in remove_metric
Include a new papi.info var (metric_enabled) to track if the metric
was enabled. This leaves us to simply assign the position in the
order we (re)add the metric to the eventset
commit 436be6ab6e10fd28387b328c463b280eccab805e
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Thu Oct 9 16:16:07 2014 -0400
Tidy up setup_eventset()
Pick a style of retval assignment/comparison and stick with it.
Report papi errors in a uniform way
commit 0ac8189e9e930156a601e3e43348ccfd3a25b828
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Thu Oct 9 16:02:56 2014 -0400
Refactor the eventset setup which is done in papi_internal_init and
remove_metric
We were only partially setting up the eventset in remove_metric (due
to working around papi bug). Refactor this and ensure it's done properly
both times.
commit 4db29959e3c3874e17696fdbbb221aa7dce24fc2
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Thu Oct 9 13:39:24 2014 -0400
Refactor {add,remove}_metric functions
We can refactor the functions to put stopping and saving the values
in its own function, while making the return values consistent.
commit 90c80fcee53c23f90675c49f853c313e4af2b2c4
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Oct 6 19:06:18 2014 -0400
Reduce the string manipulation functions usage in papi_internal_init
By reusing the same data structures and sizes that papi defines for
symbols we can directly memcpy the values in without having to loop
so many times and tokenizing everything.
commit 5e1e9f444320fcaf44e51449d6c67f22f5b2e1c7
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Oct 6 12:20:59 2014 -0400
Switch to local, stack allocated string for papi.control.status metric
Instead of realloc'ing multiple times a call, lets instead, allocate
one string (once) and simplify the process
commit fcfdaae5c6e7929d4a2726cc17675135ab709d15
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Oct 6 09:44:56 2014 -0400
Enable papi multiplexing
Enabling multiplexing will make the pmda a bit more flexible for counting
metrics for longer periods of time and for hardware with fewer hardware
counters
commit 0dffa0f01026c9de820303c588f57b4dc5bfbb06
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Fri Oct 3 15:30:56 2014 -0400
Drop unneeded (ignored) gid == 0 check in permission_check
commit 9b0c5f70b1aaa8045f5e4aa8dba79581d4d694f8
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Fri Oct 3 15:20:44 2014 -0400
Remove check_event_exists function
If the event requested isn't in already in papi_info, add_metric
and remove metric won't get called at all anyways, this check is
redundant
commit 9af90b09393f846206f3e8267b15bd0e06d8a0fa
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Fri Oct 3 15:08:31 2014 -0400
Shift papi_event_code variable into papi_event_type_t var in papi_info
We can reduce the number of variables we need and simply use the data
structures already there.
commit 0bcd7a6aafefe44f44cf782e96c67f6de563af55
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Thu Oct 2 15:02:56 2014 -0400
Add skeleton of new pmdapapi qa test - qa/799
Base for new pmdapapi test
commit f5bcc3ce37867bf7a9cf05f1ebe2f32337dedda2
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Thu Oct 2 12:04:37 2014 -0400
Make adding metrics to the current eventset more robust
If we attempt to add an event that cannot be added (for example,
if two metrics can't be counted at the same time), we should make
the attempt, but still restart papi and run the other metrics if
possible. If debugging is turned on, output the error message to
the log file.
commit 6a8050b4883b7c15414ead420427677edb75a319
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Oct 1 19:13:59 2014 -0400
Change papi.control.status to include metric values and fix papi_children
Several smaller nits. papi.control.status should now include the current
values being counted. We also now use a __pmnsTree var to keep track
of the dynamic metrics we've added. This makes both papi_children much
eaiser to manage as well as papi_name_lookup.
commit d7d093586d32bc40aed373d03a77158aa765b8a7
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Oct 1 19:09:55 2014 -0400
Update qa files for new metrics and added portion to pmns
A new portion of the papi pmns includes 'system' and will extend
to possible process names when that functionality is included.
We also need to update qa for implementation of papi.control.reset
commit d7bd289a94a253c0b853701d0c2dfdcf95625822
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Tue Sep 23 12:17:17 2014 -0400
Refactor bits of {add,remove}_metric and small cleanups
We can move the check to see if the event specified is valid outside
the function and reduce the repeated code. Also remove a loop that
we no longer need.
commit a1d3d402501714c439eb30bd556a4aa1ea3db488
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 22 16:16:59 2014 -0400
papi_state returns a bitmask, so do a bitwise comparison, not direct
compare.
instead of a direct comparison with PAPI_<state> we should just do a bitwise
AND to confirm the state
commit 4dfde46964686817313315795374eb9e89c0ab82
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 22 14:50:03 2014 -0400
Remove papi_string_status and inline the former function
The aforementioned function was incorrect in using a case statement
and assuming only one would be hit. The papi state is a bitmask,
and we should be able to return more than one condition. It is
also potentially useful to output the last known values of each active
metric.
commit 54077d685ea674bad70e0f8589320bb54b6144f9
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 22 14:48:45 2014 -0400
Add checks around papi_children realloc statements
realloc's need a check to ensure the allocation returned with no errors.
If an error was found, throw __pmNoMem
commit dc2d9243fd63ff1eb1cf79ae90ed15a4306d2f8d
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Fri Sep 19 18:07:05 2014 -0400
Remove internal enable and disable strings for papi metrics
We shouldn't require the use of these strings to pass back and forth.
commit 848198e02672e30d8014525aa2d566862d738389
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Fri Sep 19 14:14:18 2014 -0400
Implement papi.control.reset metric
papi.control.reset will zero the current papi values being counted
one must use papi.control.disable if they'd like the values to no
longer be in the active eventset
commit e311cf812980d53cf8c343de9a8ad22afe095c05
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Thu Sep 18 21:18:40 2014 -0400
Remove remove second function paramter from remove_metric
Both parameters being passed were values from papi_info, if we
instead pass the specific position within the papi_info array,
we can determine the other values we need without passing extra
arguments
commit 114d4cef2502a044b6b595eb3d66d5eb3f73752b
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Thu Sep 18 18:36:10 2014 -0400
Assign papi help text in papi_internal_init and only lookup values in
papi_text
Assigning the values of {short,long}_descr can be done within
papi_internal_init,
which allows us to simply recall the values in papi_text.
commit 2943337143a52d8bd4feb19feae08a21f86595a0
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Sep 17 18:30:20 2014 -0400
Drop unneeded parameter from check_papi_state
Drop unneeded parameter from the check_papi_state() function, and
don't mix up papi error values and pcp error values that we could
return. Stick to papi.
commit a031cee209de761818005d04a503c52e444d2519
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Sep 17 11:59:46 2014 -0400
Rename papi_pmid function to papi_name_lookup as requested
Rename function to be more descriptive
commit 9ce845cc0bb12b063d0bb5852bd662171165864c
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Sep 17 11:51:19 2014 -0400
Update the papi_fetchcallback mechanism for passing metric data
No longer loop through all the available events (as we generate the
pmns dynamically now), just use the idp->item that we're passed
commit 3d14302269500a17c6055440afd181aefa4cad5b
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Tue Sep 16 11:46:56 2014 -0400
Add papi_children callback for generating the pmns dynamically
Order the papi metrics under papi.system.metric (expecting expansion
of metrics to capture pid/tid specifics later) and dynamically
generate the list of metrics based on what's actually available on
the current hardware.
commit 318a354e0d9e821dd52844c6023898ee596e8a86
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Sep 10 10:38:15 2014 -0400
Make use of strtok in papi_pmid
Use strtok in pmda_papi function for a cleaner function
commit cc30f7703a387be0726f221752b78b779d3c5742
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Tue Sep 9 18:58:45 2014 -0400
Move PAPI_event_info_t var into papi_info for metric descriptions
By moving the PAPI_event_info_t varible into the papi_info struct
we can ensure the references to the descriptions are persistent.
commit cd2b5939dff78976cd6ba454a66538c6bb99f95a
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Tue Sep 9 18:26:11 2014 -0400
First step towards a fully dynamic papipmda (including pmns)
Remove the papi_info[].pmns_position variable and set_pmns_position
fuction. Likewise, only add papi metrics to papi_info if they're
actually present on the current hardware. In the future we might
need to add in another papi.'system'.metric to make the pmns fully
automatically generated and match with the various userspace programs
commit 8fdbf4961ccc62aab580e049c60f2457e41a68fb
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 8 12:22:33 2014 -0400
Rework saving previous papi values when adding/removing metrics
Previously, when we added or removed a metric that we were
tracking, we'd lose the previous values and all metrics would
restart from zero. By adding a prev_metric value in papi_info,
we can systematically save the values, and add it to the atom->ull
in the fetchcallback
commit e47e0c36dba0f6e02f4a06922d74c415f7d21a1c
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 8 10:10:40 2014 -0400
Be more consistent with internal use of variable names
Remove all mentions of 'sts' and consistenly use retval
commit f93083d541d90ca266684aae7bfe7130cb6fb511
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 8 09:45:47 2014 -0400
Account for control and available clusters in papi_text
papi_text was returning results from PAPI_enum_event which matched
the pcp item number, even when the metrics were in different cluters
(control and available, respectively).
commit 99288a413cc5a4d6bddc424794dc05131c24bc88
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Fri Sep 5 15:34:56 2014 -0400
Add debug warning and return PM_ERR_CONV to papi.control.enable
Currently papi.control.enable will just silently fail if presented
with metrics it can't add, fix that.
*src/pmdas/papi/papi.c - add debug warning and return the error in
papi_store for enable
commit b0cfaa1b91ef349d7ad78656bb4da57582bad434
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Tue Sep 23 12:17:17 2014 -0400
Refactor bits of {add,remove}_metric and small cleanups
We can move the check to see if the event specified is valid outside
the function and reduce the repeated code. Also remove a loop that
we no longer need.
commit da33dbaf8266e0374ebb3717103a4b1bedae89af
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 22 16:16:59 2014 -0400
papi_state returns a bitmask, so do a bitwise comparison, not direct
compare.
instead of a direct comparison with PAPI_<state> we should just do a bitwise
AND to confirm the state
commit 7068e138a6c58aa72a787a2ddf1f484f4811b6e0
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 22 14:50:03 2014 -0400
Remove papi_string_status and inline the former function
The aforementioned function was incorrect in using a case statement
and assuming only one would be hit. The papi state is a bitmask,
and we should be able to return more than one condition. It is
also potentially useful to output the last known values of each active
metric.
commit 0df3c625640676f678d20fbce479cf20aa00c17c
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 22 14:48:45 2014 -0400
Add checks around papi_children realloc statements
realloc's need a check to ensure the allocation returned with no errors.
If an error was found, throw __pmNoMem
commit 19863941c33e91728196d65407e894612bbb2d2b
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Fri Sep 19 18:07:05 2014 -0400
Remove internal enable and disable strings for papi metrics
We shouldn't require the use of these strings to pass back and forth.
commit ab114bf05c3dc4b451ce622d8b3c4ea8e04ce368
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Fri Sep 19 14:14:18 2014 -0400
Implement papi.control.reset metric
papi.control.reset will zero the current papi values being counted
one must use papi.control.disable if they'd like the values to no
longer be in the active eventset
commit ce7caf388e0acdc5a8a1cb088430f89f91e8dcca
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Thu Sep 18 21:18:40 2014 -0400
Remove remove second function paramter from remove_metric
Both parameters being passed were values from papi_info, if we
instead pass the specific position within the papi_info array,
we can determine the other values we need without passing extra
arguments
commit 916a7e0eeb7974428a6348eecb9641fd125bc6a8
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Thu Sep 18 18:36:10 2014 -0400
Assign papi help text in papi_internal_init and only lookup values in
papi_text
Assigning the values of {short,long}_descr can be done within
papi_internal_init,
which allows us to simply recall the values in papi_text.
commit 07e3fb0f357f13e9767f4959dbde3470d3986f6b
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Sep 17 18:30:20 2014 -0400
Drop unneeded parameter from check_papi_state
Drop unneeded parameter from the check_papi_state() function, and
don't mix up papi error values and pcp error values that we could
return. Stick to papi.
commit ffa8067e5093943bdcbe2ee5b4b037e7081dc2fb
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Sep 17 11:59:46 2014 -0400
Rename papi_pmid function to papi_name_lookup as requested
Rename function to be more descriptive
commit 206caabeb687b85ec8d70a3eafc669d642e72616
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Sep 17 11:51:19 2014 -0400
Update the papi_fetchcallback mechanism for passing metric data
No longer loop through all the available events (as we generate the
pmns dynamically now), just use the idp->item that we're passed
commit 132d86d035a29879b23c8e4dfde731371457a76a
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Tue Sep 16 12:29:09 2014 -0400
Add example workflow for pmdapapi to man pages
pmdapapi makes use of pmstore to control what papi metrics are currently
being tracked and which aren't. document this workflow in the manpage
commit 27e498c4bc13c0740036b8a0bf7bdce5a457ec15
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Tue Sep 16 11:46:56 2014 -0400
Add papi_children callback for generating the pmns dynamically
Order the papi metrics under papi.system.metric (expecting expansion
of metrics to capture pid/tid specifics later) and dynamically
generate the list of metrics based on what's actually available on
the current hardware.
commit caab47c9c91504f952454a1a167469f846719f0a
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Sep 10 10:38:15 2014 -0400
Make use of strtok in papi_pmid
Use strtok in pmda_papi function for a cleaner function
commit a0701fbae9119630eec0e3ef18b1b365b499a928
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Tue Sep 9 18:58:45 2014 -0400
Move PAPI_event_info_t var into papi_info for metric descriptions
By moving the PAPI_event_info_t varible into the papi_info struct
we can ensure the references to the descriptions are persistent.
commit 4346727ebc4cf342e50d71d725dbdf66275efeaa
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Tue Sep 9 18:26:11 2014 -0400
First step towards a fully dynamic papipmda (including pmns)
Remove the papi_info[].pmns_position variable and set_pmns_position
fuction. Likewise, only add papi metrics to papi_info if they're
actually present on the current hardware. In the future we might
need to add in another papi.'system'.metric to make the pmns fully
automatically generated and match with the various userspace programs
commit f007cbe732d1ed3e958869464338b29b47665731
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 8 12:22:33 2014 -0400
Rework saving previous papi values when adding/removing metrics
Previously, when we added or removed a metric that we were
tracking, we'd lose the previous values and all metrics would
restart from zero. By adding a prev_metric value in papi_info,
we can systematically save the values, and add it to the atom->ull
in the fetchcallback
commit 12ace0443b7d8b9c79501eda0642ec09ad6fbee6
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 8 10:10:40 2014 -0400
Be more consistent with internal use of variable names
Remove all mentions of 'sts' and consistenly use retval
commit 6e25eaf9a166b1a9b0fe606d192c9d41ba3d8b6e
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 8 09:45:47 2014 -0400
Account for control and available clusters in papi_text
papi_text was returning results from PAPI_enum_event which matched
the pcp item number, even when the metrics were in different cluters
(control and available, respectively).
commit 6a8ed1d7313d6767d76605773c7b1258f8f041dc
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Fri Sep 5 15:34:56 2014 -0400
Add debug warning and return PM_ERR_CONV to papi.control.enable
Currently papi.control.enable will just silently fail if presented
with metrics it can't add, fix that.
*src/pmdas/papi/papi.c - add debug warning and return the error in
papi_store for enable
commit 3559d567e886dd3526d568bc13a1ce001281e657
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Nov 5 10:43:02 2014 -0500
tweak qa/903 to account for lower papi metric output
pmdapapi only creates metrics dynamically based on the system hardware.
This means the number of metrics by default is much lower, tweak the
awk statement to reflect that
commit e595b254124b53cf9625b74c586a6ff6da75dade
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Nov 5 10:40:47 2014 -0500
Update qa/799 with -hlocal: test against real values
799 will now grab 'real' values from the current papi install.
This testcase now also includes installing and uninstalling
the pmda.
commit 24d6f6426f349020def7679f04850badfec39a8a
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Nov 5 10:34:18 2014 -0500
Add dbpmda testcase for pmdapapi
Add an additional testcase for pmdapapi, ensure a value can be
enabled, checked, and disabled through dbpmda
commit 80ca1858f7dc284724c62de52829e9e41e9f0b24
Author: Frank Ch. Eigler <fche@xxxxxxxxxx>
Date: Tue Oct 14 17:16:53 2014 -0400
papi/pmda: collapse metric addition/removal path
The add- and remove-metric operations are almost identical, with
respect to the need to save previous counter values, pause, then
restart with newborn/surviving metrics. With the recent
metric_enabled flag, the two code paths can be effectively merged.
Gone are add_metric(), remove_metric(), setup_eventset(), stop_papi(),
and the number_of_active_counters global. Left notes for a few more
candidates.
Welcome refresh_metrics() and a collapsed-case .enable/.disable
pmstore handler, a trivial .reset handler.
Tested by hand, running pmstore ops to enable/disable multiple
individual counters, including erroneous names, while monitoring the
valid counters for consistent progress. Mechanical testing
forthcoming.
commit 7cf0569611c895b32b4b7fa8ce1c6f4625286ae6
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Tue Oct 14 14:16:49 2014 -0400
Make status_string[] variable static
Avoid any type of memory corruption bug by ensuring the variable
won't already be unwound.
commit 324ec32f62a81de3fb019bcdcd2d6f6ec34764ec
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Tue Oct 14 11:27:40 2014 -0400
Fix a papi_info.position bug in remove_metric
Include a new papi.info var (metric_enabled) to track if the metric
was enabled. This leaves us to simply assign the position in the
order we (re)add the metric to the eventset
commit 05c56e4f18deaa97e283260069c0bda7da2b80e9
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Thu Oct 9 16:16:07 2014 -0400
Tidy up setup_eventset()
Pick a style of retval assignment/comparison and stick with it.
Report papi errors in a uniform way
commit d351dac6de615ce4f99efb92494f2aeef50e6cb6
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Thu Oct 9 16:02:56 2014 -0400
Refactor the eventset setup which is done in papi_internal_init and
remove_metric
We were only partially setting up the eventset in remove_metric (due
to working around papi bug). Refactor this and ensure it's done properly
both times.
commit 11b2714ece3e22989d475454218b9368e98246ec
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Thu Oct 9 13:39:24 2014 -0400
Refactor {add,remove}_metric functions
We can refactor the functions to put stopping and saving the values
in its own function, while making the return values consistent.
commit b27a384f8c4d86cf5d58ad1b53de82ddcfe63277
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Oct 6 19:06:18 2014 -0400
Reduce the string manipulation functions usage in papi_internal_init
By reusing the same data structures and sizes that papi defines for
symbols we can directly memcpy the values in without having to loop
so many times and tokenizing everything.
commit 2bb4cd668abe689bff93664a38f62b77aa632ad9
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Oct 6 12:20:59 2014 -0400
Switch to local, stack allocated string for papi.control.status metric
Instead of realloc'ing multiple times a call, lets instead, allocate
one string (once) and simplify the process
commit dea6f80d9e4461b3ca97a662fdd8ae676aeee041
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Oct 6 09:44:56 2014 -0400
Enable papi multiplexing
Enabling multiplexing will make the pmda a bit more flexible for counting
metrics for longer periods of time and for hardware with fewer hardware
counters
commit caf9f5d7b18d17a21984afce469fd8d7cc9cd6a2
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Fri Oct 3 15:30:56 2014 -0400
Drop unneeded (ignored) gid == 0 check in permission_check
commit 30cee046ce73ee6b4b80245ab5a70c458e682993
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Fri Oct 3 15:20:44 2014 -0400
Remove check_event_exists function
If the event requested isn't in already in papi_info, add_metric
and remove metric won't get called at all anyways, this check is
redundant
commit 0ba97b404e3a812272b2bc245a3b0e391f364a83
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Fri Oct 3 15:08:31 2014 -0400
Shift papi_event_code variable into papi_event_type_t var in papi_info
We can reduce the number of variables we need and simply use the data
structures already there.
commit f40f041ba7d2914e16144a146aa826bed0fa9ce1
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Thu Oct 2 15:02:56 2014 -0400
Add skeleton of new pmdapapi qa test - qa/799
Base for new pmdapapi test
commit e383b905052e126952d98240b03b41c6e6c730f4
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Thu Oct 2 12:04:37 2014 -0400
Make adding metrics to the current eventset more robust
If we attempt to add an event that cannot be added (for example,
if two metrics can't be counted at the same time), we should make
the attempt, but still restart papi and run the other metrics if
possible. If debugging is turned on, output the error message to
the log file.
commit 82d970256663064938536677687de2e76f100273
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Oct 1 19:13:59 2014 -0400
Change papi.control.status to include metric values and fix papi_children
Several smaller nits. papi.control.status should now include the current
values being counted. We also now use a __pmnsTree var to keep track
of the dynamic metrics we've added. This makes both papi_children much
eaiser to manage as well as papi_name_lookup.
commit 5896a58858bc295e0d84af61c8174d40946e9cf6
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Oct 1 19:09:55 2014 -0400
Update qa files for new metrics and added portion to pmns
A new portion of the papi pmns includes 'system' and will extend
to possible process names when that functionality is included.
We also need to update qa for implementation of papi.control.reset
commit 2015402d494b0f83a7fcfc2844ab41c33d5394e5
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Tue Sep 23 12:17:17 2014 -0400
Refactor bits of {add,remove}_metric and small cleanups
We can move the check to see if the event specified is valid outside
the function and reduce the repeated code. Also remove a loop that
we no longer need.
commit 206b7a39d7f8a1e2f1608d29c964a30b25432584
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 22 16:16:59 2014 -0400
papi_state returns a bitmask, so do a bitwise comparison, not direct
compare.
instead of a direct comparison with PAPI_<state> we should just do a bitwise
AND to confirm the state
commit 0392873d660054e111fa7b6a6caddfe3ba0afec0
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 22 14:50:03 2014 -0400
Remove papi_string_status and inline the former function
The aforementioned function was incorrect in using a case statement
and assuming only one would be hit. The papi state is a bitmask,
and we should be able to return more than one condition. It is
also potentially useful to output the last known values of each active
metric.
commit bce0c258922fdbd9cf2ce5e4ce53f3956131af4f
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 22 14:48:45 2014 -0400
Add checks around papi_children realloc statements
realloc's need a check to ensure the allocation returned with no errors.
If an error was found, throw __pmNoMem
commit a2199cd045712baa71254a513666d8fa1a5c849e
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Fri Sep 19 18:07:05 2014 -0400
Remove internal enable and disable strings for papi metrics
We shouldn't require the use of these strings to pass back and forth.
commit 1c03e37ce1b2e791accba04099dbb03c3f285800
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Fri Sep 19 14:14:18 2014 -0400
Implement papi.control.reset metric
papi.control.reset will zero the current papi values being counted
one must use papi.control.disable if they'd like the values to no
longer be in the active eventset
commit 777c17d03c7ea9eb199a3cef717e9ab10b3b446c
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Thu Sep 18 21:18:40 2014 -0400
Remove remove second function paramter from remove_metric
Both parameters being passed were values from papi_info, if we
instead pass the specific position within the papi_info array,
we can determine the other values we need without passing extra
arguments
commit 777ef784fcb2b4fde2eaa00c18f11f0cfade2f74
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Thu Sep 18 18:36:10 2014 -0400
Assign papi help text in papi_internal_init and only lookup values in
papi_text
Assigning the values of {short,long}_descr can be done within
papi_internal_init,
which allows us to simply recall the values in papi_text.
commit 32f8a2b75100704f7483acc6f1ab4447653f4fa2
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Sep 17 18:30:20 2014 -0400
Drop unneeded parameter from check_papi_state
Drop unneeded parameter from the check_papi_state() function, and
don't mix up papi error values and pcp error values that we could
return. Stick to papi.
commit 500c02b58947d4f2fd8162c46d7d06fe5bfa84e6
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Sep 17 11:59:46 2014 -0400
Rename papi_pmid function to papi_name_lookup as requested
Rename function to be more descriptive
commit c20b649ad6b0a71b39d71d4df42f43a748d8e499
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Sep 17 11:51:19 2014 -0400
Update the papi_fetchcallback mechanism for passing metric data
No longer loop through all the available events (as we generate the
pmns dynamically now), just use the idp->item that we're passed
commit 97b802e0414eb6de909226ebe02a8926e6d7813d
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Tue Sep 16 12:29:09 2014 -0400
Add example workflow for pmdapapi to man pages
pmdapapi makes use of pmstore to control what papi metrics are currently
being tracked and which aren't. document this workflow in the manpage
commit d1c1bbf599f5ed9c975c4df89e19987e76e23fd0
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Tue Sep 16 11:46:56 2014 -0400
Add papi_children callback for generating the pmns dynamically
Order the papi metrics under papi.system.metric (expecting expansion
of metrics to capture pid/tid specifics later) and dynamically
generate the list of metrics based on what's actually available on
the current hardware.
commit cbf66cd8e33ca6751107a41a8af399cef841c1cf
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Sep 10 10:38:15 2014 -0400
Make use of strtok in papi_pmid
Use strtok in pmda_papi function for a cleaner function
commit 7bee26c385707808cb3dd28dbf41d02cdcb94beb
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Tue Sep 9 18:58:45 2014 -0400
Move PAPI_event_info_t var into papi_info for metric descriptions
By moving the PAPI_event_info_t varible into the papi_info struct
we can ensure the references to the descriptions are persistent.
commit bfff8127f524dfa8a84183326ef9aa551d21a1c6
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Tue Sep 9 18:26:11 2014 -0400
First step towards a fully dynamic papipmda (including pmns)
Remove the papi_info[].pmns_position variable and set_pmns_position
fuction. Likewise, only add papi metrics to papi_info if they're
actually present on the current hardware. In the future we might
need to add in another papi.'system'.metric to make the pmns fully
automatically generated and match with the various userspace programs
commit f17a856a6e095b4c7fe528fd8bcd237c4a6e5f6a
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 8 12:22:33 2014 -0400
Rework saving previous papi values when adding/removing metrics
Previously, when we added or removed a metric that we were
tracking, we'd lose the previous values and all metrics would
restart from zero. By adding a prev_metric value in papi_info,
we can systematically save the values, and add it to the atom->ull
in the fetchcallback
commit 374ccd7cb0839b1303e93cc1ec40e7be0bf819e0
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 8 10:10:40 2014 -0400
Be more consistent with internal use of variable names
Remove all mentions of 'sts' and consistenly use retval
commit 215a7292a5b68a3dd2a8d40b6085dd306bc261da
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 8 09:45:47 2014 -0400
Account for control and available clusters in papi_text
papi_text was returning results from PAPI_enum_event which matched
the pcp item number, even when the metrics were in different cluters
(control and available, respectively).
commit 19f099f9ce57d5e7c95cd2ba73cc47fa19b5e179
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Fri Sep 5 15:34:56 2014 -0400
Add debug warning and return PM_ERR_CONV to papi.control.enable
Currently papi.control.enable will just silently fail if presented
with metrics it can't add, fix that.
*src/pmdas/papi/papi.c - add debug warning and return the error in
papi_store for enable
commit fd3a9845a32ee4208933dacf557a2094cfd192cf
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Tue Sep 23 12:17:17 2014 -0400
Refactor bits of {add,remove}_metric and small cleanups
We can move the check to see if the event specified is valid outside
the function and reduce the repeated code. Also remove a loop that
we no longer need.
commit 474e56808984577e1ca82f0ad6dc345d3746ac37
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 22 16:16:59 2014 -0400
papi_state returns a bitmask, so do a bitwise comparison, not direct
compare.
instead of a direct comparison with PAPI_<state> we should just do a bitwise
AND to confirm the state
commit de04a53f8de921df2e1f619c4247ad606b601ebe
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 22 14:50:03 2014 -0400
Remove papi_string_status and inline the former function
The aforementioned function was incorrect in using a case statement
and assuming only one would be hit. The papi state is a bitmask,
and we should be able to return more than one condition. It is
also potentially useful to output the last known values of each active
metric.
commit 580f2ad7963de915d960b19c956baea9fab0705b
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 22 14:48:45 2014 -0400
Add checks around papi_children realloc statements
realloc's need a check to ensure the allocation returned with no errors.
If an error was found, throw __pmNoMem
commit 16b12fa51182875e53e5bad433a8e0f534b02ade
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Fri Sep 19 18:07:05 2014 -0400
Remove internal enable and disable strings for papi metrics
We shouldn't require the use of these strings to pass back and forth.
commit 25298203c1e4eff8ea2372354058e54c26891518
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Fri Sep 19 14:14:18 2014 -0400
Implement papi.control.reset metric
papi.control.reset will zero the current papi values being counted
one must use papi.control.disable if they'd like the values to no
longer be in the active eventset
commit 9e96e2eea29afc1a08c473e124cf72ac767a5f30
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Thu Sep 18 21:18:40 2014 -0400
Remove remove second function paramter from remove_metric
Both parameters being passed were values from papi_info, if we
instead pass the specific position within the papi_info array,
we can determine the other values we need without passing extra
arguments
commit 9da54f9c9eaf89d4742891566f895d0d39d58f3f
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Thu Sep 18 18:36:10 2014 -0400
Assign papi help text in papi_internal_init and only lookup values in
papi_text
Assigning the values of {short,long}_descr can be done within
papi_internal_init,
which allows us to simply recall the values in papi_text.
commit 2d3196a704f325444f1ea533a809bbfadac4fcdc
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Sep 17 18:30:20 2014 -0400
Drop unneeded parameter from check_papi_state
Drop unneeded parameter from the check_papi_state() function, and
don't mix up papi error values and pcp error values that we could
return. Stick to papi.
commit 8d679bb5f262605f5e482305984d1bf97e1356ac
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Sep 17 11:59:46 2014 -0400
Rename papi_pmid function to papi_name_lookup as requested
Rename function to be more descriptive
commit 3e0ba1b4cd6aa0c859a6c40381e6674a2b4e8972
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Sep 17 11:51:19 2014 -0400
Update the papi_fetchcallback mechanism for passing metric data
No longer loop through all the available events (as we generate the
pmns dynamically now), just use the idp->item that we're passed
commit 24e2881a0e9d9d624587d92bd667dcc4cee1fda5
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Tue Sep 16 12:29:09 2014 -0400
Add example workflow for pmdapapi to man pages
pmdapapi makes use of pmstore to control what papi metrics are currently
being tracked and which aren't. document this workflow in the manpage
commit 810cfad58be60f0c24d920e85ee532f60edf40ba
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Tue Sep 16 11:51:42 2014 -0400
Add spec file condition on architecture and distro for pmdapapi
Don't build pmda papi if on a version prior to rhel6 or on
s390/s390x. The papi-devel package doesn't exist there.
commit 8006bf0c6fc17cff7e0ecd577e2d8f5940dd8ea1
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Tue Sep 16 11:46:56 2014 -0400
Add papi_children callback for generating the pmns dynamically
Order the papi metrics under papi.system.metric (expecting expansion
of metrics to capture pid/tid specifics later) and dynamically
generate the list of metrics based on what's actually available on
the current hardware.
commit 54420037c538883c8a88d53eebbf5a4da05e00c4
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Wed Sep 10 10:38:15 2014 -0400
Make use of strtok in papi_pmid
Use strtok in pmda_papi function for a cleaner function
commit bc72dc53be4952234de9013ed7ff2bd276cec033
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Tue Sep 9 18:58:45 2014 -0400
Move PAPI_event_info_t var into papi_info for metric descriptions
By moving the PAPI_event_info_t varible into the papi_info struct
we can ensure the references to the descriptions are persistent.
commit 75e26486fc52a5fad8feb75ec31daf5c4f45cea2
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Tue Sep 9 18:26:11 2014 -0400
First step towards a fully dynamic papipmda (including pmns)
Remove the papi_info[].pmns_position variable and set_pmns_position
fuction. Likewise, only add papi metrics to papi_info if they're
actually present on the current hardware. In the future we might
need to add in another papi.'system'.metric to make the pmns fully
automatically generated and match with the various userspace programs
commit 2b92cc4e3e34992ac9eb25d613dcbcc53d78e4ea
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 8 12:22:33 2014 -0400
Rework saving previous papi values when adding/removing metrics
Previously, when we added or removed a metric that we were
tracking, we'd lose the previous values and all metrics would
restart from zero. By adding a prev_metric value in papi_info,
we can systematically save the values, and add it to the atom->ull
in the fetchcallback
commit 159bf50dac441f4ac6383a9bd4632f1b34fc8cd5
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 8 10:10:40 2014 -0400
Be more consistent with internal use of variable names
Remove all mentions of 'sts' and consistenly use retval
commit 78a5f96ac6714eafba4faa4cbaad982883620bd7
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon Sep 8 09:45:47 2014 -0400
Account for control and available clusters in papi_text
papi_text was returning results from PAPI_enum_event which matched
the pcp item number, even when the metrics were in different cluters
(control and available, respectively).
commit bc295db9a4e7b2bf5382b5b2cae3851b24829eac
Author: Lukas Berk <lberk@xxxxxxxxxx>
Date: Fri Sep 5 15:34:56 2014 -0400
Add debug warning and return PM_ERR_CONV to papi.control.enable
Currently papi.control.enable will just silently fail if presented
with metrics it can't add, fix that.
*src/pmdas/papi/papi.c - add debug warning and return the error in
papi_store for enable
|