PAPI  5.3.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
linux-coretemp.c File Reference
Include dependency graph for linux-coretemp.c:

Go to the source code of this file.

Data Structures

struct  temp_event
 

Macros

#define REFRESH_LAT   4000
 
#define INVALID_RESULT   -1000000L
 
#define NUM_PATHS   2
 

Functions

static int insert_in_list (char *name, char *units, char *description, char *filename)
 
static int generateEventList (char *base_dir)
 
static long long getEventValue (int index)
 
int _coretemp_init_thread (hwd_context_t *ctx)
 
int _coretemp_init_component (int cidx)
 
int _coretemp_init_control_state (hwd_control_state_t *ctl)
 
int _coretemp_start (hwd_context_t *ctx, hwd_control_state_t *ctl)
 
int _coretemp_read (hwd_context_t *ctx, hwd_control_state_t *ctl, long long **events, int flags)
 
int _coretemp_stop (hwd_context_t *ctx, hwd_control_state_t *ctl)
 
int _coretemp_shutdown_thread (hwd_context_t *ctx)
 
int _coretemp_shutdown_component ()
 
int _coretemp_ctl (hwd_context_t *ctx, int code, _papi_int_option_t *option)
 
int _coretemp_update_control_state (hwd_control_state_t *ptr, NativeInfo_t *native, int count, hwd_context_t *ctx)
 
int _coretemp_set_domain (hwd_control_state_t *cntl, int domain)
 
int _coretemp_reset (hwd_context_t *ctx, hwd_control_state_t *ctl)
 
int _coretemp_ntv_enum_events (unsigned int *EventCode, int modifier)
 
int _coretemp_ntv_code_to_name (unsigned int EventCode, char *name, int len)
 
int _coretemp_ntv_code_to_descr (unsigned int EventCode, char *name, int len)
 
int _coretemp_ntv_code_to_info (unsigned int EventCode, PAPI_event_info_t *info)
 

Variables

papi_vector_t _coretemp_vector
 
static
CORETEMP_native_event_entry_t
_coretemp_native_events
 
static int num_events = 0
 
static int is_initialized = 0
 
static struct temp_eventroot = NULL
 
static struct temp_eventlast = NULL
 

Macro Definition Documentation

#define INVALID_RESULT   -1000000L

Definition at line 15 of file linux-coretemp.c.

#define NUM_PATHS   2
#define REFRESH_LAT   4000

Definition at line 13 of file linux-coretemp.c.

Function Documentation

int _coretemp_ctl ( hwd_context_t ctx,
int  code,
_papi_int_option_t option 
)

Definition at line 502 of file linux-coretemp.c.

503 {
504  ( void ) ctx;
505  ( void ) code;
506  ( void ) option;
507 
508  return PAPI_OK;
509 }
return PAPI_OK
Definition: linux-nvml.c:458
void
Definition: iozone.c:18627
int _coretemp_init_component ( int  cidx)

Definition at line 342 of file linux-coretemp.c.

