StarPU Internal Handbook

fxt.h
Go to the documentation of this file.
1/* StarPU --- Runtime system for heterogeneous multicore architectures.
2 *
3 * Copyright (C) 2008-2021 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
4 * Copyright (C) 2013 Joris Pablo
5 * Copyright (C) 2018,2020 Federal University of Rio Grande do Sul (UFRGS)
6 *
7 * StarPU is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation; either version 2.1 of the License, or (at
10 * your option) any later version.
11 *
12 * StarPU is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 *
16 * See the GNU Lesser General Public License in COPYING.LGPL for more details.
17 */
18
19#ifndef __FXT_H__
20#define __FXT_H__
21
22
25#ifndef _GNU_SOURCE
26#define _GNU_SOURCE 1 /* ou _BSD_SOURCE ou _SVID_SOURCE */
27#endif
28
29#include <string.h>
30#include <sys/types.h>
31#include <stdlib.h>
32#include <common/config.h>
33#ifdef HAVE_UNISTD_H
34#include <unistd.h>
35#endif
36#include <common/utils.h>
37#include <starpu.h>
38
39/* some key to identify the worker kind */
40#define _STARPU_FUT_APPS_KEY 0x100
41#define _STARPU_FUT_CPU_KEY 0x101
42#define _STARPU_FUT_CUDA_KEY 0x102
43#define _STARPU_FUT_OPENCL_KEY 0x103
44#define _STARPU_FUT_MIC_KEY 0x104
45#define _STARPU_FUT_MPI_KEY 0x106
46
47#define _STARPU_FUT_WORKER_INIT_START 0x5100
48#define _STARPU_FUT_WORKER_INIT_END 0x5101
49
50#define _STARPU_FUT_START_CODELET_BODY 0x5102
51#define _STARPU_FUT_END_CODELET_BODY 0x5103
52
53#define _STARPU_FUT_JOB_PUSH 0x5104
54#define _STARPU_FUT_JOB_POP 0x5105
55
56#define _STARPU_FUT_UPDATE_TASK_CNT 0x5106
57
58#define _STARPU_FUT_START_FETCH_INPUT_ON_TID 0x5107
59#define _STARPU_FUT_END_FETCH_INPUT_ON_TID 0x5108
60#define _STARPU_FUT_START_PUSH_OUTPUT_ON_TID 0x5109
61#define _STARPU_FUT_END_PUSH_OUTPUT_ON_TID 0x5110
62
63#define _STARPU_FUT_TAG 0x5111
64#define _STARPU_FUT_TAG_DEPS 0x5112
65
66#define _STARPU_FUT_TASK_DEPS 0x5113
67
68#define _STARPU_FUT_DATA_COPY 0x5114
69#define _STARPU_FUT_WORK_STEALING 0x5115
70
71#define _STARPU_FUT_WORKER_DEINIT_START 0x5116
72#define _STARPU_FUT_WORKER_DEINIT_END 0x5117
73
74#define _STARPU_FUT_WORKER_SLEEP_START 0x5118
75#define _STARPU_FUT_WORKER_SLEEP_END 0x5119
76
77#define _STARPU_FUT_TASK_SUBMIT 0x511a
78#define _STARPU_FUT_CODELET_DATA_HANDLE 0x511b
79
80#define _STARPU_FUT_MODEL_NAME 0x511c
81
82#define _STARPU_FUT_DATA_NAME 0x511d
83#define _STARPU_FUT_DATA_COORDINATES 0x511e
84#define _STARPU_FUT_HANDLE_DATA_UNREGISTER 0x511f
85
86#define _STARPU_FUT_USER_DEFINED_START 0x5120
87#define _STARPU_FUT_USER_DEFINED_END 0x5121
88
89#define _STARPU_FUT_NEW_MEM_NODE 0x5122
90
91#define _STARPU_FUT_START_CALLBACK 0x5123
92#define _STARPU_FUT_END_CALLBACK 0x5124
93
94#define _STARPU_FUT_TASK_DONE 0x5125
95#define _STARPU_FUT_TAG_DONE 0x5126
96
97#define _STARPU_FUT_START_ALLOC 0x5127
98#define _STARPU_FUT_END_ALLOC 0x5128
99
100#define _STARPU_FUT_START_ALLOC_REUSE 0x5129
101#define _STARPU_FUT_END_ALLOC_REUSE 0x5130
102
103#define _STARPU_FUT_USED_MEM 0x512a
104
105#define _STARPU_FUT_TASK_NAME 0x512b
106
107#define _STARPU_FUT_DATA_WONT_USE 0x512c
108
109#define _STARPU_FUT_TASK_COLOR 0x512d
110
111#define _STARPU_FUT_DATA_DOING_WONT_USE 0x512e
112
113#define _STARPU_FUT_START_MEMRECLAIM 0x5131
114#define _STARPU_FUT_END_MEMRECLAIM 0x5132
115
116#define _STARPU_FUT_START_DRIVER_COPY 0x5133
117#define _STARPU_FUT_END_DRIVER_COPY 0x5134
118
119#define _STARPU_FUT_START_DRIVER_COPY_ASYNC 0x5135
120#define _STARPU_FUT_END_DRIVER_COPY_ASYNC 0x5136
121
122#define _STARPU_FUT_START_PROGRESS_ON_TID 0x5137
123#define _STARPU_FUT_END_PROGRESS_ON_TID 0x5138
124
125#define _STARPU_FUT_USER_EVENT 0x5139
126
127#define _STARPU_FUT_SET_PROFILING 0x513a
128
129#define _STARPU_FUT_TASK_WAIT_FOR_ALL 0x513b
130
131#define _STARPU_FUT_EVENT 0x513c
132#define _STARPU_FUT_THREAD_EVENT 0x513d
133
134#define _STARPU_FUT_CODELET_DETAILS 0x513e
135#define _STARPU_FUT_CODELET_DATA 0x513f
136
137#define _STARPU_FUT_LOCKING_MUTEX 0x5140
138#define _STARPU_FUT_MUTEX_LOCKED 0x5141
139
140#define _STARPU_FUT_UNLOCKING_MUTEX 0x5142
141#define _STARPU_FUT_MUTEX_UNLOCKED 0x5143
142
143#define _STARPU_FUT_TRYLOCK_MUTEX 0x5144
144
145#define _STARPU_FUT_RDLOCKING_RWLOCK 0x5145
146#define _STARPU_FUT_RWLOCK_RDLOCKED 0x5146
147
148#define _STARPU_FUT_WRLOCKING_RWLOCK 0x5147
149#define _STARPU_FUT_RWLOCK_WRLOCKED 0x5148
150
151#define _STARPU_FUT_UNLOCKING_RWLOCK 0x5149
152#define _STARPU_FUT_RWLOCK_UNLOCKED 0x514a
153
154#define _STARPU_FUT_LOCKING_SPINLOCK 0x514b
155#define _STARPU_FUT_SPINLOCK_LOCKED 0x514c
156
157#define _STARPU_FUT_UNLOCKING_SPINLOCK 0x514d
158#define _STARPU_FUT_SPINLOCK_UNLOCKED 0x514e
159
160#define _STARPU_FUT_TRYLOCK_SPINLOCK 0x514f
161
162#define _STARPU_FUT_COND_WAIT_BEGIN 0x5150
163#define _STARPU_FUT_COND_WAIT_END 0x5151
164
165#define _STARPU_FUT_MEMORY_FULL 0x5152
166
167#define _STARPU_FUT_DATA_LOAD 0x5153
168
169#define _STARPU_FUT_START_UNPARTITION_ON_TID 0x5154
170#define _STARPU_FUT_END_UNPARTITION_ON_TID 0x5155
171
172#define _STARPU_FUT_START_FREE 0x5156
173#define _STARPU_FUT_END_FREE 0x5157
174
175#define _STARPU_FUT_START_WRITEBACK 0x5158
176#define _STARPU_FUT_END_WRITEBACK 0x5159
177
178#define _STARPU_FUT_SCHED_COMPONENT_PUSH_PRIO 0x515a
179#define _STARPU_FUT_SCHED_COMPONENT_POP_PRIO 0x515b
180
181#define _STARPU_FUT_START_WRITEBACK_ASYNC 0x515c
182#define _STARPU_FUT_END_WRITEBACK_ASYNC 0x515d
183
184#define _STARPU_FUT_HYPERVISOR_BEGIN 0x5160
185#define _STARPU_FUT_HYPERVISOR_END 0x5161
186
187#define _STARPU_FUT_BARRIER_WAIT_BEGIN 0x5162
188#define _STARPU_FUT_BARRIER_WAIT_END 0x5163
189
190#define _STARPU_FUT_WORKER_SCHEDULING_START 0x5164
191#define _STARPU_FUT_WORKER_SCHEDULING_END 0x5165
192#define _STARPU_FUT_WORKER_SCHEDULING_PUSH 0x5166
193#define _STARPU_FUT_WORKER_SCHEDULING_POP 0x5167
194
195#define _STARPU_FUT_START_EXECUTING 0x5168
196#define _STARPU_FUT_END_EXECUTING 0x5169
197
198#define _STARPU_FUT_SCHED_COMPONENT_NEW 0x516a
199#define _STARPU_FUT_SCHED_COMPONENT_CONNECT 0x516b
200#define _STARPU_FUT_SCHED_COMPONENT_PUSH 0x516c
201#define _STARPU_FUT_SCHED_COMPONENT_PULL 0x516d
202
203#define _STARPU_FUT_TASK_SUBMIT_START 0x516e
204#define _STARPU_FUT_TASK_SUBMIT_END 0x516f
205
206#define _STARPU_FUT_TASK_BUILD_START 0x5170
207#define _STARPU_FUT_TASK_BUILD_END 0x5171
208
209#define _STARPU_FUT_TASK_MPI_DECODE_START 0x5172
210#define _STARPU_FUT_TASK_MPI_DECODE_END 0x5173
211
212#define _STARPU_FUT_TASK_MPI_PRE_START 0x5174
213#define _STARPU_FUT_TASK_MPI_PRE_END 0x5175
214
215#define _STARPU_FUT_TASK_MPI_POST_START 0x5176
216#define _STARPU_FUT_TASK_MPI_POST_END 0x5177
217
218#define _STARPU_FUT_TASK_WAIT_START 0x5178
219#define _STARPU_FUT_TASK_WAIT_END 0x5179
220
221#define _STARPU_FUT_TASK_WAIT_FOR_ALL_START 0x517a
222#define _STARPU_FUT_TASK_WAIT_FOR_ALL_END 0x517b
223
224#define _STARPU_FUT_HANDLE_DATA_REGISTER 0x517c
225
226#define _STARPU_FUT_START_FETCH_INPUT 0x517e
227#define _STARPU_FUT_END_FETCH_INPUT 0x517f
228
229#define _STARPU_FUT_TASK_THROTTLE_START 0x5180
230#define _STARPU_FUT_TASK_THROTTLE_END 0x5181
231
232#define _STARPU_FUT_DATA_STATE_INVALID 0x5182
233#define _STARPU_FUT_DATA_STATE_OWNER 0x5183
234#define _STARPU_FUT_DATA_STATE_SHARED 0x5184
235
236#define _STARPU_FUT_DATA_REQUEST_CREATED 0x5185
237#define _STARPU_FUT_TASK_EXCLUDE_FROM_DAG 0x5187
238
239 extern unsigned long _starpu_job_cnt;
240
241 static inline unsigned long _starpu_fxt_get_job_id(void)
242{
243 unsigned long ret = STARPU_ATOMIC_ADDL(&_starpu_job_cnt, 1);
244 STARPU_ASSERT_MSG(ret != 0, "Oops, job_id wrapped! There are too many tasks for tracking them for profiling");
245 return ret;
246}
247
248#ifdef STARPU_USE_FXT
249#include <fxt/fxt.h>
250#include <fxt/fut.h>
251
252/* Some versions of FxT do not include the declaration of the function */
253#ifdef HAVE_ENABLE_FUT_FLUSH
254#if !HAVE_DECL_ENABLE_FUT_FLUSH
255 void enable_fut_flush();
256#endif
257#endif
258#ifdef HAVE_FUT_SET_FILENAME
259#if !HAVE_DECL_FUT_SET_FILENAME
260 void fut_set_filename(char *filename);
261#endif
262#endif
263
264 extern int _starpu_fxt_started;
265 extern int _starpu_fxt_willstart;
266 extern starpu_pthread_mutex_t _starpu_fxt_started_mutex;
267 extern starpu_pthread_cond_t _starpu_fxt_started_cond;
268
270 static inline int _starpu_fxt_wait_initialisation()
271{
272 STARPU_PTHREAD_MUTEX_LOCK(&_starpu_fxt_started_mutex);
273 while (_starpu_fxt_willstart && !_starpu_fxt_started)
274 STARPU_PTHREAD_COND_WAIT(&_starpu_fxt_started_cond, &_starpu_fxt_started_mutex);
275 STARPU_PTHREAD_MUTEX_UNLOCK(&_starpu_fxt_started_mutex);
276
277 return _starpu_fxt_started;
278}
279
280 extern unsigned long _starpu_submit_order;
281
282 static inline unsigned long _starpu_fxt_get_submit_order(void)
283{
284 unsigned long ret = STARPU_ATOMIC_ADDL(&_starpu_submit_order, 1);
285 STARPU_ASSERT_MSG(_starpu_submit_order != 0, "Oops, submit_order wrapped! There are too many tasks for tracking them for profiling");
286 return ret;
287}
288
289 long _starpu_gettid(void);
290
292 void _starpu_fxt_init_profiling(uint64_t trace_buffer_size);
293
295 void _starpu_stop_fxt_profiling(void);
296
298 void _starpu_fxt_dump_file(void);
299
300/* Associate the current processing unit to the identifier of the LWP that runs
301 * the worker. */
302 void _starpu_fxt_register_thread(unsigned);
303
304#ifdef FUT_NEEDS_COMMIT
305#define _STARPU_FUT_COMMIT(size) fut_commitstampedbuffer(size)
306#else
307#define _STARPU_FUT_COMMIT(size) do { } while (0)
308#endif
309
310#ifdef FUT_DO_PROBE1STR
311#define _STARPU_FUT_DO_PROBE1STR(CODE, P1, str) FUT_DO_PROBE1STR(CODE, P1, str)
312#else
316#define _STARPU_FUT_DO_PROBE1STR(CODE, P1, str) \
317 do { \
318 if(fut_active) { \
319 /* No more than FXT_MAX_PARAMS args are allowed */ \
320 /* we add a \0 just in case ... */ \
321 size_t len = STARPU_MIN(strlen(str)+1, (FXT_MAX_PARAMS - 1)*sizeof(unsigned long));\
322 unsigned nbargs_str = (len + sizeof(unsigned long) - 1)/(sizeof(unsigned long));\
323 unsigned nbargs = 1 + nbargs_str; \
324 size_t total_len = FUT_SIZE(nbargs); \
325 unsigned long *futargs = \
326 fut_getstampedbuffer(FUT_CODE(CODE, nbargs), total_len);\
327 *(futargs++) = (unsigned long)(P1); \
328 snprintf((char *)futargs, len, "%s", str); \
329 ((char *)futargs)[len - 1] = '\0'; \
330 _STARPU_FUT_COMMIT(total_len); \
331 } \
332} while (0);
333#endif
334
335#ifdef FUT_DO_PROBE2STR
336#define _STARPU_FUT_DO_PROBE2STR(CODE, P1, P2, str) FUT_DO_PROBE2STR(CODE, P1, P2, str)
337#else
341#define _STARPU_FUT_DO_PROBE2STR(CODE, P1, P2, str) \
342 do { \
343 if(fut_active) { \
344 /* No more than FXT_MAX_PARAMS args are allowed */ \
345 /* we add a \0 just in case ... */ \
346 size_t len = STARPU_MIN(strlen(str)+1, (FXT_MAX_PARAMS - 2)*sizeof(unsigned long));\
347 unsigned nbargs_str = (len + sizeof(unsigned long) - 1)/(sizeof(unsigned long));\
348 unsigned nbargs = 2 + nbargs_str; \
349 size_t total_len = FUT_SIZE(nbargs); \
350 unsigned long *futargs = \
351 fut_getstampedbuffer(FUT_CODE(CODE, nbargs), total_len);\
352 *(futargs++) = (unsigned long)(P1); \
353 *(futargs++) = (unsigned long)(P2); \
354 snprintf((char *)futargs, len, "%s", str); \
355 ((char *)futargs)[len - 1] = '\0'; \
356 _STARPU_FUT_COMMIT(total_len); \
357 } \
358} while (0);
359#endif
360
361#ifdef FUT_DO_PROBE3STR
362#define _STARPU_FUT_DO_PROBE3STR(CODE, P1, P2, P3, str) FUT_DO_PROBE3STR(CODE, P1, P2, P3, str)
363#else
364#define _STARPU_FUT_DO_PROBE3STR(CODE, P1, P2, P3, str) \
365 do { \
366 if(fut_active) { \
367 /* No more than FXT_MAX_PARAMS args are allowed */ \
368 /* we add a \0 just in case ... */ \
369 size_t len = STARPU_MIN(strlen(str)+1, (FXT_MAX_PARAMS - 3)*sizeof(unsigned long));\
370 unsigned nbargs_str = (len + sizeof(unsigned long) - 1)/(sizeof(unsigned long));\
371 unsigned nbargs = 3 + nbargs_str; \
372 size_t total_len = FUT_SIZE(nbargs); \
373 unsigned long *futargs = \
374 fut_getstampedbuffer(FUT_CODE(CODE, nbargs), total_len);\
375 *(futargs++) = (unsigned long)(P1); \
376 *(futargs++) = (unsigned long)(P2); \
377 *(futargs++) = (unsigned long)(P3); \
378 snprintf((char *)futargs, len, "%s", str); \
379 ((char *)futargs)[len - 1] = '\0'; \
380 _STARPU_FUT_COMMIT(total_len); \
381 } \
382} while (0);
383#endif
384
385#ifdef FUT_DO_PROBE4STR
386#define _STARPU_FUT_DO_PROBE4STR(CODE, P1, P2, P3, P4, str) FUT_DO_PROBE4STR(CODE, P1, P2, P3, P4, str)
387#else
388#define _STARPU_FUT_DO_PROBE4STR(CODE, P1, P2, P3, P4, str) \
389 do { \
390 if(fut_active) { \
391 /* No more than FXT_MAX_PARAMS args are allowed */ \
392 /* we add a \0 just in case ... */ \
393 size_t len = STARPU_MIN(strlen(str)+1, (FXT_MAX_PARAMS - 4)*sizeof(unsigned long));\
394 unsigned nbargs_str = (len + sizeof(unsigned long) - 1)/(sizeof(unsigned long));\
395 unsigned nbargs = 4 + nbargs_str; \
396 size_t total_len = FUT_SIZE(nbargs); \
397 unsigned long *futargs = \
398 fut_getstampedbuffer(FUT_CODE(CODE, nbargs), total_len);\
399 *(futargs++) = (unsigned long)(P1); \
400 *(futargs++) = (unsigned long)(P2); \
401 *(futargs++) = (unsigned long)(P3); \
402 *(futargs++) = (unsigned long)(P4); \
403 snprintf((char *)futargs, len, "%s", str); \
404 ((char *)futargs)[len - 1] = '\0'; \
405 _STARPU_FUT_COMMIT(total_len); \
406 } \
407} while (0);
408#endif
409
410#ifdef FUT_DO_PROBE5STR
411#define _STARPU_FUT_DO_PROBE5STR(CODE, P1, P2, P3, P4, P5, str) FUT_DO_PROBE5STR(CODE, P1, P2, P3, P4, P5, str)
412#else
413#define _STARPU_FUT_DO_PROBE5STR(CODE, P1, P2, P3, P4, P5, str) \
414 do { \
415 if(fut_active) { \
416 /* No more than FXT_MAX_PARAMS args are allowed */ \
417 /* we add a \0 just in case ... */ \
418 size_t len = STARPU_MIN(strlen(str)+1, (FXT_MAX_PARAMS - 5)*sizeof(unsigned long));\
419 unsigned nbargs_str = (len + sizeof(unsigned long) - 1)/(sizeof(unsigned long));\
420 unsigned nbargs = 5 + nbargs_str; \
421 size_t total_len = FUT_SIZE(nbargs); \
422 unsigned long *futargs = \
423 fut_getstampedbuffer(FUT_CODE(CODE, nbargs), total_len);\
424 *(futargs++) = (unsigned long)(P1); \
425 *(futargs++) = (unsigned long)(P2); \
426 *(futargs++) = (unsigned long)(P3); \
427 *(futargs++) = (unsigned long)(P4); \
428 *(futargs++) = (unsigned long)(P5); \
429 snprintf((char *)futargs, len, "%s", str); \
430 ((char *)futargs)[len - 1] = '\0'; \
431 _STARPU_FUT_COMMIT(total_len); \
432 } \
433} while (0);
434#endif
435
436#ifdef FUT_DO_PROBE6STR
437#define _STARPU_FUT_DO_PROBE6STR(CODE, P1, P2, P3, P4, P5, P6, str) FUT_DO_PROBE6STR(CODE, P1, P2, P3, P4, P5, P6, str)
438#else
439#define _STARPU_FUT_DO_PROBE6STR(CODE, P1, P2, P3, P4, P5, P6, str) \
440 do { \
441 if(fut_active) { \
442 /* No more than FXT_MAX_PARAMS args are allowed */ \
443 /* we add a \0 just in case ... */ \
444 size_t len = STARPU_MIN(strlen(str)+1, (FXT_MAX_PARAMS - 6)*sizeof(unsigned long));\
445 unsigned nbargs_str = (len + sizeof(unsigned long) - 1)/(sizeof(unsigned long));\
446 unsigned nbargs = 6 + nbargs_str; \
447 size_t total_len = FUT_SIZE(nbargs); \
448 unsigned long *futargs = \
449 fut_getstampedbuffer(FUT_CODE(CODE, nbargs), total_len);\
450 *(futargs++) = (unsigned long)(P1); \
451 *(futargs++) = (unsigned long)(P2); \
452 *(futargs++) = (unsigned long)(P3); \
453 *(futargs++) = (unsigned long)(P4); \
454 *(futargs++) = (unsigned long)(P5); \
455 *(futargs++) = (unsigned long)(P6); \
456 snprintf((char *)futargs, len, "%s", str); \
457 ((char *)futargs)[len - 1] = '\0'; \
458 _STARPU_FUT_COMMIT(total_len); \
459 } \
460} while (0);
461#endif
462
463#ifdef FUT_DO_PROBE7STR
464#define _STARPU_FUT_DO_PROBE7STR(CODE, P1, P2, P3, P4, P5, P6, P7, str) FUT_DO_PROBE7STR(CODE, P1, P2, P3, P4, P5, P6, P7, str)
465#else
466#define _STARPU_FUT_DO_PROBE7STR(CODE, P1, P2, P3, P4, P5, P6, P7, str) \
467 do { \
468 if(fut_active) { \
469 /* No more than FXT_MAX_PARAMS args are allowed */ \
470 /* we add a \0 just in case ... */ \
471 size_t len = STARPU_MIN(strlen(str)+1, (FXT_MAX_PARAMS - 7)*sizeof(unsigned long));\
472 unsigned nbargs_str = (len + sizeof(unsigned long) - 1)/(sizeof(unsigned long));\
473 unsigned nbargs = 7 + nbargs_str; \
474 size_t total_len = FUT_SIZE(nbargs); \
475 unsigned long *futargs = \
476 fut_getstampedbuffer(FUT_CODE(CODE, nbargs), total_len);\
477 *(futargs++) = (unsigned long)(P1); \
478 *(futargs++) = (unsigned long)(P2); \
479 *(futargs++) = (unsigned long)(P3); \
480 *(futargs++) = (unsigned long)(P4); \
481 *(futargs++) = (unsigned long)(P5); \
482 *(futargs++) = (unsigned long)(P6); \
483 *(futargs++) = (unsigned long)(P7); \
484 snprintf((char *)futargs, len, "%s", str); \
485 ((char *)futargs)[len - 1] = '\0'; \
486 _STARPU_FUT_COMMIT(total_len); \
487 } \
488} while (0);
489#endif
490
491#ifndef FUT_RAW_PROBE7
492#define FUT_RAW_PROBE7(CODE,P1,P2,P3,P4,P5,P6,P7) do { \
493 if(fut_active) { \
494 unsigned long *__args __attribute__((unused))= \
495 fut_getstampedbuffer(CODE, \
496 FUT_SIZE(7)); \
497 *(__args++)=(unsigned long)(P1);*(__args++)=(unsigned long)(P2);*(__args++)=(unsigned long)(P3);*(__args++)=(unsigned long)(P4);*(__args++)=(unsigned long)(P5);*(__args++)=(unsigned long)(P6);*(__args++)=(unsigned long)(P7); \
498 _STARPU_FUT_COMMIT(FUT_SIZE(7)); \
499 } \
500 } while (0)
501#endif
502
503#ifndef FUT_DO_PROBE7
504#define FUT_DO_PROBE7(CODE,P1,P2,P3,P4,P5,P6,P7) do { \
505 FUT_RAW_PROBE7(FUT_CODE(CODE, 7),P1,P2,P3,P4,P5,P6,P7); \
506} while (0)
507#endif
508
509#ifndef FUT_RAW_ALWAYS_PROBE2
510#define FUT_RAW_ALWAYS_PROBE2(CODE,P1,P2) do { \
511 unsigned long *__args __attribute__((unused))= \
512 fut_getstampedbuffer(CODE, \
513 FUT_SIZE(2)); \
514 *(__args++)=(unsigned long)(P1);*(__args++)=(unsigned long)(P2); \
515 fut_commitstampedbuffer(FUT_SIZE(2)); \
516 } while (0)
517#endif
518#define FUT_DO_ALWAYS_PROBE2(CODE,P1,P2) do { \
519 FUT_RAW_ALWAYS_PROBE2(FUT_CODE(CODE, 2),P1,P2); \
520} while (0)
521
522#ifndef FUT_RAW_ALWAYS_PROBE3
523#define FUT_RAW_ALWAYS_PROBE3(CODE,P1,P2,P3) do { \
524 unsigned long *__args __attribute__((unused))= \
525 fut_getstampedbuffer(CODE, \
526 FUT_SIZE(3)); \
527 *(__args++)=(unsigned long)(P1);*(__args++)=(unsigned long)(P2);*(__args++)=(unsigned long)(P3); \
528 fut_commitstampedbuffer(FUT_SIZE(3)); \
529 } while (0)
530#endif
531#define FUT_DO_ALWAYS_PROBE3(CODE,P1,P2,P3) do { \
532 FUT_RAW_ALWAYS_PROBE3(FUT_CODE(CODE, 3),P1,P2,P3); \
533} while (0)
534
535#ifndef FUT_RAW_ALWAYS_PROBE4
536#define FUT_RAW_ALWAYS_PROBE4(CODE,P1,P2,P3,P4) do { \
537 unsigned long *__args __attribute__((unused))= \
538 fut_getstampedbuffer(CODE, \
539 FUT_SIZE(4)); \
540 *(__args++)=(unsigned long)(P1);*(__args++)=(unsigned long)(P2);*(__args++)=(unsigned long)(P3);*(__args++)=(unsigned long)(P4); \
541 fut_commitstampedbuffer(FUT_SIZE(4)); \
542 } while (0)
543#endif
544#define FUT_DO_ALWAYS_PROBE4(CODE,P1,P2,P3,P4) do { \
545 FUT_RAW_ALWAYS_PROBE4(FUT_CODE(CODE, 4),P1,P2,P3,P4); \
546} while (0)
547
548#ifndef FUT_RAW_ALWAYS_PROBE5
549#define FUT_RAW_ALWAYS_PROBE5(CODE,P1,P2,P3,P4,P5) do { \
550 unsigned long *__args __attribute__((unused))= \
551 fut_getstampedbuffer(CODE, \
552 FUT_SIZE(5)); \
553 *(__args++)=(unsigned long)(P1);*(__args++)=(unsigned long)(P2);*(__args++)=(unsigned long)(P3);*(__args++)=(unsigned long)(P4);*(__args++)=(unsigned long)(P5); \
554 fut_commitstampedbuffer(FUT_SIZE(5)); \
555 } while (0)
556#endif
557#define FUT_DO_ALWAYS_PROBE5(CODE,P1,P2,P3,P4,P5) do { \
558 FUT_RAW_ALWAYS_PROBE5(FUT_CODE(CODE, 5),P1,P2,P3,P4,P5); \
559} while (0)
560
561#ifndef FUT_RAW_ALWAYS_PROBE6
562#define FUT_RAW_ALWAYS_PROBE6(CODE,P1,P2,P3,P4,P5,P6) do { \
563 unsigned long *__args __attribute__((unused))= \
564 fut_getstampedbuffer(CODE, \
565 FUT_SIZE(6)); \
566 *(__args++)=(unsigned long)(P1);*(__args++)=(unsigned long)(P2);*(__args++)=(unsigned long)(P3);*(__args++)=(unsigned long)(P4);*(__args++)=(unsigned long)(P5);*(__args++)=(unsigned long)(P6); \
567 fut_commitstampedbuffer(FUT_SIZE(6)); \
568 } while (0)
569#endif
570#define FUT_DO_ALWAYS_PROBE6(CODE,P1,P2,P3,P4,P5,P6) do { \
571 FUT_RAW_ALWAYS_PROBE6(FUT_CODE(CODE, 6),P1,P2,P3,P4,P5,P6); \
572} while (0)
573
574#ifndef FUT_RAW_ALWAYS_PROBE7
575#define FUT_RAW_ALWAYS_PROBE7(CODE,P1,P2,P3,P4,P5,P6,P7) do { \
576 unsigned long *__args __attribute__((unused))= \
577 fut_getstampedbuffer(CODE, \
578 FUT_SIZE(7)); \
579 *(__args++)=(unsigned long)(P1);*(__args++)=(unsigned long)(P2);*(__args++)=(unsigned long)(P3);*(__args++)=(unsigned long)(P4);*(__args++)=(unsigned long)(P5);*(__args++)=(unsigned long)(P6);*(__args++)=(unsigned long)(P7); \
580 fut_commitstampedbuffer(FUT_SIZE(7)); \
581 } while (0)
582#endif
583#define FUT_DO_ALWAYS_PROBE7(CODE,P1,P2,P3,P4,P5,P6,P7) do { \
584 FUT_RAW_ALWAYS_PROBE7(FUT_CODE(CODE, 7),P1,P2,P3,P4,P5,P6,P7); \
585} while (0)
586
587
588
589/* workerkind = _STARPU_FUT_CPU_KEY for instance */
590#define _STARPU_TRACE_NEW_MEM_NODE(nodeid) do {\
591 if (_starpu_fxt_started) \
592 FUT_DO_ALWAYS_PROBE2(_STARPU_FUT_NEW_MEM_NODE, nodeid, _starpu_gettid()); \
593} while (0)
594
595#define _STARPU_TRACE_WORKER_INIT_START(workerkind, workerid, devid, memnode, bindid, sync) \
596 FUT_DO_PROBE7(_STARPU_FUT_WORKER_INIT_START, workerkind, workerid, devid, memnode, bindid, sync, _starpu_gettid());
597
598#define _STARPU_TRACE_WORKER_INIT_END(__workerid) \
599 FUT_DO_PROBE2(_STARPU_FUT_WORKER_INIT_END, _starpu_gettid(), (__workerid));
600
601#define _STARPU_TRACE_START_CODELET_BODY(job, nimpl, perf_arch, workerid) \
602 do { \
603 const char *model_name = _starpu_job_get_model_name((job)), *name = _starpu_job_get_task_name((job)); \
604 if (name) \
605 { \
606 /* we include the task name */ \
607 _STARPU_FUT_DO_PROBE5STR(_STARPU_FUT_START_CODELET_BODY, (job)->job_id, ((job)->task)->sched_ctx, workerid, starpu_worker_get_memory_node(workerid), 1, name); \
608 if (model_name) \
609 _STARPU_FUT_DO_PROBE1STR(_STARPU_FUT_MODEL_NAME, (job)->job_id, model_name); \
610 } \
611 else { \
612 FUT_DO_PROBE5(_STARPU_FUT_START_CODELET_BODY, (job)->job_id, ((job)->task)->sched_ctx, workerid, starpu_worker_get_memory_node(workerid), 0); \
613 } \
614 { \
615 if ((job)->task->cl) \
616 { \
617 const int __nbuffers = STARPU_TASK_GET_NBUFFERS((job)->task); \
618 char __buf[FXT_MAX_PARAMS*sizeof(long)]; \
619 int __i; \
620 for (__i = 0; __i < __nbuffers; __i++) \
621 { \
622 starpu_data_handle_t __handle = STARPU_TASK_GET_HANDLE((job)->task, __i); \
623 void *__interface = _STARPU_TASK_GET_INTERFACES((job)->task)[__i]; \
624 if (__handle->ops->describe) \
625 { \
626 __handle->ops->describe(__interface, __buf, sizeof(__buf)); \
627 _STARPU_FUT_DO_PROBE1STR(_STARPU_FUT_CODELET_DATA, workerid, __buf); \
628 } \
629 FUT_DO_PROBE4(_STARPU_FUT_CODELET_DATA_HANDLE, (job)->job_id, (__handle), _starpu_data_get_size(__handle), STARPU_TASK_GET_MODE((job)->task, __i)); \
630 } \
631 } \
632 const size_t __job_size = _starpu_job_get_data_size((job)->task->cl?(job)->task->cl->model:NULL, perf_arch, nimpl, (job)); \
633 const uint32_t __job_hash = _starpu_compute_buffers_footprint((job)->task->cl?(job)->task->cl->model:NULL, perf_arch, nimpl, (job));\
634 FUT_DO_PROBE7(_STARPU_FUT_CODELET_DETAILS, ((job)->task)->sched_ctx, __job_size, __job_hash, (job)->task->flops / 1000 / ((job)->task->cl && job->task->cl->type != STARPU_SEQ ? j->task_size : 1), (job)->task->tag_id, workerid, ((job)->job_id)); \
635 } \
636} while(0);
637
638#define _STARPU_TRACE_END_CODELET_BODY(job, nimpl, perf_arch, workerid) \
639 do { \
640 const size_t job_size = _starpu_job_get_data_size((job)->task->cl?(job)->task->cl->model:NULL, perf_arch, nimpl, (job)); \
641 const uint32_t job_hash = _starpu_compute_buffers_footprint((job)->task->cl?(job)->task->cl->model:NULL, perf_arch, nimpl, (job));\
642 char _archname[32]=""; \
643 starpu_perfmodel_get_arch_name(perf_arch, _archname, 32, 0); \
644 _STARPU_FUT_DO_PROBE5STR(_STARPU_FUT_END_CODELET_BODY, (job)->job_id, (job_size), (job_hash), workerid, _starpu_gettid(), _archname); \
645} while(0);
646
647#define _STARPU_TRACE_START_EXECUTING() \
648 FUT_DO_PROBE1(_STARPU_FUT_START_EXECUTING, _starpu_gettid());
649
650#define _STARPU_TRACE_END_EXECUTING() \
651 FUT_DO_PROBE1(_STARPU_FUT_END_EXECUTING, _starpu_gettid());
652
653#define _STARPU_TRACE_START_CALLBACK(job) \
654 FUT_DO_PROBE2(_STARPU_FUT_START_CALLBACK, job, _starpu_gettid());
655
656#define _STARPU_TRACE_END_CALLBACK(job) \
657 FUT_DO_PROBE2(_STARPU_FUT_END_CALLBACK, job, _starpu_gettid());
658
659#define _STARPU_TRACE_JOB_PUSH(task, prio) \
660 FUT_DO_PROBE3(_STARPU_FUT_JOB_PUSH, _starpu_get_job_associated_to_task(task)->job_id, prio, _starpu_gettid());
661
662#define _STARPU_TRACE_JOB_POP(task, prio) \
663 FUT_DO_PROBE3(_STARPU_FUT_JOB_POP, _starpu_get_job_associated_to_task(task)->job_id, prio, _starpu_gettid());
664
665#define _STARPU_TRACE_UPDATE_TASK_CNT(counter) \
666 FUT_DO_PROBE2(_STARPU_FUT_UPDATE_TASK_CNT, counter, _starpu_gettid())
667
668#define _STARPU_TRACE_START_FETCH_INPUT(job) \
669 FUT_DO_PROBE2(_STARPU_FUT_START_FETCH_INPUT_ON_TID, job, _starpu_gettid());
670
671#define _STARPU_TRACE_END_FETCH_INPUT(job) \
672 FUT_DO_PROBE2(_STARPU_FUT_END_FETCH_INPUT_ON_TID, job, _starpu_gettid());
673
674#define _STARPU_TRACE_START_PUSH_OUTPUT(job) \
675 FUT_DO_PROBE2(_STARPU_FUT_START_PUSH_OUTPUT_ON_TID, job, _starpu_gettid());
676
677#define _STARPU_TRACE_END_PUSH_OUTPUT(job) \
678 FUT_DO_PROBE2(_STARPU_FUT_END_PUSH_OUTPUT_ON_TID, job, _starpu_gettid());
679
680#define _STARPU_TRACE_WORKER_END_FETCH_INPUT(job, id) \
681 FUT_DO_PROBE2(_STARPU_FUT_END_FETCH_INPUT, job, id);
682
683#define _STARPU_TRACE_WORKER_START_FETCH_INPUT(job, id) \
684 FUT_DO_PROBE2(_STARPU_FUT_START_FETCH_INPUT, job, id);
685
686#define _STARPU_TRACE_TAG(tag, job) \
687 FUT_DO_PROBE2(_STARPU_FUT_TAG, tag, (job)->job_id)
688
689#define _STARPU_TRACE_TAG_DEPS(tag_child, tag_father) \
690 FUT_DO_PROBE2(_STARPU_FUT_TAG_DEPS, tag_child, tag_father)
691
692#define _STARPU_TRACE_TASK_DEPS(job_prev, job_succ) \
693 _STARPU_FUT_DO_PROBE4STR(_STARPU_FUT_TASK_DEPS, (job_prev)->job_id, (job_succ)->job_id, (job_succ)->task->type, 1, "task")
694
695#define _STARPU_TRACE_GHOST_TASK_DEPS(ghost_prev_id, job_succ) \
696 _STARPU_FUT_DO_PROBE4STR(_STARPU_FUT_TASK_DEPS, (ghost_prev_id), (job_succ)->job_id, (job_succ)->task->type, 1, "ghost")
697
698#define _STARPU_TRACE_TASK_EXCLUDE_FROM_DAG(job) \
699 do { \
700 unsigned exclude_from_dag = (job)->exclude_from_dag; \
701 FUT_DO_PROBE2(_STARPU_FUT_TASK_EXCLUDE_FROM_DAG, (job)->job_id, (long unsigned)exclude_from_dag); \
702} while(0)
703
704#define _STARPU_TRACE_TASK_NAME(job) \
705 do { \
706 const char *model_name = _starpu_job_get_task_name((job)); \
707 if (model_name) \
708 { \
709 _STARPU_FUT_DO_PROBE1STR(_STARPU_FUT_TASK_NAME, (job)->job_id, model_name);\
710 } \
711 else { \
712 FUT_DO_PROBE2(_STARPU_FUT_TASK_NAME, (job)->job_id, "unknown");\
713 } \
714} while(0)
715
716#define _STARPU_TRACE_TASK_COLOR(job) \
717 do { \
718 if ((job)->task->color != 0) \
719 FUT_DO_PROBE3(_STARPU_FUT_TASK_COLOR, (job)->job_id, (job)->task->color, _starpu_gettid()); \
720 else if ((job)->task->cl && (job)->task->cl->color != 0) \
721 FUT_DO_PROBE3(_STARPU_FUT_TASK_COLOR, (job)->job_id, (job)->task->cl->color, _starpu_gettid()); \
722} while(0)
723
724#define _STARPU_TRACE_TASK_DONE(job) \
725 FUT_DO_PROBE2(_STARPU_FUT_TASK_DONE, (job)->job_id, _starpu_gettid())
726
727#define _STARPU_TRACE_TAG_DONE(tag) \
728 do { \
729 struct _starpu_job *job = (tag)->job; \
730 const char *model_name = _starpu_job_get_task_name((job)); \
731 if (model_name) \
732 { \
733 _STARPU_FUT_DO_PROBE3STR(_STARPU_FUT_TAG_DONE, (tag)->id, _starpu_gettid(), 1, model_name); \
734 } \
735 else { \
736 FUT_DO_PROBE3(_STARPU_FUT_TAG_DONE, (tag)->id, _starpu_gettid(), 0);\
737 } \
738} while(0);
739
740#define _STARPU_TRACE_DATA_NAME(handle, name) \
741 _STARPU_FUT_DO_PROBE1STR(_STARPU_FUT_DATA_NAME, handle, name)
742
743#define _STARPU_TRACE_DATA_COORDINATES(handle, dim, v) do {\
744 if (_starpu_fxt_started) \
745 switch (dim) { \
746 case 1: FUT_DO_ALWAYS_PROBE3(_STARPU_FUT_DATA_COORDINATES, handle, dim, v[0]); break; \
747 case 2: FUT_DO_ALWAYS_PROBE4(_STARPU_FUT_DATA_COORDINATES, handle, dim, v[0], v[1]); break; \
748 case 3: FUT_DO_ALWAYS_PROBE5(_STARPU_FUT_DATA_COORDINATES, handle, dim, v[0], v[1], v[2]); break; \
749 case 4: FUT_DO_ALWAYS_PROBE6(_STARPU_FUT_DATA_COORDINATES, handle, dim, v[0], v[1], v[2], v[3]); break; \
750 default: FUT_DO_ALWAYS_PROBE7(_STARPU_FUT_DATA_COORDINATES, handle, dim, v[0], v[1], v[2], v[3], v[4]); break; \
751 } \
752} while (0)
753
754#define _STARPU_TRACE_DATA_COPY(src_node, dst_node, size) \
755 FUT_DO_PROBE3(_STARPU_FUT_DATA_COPY, src_node, dst_node, size)
756
757#define _STARPU_TRACE_DATA_WONT_USE(handle) \
758 FUT_DO_PROBE4(_STARPU_FUT_DATA_WONT_USE, handle, _starpu_fxt_get_submit_order(), _starpu_fxt_get_job_id(), _starpu_gettid())
759
760#define _STARPU_TRACE_DATA_DOING_WONT_USE(handle) \
761 FUT_DO_PROBE1(_STARPU_FUT_DATA_DOING_WONT_USE, handle)
762
763#define _STARPU_TRACE_START_DRIVER_COPY(src_node, dst_node, size, com_id, prefetch, handle) \
764 FUT_DO_PROBE6(_STARPU_FUT_START_DRIVER_COPY, src_node, dst_node, size, com_id, prefetch, handle)
765
766#define _STARPU_TRACE_END_DRIVER_COPY(src_node, dst_node, size, com_id, prefetch) \
767 FUT_DO_PROBE5(_STARPU_FUT_END_DRIVER_COPY, src_node, dst_node, size, com_id, prefetch)
768
769#define _STARPU_TRACE_START_DRIVER_COPY_ASYNC(src_node, dst_node) \
770 FUT_DO_PROBE2(_STARPU_FUT_START_DRIVER_COPY_ASYNC, src_node, dst_node)
771
772#define _STARPU_TRACE_END_DRIVER_COPY_ASYNC(src_node, dst_node) \
773 FUT_DO_PROBE2(_STARPU_FUT_END_DRIVER_COPY_ASYNC, src_node, dst_node)
774
775#define _STARPU_TRACE_WORK_STEALING(empty_q, victim_q) \
776 FUT_DO_PROBE2(_STARPU_FUT_WORK_STEALING, empty_q, victim_q)
777
778#define _STARPU_TRACE_WORKER_DEINIT_START \
779 FUT_DO_PROBE1(_STARPU_FUT_WORKER_DEINIT_START, _starpu_gettid());
780
781#define _STARPU_TRACE_WORKER_DEINIT_END(workerkind) \
782 FUT_DO_PROBE2(_STARPU_FUT_WORKER_DEINIT_END, workerkind, _starpu_gettid());
783
784#define _STARPU_TRACE_WORKER_SCHEDULING_START \
785 FUT_DO_PROBE1(_STARPU_FUT_WORKER_SCHEDULING_START, _starpu_gettid());
786
787#define _STARPU_TRACE_WORKER_SCHEDULING_END \
788 FUT_DO_PROBE1(_STARPU_FUT_WORKER_SCHEDULING_END, _starpu_gettid());
789
790#define _STARPU_TRACE_WORKER_SCHEDULING_PUSH \
791 FUT_DO_PROBE1(_STARPU_FUT_WORKER_SCHEDULING_PUSH, _starpu_gettid());
792
793#define _STARPU_TRACE_WORKER_SCHEDULING_POP \
794 FUT_DO_PROBE1(_STARPU_FUT_WORKER_SCHEDULING_POP, _starpu_gettid());
795
796#define _STARPU_TRACE_WORKER_SLEEP_START \
797 FUT_DO_PROBE1(_STARPU_FUT_WORKER_SLEEP_START, _starpu_gettid());
798
799#define _STARPU_TRACE_WORKER_SLEEP_END \
800 FUT_DO_PROBE1(_STARPU_FUT_WORKER_SLEEP_END, _starpu_gettid());
801
802#define _STARPU_TRACE_TASK_SUBMIT(job, iter, subiter) \
803 FUT_DO_PROBE7(_STARPU_FUT_TASK_SUBMIT, (job)->job_id, iter, subiter, (job)->task->no_submitorder?0:_starpu_fxt_get_submit_order(), (job)->task->priority, (job)->task->type, _starpu_gettid());
804
805#define _STARPU_TRACE_TASK_SUBMIT_START() \
806 FUT_DO_PROBE1(_STARPU_FUT_TASK_SUBMIT_START, _starpu_gettid());
807
808#define _STARPU_TRACE_TASK_SUBMIT_END() \
809 FUT_DO_PROBE1(_STARPU_FUT_TASK_SUBMIT_END, _starpu_gettid());
810
811#define _STARPU_TRACE_TASK_THROTTLE_START() \
812 FUT_DO_PROBE1(_STARPU_FUT_TASK_THROTTLE_START, _starpu_gettid());
813
814#define _STARPU_TRACE_TASK_THROTTLE_END() \
815 FUT_DO_PROBE1(_STARPU_FUT_TASK_THROTTLE_END, _starpu_gettid());
816
817#define _STARPU_TRACE_TASK_BUILD_START() \
818 FUT_DO_PROBE1(_STARPU_FUT_TASK_BUILD_START, _starpu_gettid());
819
820#define _STARPU_TRACE_TASK_BUILD_END() \
821 FUT_DO_PROBE1(_STARPU_FUT_TASK_BUILD_END, _starpu_gettid());
822
823#define _STARPU_TRACE_TASK_MPI_DECODE_START() \
824 FUT_DO_PROBE1(_STARPU_FUT_TASK_MPI_DECODE_START, _starpu_gettid());
825
826#define _STARPU_TRACE_TASK_MPI_DECODE_END() \
827 FUT_DO_PROBE1(_STARPU_FUT_TASK_MPI_DECODE_END, _starpu_gettid());
828
829#define _STARPU_TRACE_TASK_MPI_PRE_START() \
830 FUT_DO_PROBE1(_STARPU_FUT_TASK_MPI_PRE_START, _starpu_gettid());
831
832#define _STARPU_TRACE_TASK_MPI_PRE_END() \
833 FUT_DO_PROBE1(_STARPU_FUT_TASK_MPI_PRE_END, _starpu_gettid());
834
835#define _STARPU_TRACE_TASK_MPI_POST_START() \
836 FUT_DO_PROBE1(_STARPU_FUT_TASK_MPI_POST_START, _starpu_gettid());
837
838#define _STARPU_TRACE_TASK_MPI_POST_END() \
839 FUT_DO_PROBE1(_STARPU_FUT_TASK_MPI_POST_END, _starpu_gettid());
840
841#define _STARPU_TRACE_TASK_WAIT_START(job) \
842 FUT_DO_PROBE2(_STARPU_FUT_TASK_WAIT_START, (job)->job_id, _starpu_gettid());
843
844#define _STARPU_TRACE_TASK_WAIT_END() \
845 FUT_DO_PROBE1(_STARPU_FUT_TASK_WAIT_END, _starpu_gettid());
846
847#define _STARPU_TRACE_TASK_WAIT_FOR_ALL_START() \
848 FUT_DO_PROBE1(_STARPU_FUT_TASK_WAIT_FOR_ALL_START, _starpu_gettid());
849
850#define _STARPU_TRACE_TASK_WAIT_FOR_ALL_END() \
851 FUT_DO_PROBE1(_STARPU_FUT_TASK_WAIT_FOR_ALL_END, _starpu_gettid());
852
853#define _STARPU_TRACE_USER_DEFINED_START \
854 FUT_DO_PROBE1(_STARPU_FUT_USER_DEFINED_START, _starpu_gettid());
855
856#define _STARPU_TRACE_USER_DEFINED_END \
857 FUT_DO_PROBE1(_STARPU_FUT_USER_DEFINED_END, _starpu_gettid());
858
859#define _STARPU_TRACE_START_ALLOC(memnode, size, handle, is_prefetch) \
860 FUT_DO_PROBE5(_STARPU_FUT_START_ALLOC, memnode, _starpu_gettid(), size, handle, is_prefetch);
861
862#define _STARPU_TRACE_END_ALLOC(memnode, handle, r) \
863 FUT_DO_PROBE4(_STARPU_FUT_END_ALLOC, memnode, _starpu_gettid(), handle, r);
864
865#define _STARPU_TRACE_START_ALLOC_REUSE(memnode, size, handle, is_prefetch) \
866 FUT_DO_PROBE5(_STARPU_FUT_START_ALLOC_REUSE, memnode, _starpu_gettid(), size, handle, is_prefetch);
867
868#define _STARPU_TRACE_END_ALLOC_REUSE(memnode, handle, r) \
869 FUT_DO_PROBE4(_STARPU_FUT_END_ALLOC_REUSE, memnode, _starpu_gettid(), handle, r);
870
871#define _STARPU_TRACE_START_FREE(memnode, size, handle) \
872 FUT_DO_PROBE4(_STARPU_FUT_START_FREE, memnode, _starpu_gettid(), size, handle);
873
874#define _STARPU_TRACE_END_FREE(memnode, handle) \
875 FUT_DO_PROBE3(_STARPU_FUT_END_FREE, memnode, _starpu_gettid(), handle);
876
877#define _STARPU_TRACE_START_WRITEBACK(memnode, handle) \
878 FUT_DO_PROBE3(_STARPU_FUT_START_WRITEBACK, memnode, _starpu_gettid(), handle);
879
880#define _STARPU_TRACE_END_WRITEBACK(memnode, handle) \
881 FUT_DO_PROBE3(_STARPU_FUT_END_WRITEBACK, memnode, _starpu_gettid(), handle);
882
883#define _STARPU_TRACE_USED_MEM(memnode,used) \
884 FUT_DO_PROBE3(_STARPU_FUT_USED_MEM, memnode, used, _starpu_gettid());
885
886#define _STARPU_TRACE_START_MEMRECLAIM(memnode,is_prefetch) \
887 FUT_DO_PROBE3(_STARPU_FUT_START_MEMRECLAIM, memnode, is_prefetch, _starpu_gettid());
888
889#define _STARPU_TRACE_END_MEMRECLAIM(memnode, is_prefetch) \
890 FUT_DO_PROBE3(_STARPU_FUT_END_MEMRECLAIM, memnode, is_prefetch, _starpu_gettid());
891
892#define _STARPU_TRACE_START_WRITEBACK_ASYNC(memnode) \
893 FUT_DO_PROBE2(_STARPU_FUT_START_WRITEBACK_ASYNC, memnode, _starpu_gettid());
894
895#define _STARPU_TRACE_END_WRITEBACK_ASYNC(memnode) \
896 FUT_DO_PROBE2(_STARPU_FUT_END_WRITEBACK_ASYNC, memnode, _starpu_gettid());
897
898/* We skip these events becasue they are called so often that they cause FxT to
899 * fail and make the overall trace unreadable anyway. */
900#define _STARPU_TRACE_START_PROGRESS(memnode) \
901 FUT_DO_PROBE2(_STARPU_FUT_START_PROGRESS_ON_TID, memnode, _starpu_gettid());
902
903#define _STARPU_TRACE_END_PROGRESS(memnode) \
904 FUT_DO_PROBE2(_STARPU_FUT_END_PROGRESS_ON_TID, memnode, _starpu_gettid());
905
906#define _STARPU_TRACE_USER_EVENT(code) \
907 FUT_DO_PROBE2(_STARPU_FUT_USER_EVENT, code, _starpu_gettid());
908
909#define _STARPU_TRACE_SET_PROFILING(status) \
910 FUT_DO_PROBE2(_STARPU_FUT_SET_PROFILING, status, _starpu_gettid());
911
912#define _STARPU_TRACE_TASK_WAIT_FOR_ALL \
913 FUT_DO_PROBE0(_STARPU_FUT_TASK_WAIT_FOR_ALL)
914
915#define _STARPU_TRACE_EVENT(S) \
916 FUT_DO_PROBESTR(_STARPU_FUT_EVENT,S)
917
918#define _STARPU_TRACE_THREAD_EVENT(S) \
919 _STARPU_FUT_DO_PROBE1STR(_STARPU_FUT_THREAD_EVENT, _starpu_gettid(), S)
920
921#define _STARPU_TRACE_HYPERVISOR_BEGIN() \
922 FUT_DO_PROBE1(_STARPU_FUT_HYPERVISOR_BEGIN, _starpu_gettid());
923
924#define _STARPU_TRACE_HYPERVISOR_END() \
925 FUT_DO_PROBE1(_STARPU_FUT_HYPERVISOR_END, _starpu_gettid());
926
927#ifdef STARPU_FXT_LOCK_TRACES
928
929#define _STARPU_TRACE_LOCKING_MUTEX() do { \
930 const char *file; \
931 file = strrchr(__FILE__,'/') + 1; \
932 _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_LOCKING_MUTEX,__LINE__,_starpu_gettid(),file); \
933} while (0)
934
935#define _STARPU_TRACE_MUTEX_LOCKED() do { \
936 const char *file; \
937 file = strrchr(__FILE__,'/') + 1; \
938 _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_MUTEX_LOCKED,__LINE__,_starpu_gettid(),file); \
939} while(0)
940
941#define _STARPU_TRACE_UNLOCKING_MUTEX() do { \
942 const char *file; \
943 file = strrchr(__FILE__,'/') + 1; \
944 _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_UNLOCKING_MUTEX,__LINE__,_starpu_gettid(),file); \
945} while(0)
946
947#define _STARPU_TRACE_MUTEX_UNLOCKED() do {\
948 const char *file; \
949 file = strrchr(__FILE__,'/') + 1; \
950 _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_MUTEX_UNLOCKED,__LINE__,_starpu_gettid(),file); \
951} while(0)
952
953#define _STARPU_TRACE_TRYLOCK_MUTEX() do { \
954 const char *file; \
955 file = strrchr(__FILE__,'/') + 1; \
956 _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_TRYLOCK_MUTEX,__LINE__,_starpu_gettid(),file); \
957} while(0)
958
959#define _STARPU_TRACE_RDLOCKING_RWLOCK() do { \
960 const char *file; \
961 file = strrchr(__FILE__,'/') + 1; \
962 _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_RDLOCKING_RWLOCK,__LINE__,_starpu_gettid(),file); \
963} while(0)
964
965#define _STARPU_TRACE_RWLOCK_RDLOCKED() do { \
966 const char *file; \
967 file = strrchr(__FILE__,'/') + 1; \
968 _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_RWLOCK_RDLOCKED,__LINE__,_starpu_gettid(),file); \
969} while(0)
970
971#define _STARPU_TRACE_WRLOCKING_RWLOCK() do { \
972 const char *file; \
973 file = strrchr(__FILE__,'/') + 1; \
974 _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_WRLOCKING_RWLOCK,__LINE__,_starpu_gettid(),file); \
975} while(0)
976
977#define _STARPU_TRACE_RWLOCK_WRLOCKED() do { \
978 const char *file; \
979 file = strrchr(__FILE__,'/') + 1; \
980 _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_RWLOCK_WRLOCKED,__LINE__,_starpu_gettid(),file); \
981} while(0)
982
983#define _STARPU_TRACE_UNLOCKING_RWLOCK() do { \
984 const char *file; \
985 file = strrchr(__FILE__,'/') + 1; \
986 _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_UNLOCKING_RWLOCK,__LINE__,_starpu_gettid(),file); \
987} while(0)
988
989#define _STARPU_TRACE_RWLOCK_UNLOCKED() do { \
990 const char *file; \
991 file = strrchr(__FILE__,'/') + 1; \
992 _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_RWLOCK_UNLOCKED,__LINE__,_starpu_gettid(),file); \
993} while(0)
994
995#define STARPU_TRACE_SPINLOCK_CONDITITION (starpu_worker_get_type(starpu_worker_get_id()) == STARPU_CUDA_WORKER)
996
997#define _STARPU_TRACE_LOCKING_SPINLOCK(file, line) do {\
998 if (STARPU_TRACE_SPINLOCK_CONDITITION) { \
999 const char *xfile; \
1000 xfile = strrchr(file,'/') + 1; \
1001 _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_LOCKING_SPINLOCK,line,_starpu_gettid(),xfile); \
1002 } \
1003} while(0)
1004
1005#define _STARPU_TRACE_SPINLOCK_LOCKED(file, line) do { \
1006 if (STARPU_TRACE_SPINLOCK_CONDITITION) { \
1007 const char *xfile; \
1008 xfile = strrchr(file,'/') + 1; \
1009 _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_SPINLOCK_LOCKED,line,_starpu_gettid(),xfile); \
1010 } \
1011} while(0)
1012
1013#define _STARPU_TRACE_UNLOCKING_SPINLOCK(file, line) do { \
1014 if (STARPU_TRACE_SPINLOCK_CONDITITION) { \
1015 const char *xfile; \
1016 xfile = strrchr(file,'/') + 1; \
1017 _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_UNLOCKING_SPINLOCK,line,_starpu_gettid(),xfile); \
1018 } \
1019} while(0)
1020
1021#define _STARPU_TRACE_SPINLOCK_UNLOCKED(file, line) do { \
1022 if (STARPU_TRACE_SPINLOCK_CONDITITION) { \
1023 const char *xfile; \
1024 xfile = strrchr(file,'/') + 1; \
1025 _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_SPINLOCK_UNLOCKED,line,_starpu_gettid(),xfile); \
1026 } \
1027} while(0)
1028
1029#define _STARPU_TRACE_TRYLOCK_SPINLOCK(file, line) do { \
1030 if (STARPU_TRACE_SPINLOCK_CONDITITION) { \
1031 const char *xfile; \
1032 xfile = strrchr(file,'/') + 1; \
1033 _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_TRYLOCK_SPINLOCK,line,_starpu_gettid(),xfile); \
1034 } \
1035} while(0)
1036
1037#define _STARPU_TRACE_COND_WAIT_BEGIN() do { \
1038 const char *file; \
1039 file = strrchr(__FILE__,'/') + 1; \
1040 _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_COND_WAIT_BEGIN,__LINE__,_starpu_gettid(),file); \
1041} while(0)
1042
1043#define _STARPU_TRACE_COND_WAIT_END() do { \
1044 const char *file; \
1045 file = strrchr(__FILE__,'/') + 1; \
1046 _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_COND_WAIT_END,__LINE__,_starpu_gettid(),file); \
1047} while(0)
1048
1049#define _STARPU_TRACE_BARRIER_WAIT_BEGIN() do { \
1050 const char *file; \
1051 file = strrchr(__FILE__,'/') + 1; \
1052 _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_BARRIER_WAIT_BEGIN,__LINE__,_starpu_gettid(),file); \
1053} while(0)
1054
1055#define _STARPU_TRACE_BARRIER_WAIT_END() do { \
1056 const char *file; \
1057 file = strrchr(__FILE__,'/') + 1; \
1058 _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_BARRIER_WAIT_END,__LINE__,_starpu_gettid(),file); \
1059} while(0)
1060
1061#else // !STARPU_FXT_LOCK_TRACES
1062
1063#define _STARPU_TRACE_LOCKING_MUTEX() do {} while(0)
1064#define _STARPU_TRACE_MUTEX_LOCKED() do {} while(0)
1065#define _STARPU_TRACE_UNLOCKING_MUTEX() do {} while(0)
1066#define _STARPU_TRACE_MUTEX_UNLOCKED() do {} while(0)
1067#define _STARPU_TRACE_TRYLOCK_MUTEX() do {} while(0)
1068#define _STARPU_TRACE_RDLOCKING_RWLOCK() do {} while(0)
1069#define _STARPU_TRACE_RWLOCK_RDLOCKED() do {} while(0)
1070#define _STARPU_TRACE_WRLOCKING_RWLOCK() do {} while(0)
1071#define _STARPU_TRACE_RWLOCK_WRLOCKED() do {} while(0)
1072#define _STARPU_TRACE_UNLOCKING_RWLOCK() do {} while(0)
1073#define _STARPU_TRACE_RWLOCK_UNLOCKED() do {} while(0)
1074#define _STARPU_TRACE_LOCKING_SPINLOCK(file, line) do {(void) file; (void)line;} while(0)
1075#define _STARPU_TRACE_SPINLOCK_LOCKED(file, line) do {(void) file; (void)line;} while(0)
1076#define _STARPU_TRACE_UNLOCKING_SPINLOCK(file, line) do {(void) file; (void)line;} while(0)
1077#define _STARPU_TRACE_SPINLOCK_UNLOCKED(file, line) do {(void) file; (void)line;} while(0)
1078#define _STARPU_TRACE_TRYLOCK_SPINLOCK(file, line) do {(void) file; (void)line;} while(0)
1079#define _STARPU_TRACE_COND_WAIT_BEGIN() do {} while(0)
1080#define _STARPU_TRACE_COND_WAIT_END() do {} while(0)
1081#define _STARPU_TRACE_BARRIER_WAIT_BEGIN() do {} while(0)
1082#define _STARPU_TRACE_BARRIER_WAIT_END() do {} while(0)
1083
1084#endif // STARPU_FXT_LOCK_TRACES
1085
1086#define _STARPU_TRACE_MEMORY_FULL(size) \
1087 FUT_DO_PROBE2(_STARPU_FUT_MEMORY_FULL,size,_starpu_gettid());
1088
1089#define _STARPU_TRACE_DATA_LOAD(workerid,size) \
1090 FUT_DO_PROBE2(_STARPU_FUT_DATA_LOAD, workerid, size);
1091
1092#define _STARPU_TRACE_START_UNPARTITION(handle, memnode) \
1093 FUT_DO_PROBE3(_STARPU_FUT_START_UNPARTITION_ON_TID, memnode, _starpu_gettid(), handle);
1094
1095#define _STARPU_TRACE_END_UNPARTITION(handle, memnode) \
1096 FUT_DO_PROBE3(_STARPU_FUT_END_UNPARTITION_ON_TID, memnode, _starpu_gettid(), handle);
1097
1098#define _STARPU_TRACE_SCHED_COMPONENT_PUSH_PRIO(workerid, ntasks, exp_len) \
1099 FUT_DO_PROBE4(_STARPU_FUT_SCHED_COMPONENT_PUSH_PRIO, _starpu_gettid(), workerid, ntasks, exp_len);
1100
1101#define _STARPU_TRACE_SCHED_COMPONENT_POP_PRIO(workerid, ntasks, exp_len) \
1102 FUT_DO_PROBE4(_STARPU_FUT_SCHED_COMPONENT_POP_PRIO, _starpu_gettid(), workerid, ntasks, exp_len);
1103
1104#define _STARPU_TRACE_SCHED_COMPONENT_NEW(component) \
1105 _STARPU_FUT_DO_PROBE1STR(_STARPU_FUT_SCHED_COMPONENT_NEW, component, (component)->name);
1106
1107#define _STARPU_TRACE_SCHED_COMPONENT_CONNECT(parent, child) \
1108 FUT_DO_PROBE2(_STARPU_FUT_SCHED_COMPONENT_CONNECT, parent, child);
1109
1110#define _STARPU_TRACE_SCHED_COMPONENT_PUSH(from, to, task, prio) \
1111 FUT_DO_PROBE5(_STARPU_FUT_SCHED_COMPONENT_PUSH, _starpu_gettid(), from, to, task, prio);
1112
1113#define _STARPU_TRACE_SCHED_COMPONENT_PULL(from, to, task) \
1114 FUT_DO_PROBE5(_STARPU_FUT_SCHED_COMPONENT_PULL, _starpu_gettid(), from, to, task, (task)->priority);
1115
1116#define _STARPU_TRACE_HANDLE_DATA_REGISTER(handle) do { \
1117 const size_t __data_size = handle->ops->get_size(handle); \
1118 char __buf[(FXT_MAX_PARAMS-2)*sizeof(long)]; \
1119 void *__interface = handle->per_node[0].data_interface; \
1120 if (handle->ops->describe) \
1121 handle->ops->describe(__interface, __buf, sizeof(__buf)); \
1122 else \
1123 __buf[0] = 0; \
1124 FUT_DO_PROBE3STR(_STARPU_FUT_HANDLE_DATA_REGISTER, handle, __data_size, handle->home_node, __buf); \
1125} while (0)
1126
1127#define _STARPU_TRACE_HANDLE_DATA_UNREGISTER(handle) \
1128 FUT_DO_PROBE1(_STARPU_FUT_HANDLE_DATA_UNREGISTER, handle)
1129
1130//Coherency Data Traces
1131#define _STARPU_TRACE_DATA_STATE_INVALID(handle, node) \
1132 FUT_DO_PROBE2(_STARPU_FUT_DATA_STATE_INVALID, handle, node)
1133
1134#define _STARPU_TRACE_DATA_STATE_OWNER(handle, node) \
1135 FUT_DO_PROBE2(_STARPU_FUT_DATA_STATE_OWNER, handle, node)
1136
1137#define _STARPU_TRACE_DATA_STATE_SHARED(handle, node) \
1138 FUT_DO_PROBE2(_STARPU_FUT_DATA_STATE_SHARED, handle, node)
1139
1140#define _STARPU_TRACE_DATA_REQUEST_CREATED(handle, orig, dest, prio, is_pre) \
1141 FUT_DO_PROBE5(_STARPU_FUT_DATA_REQUEST_CREATED, orig, dest, prio, handle, is_pre)
1142
1143
1144#else // !STARPU_USE_FXT
1145
1146/* Dummy macros in case FxT is disabled */
1147#define _STARPU_TRACE_NEW_MEM_NODE(nodeid) do {(void)(nodeid);} while(0)
1148#define _STARPU_TRACE_WORKER_INIT_START(a,b,c,d,e,f) do {(void)(a); (void)(b); (void)(c); (void)(d); (void)(e); (void)(f);} while(0)
1149#define _STARPU_TRACE_WORKER_INIT_END(workerid) do {(void)(workerid);} while(0)
1150#define _STARPU_TRACE_START_CODELET_BODY(job, nimpl, perf_arch, workerid) do {(void)(job); (void)(nimpl); (void)(perf_arch); (void)(workerid);} while(0)
1151#define _STARPU_TRACE_END_CODELET_BODY(job, nimpl, perf_arch, workerid) do {(void)(job); (void)(nimpl); (void)(perf_arch); (void)(workerid);} while(0)
1152#define _STARPU_TRACE_START_EXECUTING() do {} while(0)
1153#define _STARPU_TRACE_END_EXECUTING() do {} while(0)
1154#define _STARPU_TRACE_START_CALLBACK(job) do {(void)(job);} while(0)
1155#define _STARPU_TRACE_END_CALLBACK(job) do {(void)(job);} while(0)
1156#define _STARPU_TRACE_JOB_PUSH(task, prio) do {(void)(task); (void)(prio);} while(0)
1157#define _STARPU_TRACE_JOB_POP(task, prio) do {(void)(task); (void)(prio);} while(0)
1158#define _STARPU_TRACE_UPDATE_TASK_CNT(counter) do {(void)(counter);} while(0)
1159#define _STARPU_TRACE_START_FETCH_INPUT(job) do {(void)(job);} while(0)
1160#define _STARPU_TRACE_END_FETCH_INPUT(job) do {(void)(job);} while(0)
1161#define _STARPU_TRACE_START_PUSH_OUTPUT(job) do {(void)(job);} while(0)
1162#define _STARPU_TRACE_END_PUSH_OUTPUT(job) do {(void)(job);} while(0)
1163#define _STARPU_TRACE_TAG(tag, job) do {(void)(tag); (void)(job);} while(0)
1164#define _STARPU_TRACE_TAG_DEPS(a, b) do {(void)(a); (void)(b);} while(0)
1165#define _STARPU_TRACE_TASK_DEPS(a, b) do {(void)(a); (void)(b);} while(0)
1166#define _STARPU_TRACE_GHOST_TASK_DEPS(a, b) do {(void)(a); (void)(b);} while(0)
1167#define _STARPU_TRACE_TASK_EXCLUDE_FROM_DAG(a) do {(void)(a);} while(0)
1168#define _STARPU_TRACE_TASK_NAME(a) do {(void)(a);} while(0)
1169#define _STARPU_TRACE_TASK_COLOR(a) do {(void)(a);} while(0)
1170#define _STARPU_TRACE_TASK_DONE(a) do {(void)(a);} while(0)
1171#define _STARPU_TRACE_TAG_DONE(a) do {(void)(a);} while(0)
1172#define _STARPU_TRACE_DATA_NAME(a, b) do {(void)(a); (void)(b);} while(0)
1173#define _STARPU_TRACE_DATA_COORDINATES(a, b, c) do {(void)(a); (void)(b); (void)(c);} while(0)
1174#define _STARPU_TRACE_DATA_COPY(a, b, c) do {(void)(a); (void)(b); (void)(c);} while(0)
1175#define _STARPU_TRACE_DATA_WONT_USE(a) do {(void)(a);} while(0)
1176#define _STARPU_TRACE_DATA_DOING_WONT_USE(a) do {(void)(a);} while(0)
1177#define _STARPU_TRACE_START_DRIVER_COPY(a,b,c,d,e,f) do {(void)(a); (void)(b); (void)(c); (void)(d); (void)(e); (void)(f);} while(0)
1178#define _STARPU_TRACE_END_DRIVER_COPY(a,b,c,d,e) do {(void)(a); (void)(b); (void)(c); (void)(d); (void)(e);} while(0)
1179#define _STARPU_TRACE_START_DRIVER_COPY_ASYNC(a,b) do {(void)(a); (void)(b);} while(0)
1180#define _STARPU_TRACE_END_DRIVER_COPY_ASYNC(a,b) do {(void)(a); (void)(b);} while(0)
1181#define _STARPU_TRACE_WORK_STEALING(a, b) do {(void)(a); (void)(b);} while(0)
1182#define _STARPU_TRACE_WORKER_DEINIT_START do {} while(0)
1183#define _STARPU_TRACE_WORKER_DEINIT_END(a) do {(void)(a);} while(0)
1184#define _STARPU_TRACE_WORKER_SCHEDULING_START do {} while(0)
1185#define _STARPU_TRACE_WORKER_SCHEDULING_END do {} while(0)
1186#define _STARPU_TRACE_WORKER_SCHEDULING_PUSH do {} while(0)
1187#define _STARPU_TRACE_WORKER_SCHEDULING_POP do {} while(0)
1188#define _STARPU_TRACE_WORKER_SLEEP_START do {} while(0)
1189#define _STARPU_TRACE_WORKER_SLEEP_END do {} while(0)
1190#define _STARPU_TRACE_TASK_SUBMIT(job, a, b) do {(void)(job); (void)(a);(void)(b);} while(0)
1191#define _STARPU_TRACE_TASK_SUBMIT_START() do {} while(0)
1192#define _STARPU_TRACE_TASK_SUBMIT_END() do {} while(0)
1193#define _STARPU_TRACE_TASK_THROTTLE_START() do {} while(0)
1194#define _STARPU_TRACE_TASK_THROTTLE_END() do {} while(0)
1195#define _STARPU_TRACE_TASK_BUILD_START() do {} while(0)
1196#define _STARPU_TRACE_TASK_BUILD_END() do {} while(0)
1197#define _STARPU_TRACE_TASK_MPI_DECODE_START() do {} while(0)
1198#define _STARPU_TRACE_TASK_MPI_DECODE_END() do {} while(0)
1199#define _STARPU_TRACE_TASK_MPI_PRE_START() do {} while(0)
1200#define _STARPU_TRACE_TASK_MPI_PRE_END() do {} while(0)
1201#define _STARPU_TRACE_TASK_MPI_POST_START() do {} while(0)
1202#define _STARPU_TRACE_TASK_MPI_POST_END() do {} while(0)
1203#define _STARPU_TRACE_TASK_WAIT_START(job) do {(void)(job);} while(0)
1204#define _STARPU_TRACE_TASK_WAIT_END() do {} while(0)
1205#define _STARPU_TRACE_TASK_WAIT_FOR_ALL_START() do {} while(0)
1206#define _STARPU_TRACE_TASK_WAIT_FOR_ALL_END() do {} while(0)
1207#define _STARPU_TRACE_USER_DEFINED_START() do {} while(0)
1208#define _STARPU_TRACE_USER_DEFINED_END() do {} while(0)
1209#define _STARPU_TRACE_START_ALLOC(memnode, size, handle, is_prefetch) do {(void)(memnode); (void)(size); (void)(handle);} while(0)
1210#define _STARPU_TRACE_END_ALLOC(memnode, handle, r) do {(void)(memnode); (void)(handle); (void)(r);} while(0)
1211#define _STARPU_TRACE_START_ALLOC_REUSE(a, size, handle, is_prefetch) do {(void)(a); (void)(size); (void)(handle);} while(0)
1212#define _STARPU_TRACE_END_ALLOC_REUSE(a, handle, r) do {(void)(a); (void)(handle); (void)(r);} while(0)
1213#define _STARPU_TRACE_START_FREE(memnode, size, handle) do {(void)(memnode); (void)(size); (void)(handle);} while(0)
1214#define _STARPU_TRACE_END_FREE(memnode, handle) do {(void)(memnode); (void)(handle);} while(0)
1215#define _STARPU_TRACE_START_WRITEBACK(memnode, handle) do {(void)(memnode); (void)(handle);} while(0)
1216#define _STARPU_TRACE_END_WRITEBACK(memnode, handle) do {(void)(memnode); (void)(handle);} while(0)
1217#define _STARPU_TRACE_USED_MEM(memnode,used) do {(void)(memnode); (void)(used);} while (0)
1218#define _STARPU_TRACE_START_MEMRECLAIM(memnode,is_prefetch) do {(void)(memnode); (void)(is_prefetch);} while(0)
1219#define _STARPU_TRACE_END_MEMRECLAIM(memnode,is_prefetch) do {(void)(memnode); (void)(is_prefetch);} while(0)
1220#define _STARPU_TRACE_START_WRITEBACK_ASYNC(memnode) do {(void)(memnode);} while(0)
1221#define _STARPU_TRACE_END_WRITEBACK_ASYNC(memnode) do {(void)(memnode);} while(0)
1222#define _STARPU_TRACE_START_PROGRESS(memnode) do {(void)( memnode);} while(0)
1223#define _STARPU_TRACE_END_PROGRESS(memnode) do {(void)( memnode);} while(0)
1224#define _STARPU_TRACE_USER_EVENT(code) do {(void)(code);} while(0)
1225#define _STARPU_TRACE_SET_PROFILING(status) do {(void)(status);} while(0)
1226#define _STARPU_TRACE_TASK_WAIT_FOR_ALL() do {} while(0)
1227#define _STARPU_TRACE_EVENT(S) do {(void)(S);} while(0)
1228#define _STARPU_TRACE_THREAD_EVENT(S) do {(void)(S);} while(0)
1229#define _STARPU_TRACE_LOCKING_MUTEX() do {} while(0)
1230#define _STARPU_TRACE_MUTEX_LOCKED() do {} while(0)
1231#define _STARPU_TRACE_UNLOCKING_MUTEX() do {} while(0)
1232#define _STARPU_TRACE_MUTEX_UNLOCKED() do {} while(0)
1233#define _STARPU_TRACE_TRYLOCK_MUTEX() do {} while(0)
1234#define _STARPU_TRACE_RDLOCKING_RWLOCK() do {} while(0)
1235#define _STARPU_TRACE_RWLOCK_RDLOCKED() do {} while(0)
1236#define _STARPU_TRACE_WRLOCKING_RWLOCK() do {} while(0)
1237#define _STARPU_TRACE_RWLOCK_WRLOCKED() do {} while(0)
1238#define _STARPU_TRACE_UNLOCKING_RWLOCK() do {} while(0)
1239#define _STARPU_TRACE_RWLOCK_UNLOCKED() do {} while(0)
1240#define _STARPU_TRACE_LOCKING_SPINLOCK(file, line) do {(void)(file); (void)(line);} while(0)
1241#define _STARPU_TRACE_SPINLOCK_LOCKED(file, line) do {(void)(file); (void)(line);} while(0)
1242#define _STARPU_TRACE_UNLOCKING_SPINLOCK(file, line) do {(void)(file); (void)(line);} while(0)
1243#define _STARPU_TRACE_SPINLOCK_UNLOCKED(file, line) do {(void)(file); (void)(line);} while(0)
1244#define _STARPU_TRACE_TRYLOCK_SPINLOCK(file, line) do {(void)(file); (void)(line);} while(0)
1245#define _STARPU_TRACE_COND_WAIT_BEGIN() do {} while(0)
1246#define _STARPU_TRACE_COND_WAIT_END() do {} while(0)
1247#define _STARPU_TRACE_BARRIER_WAIT_BEGIN() do {} while(0)
1248#define _STARPU_TRACE_BARRIER_WAIT_END() do {} while(0)
1249#define _STARPU_TRACE_MEMORY_FULL(size) do {(void)(size);} while(0)
1250#define _STARPU_TRACE_DATA_LOAD(workerid,size) do {(void)(workerid); (void)(size);} while(0)
1251#define _STARPU_TRACE_START_UNPARTITION(handle, memnode) do {(void)(handle); (void)(memnode);} while(0)
1252#define _STARPU_TRACE_END_UNPARTITION(handle, memnode) do {(void)(handle); (void)(memnode);} while(0)
1253#define _STARPU_TRACE_SCHED_COMPONENT_PUSH_PRIO(workerid, ntasks, exp_len) do {(void)(workerid); (void)(ntasks); (void)(exp_len);} while(0)
1254#define _STARPU_TRACE_SCHED_COMPONENT_POP_PRIO(workerid, ntasks, exp_len) do {(void)(workerid); (void)(ntasks); (void)(exp_len);} while(0)
1255#define _STARPU_TRACE_HYPERVISOR_BEGIN() do {} while(0)
1256#define _STARPU_TRACE_HYPERVISOR_END() do {} while(0)
1257#define _STARPU_TRACE_SCHED_COMPONENT_NEW(component) do {(void)(component);} while (0)
1258#define _STARPU_TRACE_SCHED_COMPONENT_CONNECT(parent, child) do {(void)(parent); (void)(child);} while (0)
1259#define _STARPU_TRACE_SCHED_COMPONENT_PUSH(from, to, task, prio) do {(void)(from); (void)(to); (void)(task); (void)(prio);} while (0)
1260#define _STARPU_TRACE_SCHED_COMPONENT_PULL(from, to, task) do {(void)(from); (void)(to); (void)(task);} while (0)
1261#define _STARPU_TRACE_HANDLE_DATA_REGISTER(handle) do {(void)(handle);} while (0)
1262#define _STARPU_TRACE_HANDLE_DATA_UNREGISTER(handle) do {(void)(handle);} while (0)
1263#define _STARPU_TRACE_WORKER_START_FETCH_INPUT(job, id) do {(void)(job); (void)(id);} while(0)
1264#define _STARPU_TRACE_WORKER_END_FETCH_INPUT(job, id) do {(void)(job); (void)(id);} while(0)
1265#define _STARPU_TRACE_DATA_STATE_INVALID(handle, node) do {(void)(handle); (void)(node);} while(0)
1266#define _STARPU_TRACE_DATA_STATE_OWNER(handle, node) do {(void)(handle); (void)(node);} while(0)
1267#define _STARPU_TRACE_DATA_STATE_SHARED(handle, node) do {(void)(handle); (void)(node);} while(0)
1268#define _STARPU_TRACE_DATA_REQUEST_CREATED(handle, orig, dest, prio, is_pre) do {(void)(handle); (void)(orig); (void)(dest); (void)(prio); (void)(is_pre);} while(0)
1269
1270#endif // STARPU_USE_FXT
1271
1272#endif // __FXT_H__
utils.h