PAPI  5.3.2.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
freebsd.c File Reference
Include dependency graph for freebsd.c:

Go to the source code of this file.

Functions

long long _papi_freebsd_get_real_cycles (void)
 
int _papi_freebsd_ntv_code_to_name (unsigned int EventCode, char *ntv_name, int len)
 
static void show_counter (char *string, int id, char *name, const char *function, char *file, int line)
 
int init_mdi (void)
 
int init_presets (int cidx)
 
int _papi_freebsd_init_component (int cidx)
 
int _papi_freebsd_init_thread (hwd_context_t *ctx)
 
int _papi_freebsd_shutdown_thread (hwd_context_t *ctx)
 
int _papi_freebsd_shutdown_component (void)
 
int _papi_freebsd_init_control_state (hwd_control_state_t *ptr)
 
int _papi_freebsd_update_control_state (hwd_control_state_t *ptr, NativeInfo_t *native, int count, hwd_context_t *ctx)
 
int _papi_freebsd_start (hwd_context_t *ctx, hwd_control_state_t *ctrl)
 
int _papi_freebsd_read (hwd_context_t *ctx, hwd_control_state_t *ctrl, long long **events, int flags)
 
int _papi_freebsd_stop (hwd_context_t *ctx, hwd_control_state_t *ctrl)
 
int _papi_freebsd_reset (hwd_context_t *ctx, hwd_control_state_t *ctrl)
 
int _papi_freebsd_write (hwd_context_t *ctx, hwd_control_state_t *ctrl, long long *from)
 
void _papi_freebsd_dispatch_timer (int signal, hwd_siginfo_t *info, void *context)
 
int _papi_freebsd_stop_profiling (ThreadInfo_t *master, EventSetInfo_t *ESI)
 
int _papi_freebsd_set_overflow (EventSetInfo_t *ESI, int EventIndex, int threshold)
 
int _papi_freebsd_set_profile (EventSetInfo_t *ESI, int EventIndex, int threashold)
 
int _papi_freebsd_set_domain (hwd_control_state_t *cntrl, int domain)
 
int _papi_freebsd_ctl (hwd_context_t *ctx, int code, _papi_int_option_t *option)
 
long long _papi_freebsd_get_real_usec (void)
 
long long _papi_freebsd_get_virt_usec (void)
 
int _papi_freebsd_ntv_enum_events (unsigned int *EventCode, int modifier)
 
int _papi_freebsd_ntv_name_to_code (char *name, unsigned int *event_code)
 
int _papi_freebsd_ntv_code_to_descr (unsigned int EventCode, char *descr, int len)
 
int _papi_freebsd_allocate_registers (EventSetInfo_t *ESI)
 
int _papi_freebsd_update_shlib_info (papi_mdi_t *mdi)
 
int _papi_freebsd_detect_hypervisor (char *virtual_vendor_name)
 
int _papi_freebsd_get_system_info (papi_mdi_t *mdi)
 
int _papi_hwi_init_os (void)
 

Variables

PAPI_os_info_t _papi_os_info
 
papi_vector_t _papi_freebsd_vector
 
static hwd_libpmc_context_t Context
 
papi_os_vector_t _papi_os_vector
 

Function Documentation

int _papi_freebsd_allocate_registers ( EventSetInfo_t ESI)

Definition at line 808 of file freebsd.c.

809 {
810  char name[1024];
811  int failed, allocated_counters, i, j, ret;
812  pmc_id_t *pmcs;
813 
814  SUBDBG("Entering\n");
815 
816  failed = 0;
817  pmcs = (pmc_id_t*) malloc(sizeof(pmc_id_t)*ESI->NativeCount);
818  if (pmcs != NULL)
819  {
820  allocated_counters = 0;
821  /* Check if we can allocate all the counters needed */
822  for (i = 0; i < ESI->NativeCount; i++)
823  {
824  ret = _papi_freebsd_ntv_code_to_name (ESI->NativeInfoArray[i].ni_event, name, sizeof(name));
825  if (ret != PAPI_OK)
826  return ret;
827  if ( (ret = pmc_allocate (name, PMC_MODE_TC, 0, PMC_CPU_ANY, &pmcs[i])) < 0)
828  {
829 #if defined(DEBUG)
830  fprintf (stderr, "DEBUG: %s FAILED to allocate '%s' (%#08x) [%d of %d] ERROR = %d\n", FUNC, name, ESI->NativeInfoArray[i].ni_event, i+1, ESI->NativeCount, ret);
831 #endif
832  failed = 1;
833  break;
834  }
835  else
836  {
837 #if defined(DEBUG)
838  fprintf (stderr, "DEBUG: %s SUCCEEDED allocating '%s' (%#08x) [%d of %d]\n", FUNC, name, ESI->NativeInfoArray[i].ni_event, i+1, ESI->NativeCount);
839 #endif
840  allocated_counters++;
841  }
842  }
843  /* Free the counters */
844  for (j = 0; j < allocated_counters; j++)
845  pmc_release (pmcs[j]);
846  free (pmcs);
847  }
848  else
849  failed = 1;
850 
851  return failed?PAPI_ECNFLCT:PAPI_OK;
852 }
#define FUNC
Definition: papi_debug.h:50
return PAPI_OK
Definition: linux-nvml.c:458
#define PAPI_ECNFLCT
Definition: fpapi.h:113
long long ret
Definition: iozone.c:1346
int i
Definition: fileop.c:140
free(dummyfile[xx])
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
NativeInfo_t * NativeInfoArray
int _papi_freebsd_ntv_code_to_name(unsigned int EventCode, char *ntv_name, int len)
Definition: freebsd.c:763
char * name
Definition: iozone.c:23648
long j
Definition: iozone.c:19135

Here is the call graph for this function:

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

Definition at line 627 of file freebsd.c.