343 {
344  int i = 0;
345  struct temp_event *t,*last;
346 
347  if ( is_initialized )
348  return (PAPI_OK );
349 
350  is_initialized = 1;
351 
352  /* This is the prefered method, all coretemp sensors are symlinked here
353  * see $(kernel_src)/Documentation/hwmon/sysfs-interface */
354 
355  num_events = generateEventList("/sys/class/hwmon");
356 
357  if ( num_events < 0 ) {
359  "Cannot open /sys/class/hwmon",PAPI_MAX_STR_LEN);
360  return PAPI_ENOCMP;
361  }
362 
363  if ( num_events == 0 ) {
365  "No coretemp events found",PAPI_MAX_STR_LEN);
366  return PAPI_ENOCMP;
367  }
368 
369  t = root;
370 
373 
374  do {
376  strncpy(_coretemp_native_events[i].path,t->path,PATH_MAX);
382  last = t;
383  t = t->next;
384  papi_free(last);
385  i++;
386  } while (t != NULL);
387  root = NULL;
388 
389  /* Export the total number of events available */
391 
392  /* Export the component id */
394 
395  return PAPI_OK;
396 }
#define papi_free(a)
Definition: papi_memory.h:35
#define PAPI_MAX_STR_LEN
Definition: fpapi.h:43
#define PAPI_MIN_STR_LEN
Definition: fpapi.h:41
static int num_events
return PAPI_OK
Definition: linux-nvml.c:458
static struct temp_event * root
#define PAPI_ENOCMP
Definition: fpapi.h:122
static CORETEMP_native_event_entry_t * _coretemp_native_events
PAPI_component_info_t cmp_info
Definition: papi_vector.h:20
unsigned int selector
struct temp_event * next
char name[PAPI_MAX_STR_LEN]
t
Definition: iozone.c:23562
char disabled_reason[PAPI_MAX_STR_LEN]
Definition: papi.h:632
int i
Definition: fileop.c:140
static int cidx
Definition: event_info.c:40
CORETEMP_register_t resources
char units[PAPI_MIN_STR_LEN]
char description[PAPI_MAX_STR_LEN]
int stone
static struct temp_event * last
static int is_initialized
static int generateEventList(char *base_dir)
papi_vector_t _coretemp_vector
#define PATH_MAX
Definition: fileop.c:68
char * name
Definition: iozone.c:23648
char path[PATH_MAX]
#define papi_calloc(a, b)
Definition: papi_memory.h:37

Here is the call graph for this function:

int _coretemp_init_control_state ( hwd_control_state_t ctl)

Definition at line 406 of file linux-coretemp.c.

407 {
408  int i;
409 
411 
412  for ( i=0; i < num_events; i++ ) {
413  coretemp_ctl->counts[i] = getEventValue(i);
414  }
415 
416  /* Set last access time for caching results */
417  coretemp_ctl->lastupdate = PAPI_get_real_usec();
418 
419  return PAPI_OK;
420 }
int coretemp_ctl(hwd_context_t *ctx, int code, _papi_int_option_t *option)
static int num_events
return PAPI_OK
Definition: linux-nvml.c:458
int i
Definition: fileop.c:140
long long counts[CORETEMP_MAX_COUNTERS]
long long PAPI_get_real_usec(void)
Definition: papi.c:6125
static long long getEventValue(int index)

Here is the call graph for this function:

int _coretemp_init_thread ( hwd_context_t ctx)

Definition at line 329 of file linux-coretemp.c.

330 {
331  ( void ) ctx;
332  return PAPI_OK;
333 }
return PAPI_OK
Definition: linux-nvml.c:458
void
Definition: iozone.c:18627
int _coretemp_ntv_code_to_descr ( unsigned int  EventCode,
char *  name,
int  len 
)

Definition at line 629 of file linux-coretemp.c.

630 {
631  int index = EventCode;
632 
633  if ( index >= 0 && index < num_events ) {
634  strncpy( name, _coretemp_native_events[index].description, len );
635  return PAPI_OK;
636  }
637  return PAPI_ENOEVNT;
638 }
#define PAPI_ENOEVNT
Definition: fpapi.h:112
static int num_events
return PAPI_OK
Definition: linux-nvml.c:458
static CORETEMP_native_event_entry_t * _coretemp_native_events
char description[PAPI_MAX_STR_LEN]
char * name
Definition: iozone.c:23648
int _coretemp_ntv_code_to_info ( unsigned int  EventCode,
PAPI_event_info_t info 
)

Definition at line 641 of file linux-coretemp.c.

642 {
643 
644  int index = EventCode;
645 
646  if ( ( index < 0) || (index >= num_events )) return PAPI_ENOEVNT;
647 
648  strncpy( info->symbol, _coretemp_native_events[index].name,
649  sizeof(info->symbol));
650 
651  strncpy( info->long_descr, _coretemp_native_events[index].description,
652  sizeof(info->long_descr));
653 
654  strncpy( info->units, _coretemp_native_events[index].units,
655  sizeof(info->units));
656 
657 
658  return PAPI_OK;
659 }
char description[PAPI_MAX_STR_LEN]
#define PAPI_ENOEVNT
Definition: fpapi.h:112
static int num_events
char long_descr[PAPI_HUGE_STR_LEN]
Definition: papi.h:964
char symbol[PAPI_HUGE_STR_LEN]
Definition: papi.h:961
return PAPI_OK
Definition: linux-nvml.c:458
static CORETEMP_native_event_entry_t * _coretemp_native_events
char units[PAPI_MIN_STR_LEN]
char units[PAPI_MIN_STR_LEN]
Definition: papi.h:970
char name[PAPI_MAX_STR_LEN]
int _coretemp_ntv_code_to_name ( unsigned int  EventCode,
char *  name,
int  len 
)

Definition at line 614 of file linux-coretemp.c.

615 {
616  int index = EventCode;
617 
618  if ( index >= 0 && index < num_events ) {
619  strncpy( name, _coretemp_native_events[index].name, len );
620  return PAPI_OK;
621  }
622  return PAPI_ENOEVNT;
623 }
#define PAPI_ENOEVNT
Definition: fpapi.h:112
static int num_events
return PAPI_OK
Definition: linux-nvml.c:458
static CORETEMP_native_event_entry_t * _coretemp_native_events
char * name
Definition: iozone.c:23648
int _coretemp_ntv_enum_events ( unsigned int EventCode,
int  modifier 
)

Definition at line 575 of file linux-coretemp.c.

576 {
577 
578  int index;
579 
580  switch ( modifier ) {
581 
582  case PAPI_ENUM_FIRST:
583 
584  if (num_events==0) {
585  return PAPI_ENOEVNT;
586  }
587  *EventCode = 0;
588 
589  return PAPI_OK;
590 
591 
592  case PAPI_ENUM_EVENTS:
593 
594  index = *EventCode;
595 
596  if ( index < num_events - 1 ) {
597  *EventCode = *EventCode + 1;
598  return PAPI_OK;
599  } else {
600  return PAPI_ENOEVNT;
601  }
602  break;
603 
604  default:
605  return PAPI_EINVAL;
606  }
607  return PAPI_EINVAL;
608 }
#define PAPI_ENOEVNT
Definition: fpapi.h:112
static int num_events
return PAPI_OK
Definition: linux-nvml.c:458
return PAPI_EINVAL
Definition: linux-nvml.c:408
int _coretemp_read ( hwd_context_t ctx,
hwd_control_state_t ctl,
long long **  events,
int  flags 
)

Definition at line 432 of file linux-coretemp.c.

434 {
435  (void) flags;
436  (void) ctx;
437 
439  long long now = PAPI_get_real_usec();
440  int i;
441 
442  /* Only read the values from the kernel if enough time has passed */
443  /* since the last read. Otherwise return cached values. */
444 
445  if ( now - control->lastupdate > REFRESH_LAT ) {
446  for ( i = 0; i < num_events; i++ ) {
447  control->counts[i] = getEventValue( i );
448  }
449  control->lastupdate = now;
450  }
451 
452  /* Pass back a pointer to our results */
453  *events = control->counts;
454 
455  return PAPI_OK;
456 }
long long flags
Definition: iozone.c:12330
static int num_events
return PAPI_OK
Definition: linux-nvml.c:458
void
Definition: iozone.c:18627
int i
Definition: fileop.c:140
long long counts[CORETEMP_MAX_COUNTERS]
char events[MAX_EVENTS][BUFSIZ]
#define REFRESH_LAT
long long PAPI_get_real_usec(void)
Definition: papi.c:6125
static long long getEventValue(int index)

