18#ifndef __STARPU_PROFILING_H__
19#define __STARPU_PROFILING_H__
43#define STARPU_PROFILING_DISABLE 0
47#define STARPU_PROFILING_ENABLE 1
101 long long int papi_values[PAPI_MAX_HWCTRS];
217#ifdef BUILDING_STARPU
218#include <common/utils.h>
220extern int _starpu_profiling;
221#define starpu_profiling_status_get() ( \
224 ANNOTATE_HAPPENS_AFTER(&_starpu_profiling); \
225 __ret = _starpu_profiling; \
226 ANNOTATE_HAPPENS_BEFORE(&_starpu_profiling); \
291static __starpu_inline
void starpu_timespec_clear(
struct timespec *tsp)
297#define STARPU_NS_PER_S 1000000000
300static __starpu_inline
void starpu_timespec_add(
struct timespec *a,
302 struct timespec *result)
304 result->tv_sec = a->tv_sec + b->tv_sec;
305 result->tv_nsec = a->tv_nsec + b->tv_nsec;
307 if (result->tv_nsec >= STARPU_NS_PER_S)
310 result->tv_nsec -= STARPU_NS_PER_S;
315static __starpu_inline
void starpu_timespec_accumulate(
struct timespec *result,
318 result->tv_sec += a->tv_sec;
319 result->tv_nsec += a->tv_nsec;
321 if (result->tv_nsec >= STARPU_NS_PER_S)
324 result->tv_nsec -= STARPU_NS_PER_S;
329static __starpu_inline
void starpu_timespec_sub(
const struct timespec *a,
330 const struct timespec *b,
331 struct timespec *result)
333 result->tv_sec = a->tv_sec - b->tv_sec;
334 result->tv_nsec = a->tv_nsec - b->tv_nsec;
336 if ((result)->tv_nsec < 0)
339 result->tv_nsec += STARPU_NS_PER_S;
343#define starpu_timespec_cmp(a, b, CMP) \
344 (((a)->tv_sec == (b)->tv_sec) ? ((a)->tv_nsec CMP(b)->tv_nsec) : ((a)->tv_sec CMP(b)->tv_sec))
int long long transferred_bytes
Definition: starpu_profiling.h:179
struct timespec executing_time
Definition: starpu_profiling.h:124
struct timespec acquire_data_end_time
Definition: starpu_profiling.h:70
struct timespec waiting_time
Definition: starpu_profiling.h:131
int workerid
Definition: starpu_profiling.h:90
uint64_t stall_cycles
Definition: starpu_profiling.h:163
struct timespec all_waiting_time
Definition: starpu_profiling.h:149
struct timespec callback_end_time
Definition: starpu_profiling.h:85
int transfer_count
Definition: starpu_profiling.h:181
struct timespec submit_time
Definition: starpu_profiling.h:56
struct timespec total_time
Definition: starpu_profiling.h:177
struct timespec callback_start_time
Definition: starpu_profiling.h:83
struct timespec all_scheduling_time
Definition: starpu_profiling.h:155
double energy_consumed
Definition: starpu_profiling.h:165
struct timespec pop_start_time
Definition: starpu_profiling.h:63
struct timespec all_callback_time
Definition: starpu_profiling.h:146
uint64_t used_cycles
Definition: starpu_profiling.h:161
struct timespec push_end_time
Definition: starpu_profiling.h:61
struct timespec all_executing_time
Definition: starpu_profiling.h:143
double energy_consumed
Definition: starpu_profiling.h:97
int executed_tasks
Definition: starpu_profiling.h:158
uint64_t stall_cycles
Definition: starpu_profiling.h:95
struct timespec start_time
Definition: starpu_profiling.h:175
struct timespec callback_time
Definition: starpu_profiling.h:127
struct timespec all_sleeping_time
Definition: starpu_profiling.h:152
struct timespec acquire_data_start_time
Definition: starpu_profiling.h:68
struct timespec release_data_end_time
Definition: starpu_profiling.h:80
struct timespec pop_end_time
Definition: starpu_profiling.h:65
struct timespec push_start_time
Definition: starpu_profiling.h:59
struct timespec total_time
Definition: starpu_profiling.h:121
struct timespec release_data_start_time
Definition: starpu_profiling.h:78
struct timespec start_time
Definition: starpu_profiling.h:73
struct timespec sleeping_time
Definition: starpu_profiling.h:135
struct timespec scheduling_time
Definition: starpu_profiling.h:139
struct timespec end_time
Definition: starpu_profiling.h:75
uint64_t used_cycles
Definition: starpu_profiling.h:93
struct timespec start_time
Definition: starpu_profiling.h:119
void starpu_profiling_worker_helper_display_summary(void)
void starpu_profiling_bus_helper_display_summary(void)
void starpu_profiling_init(void)
int starpu_bus_get_profiling_info(int busid, struct starpu_profiling_bus_info *bus_info)
int starpu_bus_get_id(int src, int dst)
int starpu_bus_get_src(int busid)
double starpu_timing_timespec_to_us(struct timespec *ts)
int starpu_profiling_worker_get_info(int workerid, struct starpu_profiling_worker_info *worker_info)
int starpu_bus_get_direct(int busid)
int starpu_bus_get_count(void)
int starpu_bus_get_dst(int busid)
void starpu_data_display_memory_stats(void)
int starpu_bus_get_ngpus(int busid)
void starpu_bus_set_direct(int busid, int direct)
int starpu_profiling_status_set(int status)
double starpu_timing_timespec_delay_us(struct timespec *start, struct timespec *end)
void starpu_profiling_set_id(int new_id)
void starpu_bus_set_ngpus(int busid, int ngpus)
int starpu_profiling_status_get(void)
Definition: starpu_profiling.h:173
Definition: starpu_profiling.h:54
Definition: starpu_profiling.h:117