13{
14 int cnt, mpx;
15 struct utsname uname_info;
17
20 }
21
23
24 uname(&uname_info);
25
26 printf( "%s", prompt );
27 printf
28 ( "--------------------------------------------------------------------------------\n" );
29 printf( "PAPI version : %d.%d.%d.%d\n",
34 printf( "Operating system : %s %s\n",
35 uname_info.sysname, uname_info.release);
36 printf( "Vendor string and code : %s (%d, 0x%x)\n",
37 ( *hwinfo )->vendor_string,
38 ( *hwinfo )->vendor,
39 ( *hwinfo )->vendor );
40 printf( "Model string and code : %s (%d, 0x%x)\n",
41 ( *hwinfo )->model_string,
42 ( *hwinfo )->model,
43 ( *hwinfo )->model );
44 printf( "CPU revision : %f\n", ( *hwinfo )->revision );
45 if ( ( *hwinfo )->cpuid_family > 0 ) {
46 printf( "CPUID : Family/Model/Stepping %d/%d/%d, "
47 "0x%02x/0x%02x/0x%02x\n",
48 ( *hwinfo )->cpuid_family,
49 ( *hwinfo )->cpuid_model,
50 ( *hwinfo )->cpuid_stepping,
51 ( *hwinfo )->cpuid_family,
52 ( *hwinfo )->cpuid_model,
53 ( *hwinfo )->cpuid_stepping );
54 }
55 printf( "CPU Max MHz : %d\n", ( *hwinfo )->cpu_max_mhz );
56 printf( "CPU Min MHz : %d\n", ( *hwinfo )->cpu_min_mhz );
57 printf( "Total cores : %d\n", ( *hwinfo )->totalcpus );
58
59 if ( ( *hwinfo )->threads > 0 )
60 printf( "SMT threads per core : %d\n", ( *hwinfo )->threads );
61 if ( ( *hwinfo )->cores > 0 )
62 printf( "Cores per socket : %d\n", ( *hwinfo )->cores );
63 if ( ( *hwinfo )->sockets > 0 )
64 printf( "Sockets : %d\n", ( *hwinfo )->sockets );
65 printf( "Cores per NUMA region : %d\n", ( *hwinfo )->ncpu );
66 printf( "NUMA regions : %d\n", ( *hwinfo )->nnodes );
67 printf( "Running in a VM : %s\n", ( *hwinfo )->virtualized?
68 "yes":"no");
69 if ( (*hwinfo)->virtualized) {
70 printf( "VM Vendor : %s\n", (*hwinfo)->virtual_vendor_string);
71 }
74 if ( cnt >= 0 ) {
75 printf( "Number Hardware Counters : %d\n",cnt );
76 } else {
77 printf(
"Number Hardware Counters : PAPI error %d: %s\n", cnt,
PAPI_strerror(cnt));
78 }
79 if ( mpx >= 0 ) {
80 printf( "Max Multiplex Counters : %d\n", mpx );
81 } else {
82 printf(
"Max Multiplex Counters : PAPI error %d: %s\n", mpx,
PAPI_strerror(mpx));
83 }
84 printf("Fast counter read (rdpmc): %s\n",
85 options.cmp_info->fast_counter_read?
"yes":
"no");
86 printf( "--------------------------------------------------------------------------------\n" );
87 printf( "\n" );
89}
get information about the system hardware
Get PAPI library or event set options.
Returns a string describing the PAPI error code.
#define PAPI_MAX_MPX_CTRS
#define PAPI_COMPONENTINFO
#define PAPI_VERSION_REVISION(x)
#define PAPI_VERSION_MAJOR(x)
#define PAPI_VERSION_INCREMENT(x)
#define PAPI_VERSION_MINOR(x)
A pointer to the following is passed to PAPI_set/get_opt()