Blame man/man3/PAPI_start_counters.3
Branch: 57771707c5d17696fd3660ed6f10428b3c234e9a
Packit
577717
.TH "PAPI_start_counters" 3 "Mon Dec 18 2017" "Version 5.6.0.0" "PAPI" \" -*- nroff -*-
Packit
577717
.ad l
Packit
577717
.nh
Packit
577717
.SH NAME
Packit
577717
PAPI_start_counters \-
Packit
577717
.PP
Packit
577717
Start counting hardware events\&.
Packit
577717
Packit
577717
.SH SYNOPSIS
Packit
577717
.br
Packit
577717
.PP
Packit
577717
.SH "Detailed Description"
Packit
577717
.PP
Packit
577717
Packit
577717
.PP
Packit
577717
.nf
Packit
577717
@par C Interface:
Packit
577717
\#include <papi.h> @n
Packit
577717
int PAPI_start_counters( int *events, int array_len );
Packit
577717
Packit
577717
.fi
Packit
577717
.PP
Packit
577717
.PP
Packit
577717
\fBParameters:\fP
Packit
577717
.RS 4
Packit
577717
\fI*events\fP an array of codes for events such as PAPI_INT_INS or a native event code
Packit
577717
.br
Packit
577717
\fIarray_len\fP the number of items in the *events array
Packit
577717
.RE
Packit
577717
.PP
Packit
577717
\fBReturn values:\fP
Packit
577717
.RS 4
Packit
577717
\fIPAPI_EINVAL\fP One or more of the arguments is invalid\&.
Packit
577717
.br
Packit
577717
\fIPAPI_EISRUN\fP Counters have already been started, you must call \fBPAPI_stop_counters()\fP before you call this function again\&.
Packit
577717
.br
Packit
577717
\fIPAPI_ESYS\fP A system or C library call failed inside PAPI, see the errno variable\&.
Packit
577717
.br
Packit
577717
\fIPAPI_ENOMEM\fP Insufficient memory to complete the operation\&.
Packit
577717
.br
Packit
577717
\fIPAPI_ECNFLCT\fP The underlying counter hardware cannot count this event and other events in the EventSet simultaneously\&.
Packit
577717
.br
Packit
577717
\fIPAPI_ENOEVNT\fP The PAPI preset is not available on the underlying hardware\&.
Packit
577717
.RE
Packit
577717
.PP
Packit
577717
\fBPAPI_start_counters()\fP starts counting the events named in the *events array\&. This function cannot be called if the counters have already been started\&. The user must call \fBPAPI_stop_counters()\fP to stop the events explicitly if he/she wants to call this function again\&. It is the user's responsibility to choose events that can be counted simultaneously by reading the vendor's documentation\&. The length of the *events array should be no longer than the value returned by \fBPAPI_num_counters()\fP\&.
Packit
577717
.PP
Packit
577717
.PP
Packit
577717
.nf
Packit
577717
if( PAPI_start_counters( Events, num_hwcntrs ) != PAPI_OK )
Packit
577717
handle_error(1);
Packit
577717
*
Packit
577717
.fi
Packit
577717
.PP
Packit
577717
.PP
Packit
577717
\fBSee Also:\fP
Packit
577717
.RS 4
Packit
577717
\fBPAPI_stop_counters()\fP \fBPAPI_add_event()\fP \fBPAPI_create_eventset()\fP
Packit
577717
.RE
Packit
577717
.PP
Packit
577717
Packit
577717
Packit
577717
.SH "Author"
Packit
577717
.PP
Packit
577717
Generated automatically by Doxygen for PAPI from the source code\&.