628 {
629  (void)ctx;
630  SUBDBG("Entering\n");
631  switch (code)
632  {
633  case PAPI_DOMAIN:
634  case PAPI_DEFDOM:
635  /*return _papi_freebsd_set_domain(&option->domain.ESI->machdep, option->domain.domain);*/
636  return _papi_freebsd_set_domain(option->domain.ESI->ctl_state, option->domain.domain);
637  case PAPI_GRANUL:
638  case PAPI_DEFGRN:
639  return PAPI_ECMP;
640  default:
641  return PAPI_EINVAL;
642  }
643 }
void
Definition: iozone.c:18627
return PAPI_EINVAL
Definition: linux-nvml.c:408
#define PAPI_ECMP
Definition: fpapi.h:109
#define PAPI_DEFDOM
Definition: fpapi.h:49
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
EventSetInfo_t * ESI
#define PAPI_DOMAIN
Definition: fpapi.h:50
#define PAPI_DEFGRN
Definition: fpapi.h:51
#define PAPI_GRANUL
Definition: fpapi.h:52
int _papi_freebsd_set_domain(hwd_control_state_t *cntrl, int domain)
Definition: freebsd.c:603
_papi_int_domain_t domain
hwd_control_state_t * ctl_state

Here is the call graph for this function:

int _papi_freebsd_detect_hypervisor ( char *  virtual_vendor_name)

Definition at line 866 of file freebsd.c.

866  {
867 
868  int retval=0;
869 
870 #if defined(__i386__)||defined(__x86_64__)
871  retval=_x86_detect_hypervisor(virtual_vendor_name);
872 #else
873  (void) virtual_vendor_name;
874 #endif
875 
876  return retval;
877 }
void
Definition: iozone.c:18627
int _x86_detect_hypervisor(char *vendor_name)
ssize_t retval
Definition: libasync.c:338

Here is the call graph for this function:

Here is the caller graph for this function:

void _papi_freebsd_dispatch_timer ( int  signal,
hwd_siginfo_t info,
void context 
)

Definition at line 551 of file freebsd.c.

552 {
553  (void)signal;
554  (void)info;
555  (void)context;
556  /* Real function would call the function below with the proper args
557  * _papi_hwi_dispatch_overflow_signal(...);
558  */
559  SUBDBG("Entering\n");
560  return;
561 }
void
Definition: iozone.c:18627
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
signal(SIGINT, signal_handler)
long long _papi_freebsd_get_real_cycles ( void  )

Definition at line 678 of file freebsd.c.

679 {
680  /* Hey, I've seen somewhere a define called __x86_64__! Should I support it? */
681 #if !defined(__i386__) && !defined(__amd64__)
682  SUBDBG("Entering\n");
683  /* This will surely work, but with low precision and high overhead */
685 #else
686  SUBDBG("Entering\n");
687  if (Context.use_rdtsc)
688  {
689  long long cycles;
690  __asm __volatile(".byte 0x0f, 0x31" : "=A" (cycles));
691  return cycles;
692  }
693  else
694  {
696  }
697 #endif
698 }
long long _papi_freebsd_get_real_usec(void)
Definition: freebsd.c:650
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
papi_mdi_t _papi_hwi_system_info
Definition: papi_internal.c:57
PAPI_hw_info_t hw_info
static hwd_libpmc_context_t Context
Definition: freebsd.c:65
int cpu_max_mhz
Definition: papi.h:791

Here is the call graph for this function:

Here is the caller graph for this function:

long long _papi_freebsd_get_real_usec ( void  )

Definition at line 650 of file freebsd.c.

651 {
652  /* Hey, I've seen somewhere a define called __x86_64__! Should I support it? */
653 #if !defined(__i386__) && !defined(__amd64__)
654  /* This will surely work, but with low precision and high overhead */
655  struct rusage res;
656 
657  SUBDBG("Entering\n");
658  if ((getrusage(RUSAGE_SELF, &res) == -1))
659  return PAPI_ESYS;
660  return (res.ru_utime.tv_sec * 1000000) + res.ru_utime.tv_usec;
661 #else
662  SUBDBG("Entering\n");
663  if (Context.use_rdtsc)
664  {
666  }
667  else
668  {
669  struct rusage res;
670  if ((getrusage(RUSAGE_SELF, &res) == -1))
671  return PAPI_ESYS;
672  return (res.ru_utime.tv_sec * 1000000) + res.ru_utime.tv_usec;
673  }
674 #endif
675 }
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
#define PAPI_ESYS
Definition: fpapi.h:108
papi_mdi_t _papi_hwi_system_info
Definition: papi_internal.c:57
PAPI_hw_info_t hw_info
static hwd_libpmc_context_t Context
Definition: freebsd.c:65
int cpu_max_mhz
Definition: papi.h:791
long long _papi_freebsd_get_real_cycles(void)
Definition: freebsd.c:678

Here is the call graph for this function:

Here is the caller graph for this function:

int _papi_freebsd_get_system_info ( papi_mdi_t mdi)

Definition at line 882 of file freebsd.c.

882  {
883 
884  int retval;
885 
886  retval=_freebsd_get_memory_info(&mdi->hw_info, mdi->hw_info.model );
887 
888  /* Get virtualization info */
890 
891 
892  return PAPI_OK;
893 
894 }
return PAPI_OK
Definition: linux-nvml.c:458
char virtual_vendor_string[PAPI_MAX_STR_LEN]
Definition: papi.h:796
int _freebsd_get_memory_info(PAPI_hw_info_t *hw_info, int id)
PAPI_hw_info_t hw_info
int model
Definition: papi.h:784
int virtualized
Definition: papi.h:795
int _papi_freebsd_detect_hypervisor(char *virtual_vendor_name)
Definition: freebsd.c:866
ssize_t retval
Definition: libasync.c:338

Here is the call graph for this function:

Here is the caller graph for this function:

long long _papi_freebsd_get_virt_usec ( void  )

Definition at line 702 of file freebsd.c.

703 {
704  struct rusage res;
705 
706  SUBDBG("Entering\n");
707 
708  if ((getrusage(RUSAGE_SELF, &res) == -1))
709  return PAPI_ESYS;
710  return (res.ru_utime.tv_sec * 1000000) + res.ru_utime.tv_usec;
711 }
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
#define PAPI_ESYS
Definition: fpapi.h:108
int _papi_freebsd_init_component ( int  cidx)

Definition at line 213 of file freebsd.c.

214 {
215  (void)cidx;
216 
217  int retval;
218 
219  SUBDBG("Entering\n");
220 
221  /* Internal function, doesn't necessarily need to be a function */
222  retval=init_presets(cidx);
223 
224  return retval;
225 }
void
Definition: iozone.c:18627
int init_presets(int cidx)
Definition: freebsd.c:151
static int cidx
Definition: event_info.c:40
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
ssize_t retval
Definition: libasync.c:338

