19 #ifndef __STARPU_PROFILING_H__ 20 #define __STARPU_PROFILING_H__ 39 #define STARPU_PROFILING_DISABLE 0 43 #define STARPU_PROFILING_ENABLE 1 106 struct timespec total_time;
108 struct timespec executing_time;
110 struct timespec sleeping_time;
129 struct timespec total_time;
165 #ifdef BUILDING_STARPU 166 #include <common/utils.h> 168 extern int _starpu_profiling;
169 #define starpu_profiling_status_get() ({ \ 171 ANNOTATE_HAPPENS_AFTER(&_starpu_profiling); \ 172 __ret = _starpu_profiling; \ 173 ANNOTATE_HAPPENS_BEFORE(&_starpu_profiling); \ 207 void starpu_bus_set_direct(
int busid,
int direct);
208 int starpu_bus_get_direct(
int busid);
209 void starpu_bus_set_ngpus(
int busid,
int ngpus);
210 int starpu_bus_get_ngpus(
int busid);
220 static __starpu_inline
void starpu_timespec_clear(
struct timespec *tsp)
226 #define STARPU_NS_PER_S 1000000000 229 static __starpu_inline
void starpu_timespec_add(
struct timespec *a,
231 struct timespec *result)
233 result->tv_sec = a->tv_sec + b->tv_sec;
234 result->tv_nsec = a->tv_nsec + b->tv_nsec;
236 if (result->tv_nsec >= STARPU_NS_PER_S)
239 result->tv_nsec -= STARPU_NS_PER_S;
244 static __starpu_inline
void starpu_timespec_accumulate(
struct timespec *result,
247 result->tv_sec += a->tv_sec;
248 result->tv_nsec += a->tv_nsec;
250 if (result->tv_nsec >= STARPU_NS_PER_S)
253 result->tv_nsec -= STARPU_NS_PER_S;
258 static __starpu_inline
void starpu_timespec_sub(
const struct timespec *a,
259 const struct timespec *b,
260 struct timespec *result)
262 result->tv_sec = a->tv_sec - b->tv_sec;
263 result->tv_nsec = a->tv_nsec - b->tv_nsec;
265 if ((result)->tv_nsec < 0)
268 result->tv_nsec += STARPU_NS_PER_S;
272 #define starpu_timespec_cmp(a, b, CMP) \ 273 (((a)->tv_sec == (b)->tv_sec) ? ((a)->tv_nsec CMP (b)->tv_nsec) : ((a)->tv_sec CMP (b)->tv_sec)) Definition: starpu_profiling.h:49
int executed_tasks
Definition: starpu_profiling.h:112
int starpu_bus_get_src(int busid)
void starpu_data_display_memory_stats()
void starpu_profiling_bus_helper_display_summary(void)
int starpu_bus_get_profiling_info(int busid, struct starpu_profiling_bus_info *bus_info)
struct timespec release_data_start_time
Definition: starpu_profiling.h:74
struct timespec pop_start_time
Definition: starpu_profiling.h:59
int long long transferred_bytes
Definition: starpu_profiling.h:131
struct timespec callback_end_time
Definition: starpu_profiling.h:81
int transfer_count
Definition: starpu_profiling.h:133
uint64_t used_cycles
Definition: starpu_profiling.h:115
struct timespec pop_end_time
Definition: starpu_profiling.h:61
struct timespec submit_time
Definition: starpu_profiling.h:52
void starpu_profiling_init(void)
struct timespec acquire_data_end_time
Definition: starpu_profiling.h:66
struct timespec acquire_data_start_time
Definition: starpu_profiling.h:64
int starpu_bus_get_dst(int busid)
void starpu_profiling_worker_helper_display_summary(void)
int workerid
Definition: starpu_profiling.h:86
double starpu_timing_timespec_to_us(struct timespec *ts)
struct timespec push_start_time
Definition: starpu_profiling.h:55
double starpu_timing_timespec_delay_us(struct timespec *start, struct timespec *end)
Definition: starpu_profiling.h:101
uint64_t stall_cycles
Definition: starpu_profiling.h:91
int starpu_profiling_status_set(int status)
void starpu_profiling_set_id(int new_id)
struct timespec start_time
Definition: starpu_profiling.h:69
struct timespec release_data_end_time
Definition: starpu_profiling.h:76
double energy_consumed
Definition: starpu_profiling.h:119
uint64_t stall_cycles
Definition: starpu_profiling.h:117
int starpu_bus_get_count(void)
struct timespec callback_start_time
Definition: starpu_profiling.h:79
double energy_consumed
Definition: starpu_profiling.h:93
Definition: starpu_profiling.h:124
uint64_t used_cycles
Definition: starpu_profiling.h:89
int starpu_profiling_status_get(void)
struct timespec push_end_time
Definition: starpu_profiling.h:57
int starpu_bus_get_id(int src, int dst)
struct timespec end_time
Definition: starpu_profiling.h:71
int starpu_profiling_worker_get_info(int workerid, struct starpu_profiling_worker_info *worker_info)