From PAPI Component Repository
(Difference between revisions)
Jump to: navigation, search
(Created page with "{{Component |Author=PAPI team |Version=PAPI current |Last modified=2011/05/23 |Author support=Yes |Component overview=Example component code with 3 counters |type=Url |url=http:/...")
m (Update modification date.)
Line 2: Line 2:
|Author=PAPI team
|Author=PAPI team
|Version=PAPI current
|Version=PAPI current
|Last modified=2011/05/23
|Last modified=2012/01/28
|Author support=Yes
|Author support=Yes
|Component overview=Example component code with 3 counters
|Component overview=Example component code with 3 counters

Latest revision as of 18:51, 3 February 2012

Author(s) PAPI team
Version PAPI current
Last modified 2012/01/28
Author support Yes
Component overview Example component code with 3 counters
Source Code




This component has three counters, one that always returns 0, one that returns a constant, one that returns an auto-incrementing value.

While it works as is, there are still some improvements that can be made: * PAPI_write() should be implemented * auto-increment counter should only increment when it itself is being read, and not increment whenever any of the example counters are read. Both of the above will make the component more complicated, but might help writers of new components.


Use the "Download tarball" link on the provided page to download a tarball of the source code folder to your computer. Untar the folder and place it in the components directory of your PAPI source tree. Configure using "--with-component=example". Rebuild PAPI.


Use as directed.

Supported Platforms

Anywhere you want to be.