20#ifndef __STARPU_PROFILING_H__
21#define __STARPU_PROFILING_H__
44#define STARPU_PROFILING_DISABLE 0
48#define STARPU_PROFILING_ENABLE 1
102 long long int papi_values[PAPI_MAX_HWCTRS];
221#ifdef BUILDING_STARPU
222#include <common/utils.h>
224extern int _starpu_profiling;
225#define starpu_profiling_status_get() ( \
228 ANNOTATE_HAPPENS_AFTER(&_starpu_profiling); \
229 __ret = _starpu_profiling; \
230 ANNOTATE_HAPPENS_BEFORE(&_starpu_profiling); \
295static __starpu_inline
void starpu_timespec_clear(
struct timespec *tsp)
301#define STARPU_NS_PER_S 1000000000
304static __starpu_inline
void starpu_timespec_add(
struct timespec *a,
306 struct timespec *result)
308 result->tv_sec = a->tv_sec + b->tv_sec;
309 result->tv_nsec = a->tv_nsec + b->tv_nsec;
311 if (result->tv_nsec >= STARPU_NS_PER_S)
314 result->tv_nsec -= STARPU_NS_PER_S;
319static __starpu_inline
void starpu_timespec_accumulate(
struct timespec *result,
322 result->tv_sec += a->tv_sec;
323 result->tv_nsec += a->tv_nsec;
325 if (result->tv_nsec >= STARPU_NS_PER_S)
328 result->tv_nsec -= STARPU_NS_PER_S;
333static __starpu_inline
void starpu_timespec_sub(
const struct timespec *a,
334 const struct timespec *b,
335 struct timespec *result)
337 result->tv_sec = a->tv_sec - b->tv_sec;
338 result->tv_nsec = a->tv_nsec - b->tv_nsec;
340 if ((result)->tv_nsec < 0)
343 result->tv_nsec += STARPU_NS_PER_S;
347#define starpu_timespec_cmp(a, b, CMP) \
348 (((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:183
struct timespec executing_time
Definition: starpu_profiling.h:125
struct timespec acquire_data_end_time
Definition: starpu_profiling.h:71
struct timespec waiting_time
Definition: starpu_profiling.h:132
int workerid
Definition: starpu_profiling.h:91
uint64_t stall_cycles
Definition: starpu_profiling.h:164
struct timespec all_waiting_time
Definition: starpu_profiling.h:150
struct timespec callback_end_time
Definition: starpu_profiling.h:86
int transfer_count
Definition: starpu_profiling.h:185
struct timespec submit_time
Definition: starpu_profiling.h:57
struct timespec total_time
Definition: starpu_profiling.h:181
struct timespec callback_start_time
Definition: starpu_profiling.h:84
struct timespec all_scheduling_time
Definition: starpu_profiling.h:156
double energy_consumed
Definition: starpu_profiling.h:166
struct timespec pop_start_time
Definition: starpu_profiling.h:64
struct timespec all_callback_time
Definition: starpu_profiling.h:147
uint64_t used_cycles
Definition: starpu_profiling.h:162
struct timespec push_end_time
Definition: starpu_profiling.h:62
struct timespec all_executing_time
Definition: starpu_profiling.h:144
double energy_consumed
Definition: starpu_profiling.h:98
int executed_tasks
Definition: starpu_profiling.h:159
uint64_t stall_cycles
Definition: starpu_profiling.h:96
struct timespec start_time
Definition: starpu_profiling.h:179
struct timespec callback_time
Definition: starpu_profiling.h:128
struct timespec all_sleeping_time
Definition: starpu_profiling.h:153
struct timespec acquire_data_start_time
Definition: starpu_profiling.h:69
struct timespec release_data_end_time
Definition: starpu_profiling.h:81
struct timespec pop_end_time
Definition: starpu_profiling.h:66
struct timespec push_start_time
Definition: starpu_profiling.h:60
struct timespec total_time
Definition: starpu_profiling.h:122
struct timespec release_data_start_time
Definition: starpu_profiling.h:79
struct timespec start_time
Definition: starpu_profiling.h:74
struct timespec sleeping_time
Definition: starpu_profiling.h:136
struct timespec scheduling_time
Definition: starpu_profiling.h:140
struct timespec end_time
Definition: starpu_profiling.h:76
uint64_t used_cycles
Definition: starpu_profiling.h:94
struct timespec start_time
Definition: starpu_profiling.h:120
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:177
Definition: starpu_profiling.h:55
Definition: starpu_profiling.h:118