Here is the call graph for this function:

int _papi_freebsd_init_control_state ( hwd_control_state_t ptr)

Definition at line 258 of file freebsd.c.

259 {
260  /* We will default to gather counters in USER|KERNEL mode */
261  SUBDBG("Entering\n");
263  ptr->pmcs = NULL;
264  ptr->counters = NULL;
265  ptr->n_counters = 0;
266  return PAPI_OK;
267 }
return PAPI_OK
Definition: linux-nvml.c:458
#define PAPI_DOM_KERNEL
Definition: fpapi.h:22
pmc_id_t * pmcs
Definition: freebsd.h:57
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
char ** counters
Definition: freebsd.h:59
#define PAPI_DOM_USER
Definition: fpapi.h:21
int _papi_freebsd_init_thread ( hwd_context_t ctx)

Definition at line 233 of file freebsd.c.

234 {
235  (void)ctx;
236  SUBDBG("Entering\n");
237  return PAPI_OK;
238 }
return PAPI_OK
Definition: linux-nvml.c:458
void
Definition: iozone.c:18627
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
int _papi_freebsd_ntv_code_to_descr ( unsigned int  EventCode,
char *  descr,
int  len 
)

Definition at line 784 of file freebsd.c.

785 {
786  SUBDBG("Entering\n");
787  int nidx;
788 
789  nidx = EventCode & PAPI_NATIVE_AND_MASK;
791  return PAPI_ENOEVNT;
792  }
793 
794  strncpy (descr, _papi_hwd_native_info[Context.CPUtype].info[nidx].description, len);
795  if (strlen(_papi_hwd_native_info[Context.CPUtype].info[nidx].description) > (size_t)len-1) {
796  return PAPI_EBUF;
797  }
798  return PAPI_OK;
799 }
Native_Event_LabelDescription_t * info
Definition: map.h:47
#define PAPI_ENOEVNT
Definition: fpapi.h:112
papi_vector_t _papi_freebsd_vector
Definition: freebsd.c:33
Native_Event_Info_t _papi_hwd_native_info[CPU_LAST+1]
Definition: map.c:17
return PAPI_OK
Definition: linux-nvml.c:458
PAPI_component_info_t cmp_info
Definition: papi_vector.h:20
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
static hwd_libpmc_context_t Context
Definition: freebsd.c:65
#define PAPI_EBUF
Definition: fpapi.h:125
#define PAPI_NATIVE_AND_MASK
int _papi_freebsd_ntv_code_to_name ( unsigned int  EventCode,
char *  ntv_name,
int  len 
)

Definition at line 763 of file freebsd.c.

765 {
766  SUBDBG("Entering\n");
767 
768  int nidx;
769 
770  nidx = EventCode & PAPI_NATIVE_AND_MASK;
771 
773  return PAPI_ENOEVNT;
774  }
775 
776  strncpy (ntv_name,
778  if (strlen(_papi_hwd_native_info[Context.CPUtype].info[nidx].name) > (size_t)len-1) {
779  return PAPI_EBUF;
780  }
781  return PAPI_OK;
782 }
Native_Event_LabelDescription_t * info
Definition: map.h:47
#define PAPI_ENOEVNT
Definition: fpapi.h:112
papi_vector_t _papi_freebsd_vector
Definition: freebsd.c:33
Native_Event_Info_t _papi_hwd_native_info[CPU_LAST+1]
Definition: map.c:17
return PAPI_OK
Definition: linux-nvml.c:458
PAPI_component_info_t cmp_info
Definition: papi_vector.h:20
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
static hwd_libpmc_context_t Context
Definition: freebsd.c:65
#define PAPI_EBUF
Definition: fpapi.h:125
#define PAPI_NATIVE_AND_MASK

Here is the caller graph for this function:

int _papi_freebsd_ntv_enum_events ( unsigned int EventCode,
int  modifier 
)

Definition at line 718 of file freebsd.c.

719 {
720  int res;
721  char name[1024];
722  unsigned int nextCode = 1 + *EventCode;
723 
724  SUBDBG("Entering\n");
725 
726  if (modifier==PAPI_ENUM_FIRST) {
727 
728  *EventCode=0;
729 
730  return PAPI_OK;
731  }
732 
733  if (modifier==PAPI_ENUM_EVENTS) {
734 
735  res = _papi_freebsd_ntv_code_to_name(nextCode, name, sizeof(name));
736  if (res != PAPI_OK) {
737  return res;
738  } else {
739  *EventCode = nextCode;
740  }
741  return PAPI_OK;
742  }
743 
744  return PAPI_ENOEVNT;
745 
746 }
#define PAPI_ENOEVNT
Definition: fpapi.h:112
return PAPI_OK
Definition: linux-nvml.c:458
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
int _papi_freebsd_ntv_code_to_name(unsigned int EventCode, char *ntv_name, int len)
Definition: freebsd.c:763
char * name
Definition: iozone.c:23648

Here is the call graph for this function:

int _papi_freebsd_ntv_name_to_code ( char *  name,
unsigned int event_code 
)

Definition at line 748 of file freebsd.c.

748  {
749 
750  SUBDBG("Entering\n");
751 
752  int i;
753 
754  for(i = 0; i < _papi_freebsd_vector.cmp_info.num_native_events; i++) {
755  if (strcmp (name, _papi_hwd_native_info[Context.CPUtype].info[i].name) == 0) {
756  *event_code = i;
757  return PAPI_OK;
758  }
759  }
760  return PAPI_ENOEVNT;
761 }
Native_Event_LabelDescription_t * info
Definition: map.h:47
#define PAPI_ENOEVNT
Definition: fpapi.h:112
papi_vector_t _papi_freebsd_vector
Definition: freebsd.c:33
Native_Event_Info_t _papi_hwd_native_info[CPU_LAST+1]
Definition: map.c:17
return PAPI_OK
Definition: linux-nvml.c:458
PAPI_component_info_t cmp_info
Definition: papi_vector.h:20
int i
Definition: fileop.c:140
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
static hwd_libpmc_context_t Context
Definition: freebsd.c:65
char * name
Definition: iozone.c:23648
int _papi_freebsd_read ( hwd_context_t ctx,
hwd_control_state_t ctrl,
long long **  events,
int  flags 
)