Here is the call graph for this function:

int _coretemp_reset ( hwd_context_t ctx,
hwd_control_state_t ctl 
)

Definition at line 562 of file linux-coretemp.c.

563 {
564  ( void ) ctx;
565  ( void ) ctl;
566 
567  return PAPI_OK;
568 }
return PAPI_OK
Definition: linux-nvml.c:458
void
Definition: iozone.c:18627
int _coretemp_set_domain ( hwd_control_state_t cntl,
int  domain 
)

Definition at line 540 of file linux-coretemp.c.

541 {
542  int found = 0;
543  ( void ) cntl;
544 
545  if ( PAPI_DOM_USER & domain )
546  found = 1;
547 
548  if ( PAPI_DOM_KERNEL & domain )
549  found = 1;
550 
551  if ( PAPI_DOM_OTHER & domain )
552  found = 1;
553 
554  if ( !found )
555  return PAPI_EINVAL;
556 
557  return PAPI_OK;
558 }
return PAPI_OK
Definition: linux-nvml.c:458
#define PAPI_DOM_OTHER
Definition: fpapi.h:23
#define PAPI_DOM_KERNEL
Definition: fpapi.h:22
void
Definition: iozone.c:18627
return PAPI_EINVAL
Definition: linux-nvml.c:408
long long found
Definition: libasync.c:735
#define PAPI_DOM_USER
Definition: fpapi.h:21
int _coretemp_shutdown_component ( )

Definition at line 486 of file linux-coretemp.c.

487 {
488  if ( is_initialized ) {
489  is_initialized = 0;
492  }
493  return PAPI_OK;
494 }
#define papi_free(a)
Definition: papi_memory.h:35
return PAPI_OK
Definition: linux-nvml.c:458
static CORETEMP_native_event_entry_t * _coretemp_native_events
static int is_initialized
int _coretemp_shutdown_thread ( hwd_context_t ctx)

Definition at line 475 of file linux-coretemp.c.

476 {
477  ( void ) ctx;
478  return PAPI_OK;
479 }
return PAPI_OK
Definition: linux-nvml.c:458
void
Definition: iozone.c:18627
int _coretemp_start ( hwd_context_t ctx,
hwd_control_state_t ctl 
)

Definition at line 423 of file linux-coretemp.c.

424 {
425  ( void ) ctx;
426  ( void ) ctl;
427 
428  return PAPI_OK;
429 }
return PAPI_OK
Definition: linux-nvml.c:458
void
Definition: iozone.c:18627
int _coretemp_stop ( hwd_context_t ctx,
hwd_control_state_t ctl 
)

Definition at line 459 of file linux-coretemp.c.

460 {
461  (void) ctx;
462  /* read values */
464  int i;
465 
466  for ( i = 0; i < num_events; i++ ) {
467  control->counts[i] = getEventValue( i );
468  }
469 
470  return PAPI_OK;
471 }
static int num_events
return PAPI_OK
Definition: linux-nvml.c:458
void
Definition: iozone.c:18627
int i
Definition: fileop.c:140
long long counts[CORETEMP_MAX_COUNTERS]
static long long getEventValue(int index)

Here is the call graph for this function:

int _coretemp_update_control_state ( hwd_control_state_t ptr,
NativeInfo_t native,
int  count,
hwd_context_t ctx 
)

Definition at line 513 of file linux-coretemp.c.

516 {
517  int i, index;
518  ( void ) ctx;
519  ( void ) ptr;
520 
521  for ( i = 0; i < count; i++ ) {
522  index = native[i].ni_event;
524  }
525  return PAPI_OK;
526 }
return PAPI_OK
Definition: linux-nvml.c:458
int count
Definition: iozone.c:22422
static CORETEMP_native_event_entry_t * _coretemp_native_events
void
Definition: iozone.c:18627
unsigned int selector
int i
Definition: fileop.c:140
CORETEMP_register_t resources
static int generateEventList ( char *  base_dir)
static

