23int main (
int argc,
char **argv)
26 int retval,cid,coretemp_cid=-1,numcmp;
46 printf(
"Trying all coretemp events\n");
51 for(cid=0; cid<numcmp; cid++) {
54 test_fail(__FILE__, __LINE__,
"PAPI_get_component_info failed\n", 0);
57 if (strstr(cmpinfo->
name,
"coretemp")) {
59 if (!
TESTS_QUIET) printf(
"Found coretemp component at cid %d\n",
65 "Component disabled\n", 0);
68 test_skip(__FILE__,__LINE__,
"No coretemp events found",0);
85 printf(
"Error translating %#x\n",code);
87 "PAPI_event_code_to_name",
retval );
93 "Error getting event info\n",
retval);
111 "PAPI_create_eventset()",
retval);
117 "PAPI_add_event()",
retval);
130 temperature=(
values[0]/1000.0);
140 "PAPI_cleanup_eventset()",
retval);
146 "PAPI_destroy_eventset()",
retval);
166 "PAPI_create_eventset()",
retval);
172 "PAPI_add_event()",
retval);
185 temperature=(
values[0]/1000.0);
195 "PAPI_cleanup_eventset()",
retval);
201 "PAPI_destroy_eventset()",
retval);
220 "PAPI_create_eventset()",
retval);
226 "PAPI_add_event()",
retval);
245 "PAPI_cleanup_eventset()",
retval);
251 "PAPI_destroy_eventset()",
retval);
add PAPI preset or native hardware event to an event set
Empty and destroy an EventSet.
Create a new empty PAPI EventSet.
Empty and destroy an EventSet.
Enumerate PAPI preset or native events for a given component.
Convert a numeric hardware event code to a name.
get information about a specific software component
Get the event's name and description info.
initialize the PAPI library.
Get the number of components available on the system.
Start counting hardware events in an event set.
Stop counting hardware events in an event set.
#define NUM_EVENTS
Shows "pretty" coretemp output.
char event_name[2][PAPI_MAX_STR_LEN]
static long long values[NUM_EVENTS]
Return codes and api definitions.
int tests_quiet(int argc, char **argv)
void PAPI_NORETURN test_fail(const char *file, int line, const char *call, int retval)
void PAPI_NORETURN test_pass(const char *filename)
void PAPI_NORETURN test_skip(const char *file, int line, const char *call, int retval)
char name[PAPI_MAX_STR_LEN]
char disabled_reason[PAPI_HUGE_STR_LEN]
char long_descr[PAPI_HUGE_STR_LEN]