Blame src/ctests/prof_utils.h

Packit 577717
/*
Packit 577717
* File:    prof_utils.h
Packit 577717
* Author:  Dan Terpstra
Packit 577717
*          terpstra@cs.utk.edu
Packit 577717
* Mods:    Maynard Johnson
Packit 577717
*          maynardj@us.ibm.com
Packit 577717
*/
Packit 577717
Packit 577717
/* This file contains utility definitions useful for all profiling tests
Packit 577717
   It should be #included in:
Packit 577717
   - profile.c,
Packit 577717
   - sprofile.c,
Packit 577717
   - profile_pthreads.c,
Packit 577717
   - profile_twoevents.c,
Packit 577717
   - earprofile.c,
Packit 577717
   - future profiling tests.
Packit 577717
*/
Packit 577717
Packit 577717
/* value for scale parameter that sets scale to 1 */
Packit 577717
#define FULL_SCALE 65536
Packit 577717
Packit 577717
/* Internal prototype */
Packit 577717
int prof_events(int num_tests);
Packit 577717
void prof_print_address(const char *title, const PAPI_exe_info_t *prginfo);
Packit 577717
void prof_print_prof_info(caddr_t start, caddr_t end, int threshold, char *event_name);
Packit 577717
void prof_alloc(int num, unsigned long plength);
Packit 577717
void prof_head(unsigned long blength, int bucket_size, int num_buckets, const char *header);
Packit 577717
void prof_out(caddr_t start, int n, int bucket, int num_buckets, unsigned int scale);
Packit 577717
unsigned long prof_size(unsigned long plength, unsigned scale, int bucket, int *num_buckets);
Packit 577717
int prof_check(int n, int bucket, int num_buckets);
Packit 577717
int prof_buckets(int bucket);
Packit 577717
void do_no_profile(int quiet);
Packit 577717
Packit 577717
/* variables global to profiling tests */
Packit 577717
extern long long **values;
Packit 577717
extern char event_name[PAPI_MAX_STR_LEN];
Packit 577717
extern int PAPI_event;
Packit 577717
extern int EventSet;
Packit 577717
extern void *profbuf[5];
Packit 577717
Packit 577717
/* Itanium returns function descriptors instead of function addresses.
Packit 577717
   I couldn't find the following structure in a header file,
Packit 577717
   so I duplicated it below.
Packit 577717
*/
Packit 577717
#if (defined(ITANIUM1) || defined(ITANIUM2))
Packit 577717
   struct fdesc {
Packit 577717
      void *ip;	/* entry point (code address) */
Packit 577717
      void *gp;	/* global-pointer */
Packit 577717
   };
Packit 577717
#elif defined(__powerpc64__)
Packit 577717
	struct fdesc {
Packit 577717
		void * ip;   // function entry point
Packit 577717
		void * toc;
Packit 577717
		void * env;
Packit 577717
	};
Packit 577717
#endif