Definition at line 91 of file linux-coretemp.c.

92 {
94  char modulename[PAPI_MIN_STR_LEN],
99  DIR *dir,*d;
100  FILE *fff;
101  int count = 0;
102  struct dirent *hwmonx;
103  int i,pathnum;
104 
105 #define NUM_PATHS 2
106  char paths[NUM_PATHS][PATH_MAX]={
107  "device","."
108  };
109 
110  /* Open "/sys/class/hwmon" */
111  dir = opendir(base_dir);
112  if ( dir == NULL ) {
113  SUBDBG("Can't find %s, are you sure the coretemp module is loaded?\n",
114  base_dir);
115  return 0;
116  }
117 
118  /* Iterate each /sys/class/hwmonX/device directory */
119  while( (hwmonx = readdir(dir) ) ) {
120  if ( !strncmp("hwmon", hwmonx->d_name, 5) ) {
121 
122  /* Found a hwmon directory */
123 
124  /* Sometimes the files are in ./, sometimes in device/ */
125  for(pathnum=0;pathnum<NUM_PATHS;pathnum++) {
126 
127  snprintf(path, PATH_MAX, "%s/%s/%s",
128  base_dir, hwmonx->d_name,paths[pathnum]);
129 
130  SUBDBG("Trying to open %s\n",path);
131  d = opendir(path);
132  if (d==NULL) {
133  continue;
134  }
135 
136  /* Get the name of the module */
137 
138  snprintf(filename, PAPI_MAX_STR_LEN, "%s/name",path);
139  fff=fopen(filename,"r");
140  if (fff==NULL) {
141  snprintf(modulename, PAPI_MIN_STR_LEN, "Unknown");
142  } else {
143  if (fgets(modulename,PAPI_MIN_STR_LEN,fff)!=NULL) {
144  modulename[strlen(modulename)-1]='\0';
145  }
146  fclose(fff);
147  }
148 
149  SUBDBG("Found module %s\n",modulename);
150 
151  /******************************************************/
152  /* Try handling all events starting with in (voltage) */
153  /******************************************************/
154 
155 
156  /* arbitrary maximum */
157  /* the problem is the numbering can be sparse */
158  /* should probably go back to dirent listing */
159 
160  for(i=0;i<32;i++) {
161 
162  /* Try looking for a location label */
163  snprintf(filename, PAPI_MAX_STR_LEN, "%s/in%d_label",
164  path,i);
165  fff=fopen(filename,"r");
166  if (fff==NULL) {
167  strncpy(location,"?",PAPI_MIN_STR_LEN);
168  }
169  else {
170  if (fgets(location,PAPI_MIN_STR_LEN,fff)!=NULL) {
171  location[strlen(location)-1]='\0';
172  }
173  fclose(fff);
174  }
175 
176  /* Look for input temperature */
177  snprintf(filename, PAPI_MAX_STR_LEN, "%s/in%d_input",
178  path,i);
179  fff=fopen(filename,"r");
180  if (fff==NULL) continue;
181  fclose(fff);
182 
183  snprintf(name, PAPI_MAX_STR_LEN, "%s:in%i_input",
184  hwmonx->d_name, i);
185  snprintf(units, PAPI_MIN_STR_LEN, "V");
186  snprintf(description, PAPI_MAX_STR_LEN, "%s, %s module, label %s",
187  units,modulename,
188  location);
189 
190  if (insert_in_list(name,units,description,filename)!=PAPI_OK) {
191  goto done_error;
192  }
193 
194  count++;
195 
196  }
197 
198  /************************************************************/
199  /* Try handling all events starting with temp (temperature) */
200  /************************************************************/
201 
202  for(i=0;i<32;i++) {
203 
204  /* Try looking for a location label */
205  snprintf(filename, PAPI_MAX_STR_LEN, "%s/temp%d_label",
206  path,i);
207  fff=fopen(filename,"r");
208  if (fff==NULL) {
209  strncpy(location,"?",PAPI_MIN_STR_LEN);
210  }
211  else {
212  if (fgets(location,PAPI_MIN_STR_LEN,fff)!=NULL) {
213  location[strlen(location)-1]='\0';
214  }
215  fclose(fff);
216  }
217 
218  /* Look for input temperature */
219  snprintf(filename, PAPI_MAX_STR_LEN, "%s/temp%d_input",
220  path,i);
221  fff=fopen(filename,"r");
222  if (fff==NULL) continue;
223  fclose(fff);
224 
225  snprintf(name, PAPI_MAX_STR_LEN, "%s:temp%i_input",
226  hwmonx->d_name, i);
227  snprintf(units, PAPI_MIN_STR_LEN, "degrees C");
228  snprintf(description, PAPI_MAX_STR_LEN, "%s, %s module, label %s",
229  units,modulename,
230  location);
231 
232  if (insert_in_list(name,units,description,filename)!=PAPI_OK) {
233  goto done_error;
234  }
235 
236  count++;
237  }
238 
239  /************************************************************/
240  /* Try handling all events starting with fan (fan) */
241  /************************************************************/
242 
243  for(i=0;i<32;i++) {
244 
245  /* Try looking for a location label */
246  snprintf(filename, PAPI_MAX_STR_LEN, "%s/fan%d_label",
247  path,i);
248  fff=fopen(filename,"r");
249  if (fff==NULL) {
250  strncpy(location,"?",PAPI_MIN_STR_LEN);
251  }
252  else {
253  if (fgets(location,PAPI_MIN_STR_LEN,fff)!=NULL) {
254  location[strlen(location)-1]='\0';
255  }
256  fclose(fff);
257  }
258 
259  /* Look for input fan */
260  snprintf(filename, PAPI_MAX_STR_LEN, "%s/fan%d_input",
261  path,i);
262  fff=fopen(filename,"r");
263  if (fff==NULL) continue;
264  fclose(fff);
265 
266  snprintf(name, PAPI_MAX_STR_LEN, "%s:fan%i_input",
267  hwmonx->d_name, i);
268  snprintf(units, PAPI_MIN_STR_LEN, "RPM");
269  snprintf(description, PAPI_MAX_STR_LEN, "%s, %s module, label %s",
270  units,modulename,
271  location);
272 
273  if (insert_in_list(name,units,description,filename)!=PAPI_OK) {
274  goto done_error;
275  }
276 
277  count++;
278 
279  }
280  closedir(d);
281  }
282  }
283  }
284 
285  closedir(dir);
286  return count;
287 
288 done_error:
289  closedir(d);
290  closedir(dir);
291  return PAPI_ECMP;
292 }
#define PAPI_MAX_STR_LEN
Definition: fpapi.h:43
#define PAPI_MIN_STR_LEN
Definition: fpapi.h:41
return PAPI_OK
Definition: linux-nvml.c:458
int count
Definition: iozone.c:22422
char filename[MAXNAMESIZE]
Definition: iozone.c:1360
fclose(thread_wqfd)
FILE * fff[MAX_EVENTS]
int i
Definition: fileop.c:140
#define PAPI_ECMP
Definition: fpapi.h:109
char units[PAPI_MIN_STR_LEN]
char description[PAPI_MAX_STR_LEN]
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
#define NUM_PATHS
char location[PAPI_MAX_STR_LEN]
static int insert_in_list(char *name, char *units, char *description, char *filename)
#define PATH_MAX
Definition: fileop.c:68
char * name
Definition: iozone.c:23648
char path[PATH_MAX]

