text
stringlengths
0
234
to the input arguments specified by
.ir arg .
the number of arguments is defined by \finarg\fr.
the
.i fd
argument specifies the perfmon context to operate on.
.pp
supported values for
.i cmd
are:
.tp
.b pfm_create_context
.nf
.bi "perfmonctl(int " fd ", pfm_create_context, pfarg_context_t *" ctxt ", 1);"
.fi
set up a context.
.ip
the
.i fd
parameter is ignored.
a new perfmon context is created as specified in
.i ctxt
and its file descriptor is returned in \fictxt->ctx_fd\fr.
.ip
the file descriptor can be used in subsequent calls to
.br perfmonctl ()
and can be used to read event notifications (type
.ir pfm_msg_t )
using
.br read (2).
the file descriptor is pollable using
.br select (2),
.br poll (2),
and
.br epoll (7).
.ip
the context can be destroyed by calling
.br close (2)
on the file descriptor.
.tp
.b pfm_write_pmcs
.\" pfm_write_pmcs()
.nf
.bi "perfmonctl(int " fd ", pfm_write_pmcs, pfarg_reg_t *" pmcs ", n);"
.fi
set pmc registers.
.tp
.b pfm_write_pmds
.nf
.bi "perfmonctl(int " fd ", pfm_write_pmds, pfarg_reg_t *" pmds ", n);"
.fi
.\" pfm_write_pmds()
set pmd registers.
.tp
.b pfm_read_pmds
.\" pfm_read_pmds()
.nf
.bi "perfmonctl(int " fd ", pfm_read_pmds, pfarg_reg_t *" pmds ", n);"
.fi
read pmd registers.
.tp
.b pfm_start
.\" pfm_start()
.nf
.\" .bi "perfmonctl(int " fd ", pfm_start, arg, 1);
.bi "perfmonctl(int " fd ", pfm_start, null, 0);"
.fi
start monitoring.
.tp
.b pfm_stop
.\" pfm_stop()
.nf
.bi "perfmonctl(int " fd ", pfm_stop, null, 0);"
.fi
stop monitoring.
.tp
.b pfm_load_context
.\" pfm_context_load()
.nf
.bi "perfmonctl(int " fd ", pfm_load_context, pfarg_load_t *" largs ", 1);"
.fi
attach the context to a thread.
.tp
.b pfm_unload_context
.\" pfm_context_unload()
.nf
.bi "perfmonctl(int " fd ", pfm_unload_context, null, 0);"
.fi
detach the context from a thread.
.tp
.b pfm_restart
.\" pfm_restart()
.nf
.bi "perfmonctl(int " fd ", pfm_restart, null, 0);"
.fi
restart monitoring after receiving an overflow notification.
.tp
.b pfm_get_features
.\" pfm_get_features()
.nf