Go to the documentation of this file.
19 #ifndef __STARPU_PROFILING_H__
20 #define __STARPU_PROFILING_H__
39 #define STARPU_PROFILING_DISABLE 0
43 #define STARPU_PROFILING_ENABLE 1
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
struct timespec sleeping_time
Definition: starpu_profiling.h:110
struct timespec executing_time
Definition: starpu_profiling.h:108
int starpu_bus_get_src(int busid)
struct timespec total_time
Definition: starpu_profiling.h:106
struct timespec callback_end_time
Definition: starpu_profiling.h:81
int executed_tasks
Definition: starpu_profiling.h:112
void starpu_data_display_memory_stats()
struct timespec start_time
Definition: starpu_profiling.h:104
int transfer_count
Definition: starpu_profiling.h:133
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 submit_time
Definition: starpu_profiling.h:52
struct timespec pop_start_time
Definition: starpu_profiling.h:59
struct timespec acquire_data_end_time
Definition: starpu_profiling.h:66
int long long transferred_bytes
Definition: starpu_profiling.h:131
int workerid
Definition: starpu_profiling.h:86
uint64_t used_cycles
Definition: starpu_profiling.h:115
struct timespec start_time
Definition: starpu_profiling.h:127
uint64_t stall_cycles
Definition: starpu_profiling.h:91
void starpu_profiling_init(void)
struct timespec acquire_data_start_time
Definition: starpu_profiling.h:64
double starpu_timing_timespec_to_us(struct timespec *ts)
void starpu_profiling_worker_helper_display_summary(void)
struct timespec pop_end_time
Definition: starpu_profiling.h:61
int starpu_bus_get_dst(int busid)
uint64_t used_cycles
Definition: starpu_profiling.h:89
double starpu_timing_timespec_delay_us(struct timespec *start, struct timespec *end)
double energy_consumed
Definition: starpu_profiling.h:119
Definition: starpu_profiling.h:101
void starpu_profiling_set_id(int new_id)
int starpu_profiling_status_set(int status)
Definition: starpu_profiling.h:124
struct timespec callback_start_time
Definition: starpu_profiling.h:79
struct timespec push_start_time
Definition: starpu_profiling.h:55
double energy_consumed
Definition: starpu_profiling.h:93
struct timespec start_time
Definition: starpu_profiling.h:69
struct timespec release_data_end_time
Definition: starpu_profiling.h:76
int starpu_bus_get_id(int src, int dst)
int starpu_bus_get_count(void)
uint64_t stall_cycles
Definition: starpu_profiling.h:117
struct timespec total_time
Definition: starpu_profiling.h:129
int starpu_profiling_status_get(void)
int starpu_profiling_worker_get_info(int workerid, struct starpu_profiling_worker_info *worker_info)
struct timespec push_end_time
Definition: starpu_profiling.h:57
struct timespec end_time
Definition: starpu_profiling.h:71