Here is the call graph for this function:

Here is the caller graph for this function:

static long long getEventValue ( int  index)
static

Definition at line 295 of file linux-coretemp.c.

296 {
297  char buf[PAPI_MAX_STR_LEN];
298  FILE* fp;
299  long result;
300 
301  if (_coretemp_native_events[index].stone) {
302  return _coretemp_native_events[index].value;
303  }
304 
305  fp = fopen(_coretemp_native_events[index].path, "r");
306  if (fp==NULL) {
307  return INVALID_RESULT;
308  }
309 
310  if (fgets(buf, PAPI_MAX_STR_LEN, fp)==NULL) {
311  result=INVALID_RESULT;
312  }
313  else {
314  result=strtoll(buf, NULL, 10);
315  }
316  fclose(fp);
317 
318  return result;
319 }
#define PAPI_MAX_STR_LEN
Definition: fpapi.h:43
#define INVALID_RESULT
fclose(thread_wqfd)
static CORETEMP_native_event_entry_t * _coretemp_native_events
char buf[200]
Definition: iozone.c:19609
static FILE * fp
long value

Here is the call graph for this function:

Here is the caller graph for this function:

static int insert_in_list ( char *  name,
char *  units,
char *  description,
char *  filename 
)
static

Definition at line 44 of file linux-coretemp.c.

