Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

papi_num_cmp_hwctrs(3) [centos man page]

PAPI_num_cmp_hwctrs(3)						       PAPI						    PAPI_num_cmp_hwctrs(3)

NAME
PAPI_num_cmp_hwctrs - Return the number of hardware counters for the specified component. SYNOPSIS
Detailed Description PAPI_num_cmp_hwctrs() returns the number of counters present in the specified component. By convention, component 0 is always the cpu. On some components, especially for CPUs, the value returned is a theoretical maximum for estimation purposes only. It might not be possible to easily create an EventSet that contains the full number of events. This can be due to a variety of reasons: 1). Some CPUs (especially Intel and POWER) have the notion of fixed counters that can only measure one thing, usually cycles. 2). Some CPUs have very explicit rules about which event can run in which counter. In this case it might not be possible to add a wanted event even if counters are free. 3). Some CPUs halve the number of counters available when running with SMT (multiple CPU threads) enabled. 4). Some operating systems 'steal' a counter to use for things such as NMI Watchdog timers. The only sure way to see if events will fit is to attempt adding events to an EventSet, and doing something sensible if an error is generated. PAPI_library_init() must be called in order for this function to return anything greater than 0. C Interface: #include <papi.h> int PAPI_num_cmp_hwctrs(int cidx ); Parameters: cidx -- An integer identifier for a component. By convention, component 0 is always the cpu component. Example * // Query the cpu component for the number of counters. * printf( * Returns: On success, this function returns a value greater than zero. A zero result usually means the library has not been initialized. Author Generated automatically by Doxygen for PAPI from the source code. Version 5.2.0.0 Tue Jun 17 2014 PAPI_num_cmp_hwctrs(3)

Check Out this Related Man Page

PAPI_reset(3)							       PAPI							     PAPI_reset(3)

NAME
PAPI_reset - Reset the hardware event counts in an event set. SYNOPSIS
Detailed Description @par C Prototype: int PAPI_reset( int EventSet ); @param EventSet an integer handle for a PAPI event set as created by PAPI_create_eventset @retval PAPI_OK @retval PAPI_ESYS A system or C library call failed inside PAPI, see the errno variable. @retval PAPI_ENOEVST The EventSet specified does not exist. PAPI_reset() zeroes the values of the counters contained in EventSet. This call assumes an initialized PAPI library and a properly added event set @par Example: int EventSet = PAPI_NULL; int Events[] = {PAPI_TOT_INS, PAPI_FP_OPS}; int ret; // Create an empty EventSet ret = PAPI_create_eventset(&EventSet); if (ret != PAPI_OK) handle_error(ret); // Add two events to our EventSet ret = PAPI_add_events(EventSet, Events, 2); if (ret != PAPI_OK) handle_error(ret); // Start counting ret = PAPI_start(EventSet); if (ret != PAPI_OK) handle_error(ret); // Stop counting, ignore values ret = PAPI_stop(EventSet, NULL); if (ret != PAPI_OK) handle_error(ret); // reset the counters in this EventSet ret = PAPI_reset(EventSet); if (ret != PAPI_OK) handle_error(ret); * See Also: PAPI_create_eventset Author Generated automatically by Doxygen for PAPI from the source code. Version 5.2.0.0 Tue Jun 17 2014 PAPI_reset(3)
Man Page

7 More Discussions You Might Find Interesting

1. Programming

Linux SLOC Counter

Anyone know of any free Linux SLOC counters or where I can get it? I googled, but didn't come up with much besides Windows SLOC counters. (1 Reply)
Discussion started by: jalburger
1 Replies

2. Solaris

netstat counters

Is there a way to reset the netstat counters in solaris 8? Specifically, the error counters? (1 Reply)
Discussion started by: tjlst15
1 Replies

3. AIX

Enable SMT

How to enable SMT in aix 5.2 ml 9? If i run smtctl it gives error ksh: smtctl: not found. please tell me if SMT is supported in 5.2 (4 Replies)
Discussion started by: vjm
4 Replies

4. AIX

POWER Hardware

I need book or any useful link about POWER hardware architecture .. Thanks :-) (4 Replies)
Discussion started by: Vit0_Corleone
4 Replies

5. UNIX for Dummies Questions & Answers

How to print based on the value from counters?

Hi, I am writing a script which will get the input from a combinations of awk commands and using counters and loop I am generating a dynamic values and passing the output to a file using print -u3 options, now instead of redirecting the output to a file how can the output be created in the same... (3 Replies)
Discussion started by: shruthidwh
3 Replies

6. AIX

Shared-SMT-4 vs Dedicated-SMT-4 on capped LPAR

Hi, I have a POWER8 server running in Processor Implementation Mode: POWER 7. I have 2 LPAR's, both are capped with 4 cores. One of them displays: Shared-SMT-4 and the other: Dedicated-SMT-4 What is the difference when running in capped mode? Thanks (1 Reply)
Discussion started by: amitlib
1 Replies

7. UNIX for Beginners Questions & Answers

Working out percentage in shell script

Hi All, I currently have a shell script which is pulling multiple counters from various sources. Due to the counters being cumulative counters I've got some code to work out the delta from the last reading and current which is working fine. The problem i have now is being able to work out the... (8 Replies)
Discussion started by: mutley2202
8 Replies

Featured Tech Videos