File: pfm_initialize.3

package info (click to toggle)
libpfm4 4.13.0%2Bgit99-gc5587f9-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 11,860 kB
  • sloc: ansic: 233,278; makefile: 786; python: 183; sh: 18
file content (32 lines) | stat: -rw-r--r-- 1,062 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
.TH LIBPFM 3  "September, 2009" "" "Linux Programmer's Manual"
.SH NAME
pfm_initialize \- initialize library
.SH SYNOPSIS
.nf
.B #include <perfmon/pfmlib.h>
.sp
.BI "int pfm_initialize(void);"
.sp
.SH DESCRIPTION
This is the first function that a program \fBmust\fR call otherwise
the library will not operate.  This function probes the
underlying hardware looking for valid PMU event tables to activate.
Multiple distinct PMU tables may be activated at the same time.

The function must be called only once. If the function is called
more than once, it does not execute the initialization multiple times,
it simply returns the same value as for the first call.
This is \fBnot a reentrant function\fR. Only one thread at a time can call
the function

.SH RETURN
The function returns whether or not it was successful, i.e., at least
one PMU was activated. A return value of \fBPFMLIB_SUCCESS\fR indicates
success, otherwise the value is an error code.
.SH ERRORS
.TP
.B PFMLIB_ERR_NOTSUPP
No PMU was activated.
.SH AUTHOR
Stephane Eranian <eranian@gmail.com>
.PP