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_assign_eventset_component(3)				       PAPI					 PAPI_assign_eventset_component(3)

NAME
PAPI_assign_eventset_component - Assign a component index to an existing but empty EventSet. SYNOPSIS
Detailed Description @par C Interface: PAPI_assign_eventset_component( int EventSet, int cidx ); @param EventSet An integer identifier for an existing EventSet. @param cidx An integer identifier for a component. By convention, component 0 is always the cpu component. @retval PAPI_ENOCMP The argument cidx is not a valid component. @retval PAPI_ENOEVST The EventSet doesn't exist. @retval PAPI_ENOMEM Insufficient memory to complete the operation. PAPI_assign_eventset_component assigns a specific component index, as specified by cidx, to a new EventSet identified by EventSet, as obtained from PAPI_create_eventset. EventSets are ordinarily automatically bound to components when the first event is added. This routine is useful to explicitly bind an EventSet to a component before setting component related options. @par Examples: * int EventSet = PAPI_NULL; * if ( PAPI_create_eventset( &EventSet ) != PAPI_OK ) * handle_error( 1 ); * // Bind our EventSet to the cpu component * if ( PAPI_assign_eventset_component( EventSet, 0 ) != PAPI_OK ) * handle_error( 1 ); * // Convert our EventSet to multiplexing * if ( PAPI_set_multiplex( EventSet ) != PAPI_OK ) * handle_error( 1 ); * See Also: PAPI_set_opt PAPI_create_eventset PAPI_add_events PAPI_set_multiplex Author Generated automatically by Doxygen for PAPI from the source code. Version 5.2.0.0 Tue Jun 17 2014 PAPI_assign_eventset_component(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