45  {
46 
47 
48  struct temp_event *temp;
49 
50 
51  /* new_event path, events->d_name */
52  temp = (struct temp_event *) papi_calloc(sizeof(struct temp_event),1);
53  if (temp==NULL) {
54  PAPIERROR("out of memory!");
55  /* We should also free any previously allocated data */
56  return PAPI_ENOMEM;
57  }
58 
59  temp->next = NULL;
60 
61  if (root == NULL) {
62  root = temp;
63  }
64  else if (last) {
65  last->next = temp;
66  }
67  else {
68  /* Because this is a function, it is possible */
69  /* we are called with root!=NULL but no last */
70  /* so add this to keep coverity happy */
71  free(temp);
72  PAPIERROR("This shouldn't be possible\n");
73 
74  return PAPI_ECMP;
75  }
76 
77  last = temp;
78 
79  snprintf(temp->name, PAPI_MAX_STR_LEN, "%s", name);
80  snprintf(temp->units, PAPI_MIN_STR_LEN, "%s", units);
81  snprintf(temp->description, PAPI_MAX_STR_LEN, "%s", description);
82  snprintf(temp->path, PATH_MAX, "%s", filename);
83 
84  return PAPI_OK;
85 }
#define PAPI_ENOMEM
Definition: fpapi.h:107
#define PAPI_MAX_STR_LEN
Definition: fpapi.h:43
#define PAPI_MIN_STR_LEN
Definition: fpapi.h:41
return PAPI_OK
Definition: linux-nvml.c:458
static struct temp_event * root
char filename[MAXNAMESIZE]
Definition: iozone.c:1360
struct temp_event * next
char name[PAPI_MAX_STR_LEN]
free(dummyfile[xx])
#define PAPI_ECMP
Definition: fpapi.h:109
char units[PAPI_MIN_STR_LEN]
char description[PAPI_MAX_STR_LEN]
void PAPIERROR(char *format,...)
static struct temp_event * last
#define PATH_MAX
Definition: fileop.c:68
char * name
Definition: iozone.c:23648
int temp
Definition: iozone.c:22158
char path[PATH_MAX]
#define papi_calloc(a, b)
Definition: papi_memory.h:37

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

CORETEMP_native_event_entry_t* _coretemp_native_events
static

Definition at line 32 of file linux-coretemp.c.

papi_vector_t _coretemp_vector

Definition at line 17 of file linux-coretemp.c.

int is_initialized = 0
static

Definition at line 34 of file linux-coretemp.c.

struct temp_event* last = NULL
static

Definition at line 41 of file linux-coretemp.c.

int num_events = 0
static

Definition at line 33 of file linux-coretemp.c.

struct temp_event* root = NULL
static

Definition at line 40 of file linux-coretemp.c.