Definition at line 390 of file freebsd.c.

391 {
392  int i, ret;
393  (void)ctx;
394  (void)flags;
395 
396  SUBDBG("Entering\n");
397 
398  for (i = 0; i < ctrl->n_counters; i++)
399  if ((ret = pmc_read (ctrl->pmcs[i], &(ctrl->values[i]))) < 0)
400  {
401 #if defined(DEBUG)
402  fprintf (stderr, "DEBUG: %s FAILED to read '%s' [%d of %d] ERROR = %d\n", FUNC, ctrl->counters[i], i+1, ctrl->n_counters, ret);
403 #endif
404  return PAPI_ESYS;
405  }
406  *events = (long long *)ctrl->values;
407 
408 #if defined(DEBUG)
409  for (i = 0; i < ctrl->n_counters; i++)
410  fprintf (stderr, "DEBUG: %s counter '%s' has value %lld\n",
411  FUNC, ctrl->counters[i], (long long)ctrl->values[i]);
412 #endif
413  return PAPI_OK;
414 }
#define FUNC
Definition: papi_debug.h:50
long long flags
Definition: iozone.c:12330
pmc_value_t * values
Definition: freebsd.h:58
return PAPI_OK
Definition: linux-nvml.c:458
void
Definition: iozone.c:18627
pmc_id_t * pmcs
Definition: freebsd.h:57
long long ret
Definition: iozone.c:1346
int i
Definition: fileop.c:140
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
char events[MAX_EVENTS][BUFSIZ]
char ** counters
Definition: freebsd.h:59
#define PAPI_ESYS
Definition: fpapi.h:108
int _papi_freebsd_reset ( hwd_context_t ctx,
hwd_control_state_t ctrl 
)

Definition at line 444 of file freebsd.c.

445 {
446  int i, ret;
447  (void)ctx;
448 
449  SUBDBG("Entering\n");
450 
451  for (i = 0; i < ctrl->n_counters; i++)
452  {
453  /* Can we write on the counters? */
454  if (ctrl->caps[i] & PMC_CAP_WRITE)
455  {
456  show_counter("DEBUG: _papi_freebsd_reset is about "
457  "to stop the counter i+1",
458  ctrl->pmcs[i],ctrl->counters[i],
459  __FUNCTION__,__FILE__,__LINE__);
460 
461  if ((ret = pmc_stop (ctrl->pmcs[i])) < 0)
462  {
463 #if defined(DEBUG)
464  fprintf (stderr, "DEBUG: %s FAILED to stop '%s' [%d of %d] ERROR = %d\n", FUNC, ctrl->counters[i], i+1, ctrl->n_counters, ret);
465 #endif
466  return PAPI_ESYS;
467  }
468 
469  show_counter(
470  "DEBUG: _papi_freebsd_reset is about "
471  "to write the counter i+1\n",
472  ctrl->pmcs[i],ctrl->counters[i],
473  __FUNCTION__,__FILE__,__LINE__);
474 
475  if ((ret = pmc_write (ctrl->pmcs[i], 0)) < 0)
476  {
477 #if defined(DEBUG)
478  fprintf (stderr, "DEBUG: %s FAILED to write '%s' [%d of %d] ERROR = %d\n", FUNC, ctrl->counters[i], i+1, ctrl->n_counters, ret);
479 #endif
480  return PAPI_ESYS;
481  }
482 
483  show_counter("DEBUG: _papi_freebsd_reset is about to "
484  "start the counter %i+1",
485  ctrl->pmcs[i],ctrl->counters[i],
486  __FUNCTION__,__FILE__,__LINE__);
487 
488  if ((ret = pmc_start (ctrl->pmcs[i])) < 0)
489  {
490 #if defined(DEBUG)
491  fprintf (stderr, "DEBUG: %s FAILED to start '%s' [%d of %d] ERROR = %d\n", FUNC, ctrl->counters[i], i+1, ctrl->n_counters, ret);
492 #endif
493  return PAPI_ESYS;
494  }
495 
496  show_counter("DEBUG: _papi_freebsd_reset after "
497  "starting the counter i+1",
498  ctrl->pmcs[i],ctrl->counters[i],
499  __FUNCTION__,__FILE__,__LINE__);
500 
501  }
502  else
503  return PAPI_ECMP;
504  }
505  return PAPI_OK;
506 }
#define FUNC
Definition: papi_debug.h:50
static void show_counter(char *string, int id, char *name, const char *function, char *file, int line)
Definition: freebsd.c:40
return PAPI_OK
Definition: linux-nvml.c:458
unsigned * caps
Definition: freebsd.h:56
void
Definition: iozone.c:18627
pmc_id_t * pmcs
Definition: freebsd.h:57
long long ret
Definition: iozone.c:1346
int i
Definition: fileop.c:140
#define PAPI_ECMP
Definition: fpapi.h:109
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
char ** counters
Definition: freebsd.h:59
#define PAPI_ESYS
Definition: fpapi.h:108

Here is the call graph for this function:

int _papi_freebsd_set_domain ( hwd_control_state_t cntrl,
int  domain 
)

Definition at line 603 of file freebsd.c.

604 {
605  int found = 0;
606 
607  SUBDBG("Entering\n");
608  /* libpmc supports USER/KERNEL mode only when counters are native */
609  if (Context.CPUtype != CPU_UNKNOWN)
610  {
611  if (domain & (PAPI_DOM_USER|PAPI_DOM_KERNEL))
612  {
613  cntrl->hwc_domain = domain & (PAPI_DOM_USER|PAPI_DOM_KERNEL);
614  found = 1;
615  }
616  return found?PAPI_OK:PAPI_EINVAL;
617  }
618  else
619  return PAPI_ECMP;
620 }
return PAPI_OK
Definition: linux-nvml.c:458
#define PAPI_DOM_KERNEL
Definition: fpapi.h:22
return PAPI_EINVAL
Definition: linux-nvml.c:408
long long found
Definition: libasync.c:735
#define PAPI_ECMP
Definition: fpapi.h:109
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
static hwd_libpmc_context_t Context
Definition: freebsd.c:65
#define PAPI_DOM_USER
Definition: fpapi.h:21

