PAPI_get_opt(3)
πΈ NAME πΈ
okay bestie, welcome to the PAPI_get_opt(3) page from the PAPI manual π
PAPI_get_opt β Get PAPI library or event set options.
β¨ SYNOPSIS β¨
the synopsis situation is literally the C Interface right below in Detailed Description β donβt skip it, bestie π«Ά
π« Detailed Description π«
π C Interface π
#include <papi.h>
int PAPI_get_opt( int option, PAPI_option_t * ptr );
πΈ Parameters πΈ
optionβ Defines the option to get. Possible values are briefly described in the table below.ptrβ Pointer to a structure determined by the selected option. SeePAPI_option_tfor a description of possible structures.
π¦ Return values π¦
PAPI_OKPAPI_EINVALβ The specified option or parameter is invalid.PAPI_ENOEVSTβ The EventSet specified does not exist.PAPI_ECMPβ The option is not implemented for the current component.PAPI_ENOINITβ specified option requires PAPI to be initialized first.
PAPI_get_opt() queries the options of the PAPI library or a specific event set created by PAPI_create_eventset. Some options may require that the eventset be bound to a component before they can execute successfully. This can be done either by adding an event or by explicitly calling PAPI_assign_eventset_component.
Ptr is a pointer to the PAPI_option_t structure, which is actually a union of different structures for different options. Not all options require or return information in these structures. Each returns different values in the structure. Some options require a component index to be provided. These options are handled explicitly by the PAPI_get_cmp_opt() call.
π¦ Note π¦
Some options, such as PAPI_DOMAIN and PAPI_MULTIPLEX are also available as separate entry points in both C and Fortran.
The reader is encouraged to peruse the ctests code in the PAPI distribution for examples of usage of PAPI_set_opt.
π Possible values for the PAPI_get_opt option parameter π
PAPI_DEFDOMβ Get default counting domain for newly created event sets. Requires a component index.PAPI_DEFGRNβ Get default counting granularity. Requires a component index.PAPI_DEBUGβ Get the PAPI debug state and the debug handler. The debug state is specified inptr->debug.level. The debug handler is specified inptr->debug.handler. For further information regarding debug states and the behavior of the handler, seePAPI_set_debug.PAPI_MULTIPLEXβ Get current multiplexing state for specified EventSet.PAPI_DEF_ITIMERβ Get the type of itimer used in software multiplexing, overflowing and profiling.PAPI_DEF_MPX_NSβ Get the sampling time slice in nanoseconds for multiplexing and overflow.PAPI_DEF_ITIMER_NSβ SeePAPI_DEF_MPX_NS.PAPI_ATTACHβ Get thread or process id to which event set is attached. ReturnsTRUEif currently attached.PAPI_CPU_ATTACHβ Getptr->cpu.cpu_numand Attach state for EventSet specified inptr->cpu.eventset.PAPI_DETACHβ Get thread or process id to which event set is attached. ReturnsTRUEif currently attached.PAPI_DOMAINβ Get domain for EventSet specified inptr->domain.eventset. Will error if eventset is not bound to a component.PAPI_GRANULβ Get granularity for EventSet specified inptr->granularity.eventset. Will error if eventset is not bound to a component.PAPI_INHERITβ Get current inheritance state for specified EventSet.PAPI_PRELOADβ GetLD_PRELOADenvironment equivalent.PAPI_CLOCKRATEβ Get clockrate in MHz.PAPI_MAX_CPUSβ Get number of CPUs.PAPI_EXEINFOβ Get Executable addresses for text/data/bss.PAPI_HWINFOβ Get information about the hardware.PAPI_LIB_VERSIONβ Get the full PAPI version of the library. This does not require PAPI to be initialized first.PAPI_MAX_HWCTRSβ Get number of counters. Requires a component index.PAPI_MAX_MPX_CTRSβ Get maximum number of multiplexing counters. Requires a component index.PAPI_SHLIBINFOβ Get shared library information used by the program.PAPI_COMPONENTINFOβ Get the PAPI features the specified component supports. Requires a component index.
π See also π
PAPI_get_multiplexPAPI_get_cmp_optPAPI_set_optPAPI_option_t
π Author π
Generated automatically by Doxygen for PAPI from the source code.
okay thatβs the whole page, bestie β signing off from PAPI with source/version Version 7.2.0.0 and date Wed Jun 25 2025 19:30:48 π«Άβ¨
π¦ where this page comes from
- nixos 26.05: papi 7.2.0
- nixpkgs unstable: papi 7.2.0
- opensuse-leap 16.0: papi-devel 7.2.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: papi-devel 7.2.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: papi-devel 7.2.0-160000.2.2 Β· BSD-3-Clause
- ubuntu resolute: libpapi-dev 7.2.0-2 Β· BSD-3-Clause
- ubuntu stonking: libpapi-dev 7.2.0-2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms