18 #ifndef __STARPU_PROFILING_H__ 19 #define __STARPU_PROFILING_H__ 38 #define STARPU_PROFILING_DISABLE 0 42 #define STARPU_PROFILING_ENABLE 1 105 struct timespec total_time;
107 struct timespec executing_time;
109 struct timespec sleeping_time;
128 struct timespec total_time;
164 #ifdef BUILDING_STARPU 165 #include <common/utils.h> 167 extern int _starpu_profiling;
168 #define starpu_profiling_status_get() ({ \ 170 ANNOTATE_HAPPENS_AFTER(&_starpu_profiling); \ 171 __ret = _starpu_profiling; \ 172 ANNOTATE_HAPPENS_BEFORE(&_starpu_profiling); \ 206 void starpu_bus_set_direct(
int busid,
int direct);
207 int starpu_bus_get_direct(
int busid);
208 void starpu_bus_set_ngpus(
int busid,
int ngpus);
209 int starpu_bus_get_ngpus(
int busid);
219 static __starpu_inline
void starpu_timespec_clear(
struct timespec *tsp)
225 #define STARPU_NS_PER_S 1000000000 228 static __starpu_inline
void starpu_timespec_add(
struct timespec *a,
230 struct timespec *result)
232 result->tv_sec = a->tv_sec + b->tv_sec;
233 result->tv_nsec = a->tv_nsec + b->tv_nsec;
235 if (result->tv_nsec >= STARPU_NS_PER_S)
238 result->tv_nsec -= STARPU_NS_PER_S;
243 static __starpu_inline
void starpu_timespec_accumulate(
struct timespec *result,
246 result->tv_sec += a->tv_sec;
247 result->tv_nsec += a->tv_nsec;
249 if (result->tv_nsec >= STARPU_NS_PER_S)
252 result->tv_nsec -= STARPU_NS_PER_S;
257 static __starpu_inline
void starpu_timespec_sub(
const struct timespec *a,
258 const struct timespec *b,
259 struct timespec *result)
261 result->tv_sec = a->tv_sec - b->tv_sec;
262 result->tv_nsec = a->tv_nsec - b->tv_nsec;
264 if ((result)->tv_nsec < 0)
267 result->tv_nsec += STARPU_NS_PER_S;
271 #define starpu_timespec_cmp(a, b, CMP) \ 272 (((a)->tv_sec == (b)->tv_sec) ? ((a)->tv_nsec CMP (b)->tv_nsec) : ((a)->tv_sec CMP (b)->tv_sec)) Definition: starpu_profiling.h:48
int executed_tasks
Definition: starpu_profiling.h:111
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:73
struct timespec pop_start_time
Definition: starpu_profiling.h:58
int long long transferred_bytes
Definition: starpu_profiling.h:130
struct timespec callback_end_time
Definition: starpu_profiling.h:80
int transfer_count
Definition: starpu_profiling.h:132
uint64_t used_cycles
Definition: starpu_profiling.h:114
struct timespec pop_end_time
Definition: starpu_profiling.h:60
struct timespec submit_time
Definition: starpu_profiling.h:51
void starpu_profiling_init(void)
struct timespec acquire_data_end_time
Definition: starpu_profiling.h:65
struct timespec acquire_data_start_time
Definition: starpu_profiling.h:63
int starpu_bus_get_dst(int busid)
void starpu_profiling_worker_helper_display_summary(void)
int workerid
Definition: starpu_profiling.h:85
double starpu_timing_timespec_to_us(struct timespec *ts)
struct timespec push_start_time
Definition: starpu_profiling.h:54
double starpu_timing_timespec_delay_us(struct timespec *start, struct timespec *end)
Definition: starpu_profiling.h:100
uint64_t stall_cycles
Definition: starpu_profiling.h:90
int starpu_profiling_status_set(int status)
void starpu_profiling_set_id(int new_id)
struct timespec start_time
Definition: starpu_profiling.h:68
struct timespec release_data_end_time
Definition: starpu_profiling.h:75
double energy_consumed
Definition: starpu_profiling.h:118
uint64_t stall_cycles
Definition: starpu_profiling.h:116
int starpu_bus_get_count(void)
struct timespec callback_start_time
Definition: starpu_profiling.h:78
double energy_consumed
Definition: starpu_profiling.h:92
Definition: starpu_profiling.h:123
uint64_t used_cycles
Definition: starpu_profiling.h:88
int starpu_profiling_status_get(void)
struct timespec push_end_time
Definition: starpu_profiling.h:56
int starpu_bus_get_id(int src, int dst)
struct timespec end_time
Definition: starpu_profiling.h:70
int starpu_profiling_worker_get_info(int workerid, struct starpu_profiling_worker_info *worker_info)