Here is the caller graph for this function:

int _papi_freebsd_set_overflow ( EventSetInfo_t ESI,
int  EventIndex,
int  threshold 
)

Definition at line 571 of file freebsd.c.

572 {
573  (void)ESI;
574  (void)EventIndex;
575  (void)threshold;
576  SUBDBG("Entering\n");
577  return PAPI_OK;
578 }
return PAPI_OK
Definition: linux-nvml.c:458
void
Definition: iozone.c:18627
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
int threshold
int _papi_freebsd_set_profile ( EventSetInfo_t ESI,
int  EventIndex,
int  threashold 
)

Definition at line 580 of file freebsd.c.

581 {
582  (void)ESI;
583  (void)EventIndex;
584  (void)threashold;
585  SUBDBG("Entering\n");
586  return PAPI_OK;
587 }
return PAPI_OK
Definition: linux-nvml.c:458
void
Definition: iozone.c:18627
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
int _papi_freebsd_shutdown_component ( void  )

Definition at line 247 of file freebsd.c.

248 {
249  SUBDBG("Entering\n");
250  return PAPI_OK;
251 }
return PAPI_OK
Definition: linux-nvml.c:458
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
int _papi_freebsd_shutdown_thread ( hwd_context_t ctx)

Definition at line 240 of file freebsd.c.

241 {
242  (void)ctx;
243  SUBDBG("Entering\n");
244  return PAPI_OK;
245 }
return PAPI_OK
Definition: linux-nvml.c:458
void
Definition: iozone.c:18627
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
int _papi_freebsd_start ( hwd_context_t ctx,
hwd_control_state_t ctrl 
)

Definition at line 352 of file freebsd.c.

353 {
354  int i, ret;
355  (void)ctx;
356 
357  SUBDBG("Entering\n");
358 
359  for (i = 0; i < ctrl->n_counters; i++)
360  {
361  if ((ret = pmc_allocate (ctrl->counters[i], PMC_MODE_TC, 0, PMC_CPU_ANY, &(ctrl->pmcs[i]))) < 0)
362  {
363 #if defined(DEBUG)
364  /* This shouldn't happen, it's tested previously on _papi_freebsd_allocate_registers */
365  fprintf (stderr, "DEBUG: %s FAILED to allocate '%s' [%d of %d] ERROR = %d\n", FUNC, ctrl->counters[i], i+1, ctrl->n_counters, ret);
366 #endif
367  return PAPI_ESYS;
368  }
369  if ((ret = pmc_capabilities (ctrl->pmcs[i],&(ctrl->caps[i]))) < 0)
370  {
371 #if defined(DEBUG)
372  fprintf (stderr, "DEBUG: %s FAILED to get capabilites for '%s' [%d of %d] ERROR = %d\n", FUNC, ctrl->counters[i], i+1, ctrl->n_counters, ret);
373 #endif
374  ctrl->caps[i] = 0;
375  }
376 #if defined(DEBUG)
377  fprintf (stderr, "DEBUG: %s got counter '%s' is %swrittable! [%d of %d]\n", FUNC, ctrl->counters[i], (ctrl->caps[i]&PMC_CAP_WRITE)?"":"NOT", i+1, ctrl->n_counters);
378 #endif
379  if ((ret = pmc_start (ctrl->pmcs[i])) < 0)
380  {
381 #if defined(DEBUG)
382  fprintf (stderr, "DEBUG: %s FAILED to start '%s' [%d of %d] ERROR = %d\n", FUNC, ctrl->counters[i], i+1, ctrl->n_counters, ret);
383 #endif
384  return PAPI_ESYS;
385  }
386  }
387  return PAPI_OK;
388 }
#define FUNC
Definition: papi_debug.h:50
return PAPI_OK
Definition: linux-nvml.c:458
unsigned * caps
Definition: freebsd.h:56
void
Definition: iozone.c:18627
pmc_id_t * pmcs
Definition: freebsd.h:57
long long ret
Definition: iozone.c:1346
int i
Definition: fileop.c:140
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
char ** counters
Definition: freebsd.h:59
#define PAPI_ESYS
Definition: fpapi.h:108
int _papi_freebsd_stop ( hwd_context_t ctx,
hwd_control_state_t ctrl 
)

Definition at line 416 of file freebsd.c.

417 {
418  int i, ret;
419  (void)ctx;
420 
421  SUBDBG("Entering\n");
422 
423  for (i = 0; i < ctrl->n_counters; i++)
424  {
425  if ((ret = pmc_stop (ctrl->pmcs[i])) < 0)
426  {
427 #if defined(DEBUG)
428  fprintf (stderr, "DEBUG: %s FAILED to stop '%s' [%d of %d] ERROR = %d\n", FUNC, ctrl->counters[i], i+1, ctrl->n_counters, ret);
429 #endif
430  return PAPI_ESYS;
431  }
432  if ((ret = pmc_release (ctrl->pmcs[i])) < 0)
433  {
434 #if defined(DEBUG)
435  /* This shouldn't happen, it's tested previously on _papi_freebsd_allocate_registers */
436  fprintf (stderr, "DEBUG: %s FAILED to release '%s' [%d of %d] ERROR = %d\n", FUNC, ctrl->counters[i], i+1, ctrl->n_counters, ret);
437 #endif
438  return PAPI_ESYS;
439  }
440  }
441  return PAPI_OK;
442 }
#define FUNC
Definition: papi_debug.h:50
return PAPI_OK
Definition: linux-nvml.c:458
void
Definition: iozone.c:18627
pmc_id_t * pmcs
Definition: freebsd.h:57
long long ret
Definition: iozone.c:1346
int i
Definition: fileop.c:140
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
char ** counters
Definition: freebsd.h:59
#define PAPI_ESYS
Definition: fpapi.h:108
int _papi_freebsd_stop_profiling ( ThreadInfo_t master,
EventSetInfo_t ESI 
)

Definition at line 563 of file freebsd.c.

