1LIBPFM(3)                  Linux Programmer's Manual                 LIBPFM(3)
2
3
4

NAME

6       pfm_get_cycle_event,   pfm_get_inst_retired_event  -  get  basic  event
7       descriptors
8
9

SYNOPSIS

11       #include <perfmon/pfmlib.h>
12
13       int pfm_get_cycle_event(pfmlib_event_t *ev);
14       int pfm_get_inst_retired_event(pfmlib_event_t *ev);
15
16

DESCRIPTION

18       In order to build very simple geenric examples that work across all PMU
19       models,  the  library  provides a way to retrieve information about two
20       basic events that are present in most PMU models: cycles  and  instruc‐
21       tion  retired.  The  first  event, cycles, counts the number of elapsed
22       cycles. The second event, instruction retired,  counts  the  number  of
23       instructions  that  have  executed and retired from the processor pipe‐
24       line. Depending on the PMU model, there may be variations in the  exact
25       definition  of those events. The library provides this information on a
26       best effort basis. User must refer to PMU model specific  documentation
27       to validate the event definition.
28
29       The  pfm_get_cycle_event  function returns in ev the event and optional
30       unit mask descriptors for the event that counts elapsed cycles. Depend‐
31       ing  on  the  PMU  model,  there may be unit mask(s) necessary to count
32       cycles. Application must check the value returned in ev->num_masks.
33
34
35       The pfm_get_inst_retired_event function returns in  ev  the  event  and
36       optional  unit mask descriptors for the event that counts the number of
37       retured instruction. Depending on the PMU  model,  there  may  be  unit
38       mask(s) necessary to count retired instructions. Application must check
39       the value returned in ev->num_masks.
40
41

RETURN

43       All functions return whether or not the call was successful.  A  return
44       value  of  PFMLIB_SUCCESS indicates success, otherwise the value is the
45       error code.
46

ERRORS

48       PFMLIB_ERR_NOINIT the library has not been initialized properly.
49
50       PFMLIB_ERR_INVAL
51              the ev parameter is NULL.
52
53       PFMLIB_ERR_NOTSUPP
54              the host PMU does  not  define  an  event  to  count  cycles  or
55              instructions retired.
56
57
58       AUTHOR
59              Stephane Eranian <eranian@hpl.hp.com>
60
61                                September, 2006                      LIBPFM(3)
Impressum