|
Packit |
577717 |
/*
|
|
Packit |
577717 |
* File: cmpinfo.c
|
|
Packit |
577717 |
* Author: Philip Mucci
|
|
Packit |
577717 |
* mucci@cs.utk.edu
|
|
Packit |
577717 |
* Mods: <your name here>
|
|
Packit |
577717 |
* <your email address>
|
|
Packit |
577717 |
*/
|
|
Packit |
577717 |
#include <stdlib.h>
|
|
Packit |
577717 |
#include <stdio.h>
|
|
Packit |
577717 |
|
|
Packit |
577717 |
#include "papi.h"
|
|
Packit |
577717 |
#include "papi_test.h"
|
|
Packit |
577717 |
|
|
Packit |
577717 |
int
|
|
Packit |
577717 |
main( int argc, char **argv )
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
int retval;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
const PAPI_component_info_t *cmpinfo;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
tests_quiet( argc, argv ); /* Set TESTS_QUIET variable */
|
|
Packit |
577717 |
|
|
Packit |
577717 |
if ( ( retval =
|
|
Packit |
577717 |
PAPI_library_init( PAPI_VER_CURRENT ) ) != PAPI_VER_CURRENT )
|
|
Packit |
577717 |
test_fail( __FILE__, __LINE__, "PAPI_library_init", retval );
|
|
Packit |
577717 |
|
|
Packit |
577717 |
if ( ( cmpinfo = PAPI_get_component_info( 0 ) ) == NULL )
|
|
Packit |
577717 |
test_fail( __FILE__, __LINE__, "PAPI_get_component_info", retval );
|
|
Packit |
577717 |
|
|
Packit |
577717 |
if (!TESTS_QUIET) {
|
|
Packit |
577717 |
printf( "name: %s\n", cmpinfo->name );
|
|
Packit |
577717 |
printf( "component_version: %s\n", cmpinfo->version );
|
|
Packit |
577717 |
printf( "support_version: %s\n", cmpinfo->support_version );
|
|
Packit |
577717 |
printf( "kernel_version: %s\n", cmpinfo->kernel_version );
|
|
Packit |
577717 |
printf( "num_cntrs: %d\n", cmpinfo->num_cntrs );
|
|
Packit |
577717 |
printf( "num_mpx_cntrs: %d\n", cmpinfo->num_mpx_cntrs );
|
|
Packit |
577717 |
printf( "num_preset_events: %d\n", cmpinfo->num_preset_events ); /* Number of counters the component supports */
|
|
Packit |
577717 |
printf( "num_native_events: %d\n", cmpinfo->num_native_events ); /* Number of counters the component supports */
|
|
Packit |
577717 |
printf( "default_domain: %#x (%s)\n", cmpinfo->default_domain,
|
|
Packit |
577717 |
stringify_all_domains( cmpinfo->default_domain ) );
|
|
Packit |
577717 |
printf( "available_domains: %#x (%s)\n", cmpinfo->available_domains, stringify_all_domains( cmpinfo->available_domains ) ); /* Available domains */
|
|
Packit |
577717 |
printf( "default_granularity: %#x (%s)\n", cmpinfo->default_granularity,
|
|
Packit |
577717 |
stringify_granularity( cmpinfo->default_granularity ) );
|
|
Packit |
577717 |
/* The default granularity when this component is used */
|
|
Packit |
577717 |
printf( "available_granularities: %#x (%s)\n", cmpinfo->available_granularities, stringify_all_granularities( cmpinfo->available_granularities ) ); /* Available granularities */
|
|
Packit |
577717 |
printf( "hardware_intr_sig: %d\n", cmpinfo->hardware_intr_sig ); printf( "hardware_intr: %d\n", cmpinfo->hardware_intr ); /* Needs hw overflow intr to be emulated in software */
|
|
Packit |
577717 |
printf( "precise_intr: %d\n", cmpinfo->precise_intr ); /* Performance interrupts happen precisely */
|
|
Packit |
577717 |
printf( "posix1b_timers: %d\n", cmpinfo->posix1b_timers ); /* Performance interrupts happen precisely */
|
|
Packit |
577717 |
printf( "kernel_profile: %d\n", cmpinfo->kernel_profile ); /* Needs kernel profile support (buffered interrupts) to be emulated */
|
|
Packit |
577717 |
printf( "kernel_multiplex: %d\n", cmpinfo->kernel_multiplex ); /* In kernel multiplexing */
|
|
Packit |
577717 |
printf( "fast_counter_read: %d\n", cmpinfo->fast_counter_read ); /* Has a fast counter read */
|
|
Packit |
577717 |
printf( "fast_real_timer: %d\n", cmpinfo->fast_real_timer ); /* Has a fast real timer */
|
|
Packit |
577717 |
printf( "fast_virtual_timer: %d\n", cmpinfo->fast_virtual_timer ); /* Has a fast virtual timer */
|
|
Packit |
577717 |
printf( "attach: %d\n", cmpinfo->attach ); /* Supports attach */
|
|
Packit |
577717 |
printf( "attach_must_ptrace: %d\n", cmpinfo->attach_must_ptrace ); /* */
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
test_pass( __FILE__ );
|
|
Packit |
577717 |
|
|
Packit |
577717 |
return 0;
|
|
Packit |
577717 |
}
|