564 {
565  (void)master;
566  (void)ESI;
567  SUBDBG("Entering\n");
568  return PAPI_OK;
569 }
return PAPI_OK
Definition: linux-nvml.c:458
void
Definition: iozone.c:18627
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
int _papi_freebsd_update_control_state ( hwd_control_state_t ptr,
NativeInfo_t native,
int  count,
hwd_context_t ctx 
)

Definition at line 269 of file freebsd.c.

270 {
271  char name[1024];
272  int i;
273  int res;
274  (void)ctx;
275 
276  SUBDBG("Entering\n");
277 
278  /* We're going to store which counters are being used in this EventSet.
279  As this ptr structure can be reused within many PAPI_add_event calls,
280  and domain can change we will reconstruct the table of counters
281  (ptr->counters) everytime where here.
282  */
283  if (ptr->counters != NULL && ptr->n_counters > 0)
284  {
285  for (i = 0; i < ptr->n_counters; i++)
286  if (ptr->counters[i] != NULL)
287  free (ptr->counters[i]);
288  free (ptr->counters);
289  }
290  if (ptr->pmcs != NULL)
291  free (ptr->pmcs);
292  if (ptr->values != NULL)
293  free (ptr->values);
294  if (ptr->caps != NULL)
295  free (ptr->caps);
296 
297  ptr->n_counters = count;
298  ptr->pmcs = (pmc_id_t*) malloc (sizeof(pmc_id_t)*count);
299  ptr->caps = (uint32_t*) malloc (sizeof(uint32_t)*count);
300  ptr->values = (pmc_value_t*) malloc (sizeof(pmc_value_t)*count);
301  ptr->counters = (char **) malloc (sizeof(char*)*count);
302  for (i = 0; i < count; i++)
303  ptr->counters[i] = NULL;
304 
305  for (i = 0; i < count; i++)
306  {
307  res = _papi_freebsd_ntv_code_to_name (native[i].ni_event, name, sizeof(name));
308  if (res != PAPI_OK)
309  return res;
310 
311  native[i].ni_position = i;
312 
313  /* Domains can be applied to canonical events in libpmc (not "generic") */
314  if (Context.CPUtype != CPU_UNKNOWN)
315  {
317  {
318  /* PMC defaults domain to OS & User. So simply copy the name of the counter */
319  ptr->counters[i] = strdup (name);
320  if (ptr->counters[i] == NULL)
321  return PAPI_ESYS;
322  }
323  else if (ptr->hwc_domain == PAPI_DOM_USER)
324  {
325  /* This is user-domain case. Just add unitmask=usr */
326  ptr->counters[i] = malloc ((strlen(name)+strlen(",usr")+1)*sizeof(char));
327  if (ptr->counters[i] == NULL)
328  return PAPI_ESYS;
329  sprintf (ptr->counters[i], "%s,usr", name);
330  }
331  else /* if (ptr->hwc_domain == PAPI_DOM_KERNEL) */
332  {
333  /* This is the last case. Just add unitmask=os */
334  ptr->counters[i] = malloc ((strlen(name)+strlen(",os")+1)*sizeof(char));
335  if (ptr->counters[i] == NULL)
336  return PAPI_ESYS;
337  sprintf (ptr->counters[i], "%s,os", name);
338  }
339  }
340  else
341  {
342  /* PMC defaults domain to OS & User. So simply copy the name of the counter */
343  ptr->counters[i] = strdup (name);
344  if (ptr->counters[i] == NULL)
345  return PAPI_ESYS;
346  }
347  }
348 
349  return PAPI_OK;
350 }
sprintf(splash[splash_line++],"\tIozone: Performance Test of File I/O\n")
pmc_value_t * values
Definition: freebsd.h:58
for(i=0;i<=max_y;i++)
Definition: iozone.c:11615
return PAPI_OK
Definition: linux-nvml.c:458
int count
Definition: iozone.c:22422
#define PAPI_DOM_KERNEL
Definition: fpapi.h:22
unsigned * caps
Definition: freebsd.h:56
void
Definition: iozone.c:18627
pmc_id_t * pmcs
Definition: freebsd.h:57
int i
Definition: fileop.c:140
free(dummyfile[xx])
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
char ** counters
Definition: freebsd.h:59
#define PAPI_ESYS
Definition: fpapi.h:108
int _papi_freebsd_ntv_code_to_name(unsigned int EventCode, char *ntv_name, int len)
Definition: freebsd.c:763
static hwd_libpmc_context_t Context
Definition: freebsd.c:65
char * name
Definition: iozone.c:23648
#define PAPI_DOM_USER
Definition: fpapi.h:21

Here is the call graph for this function:

int _papi_freebsd_update_shlib_info ( papi_mdi_t mdi)

Definition at line 857 of file freebsd.c.

857  {
858  SUBDBG("Entering\n");
859  (void)mdi;
860  return PAPI_OK;
861 }
return PAPI_OK
Definition: linux-nvml.c:458
void
Definition: iozone.c:18627
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
int _papi_freebsd_write ( hwd_context_t ctx,
hwd_control_state_t ctrl,
long long from 
)

Definition at line 508 of file freebsd.c.

509 {
510  int i, ret;
511  (void)ctx;
512 
513  SUBDBG("Entering\n");
514 
515  for (i = 0; i < ctrl->n_counters; i++)
516  {
517  /* Can we write on the counters? */
518  if (ctrl->caps[i] & PMC_CAP_WRITE)
519  {
520  if ((ret = pmc_stop (ctrl->pmcs[i])) < 0)
521  {
522 #if defined(DEBUG)
523  fprintf (stderr, "DEBUG: %s FAILED to stop '%s' [%d of %d] ERROR = %d\n", FUNC, ctrl->counters[i], i+1, ctrl->n_counters, ret);
524 #endif
525  return PAPI_ESYS;
526  }
527  if ((ret = pmc_write (ctrl->pmcs[i], from[i])) < 0)
528  {
529 #if defined(DEBUG)
530  fprintf (stderr, "DEBUG: %s FAILED to write '%s' [%d of %d] ERROR = %d\n", FUNC, ctrl->counters[i], i+1, ctrl->n_counters, ret);
531 #endif
532  return PAPI_ESYS;
533  }
534  if ((ret = pmc_start (ctrl->pmcs[i])) < 0)
535  {
536 #if defined(DEBUG)
537  fprintf (stderr, "DEBUG: %s FAILED to stop '%s' [%d of %d] ERROR = %d\n", FUNC, ctrl->counters[i], i+1, ctrl->n_counters, ret);
538 #endif
539  return PAPI_ESYS;
540  }
541  }
542  else
543  return PAPI_ECMP;
544  }
545  return PAPI_OK;
546 }
#define FUNC
Definition: papi_debug.h:50
return PAPI_OK
Definition: linux-nvml.c:458
unsigned * caps
Definition: freebsd.h:56
void
Definition: iozone.c:18627
pmc_id_t * pmcs
Definition: freebsd.h:57
long long ret
Definition: iozone.c:1346
int i
Definition: fileop.c:140
#define PAPI_ECMP
Definition: fpapi.h:109
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
char ** counters
Definition: freebsd.h:59
#define PAPI_ESYS
Definition: fpapi.h:108
int _papi_hwi_init_os ( void  )

