---
name: "pfm_set_options"
section: "3"
platform: "linux"
package: "libpfm3-3.2-dev"
version: "3.2.070507-1.1"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/pfm_set_options"
---

# pfm\_set\_options(3)

set performance monitoring library debug options

## NAME

pfm\_set\_options - set performance monitoring library debug options

## SYNOPSIS

```
#include <perfmon/pfmlib.h>

int pfm_set_options(pfmlib_options_t *opt);

```

## DESCRIPTION

This function can be called at any time to adjust the level of debug of the library. You can adjust the verbosity  or the debug level. In both cases, extra output will be generated on the standard output when the library gets called. This can be useful to figure out how the PMC registers are initialized.

The opt argument is a pointer to a  **pfmlib\_options\_t** structure which is defined as follows:

```
typedef struct {
	unsigned int	pfm_debug:1;
	unsigned int	pfm_verbose:1;
} pfmlib_options_t;
```

Setting **pfm\_debug** to 1 will enable debug messages whereas setting **pfm\_verbose** will enable verbose messages.

## RETURN

The function returns whether or not it was successful.A return value of **PFMLIB\_SUCCESS** indicates success, otherwise the  value is the error code.

## ERRORS

- **PFMLIB\_ERR\_INVAL**

  the argument is invalid, most likely a NULL pointer.

## AUTHOR

Stephane Eranian \<eranian@hpl.hp.com\>
