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

NAME

6       pfm_get_pmu_name,       pfm_get_pmu_type,      pfm_get_pmu_name_bytype,
7       pfm_pmu_is_supported,  pfm_force_pmu,pfm_list_supported_pmu   -   query
8       library about supported PMU models
9

SYNOPSIS

11       #include <perfmon/pfmlib.h>
12
13       int pfm_get_pmu_name(char *name, int maxlen);
14       int pfm_get_pmu_type(int *type);
15       int pfm_get_pmu_name_bytype(int type, char *name, int maxlen);
16       int pfm_pmu_is_supported(int type);
17       int pfm_force_pmu(int type);
18       int pfm_list_supported_pmus(int (*pf)(const char *fmt,...));
19
20

DESCRIPTION

22       These  functions  retrieve  information about the detected host PMU and
23       the PMU models supported by the library. More than  one  model  can  be
24       supported by the same library.
25
26       Each  PMU  model  is  assigned  a type and a name. The latter is just a
27       string and the former is a unique identifier. The  currently  supported
28       types are:
29
30       PFMLIB_GENERIC_PMU
31              Intel  Itanium  default  architected  PMU model, i.e., the basic
32              model.
33
34       PFMLIB_ITANIUM_PMU
35              Intel Itanium processor PMU model. The model  is  found  in  the
36              first  implementation  of  the  IA-64  architecture,  code  name
37              Merced.
38
39       PFMLIB_ITANIUM2_PMU
40              Intel Itanium 2 processor PMU model. This is the model  provided
41              by McKinley, Madison, and Deerfield processors.
42
43       PFMLIB_MONTECITO_PMU
44              Intel Dual-core Itanium 2 processor PMU model. This is the model
45              provided by Montecito, Montvale processors.
46
47       PFMLIB_AMD64_PMU
48              AMD AMD64 processors (family 15 and 16)
49
50       PFMLIB_GEN_IA32_PMU
51               Intel X86 architectural PMU v1, v2, v3
52
53       PFMLIB_I386_P6_PMU
54              Intel P6 processors. That includes Pentium Pro, Pentium II, Pen‐
55              tium III, but excludes Pentium M
56
57       PFMLIB_I386_PM_PMU
58              Intel Pentium M processors.
59
60       PFMLIB_INTEL_PII_PMU
61              Intel Pentium II processors.
62
63       PFMLIB_PENTIUM4_PMU
64              Intel  processors  based  on  Netburst  micro-architecture. That
65              includes Pentium 4.
66
67       PFMLIB_COREDUO_PMU
68              Intel  processors  based  on  Yonah   micro-architecture.   That
69              includes Intel Core Duo/Core Solo processors
70
71       PFMLIB_I386_PM_PMU
72              Intel Pentium M processors
73
74       PFMLIB_INTEL_CORE_PMU
75              Intel  processors  based  on  the  Core micro-architecture. That
76              includes Intel Core 2 Duo/Quad processors
77
78       PFMLIB_INTEL_ATOM_PMU
79              Intel processors based on the Atom micro-architecture.
80
81       PFMLIB_INTEL_NHM_PMU
82              Intel processors based on the Nehalem micro-architectures.  That
83              includes Intel Core i7 processors.
84
85       PFMLIB_MIPS_20KC_PMU
86              MIPS 20KC  processors
87
88       PFMLIB_MIPS_24K_PMU
89              MIPS 24K processors
90
91       PFMLIB_MIPS_25KF_PMU
92              MIPS 25KF processors
93
94       PFMLIB_MIPS_34K_PMU
95              MIPS 34K processors
96
97       PFMLIB_MIPS_5KC_PMU
98              MIPS 5KC processors
99
100       PFMLIB_MIPS_74K_PMU
101              MIPS 74K  processors
102
103       PFMLIB_MIPS_R10000_PMU
104              MIPS R10000 processors
105
106       PFMLIB_MIPS_R12000_PMU
107              MIPS R12000 processors
108
109       PFMLIB_MIPS_RM7000_PMU
110              MIPS RM7000 processors
111
112       PFMLIB_MIPS_RM9000_PMU
113              MIPS RM9000 processors
114
115       PFMLIB_MIPS_SB1_PMU
116              MIPS SB1/SB1A processors
117
118       PFMLIB_MIPS_VR5432_PMU
119              MIPS VR5432 processors
120
121       PFMLIB_MIPS_VR5500_PMU
122              MIPS VR5500 processors
123
124       PFMLIB_MIPS_ICE9A_PMU
125              SiCortex ICE9A
126
127       PFMLIB_MIPS_ICE9B_PMU
128              SiCortex ICE9B
129
130       PFMLIB_POWERPC_PMU
131              IBM POWERPC processors
132
133       PFMLIB_CRAYX2_PMU
134              Cray X2  processors
135
136       PFMLIB_CELL_PMU
137              IBM Cell processors
138
139       PFMLIB_PPC970_PMU
140              IBM PowerPC 970(FX,GX) processors
141
142       PFMLIB_PPC970MP_PMU
143              IBM PowerPC 970MP processors
144
145       PFMLIB_POWER3_PMU
146              IBM POWER3  processors
147
148       PFMLIB_POWER4_PMU
149              IBM POWER4 processors
150
151       PFMLIB_POWER5_PMU
152              IBM POWER5 processors
153
154       PFMLIB_POWER5p_PMU
155              BM POWER5+ processors
156
157       PFMLIB_POWER6_PMU
158              IBM POWER6 processors
159
160       The  pfm_get_pmu_name()  function returns the name of the detected host
161       PMU. The library must have been initialized properly before making this
162       call.  The  name  is returned in the name argument. The maxlen argument
163       indicates the maximum length of the buffer provided for  name.   Up  to
164       maxlen-1  characters  will  be  returned, not including the termination
165       character.
166
167
168       The pfm_get_pmu_type() function returns the type of the  detected  host
169       PMU. The library must have been initialized properly before making this
170       call. The type returned in  type can be any one  of  the  three  listed
171       above.
172
173       The  pfm_get_pmu_name_bytype() function returns the name of a PMU model
174       in name given a type in the type argument. The  maxlen  argument  indi‐
175       cates  the  maximum  length  of  the  buffer  provided for name.  Up to
176       maxlen-1 characters will be returned,  not  including  the  termination
177       character.
178
179
180       The pfm_pmu_is_supported() function returns PFMLIB_SUCCESS if the given
181       PMU type is supported by the library independently of what the host PMU
182       model is.
183
184       The  pfm_force_pmu()  function  is  used to forced the library to use a
185       particular PMU model compared to what  it  has  detected.  The  library
186       checks that the selected type can be supported by the host PMU. This is
187       mostly useful to force the library to the use generic  PMU  model  PFM‐
188       LIB_GENERIC_PMU.   This  function  can  be  called at any time and upon
189       return the library is considered initialized.
190
191       The pfm_list_supported_pmu() function is used to  print  the  list  PMU
192       types that the library supports. The results is printed using the func‐
193       tion provided in the pf argument, which must be  a  printf-style  func‐
194       tion.
195

RETURN

197       The  function returns whether or not it was successful.  A return value
198       of PFMLIB_SUCCESS indicates success, otherwise the value is  the  error
199       code.
200

ERRORS

202       PFMLIB_ERR_NOINIT the library has not been initialized properly.
203
204       PFMLIB_ERR_INVAL
205              invalid  argument  was  given,  most  likely  invalid pointer or
206              invalid PMU type.
207
208       PFMLIB_ERR_NOTSUPP
209              the selected PMU type can be used on the host CPU.
210

AUTHOR

212       Stephane Eranian <eranian@hpl.hp.com>
213
214                                November, 2003                       LIBPFM(3)
Impressum