Definition at line 897 of file freebsd.c.

897  {
898 
899  struct utsname uname_buffer;
900 
901  /* Internal function, doesn't necessarily need to be a function */
902  init_mdi();
903 
904  uname(&uname_buffer);
905 
906  strncpy(_papi_os_info.name,uname_buffer.sysname,PAPI_MAX_STR_LEN);
907 
908  strncpy(_papi_os_info.version,uname_buffer.release,PAPI_MAX_STR_LEN);
909 
912  _papi_os_info.itimer_ns = PAPI_INT_MPX_DEF_US * 1000; /* Not actually supported */
914 
916 
917  return PAPI_OK;
918 }
#define PAPI_INT_MPX_DEF_US
Definition: papi_internal.h:65
#define PAPI_MAX_STR_LEN
Definition: fpapi.h:43
return PAPI_OK
Definition: linux-nvml.c:458
char name[PAPI_MAX_STR_LEN]
int init_mdi(void)
Definition: freebsd.c:76
PAPI_os_info_t _papi_os_info
Definition: aix.c:1210
#define PAPI_INT_ITIMER
Definition: papi_internal.h:54
char version[PAPI_MAX_STR_LEN]
int _papi_freebsd_get_system_info(papi_mdi_t *mdi)
Definition: freebsd.c:882
#define PAPI_INT_MPX_SIGNAL
Definition: papi_internal.h:52
papi_mdi_t _papi_hwi_system_info
Definition: papi_internal.c:57

Here is the call graph for this function:

int init_mdi ( void  )

Definition at line 76 of file freebsd.c.

77 {
78  const struct pmc_cpuinfo *info;
79 
80  SUBDBG("Entering\n");
81 
82  /* Initialize PMC library */
83  if (pmc_init() < 0)
84  return PAPI_ESYS;
85 
86  if (pmc_cpuinfo (&info) != 0)
87  return PAPI_ESYS;
88 
89  if (info != NULL)
90  {
91  /* Get CPU clock rate from HW.CLOCKRATE sysctl value, and
92  MODEL from HW.MODEL */
93  int mib[5];
94  size_t len;
95  int hw_clockrate;
96  char hw_model[PAPI_MAX_STR_LEN];
97 
98 #if !defined(__i386__) && !defined(__amd64__)
100 #else
101  /* Ok, I386s/AMD64s can use RDTSC. But be careful, if the cpufreq
102  module is loaded, then CPU frequency can vary and this method
103  does not work properly! We'll use use_rdtsc to know if this
104  method is available */
105  len = 5;
106  Context.use_rdtsc = sysctlnametomib ("dev.cpufreq.0.%driver", mib, &len) == -1;
107 #endif
108 
109  len = 3;
110  if (sysctlnametomib ("hw.clockrate", mib, &len) == -1)
111  return PAPI_ESYS;
112  len = sizeof(hw_clockrate);
113  if (sysctl (mib, 2, &hw_clockrate, &len, NULL, 0) == -1)
114  return PAPI_ESYS;
115 
116  len = 3;
117  if (sysctlnametomib ("hw.model", mib, &len) == -1)
118  return PAPI_ESYS;
119  len = PAPI_MAX_STR_LEN;
120  if (sysctl (mib, 2, &hw_model, &len, NULL, 0) == -1)
121  return PAPI_ESYS;
122 
123  /*strcpy (_papi_hwi_system_info.hw_info.vendor_string, pmc_name_of_cputype(info->pm_cputype));*/
124  sprintf (_papi_hwi_system_info.hw_info.vendor_string, "%s (TSC:%c)", pmc_name_of_cputype(info->pm_cputype), Context.use_rdtsc?'Y':'N');
126  _papi_hwi_system_info.hw_info.mhz = (float) hw_clockrate;
129  _papi_hwi_system_info.hw_info.ncpu = info->pm_ncpu;
131  _papi_hwi_system_info.hw_info.totalcpus = info->pm_ncpu;
132  /* Right now, PMC states that TSC is an additional counter. However
133  it's only available as a system-wide counter and this requires
134  root access */
135  _papi_freebsd_vector.cmp_info.num_cntrs = info->pm_npmc - 1;
136 
137  if ( strstr(pmc_name_of_cputype(info->pm_cputype), "INTEL"))
139  else if ( strstr(pmc_name_of_cputype(info->pm_cputype), "AMD"))
141  else
142  fprintf(stderr,"We didn't actually find a supported vendor...\n\n\n");
143  }
144  else
145  return PAPI_ESYS;
146 
147  return 1;
148 }
sprintf(splash[splash_line++],"\tIozone: Performance Test of File I/O\n")
#define PAPI_MAX_STR_LEN
Definition: fpapi.h:43
int cpu_min_mhz
Definition: papi.h:792
papi_vector_t _papi_freebsd_vector
Definition: freebsd.c:33
PAPI_component_info_t cmp_info
Definition: papi_vector.h:20
float mhz
Definition: papi.h:802
#define FALSE
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
int nnodes
Definition: papi.h:780
#define PAPI_ESYS
Definition: fpapi.h:108
char vendor_string[PAPI_MAX_STR_LEN]
Definition: papi.h:783
papi_mdi_t _papi_hwi_system_info
Definition: papi_internal.c:57
strcpy(filename, default_filename)
PAPI_hw_info_t hw_info
static hwd_libpmc_context_t Context
Definition: freebsd.c:65
#define PAPI_VENDOR_INTEL
Definition: papi.h:346
int vendor
Definition: papi.h:782
int cpu_max_mhz
Definition: papi.h:791
int totalcpus
Definition: papi.h:781
char model_string[PAPI_MAX_STR_LEN]
Definition: papi.h:785
if(gettimeofday(&tp,(struct timezone *) NULL)==-1) perror("gettimeofday")
#define PAPI_VENDOR_AMD
Definition: papi.h:347
int ncpu
Definition: papi.h:776

