Go to the source code of this file.
|
| int | prof_events (int num_tests) |
| |
| void | prof_print_address (const char *title, const PAPI_exe_info_t *prginfo) |
| |
| void | prof_print_prof_info (caddr_t start, caddr_t end, int threshold, char *event_name) |
| |
| void | prof_alloc (int num, unsigned long plength) |
| |
| void | prof_head (unsigned long blength, int bucket_size, int num_buckets, const char *header) |
| |
| void | prof_out (caddr_t start, int n, int bucket, int num_buckets, unsigned int scale) |
| |
| unsigned long | prof_size (unsigned long plength, unsigned scale, int bucket, int *num_buckets) |
| |
| int | prof_check (int n, int bucket, int num_buckets) |
| |
| int | prof_buckets (int bucket) |
| |
| void | do_no_profile (int quiet) |
| |
◆ FULL_SCALE
◆ do_no_profile()
| void do_no_profile |
( |
int |
quiet | ) |
|
Definition at line 113 of file prof_utils.c.
127 printf(
"Test type : \t%s\n",
"No profiling" );
129 printf(
TAB1,
"PAPI_TOT_CYC", (
values[0] )[1] );
int PAPI_stop(int EventSet, long long *values)
void test_fail(const char *file, int line, const char *call, int retval)
int PAPI_start(int EventSet)
char event_name[PAPI_MAX_STR_LEN]
◆ prof_alloc()
| void prof_alloc |
( |
int |
num, |
|
|
unsigned long |
plength |
|
) |
| |
Definition at line 140 of file prof_utils.c.
144 for (
i = 0;
i < num;
i++ ) {
149 memset(
profbuf[
i], 0x00, blength );
void test_fail(const char *file, int line, const char *call, int retval)
◆ prof_buckets()
| int prof_buckets |
( |
int |
bucket | ) |
|
Definition at line 160 of file prof_utils.c.
165 bucket_size =
sizeof ( short );
168 bucket_size =
sizeof ( int );
171 bucket_size =
sizeof (
unsigned long long );
177 return ( bucket_size );
#define PAPI_PROFIL_BUCKET_16
#define PAPI_PROFIL_BUCKET_32
#define PAPI_PROFIL_BUCKET_64
◆ prof_check()
| int prof_check |
( |
int |
n, |
|
|
int |
bucket, |
|
|
int |
num_buckets |
|
) |
| |
Definition at line 272 of file prof_utils.c.
276 unsigned short **buf16 = (
unsigned short ** )
profbuf;
277 unsigned int **buf32 = (
unsigned int ** )
profbuf;
278 unsigned long long **buf64 = (
unsigned long long ** )
profbuf;
282 for (
i = 0;
i < num_buckets;
i++ )
283 for ( j = 0; j < n; j++ )
287 for (
i = 0;
i < num_buckets;
i++ )
288 for ( j = 0; j < n; j++ )
292 for (
i = 0;
i < num_buckets;
i++ )
293 for ( j = 0; j < n; j++ )
#define PAPI_PROFIL_BUCKET_16
#define PAPI_PROFIL_BUCKET_32
#define PAPI_PROFIL_BUCKET_64
◆ prof_events()
| int prof_events |
( |
int |
num_tests | ) |
|
Definition at line 42 of file prof_utils.c.
int PAPI_event_code_to_name(int EventCode, char *out)
void test_fail(const char *file, int line, const char *call, int retval)
int add_two_nonderived_events(int *num_events, int *papi_event, int *mask)
long long ** allocate_test_space(int num_tests, int num_events)
char event_name[PAPI_MAX_STR_LEN]
◆ prof_head()
| void prof_head |
( |
unsigned long |
blength, |
|
|
int |
bucket_size, |
|
|
int |
num_buckets, |
|
|
const char * |
header |
|
) |
| |
Definition at line 183 of file prof_utils.c.
187 (
"\n------------------------------------------------------------\n" );
188 printf(
"PAPI_profil() hash table, Bucket size: %d bits.\n",
190 printf(
"Number of buckets: %d.\nLength of buffer: %ld bytes.\n",
191 num_buckets, blength );
192 printf(
"------------------------------------------------------------\n" );
193 printf(
"%s\n", header );
int prof_buckets(int bucket)
◆ prof_out()
| void prof_out |
( |
caddr_t |
start, |
|
|
int |
n, |
|
|
int |
bucket, |
|
|
int |
num_buckets, |
|
|
unsigned int |
scale |
|
) |
| |
Definition at line 202 of file prof_utils.c.
206 unsigned short buf_16;
208 unsigned long long buf_64;
209 unsigned short **buf16 = (
unsigned short ** )
profbuf;
210 unsigned int **buf32 = (
unsigned int ** )
profbuf;
211 unsigned long long **buf64 = (
unsigned long long ** )
profbuf;
218 for (
i = 0;
i < num_buckets;
i++ ) {
219 for ( j = 0, buf_16 = 0; j < n; j++ )
220 buf_16 |= ( buf16[j] )[
i];
225 (
long long) (
unsigned long)
start +
226 ( ( (
long long )
i * scale ) >> 15 ) );
227 for ( j = 0, buf_16 = 0; j < n; j++ )
228 printf(
"\t%d", ( buf16[j] )[
i] );
234 for (
i = 0;
i < num_buckets;
i++ ) {
235 for ( j = 0, buf_32 = 0; j < n; j++ )
236 buf_32 |= ( buf32[j] )[
i];
239 (
long long) (
unsigned long)
start +
240 ( ( (
long long )
i * scale ) >> 15 ) );
241 for ( j = 0, buf_32 = 0; j < n; j++ )
242 printf(
"\t%d", ( buf32[j] )[
i] );
248 for (
i = 0;
i < num_buckets;
i++ ) {
249 for ( j = 0, buf_64 = 0; j < n; j++ )
250 buf_64 |= ( buf64[j] )[
i];
253 (
long long) (
unsigned long)
start +
254 ( ( (
long long )
i * scale ) >> 15 ) );
255 for ( j = 0, buf_64 = 0; j < n; j++ )
256 printf(
"\t%lld", ( buf64[j] )[
i] );
263 (
"------------------------------------------------------------\n\n" );
#define PAPI_PROFIL_BUCKET_16
#define PAPI_PROFIL_BUCKET_32
static struct timeval start
#define PAPI_PROFIL_BUCKET_64
◆ prof_print_address()
| void prof_print_address |
( |
const char * |
title, |
|
|
const PAPI_exe_info_t * |
prginfo |
|
) |
| |
Definition at line 69 of file prof_utils.c.
71 printf(
"%s\n", title );
73 (
"----------------------------------------------------------------\n" );
74 printf(
"Text start: %p, Text end: %p, Text length: %#x\n",
84 (
"----------------------------------------------------------------\n" );
PAPI_address_map_t address_info
◆ prof_print_prof_info()
| void prof_print_prof_info |
( |
caddr_t |
start, |
|
|
caddr_t |
end, |
|
|
int |
threshold, |
|
|
char * |
event_name |
|
) |
| |
Definition at line 93 of file prof_utils.c.
96 printf(
"Profiling event : %s\n",
event_name );
97 printf(
"Profile Threshold: %d\n",
threshold );
98 printf(
"Profile Iters : %d\n",
101 printf(
"Profile Range : %p to %p\n",
start, end );
103 (
"----------------------------------------------------------------\n" );
static struct timeval start
char event_name[PAPI_MAX_STR_LEN]
◆ prof_size()
| unsigned long prof_size |
( |
unsigned long |
plength, |
|
|
unsigned |
scale, |
|
|
int |
bucket, |
|
|
int * |
num_buckets |
|
) |
| |
Definition at line 310 of file prof_utils.c.
312 unsigned long blength;
313 long long llength = ( (
long long ) plength * scale );
315 *num_buckets = ( int ) ( llength / 65536 / 2 );
316 blength = (
unsigned long ) ( *num_buckets * bucket_size );
int prof_buckets(int bucket)
◆ event_name
◆ EventSet
◆ PAPI_event
◆ profbuf
◆ values