pfm_start, pfm_stop - start and stop monitoring for a
self-monitoring process
SYNOPSIS
#include <perfmon/pfmlib.h>
void pfm_start(void);
void pfm_stop(void);
DESCRIPTION
These two function can only be used by self-monitoring
processes. They have no effect on system wide sessions.
The pfm_start function activates monitoring by setting the
psr.up bit. This has no effect if the process has not cre
ated a perfmon context and enabled it. This function is
equivalent to calling perfmonctl() with the PFM_START com
mand.
The pfm_stop function activates monitoring by clearing the
psr.up bit. This has no effect if the process has not cre
ated a perfmon context and enabled it. This function is
equivalent to calling perfmonctl() with the PFM_STOP com
mand.
The first difference with the perfmonctl() call is that
there is no kernel call involved, therefore it is a much
lighter weight call. In fact these functions are defined
as macros that are inlined. They are useful when measuring
short sections of code. The second difference is that they
apply only to the context of the caller.
RETURN
nothing is returned.
ERRORS
no errors are returned. If the caller has no perfmon con
text, the functions have no effect.
AUTHOR
Stephane Eranian <eranian@hpl.hp.com>
Man(1) output converted with
man2html