Here is the call graph for this function:

Here is the caller graph for this function:

int init_presets ( int  cidx)

Definition at line 151 of file freebsd.c.

152 {
153  const struct pmc_cpuinfo *info;
154 
155  SUBDBG("Entering\n");
156 
157  if (pmc_cpuinfo (&info) != 0)
158  return PAPI_ESYS;
159 
161 
162  if (strcmp(pmc_name_of_cputype(info->pm_cputype), "INTEL_P6") == 0)
164 
165  else if (strcmp(pmc_name_of_cputype(info->pm_cputype), "INTEL_PII") == 0)
167  else if (strcmp(pmc_name_of_cputype(info->pm_cputype), "INTEL_PIII") == 0)
169  else if (strcmp(pmc_name_of_cputype(info->pm_cputype), "INTEL_CL") == 0)
171  else if (strcmp(pmc_name_of_cputype(info->pm_cputype), "INTEL_PM") == 0)
173  else if (strcmp(pmc_name_of_cputype(info->pm_cputype), "AMD_K7") == 0)
175  else if (strcmp(pmc_name_of_cputype(info->pm_cputype), "AMD_K8") == 0)
177  else if (strcmp(pmc_name_of_cputype(info->pm_cputype), "INTEL_PIV") == 0)
179  else if (strcmp(pmc_name_of_cputype(info->pm_cputype), "INTEL_ATOM") == 0)
181  else if (strcmp(pmc_name_of_cputype(info->pm_cputype), "INTEL_CORE") == 0)
183  else if (strcmp(pmc_name_of_cputype(info->pm_cputype), "INTEL_CORE2") == 0)
185  else if (strcmp(pmc_name_of_cputype(info->pm_cputype), "INTEL_CORE2EXTREME") == 0)
187  else if (strcmp(pmc_name_of_cputype(info->pm_cputype), "INTEL_COREI7") == 0)
189  else if (strcmp(pmc_name_of_cputype(info->pm_cputype), "INTEL_WESTMERE") == 0)
191  else
192  /* Unknown processor! */
194 
195 
198 
199  _papi_load_preset_table((char *)pmc_name_of_cputype(info->pm_cputype),
200  0,cidx);
201 
202  return 0;
203 }
Definition: map.h:28
unsigned int attach
Definition: papi.h:657
papi_vector_t _papi_freebsd_vector
Definition: freebsd.c:33
void init_freebsd_libpmc_mappings(void)
Definition: map.c:19
Definition: map.h:30
PAPI_component_info_t cmp_info
Definition: papi_vector.h:20
int freebsd_number_of_events(int processortype)
Definition: map.c:40
Definition: map.h:31
Definition: map.h:26
Definition: map.h:27
Definition: map.h:25
static int cidx
Definition: event_info.c:40
Definition: map.h:22
Definition: map.h:23
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
int _papi_load_preset_table(char *pmu_str, int pmu_type, int cidx)
Definition: papi_preset.c:299
Definition: map.h:24
#define PAPI_ESYS
Definition: fpapi.h:108
static hwd_libpmc_context_t Context
Definition: freebsd.c:65
Definition: map.h:33
Definition: map.h:29
Definition: map.h:21

Here is the call graph for this function:

Here is the caller graph for this function:

static void show_counter ( char *  string,
int  id,
char *  name,
const char *  function,
char *  file,
int  line 
)
static

Definition at line 40 of file freebsd.c.

41  {
42 
43 #if defined(DEBUG)
44  pmc_value_t tmp_value;
45  int ret = pmc_read (id, &tmp_value);
46 
47  fprintf(stderr,"%s\n",string);
48  if (ret < 0) {
49  fprintf (stderr, "DEBUG: Unable to read counter %s (ID: %08x) "
50  "on routine %s (file: %s, line: %d)\n",
51  name, id, function,file,line);
52  } else {
53  fprintf (stderr, "DEBUG: Read counter %s (ID: %08x) - "
54  "value %llu on routine %s (file: %s, line: %d)\n",
55  name, id, (long long unsigned int)tmp_value,
56  function, file, line);
57  }
58 #else
59  (void) string; (void)name;
60  (void)id; (void)function; (void)file; (void)line;
61 #endif
62 }
void
Definition: iozone.c:18627
long long ret
Definition: iozone.c:1346
char * name
Definition: iozone.c:23648

Here is the caller graph for this function:

Variable Documentation

papi_vector_t _papi_freebsd_vector

Definition at line 33 of file freebsd.c.

PAPI_os_info_t _papi_os_info

Definition at line 30 of file freebsd.c.

papi_os_vector_t _papi_os_vector
Initial value:
= {
.get_dmem_info = _papi_freebsd_get_dmem_info,
.get_real_cycles = _papi_freebsd_get_real_cycles,
.get_real_usec = _papi_freebsd_get_real_usec,
.get_virt_usec = _papi_freebsd_get_virt_usec,
.update_shlib_info = _papi_freebsd_update_shlib_info,
.get_system_info = _papi_freebsd_get_system_info,
}
long long _papi_freebsd_get_real_usec(void)
Definition: freebsd.c:650
long long _papi_freebsd_get_virt_usec(void)
Definition: freebsd.c:702
int _papi_freebsd_get_system_info(papi_mdi_t *mdi)
Definition: freebsd.c:882
int _papi_freebsd_update_shlib_info(papi_mdi_t *mdi)
Definition: freebsd.c:857
long long _papi_freebsd_get_real_cycles(void)
Definition: freebsd.c:678
int _papi_freebsd_get_dmem_info(PAPI_dmem_info_t *d)

Definition at line 976 of file freebsd.c.

hwd_libpmc_context_t Context
static

Definition at line 65 of file freebsd.c.