pfm_self_start(3)

pfm_self_start3

Start and stop monitoring for a self-monitoring process

Usage

#include <perfmon/pfmlib.h>

int pfm_self_start(int fd);
int pfm_self_stop(int fd);

Overview

These two functions can only be used by self-monitoring processes. They have no effect on system wide sessions.

The pfm_self_start function activates monitoring. This function is equivalent to calling perfmonctl() with the PFM_START command and may end up calling it. On Linux/ia64 it is implemented as a lightweight call to set the psr.up bit.

The pfm_self_stop function deactivates monitoring This function is equivalent to calling perfmonctl() with the PFM_STOP command and may end up calling it.On Linux/ia64 it is implemented as a lightweight call to clear the psr.up bit.

Return

The function returns 0 if successful, otherwise -1 and the error code is set in errno.

Errors

0 is always returned on Linux/ia64.

Releases

Unchanged in 3 releases since Debian 4.0 (Etch).

  1. 4.0–6.0

Author

Stephane Eranian <[email protected]>

From libpfm3-3.2-dev 3.2.070507-1.1 in Debian 6.0 (Squeeze). Parsed by carta from the page's man source.