Blame src/libpfm-3.y/docs/man3/pfm_set_options.3

Packit 577717
.TH LIBPFM 3 "November, 2003" "" "Linux Programmer's Manual"
Packit 577717
.SH NAME
Packit 577717
pfm_set_options \- set performance monitoring library debug options
Packit 577717
.SH SYNOPSIS
Packit 577717
.nf
Packit 577717
.B #include <perfmon/pfmlib.h>
Packit 577717
.sp
Packit 577717
.BI "int pfm_set_options(pfmlib_options_t *"opt);
Packit 577717
.sp
Packit 577717
.SH DESCRIPTION
Packit 577717
This function can be called at any time to adjust the level
Packit 577717
of debug of the library. In both cases, extra output will be
Packit 577717
generated on standard error when the library gets
Packit 577717
called. This can be useful to figure out how the PMC
Packit 577717
registers are initialized for instance.
Packit 577717
.sp
Packit 577717
The opt argument to this function is a pointer to a 
Packit 577717
.B pfmlib_options_t 
Packit 577717
structure which is defined as follows:
Packit 577717
.sp
Packit 577717
.nf 
Packit 577717
typedef struct {
Packit 577717
	unsigned int	pfm_debug:1;
Packit 577717
	unsigned int	pfm_verbose:1;
Packit 577717
} pfmlib_options_t;
Packit 577717
.fi
Packit 577717
.sp
Packit 577717
.sp
Packit 577717
Setting \fBpfm_debug\fR to 1 will enable debug messages whereas setting
Packit 577717
\fBpfm_verbose\fR will enable verbose messages. 
Packit 577717
Packit 577717
.SH ENVIRONMENT VARIABLES
Packit 577717
Setting library options with this function has lower priority than
Packit 577717
with environment variables. As such, the call to this function may
Packit 577717
not have any actual effects. A user can set the following environment
Packit 577717
variables to control verbosity and debug output:
Packit 577717
.TP
Packit 577717
.B LIBPFM_VERBOSE
Packit 577717
Enable verbose output. Value must be 0 or 1. When not set, verbosity level
Packit 577717
can be controlled with this function.
Packit 577717
.TP
Packit 577717
.B LIBPFM_DEBUG
Packit 577717
Enable debug  output. Value must be 0 or 1. When not set, debug level
Packit 577717
can be controlled with this function.
Packit 577717
.LP
Packit 577717
.SH RETURN
Packit 577717
The function returns whether or not it was successful. A return
Packit 577717
value of \fBPFMLIB_SUCCESS\fR indicates success, otherwise the 
Packit 577717
value is the error code.
Packit 577717
.sp
Packit 577717
When environment variables exist, they take precedence and this
Packit 577717
function returns \fBPFMLIB_SUCCESS\fR.
Packit 577717
.SH ERRORS
Packit 577717
.TP
Packit 577717
.B PFMLIB_ERR_INVAL 
Packit 577717
the argument is invalid, most likely a NULL pointer.
Packit 577717
.SH AUTHOR
Packit 577717
Stephane Eranian <eranian@hpl.hp.com>
Packit 577717
.PP