fxt.h 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2009-2014 Université de Bordeaux 1
  4. * Copyright (C) 2010, 2011, 2012, 2013 Centre National de la Recherche Scientifique
  5. *
  6. * StarPU is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU Lesser General Public License as published by
  8. * the Free Software Foundation; either version 2.1 of the License, or (at
  9. * your option) any later version.
  10. *
  11. * StarPU is distributed in the hope that it will be useful, but
  12. * WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14. *
  15. * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  16. */
  17. #ifndef __FXT_H__
  18. #define __FXT_H__
  19. #ifndef _GNU_SOURCE
  20. #define _GNU_SOURCE /* ou _BSD_SOURCE ou _SVID_SOURCE */
  21. #endif
  22. #include <unistd.h>
  23. #include <string.h>
  24. #include <sys/types.h>
  25. #include <stdlib.h>
  26. #include <common/config.h>
  27. #include <common/utils.h>
  28. #include <starpu.h>
  29. /* some key to identify the worker kind */
  30. #define _STARPU_FUT_APPS_KEY 0x100
  31. #define _STARPU_FUT_CPU_KEY 0x101
  32. #define _STARPU_FUT_CUDA_KEY 0x102
  33. #define _STARPU_FUT_OPENCL_KEY 0x103
  34. #define _STARPU_FUT_MIC_KEY 0x104
  35. #define _STARPU_FUT_SCC_KEY 0x105
  36. #define _STARPU_FUT_WORKER_INIT_START 0x5100
  37. #define _STARPU_FUT_WORKER_INIT_END 0x5101
  38. #define _STARPU_FUT_START_CODELET_BODY 0x5102
  39. #define _STARPU_FUT_END_CODELET_BODY 0x5103
  40. #define _STARPU_FUT_JOB_PUSH 0x5104
  41. #define _STARPU_FUT_JOB_POP 0x5105
  42. #define _STARPU_FUT_UPDATE_TASK_CNT 0x5106
  43. #define _STARPU_FUT_START_FETCH_INPUT 0x5107
  44. #define _STARPU_FUT_END_FETCH_INPUT 0x5108
  45. #define _STARPU_FUT_START_PUSH_OUTPUT 0x5109
  46. #define _STARPU_FUT_END_PUSH_OUTPUT 0x5110
  47. #define _STARPU_FUT_TAG 0x5111
  48. #define _STARPU_FUT_TAG_DEPS 0x5112
  49. #define _STARPU_FUT_TASK_DEPS 0x5113
  50. #define _STARPU_FUT_DATA_COPY 0x5114
  51. #define _STARPU_FUT_WORK_STEALING 0x5115
  52. #define _STARPU_FUT_WORKER_DEINIT_START 0x5116
  53. #define _STARPU_FUT_WORKER_DEINIT_END 0x5117
  54. #define _STARPU_FUT_WORKER_SLEEP_START 0x5118
  55. #define _STARPU_FUT_WORKER_SLEEP_END 0x5119
  56. #define _STARPU_FUT_USER_DEFINED_START 0x5120
  57. #define _STARPU_FUT_USER_DEFINED_END 0x5121
  58. #define _STARPU_FUT_NEW_MEM_NODE 0x5122
  59. #define _STARPU_FUT_START_CALLBACK 0x5123
  60. #define _STARPU_FUT_END_CALLBACK 0x5124
  61. #define _STARPU_FUT_TASK_DONE 0x5125
  62. #define _STARPU_FUT_TAG_DONE 0x5126
  63. #define _STARPU_FUT_START_ALLOC 0x5127
  64. #define _STARPU_FUT_END_ALLOC 0x5128
  65. #define _STARPU_FUT_START_ALLOC_REUSE 0x5129
  66. #define _STARPU_FUT_END_ALLOC_REUSE 0x5130
  67. #define _STARPU_FUT_START_MEMRECLAIM 0x5131
  68. #define _STARPU_FUT_END_MEMRECLAIM 0x5132
  69. #define _STARPU_FUT_START_DRIVER_COPY 0x5133
  70. #define _STARPU_FUT_END_DRIVER_COPY 0x5134
  71. #define _STARPU_FUT_START_DRIVER_COPY_ASYNC 0x5135
  72. #define _STARPU_FUT_END_DRIVER_COPY_ASYNC 0x5136
  73. #define _STARPU_FUT_START_PROGRESS 0x5137
  74. #define _STARPU_FUT_END_PROGRESS 0x5138
  75. #define _STARPU_FUT_USER_EVENT 0x5139
  76. #define _STARPU_FUT_SET_PROFILING 0x513a
  77. #define _STARPU_FUT_TASK_WAIT_FOR_ALL 0x513b
  78. #define _STARPU_FUT_EVENT 0x513c
  79. #define _STARPU_FUT_THREAD_EVENT 0x513d
  80. #define _STARPU_FUT_CODELET_DETAILS 0x513e
  81. #define _STARPU_FUT_CODELET_DATA 0x513f
  82. #define _STARPU_FUT_LOCKING_MUTEX 0x5140
  83. #define _STARPU_FUT_MUTEX_LOCKED 0x5141
  84. #define _STARPU_FUT_UNLOCKING_MUTEX 0x5142
  85. #define _STARPU_FUT_MUTEX_UNLOCKED 0x5143
  86. #define _STARPU_FUT_TRYLOCK_MUTEX 0x5144
  87. #define _STARPU_FUT_RDLOCKING_RWLOCK 0x5145
  88. #define _STARPU_FUT_RWLOCK_RDLOCKED 0x5146
  89. #define _STARPU_FUT_WRLOCKING_RWLOCK 0x5147
  90. #define _STARPU_FUT_RWLOCK_WRLOCKED 0x5148
  91. #define _STARPU_FUT_UNLOCKING_RWLOCK 0x5149
  92. #define _STARPU_FUT_RWLOCK_UNLOCKED 0x514a
  93. #define _STARPU_FUT_LOCKING_SPINLOCK 0x514b
  94. #define _STARPU_FUT_SPINLOCK_LOCKED 0x514c
  95. #define _STARPU_FUT_UNLOCKING_SPINLOCK 0x514d
  96. #define _STARPU_FUT_SPINLOCK_UNLOCKED 0x514e
  97. #define _STARPU_FUT_TRYLOCK_SPINLOCK 0x514f
  98. #define _STARPU_FUT_COND_WAIT_BEGIN 0x5150
  99. #define _STARPU_FUT_COND_WAIT_END 0x5151
  100. #define _STARPU_FUT_MEMORY_FULL 0x5152
  101. #define _STARPU_FUT_DATA_LOAD 0x5153
  102. #define _STARPU_FUT_START_UNPARTITION 0x5154
  103. #define _STARPU_FUT_END_UNPARTITION 0x5155
  104. #define _STARPU_FUT_START_FREE 0x5156
  105. #define _STARPU_FUT_END_FREE 0x5157
  106. #define _STARPU_FUT_START_WRITEBACK 0x5158
  107. #define _STARPU_FUT_END_WRITEBACK 0x5159
  108. #define _STARPU_FUT_HYPERVISOR_BEGIN 0x5160
  109. #define _STARPU_FUT_HYPERVISOR_END 0x5161
  110. #define _STARPU_FUT_BARRIER_WAIT_BEGIN 0x5162
  111. #define _STARPU_FUT_BARRIER_WAIT_END 0x5163
  112. #define _STARPU_FUT_WORKER_SCHEDULING_START 0x5164
  113. #define _STARPU_FUT_WORKER_SCHEDULING_END 0x5165
  114. #define _STARPU_FUT_WORKER_SCHEDULING_PUSH 0x5166
  115. #define _STARPU_FUT_WORKER_SCHEDULING_POP 0x5167
  116. #define _STARPU_FUT_START_EXECUTING 0x5168
  117. #define _STARPU_FUT_END_EXECUTING 0x5169
  118. #ifdef STARPU_USE_FXT
  119. #include <fxt/fxt.h>
  120. #include <fxt/fut.h>
  121. /* Some versions of FxT do not include the declaration of the function */
  122. #ifdef HAVE_ENABLE_FUT_FLUSH
  123. #if !HAVE_DECL_ENABLE_FUT_FLUSH
  124. void enable_fut_flush();
  125. #endif
  126. #endif
  127. #ifdef HAVE_FUT_SET_FILENAME
  128. #if !HAVE_DECL_FUT_SET_FILENAME
  129. void fut_set_filename(char *filename);
  130. #endif
  131. #endif
  132. long _starpu_gettid(void);
  133. /* Initialize the FxT library. */
  134. void _starpu_init_fxt_profiling(unsigned trace_buffer_size);
  135. /* Stop the FxT library, and generate the trace file. */
  136. void _starpu_stop_fxt_profiling(void);
  137. /* Associate the current processing unit to the identifier of the LWP that runs
  138. * the worker. */
  139. void _starpu_fxt_register_thread(unsigned);
  140. #ifdef FUT_NEEDS_COMMIT
  141. #define _STARPU_FUT_COMMIT(size) fut_commitstampedbuffer(size)
  142. #else
  143. #define _STARPU_FUT_COMMIT(size) do { } while (0)
  144. #endif
  145. #ifdef FUT_DO_PROBE1STR
  146. #define _STARPU_FUT_DO_PROBE1STR(CODE, P1, str) FUT_DO_PROBE1STR(CODE, P1, str)
  147. #else
  148. /* Sometimes we need something a little more specific than the wrappers from
  149. * FxT: these macro permit to put add an event with 3 (or 4) numbers followed
  150. * by a string. */
  151. #define _STARPU_FUT_DO_PROBE1STR(CODE, P1, str) \
  152. do { \
  153. if(fut_active) { \
  154. /* No more than FXT_MAX_PARAMS args are allowed */ \
  155. /* we add a \0 just in case ... */ \
  156. size_t len = STARPU_MIN(strlen(str)+1, (FXT_MAX_PARAMS - 1)*sizeof(unsigned long));\
  157. unsigned nbargs_str = (len + sizeof(unsigned long) - 1)/(sizeof(unsigned long));\
  158. unsigned nbargs = 1 + nbargs_str; \
  159. size_t total_len = FUT_SIZE(nbargs); \
  160. unsigned long *futargs = \
  161. fut_getstampedbuffer(FUT_CODE(CODE, nbargs), total_len);\
  162. *(futargs++) = (unsigned long)(P1); \
  163. snprintf((char *)futargs, len, "%s", str); \
  164. ((char *)futargs)[len - 1] = '\0'; \
  165. _STARPU_FUT_COMMIT(total_len); \
  166. } \
  167. } while (0);
  168. #endif
  169. #ifdef FUT_DO_PROBE2STR
  170. #define _STARPU_FUT_DO_PROBE2STR(CODE, P1, P2, str) FUT_DO_PROBE2STR(CODE, P1, P2, str)
  171. #else
  172. /* Sometimes we need something a little more specific than the wrappers from
  173. * FxT: these macro permit to put add an event with 3 (or 4) numbers followed
  174. * by a string. */
  175. #define _STARPU_FUT_DO_PROBE2STR(CODE, P1, P2, str) \
  176. do { \
  177. if(fut_active) { \
  178. /* No more than FXT_MAX_PARAMS args are allowed */ \
  179. /* we add a \0 just in case ... */ \
  180. size_t len = STARPU_MIN(strlen(str)+1, (FXT_MAX_PARAMS - 2)*sizeof(unsigned long));\
  181. unsigned nbargs_str = (len + sizeof(unsigned long) - 1)/(sizeof(unsigned long));\
  182. unsigned nbargs = 2 + nbargs_str; \
  183. size_t total_len = FUT_SIZE(nbargs); \
  184. unsigned long *futargs = \
  185. fut_getstampedbuffer(FUT_CODE(CODE, nbargs), total_len);\
  186. *(futargs++) = (unsigned long)(P1); \
  187. *(futargs++) = (unsigned long)(P2); \
  188. snprintf((char *)futargs, len, "%s", str); \
  189. ((char *)futargs)[len - 1] = '\0'; \
  190. _STARPU_FUT_COMMIT(total_len); \
  191. } \
  192. } while (0);
  193. #endif
  194. #ifdef FUT_DO_PROBE3STR
  195. #define _STARPU_FUT_DO_PROBE3STR(CODE, P1, P2, P3, str) FUT_DO_PROBE3STR(CODE, P1, P2, P3, str)
  196. #else
  197. #define _STARPU_FUT_DO_PROBE3STR(CODE, P1, P2, P3, str) \
  198. do { \
  199. if(fut_active) { \
  200. /* No more than FXT_MAX_PARAMS args are allowed */ \
  201. /* we add a \0 just in case ... */ \
  202. size_t len = STARPU_MIN(strlen(str)+1, (FXT_MAX_PARAMS - 3)*sizeof(unsigned long));\
  203. unsigned nbargs_str = (len + sizeof(unsigned long) - 1)/(sizeof(unsigned long));\
  204. unsigned nbargs = 3 + nbargs_str; \
  205. size_t total_len = FUT_SIZE(nbargs); \
  206. unsigned long *futargs = \
  207. fut_getstampedbuffer(FUT_CODE(CODE, nbargs), total_len);\
  208. *(futargs++) = (unsigned long)(P1); \
  209. *(futargs++) = (unsigned long)(P2); \
  210. *(futargs++) = (unsigned long)(P3); \
  211. snprintf((char *)futargs, len, "%s", str); \
  212. ((char *)futargs)[len - 1] = '\0'; \
  213. _STARPU_FUT_COMMIT(total_len); \
  214. } \
  215. } while (0);
  216. #endif
  217. #ifdef FUT_DO_PROBE4STR
  218. #define _STARPU_FUT_DO_PROBE4STR(CODE, P1, P2, P3, P4, str) FUT_DO_PROBE4STR(CODE, P1, P2, P3, P4, str)
  219. #else
  220. #define _STARPU_FUT_DO_PROBE4STR(CODE, P1, P2, P3, P4, str) \
  221. do { \
  222. if(fut_active) { \
  223. /* No more than FXT_MAX_PARAMS args are allowed */ \
  224. /* we add a \0 just in case ... */ \
  225. size_t len = STARPU_MIN(strlen(str)+1, (FXT_MAX_PARAMS - 4)*sizeof(unsigned long));\
  226. unsigned nbargs_str = (len + sizeof(unsigned long) - 1)/(sizeof(unsigned long));\
  227. unsigned nbargs = 4 + nbargs_str; \
  228. size_t total_len = FUT_SIZE(nbargs); \
  229. unsigned long *futargs = \
  230. fut_getstampedbuffer(FUT_CODE(CODE, nbargs), total_len);\
  231. *(futargs++) = (unsigned long)(P1); \
  232. *(futargs++) = (unsigned long)(P2); \
  233. *(futargs++) = (unsigned long)(P3); \
  234. *(futargs++) = (unsigned long)(P4); \
  235. snprintf((char *)futargs, len, "%s", str); \
  236. ((char *)futargs)[len - 1] = '\0'; \
  237. _STARPU_FUT_COMMIT(total_len); \
  238. } \
  239. } while (0);
  240. #endif
  241. #ifdef FUT_DO_PROBE5STR
  242. #define _STARPU_FUT_DO_PROBE5STR(CODE, P1, P2, P3, P4, P5, str) FUT_DO_PROBE5STR(CODE, P1, P2, P3, P4, P5, str)
  243. #else
  244. #define _STARPU_FUT_DO_PROBE5STR(CODE, P1, P2, P3, P4, P5, str) \
  245. do { \
  246. if(fut_active) { \
  247. /* No more than FXT_MAX_PARAMS args are allowed */ \
  248. /* we add a \0 just in case ... */ \
  249. size_t len = STARPU_MIN(strlen(str)+1, (FXT_MAX_PARAMS - 5)*sizeof(unsigned long));\
  250. unsigned nbargs_str = (len + sizeof(unsigned long) - 1)/(sizeof(unsigned long));\
  251. unsigned nbargs = 5 + nbargs_str; \
  252. size_t total_len = FUT_SIZE(nbargs); \
  253. unsigned long *futargs = \
  254. fut_getstampedbuffer(FUT_CODE(CODE, nbargs), total_len);\
  255. *(futargs++) = (unsigned long)(P1); \
  256. *(futargs++) = (unsigned long)(P2); \
  257. *(futargs++) = (unsigned long)(P3); \
  258. *(futargs++) = (unsigned long)(P4); \
  259. *(futargs++) = (unsigned long)(P5); \
  260. snprintf((char *)futargs, len, "%s", str); \
  261. ((char *)futargs)[len - 1] = '\0'; \
  262. _STARPU_FUT_COMMIT(total_len); \
  263. } \
  264. } while (0);
  265. #endif
  266. #ifdef FUT_DO_PROBE6STR
  267. #define _STARPU_FUT_DO_PROBE6STR(CODE, P1, P2, P3, P4, P5, P6, str) FUT_DO_PROBE6STR(CODE, P1, P2, P3, P4, P5, P6, str)
  268. #else
  269. #define _STARPU_FUT_DO_PROBE6STR(CODE, P1, P2, P3, P4, P5, P6, str) \
  270. do { \
  271. if(fut_active) { \
  272. /* No more than FXT_MAX_PARAMS args are allowed */ \
  273. /* we add a \0 just in case ... */ \
  274. size_t len = STARPU_MIN(strlen(str)+1, (FXT_MAX_PARAMS - 6)*sizeof(unsigned long));\
  275. unsigned nbargs_str = (len + sizeof(unsigned long) - 1)/(sizeof(unsigned long));\
  276. unsigned nbargs = 6 + nbargs_str; \
  277. size_t total_len = FUT_SIZE(nbargs); \
  278. unsigned long *futargs = \
  279. fut_getstampedbuffer(FUT_CODE(CODE, nbargs), total_len);\
  280. *(futargs++) = (unsigned long)(P1); \
  281. *(futargs++) = (unsigned long)(P2); \
  282. *(futargs++) = (unsigned long)(P3); \
  283. *(futargs++) = (unsigned long)(P4); \
  284. *(futargs++) = (unsigned long)(P5); \
  285. *(futargs++) = (unsigned long)(P6); \
  286. snprintf((char *)futargs, len, "%s", str); \
  287. ((char *)futargs)[len - 1] = '\0'; \
  288. _STARPU_FUT_COMMIT(total_len); \
  289. } \
  290. } while (0);
  291. #endif
  292. #ifdef FUT_DO_PROBE7STR
  293. #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)
  294. #else
  295. #define _STARPU_FUT_DO_PROBE7STR(CODE, P1, P2, P3, P4, P5, P6, P7, str) \
  296. do { \
  297. if(fut_active) { \
  298. /* No more than FXT_MAX_PARAMS args are allowed */ \
  299. /* we add a \0 just in case ... */ \
  300. size_t len = STARPU_MIN(strlen(str)+1, (FXT_MAX_PARAMS - 7)*sizeof(unsigned long));\
  301. unsigned nbargs_str = (len + sizeof(unsigned long) - 1)/(sizeof(unsigned long));\
  302. unsigned nbargs = 7 + nbargs_str; \
  303. size_t total_len = FUT_SIZE(nbargs); \
  304. unsigned long *futargs = \
  305. fut_getstampedbuffer(FUT_CODE(CODE, nbargs), total_len);\
  306. *(futargs++) = (unsigned long)(P1); \
  307. *(futargs++) = (unsigned long)(P2); \
  308. *(futargs++) = (unsigned long)(P3); \
  309. *(futargs++) = (unsigned long)(P4); \
  310. *(futargs++) = (unsigned long)(P5); \
  311. *(futargs++) = (unsigned long)(P6); \
  312. *(futargs++) = (unsigned long)(P7); \
  313. snprintf((char *)futargs, len, "%s", str); \
  314. ((char *)futargs)[len - 1] = '\0'; \
  315. _STARPU_FUT_COMMIT(total_len); \
  316. } \
  317. } while (0);
  318. #endif
  319. #ifndef FUT_RAW_PROBE7
  320. #define FUT_RAW_PROBE7(CODE,P1,P2,P3,P4,P5,P6,P7) do { \
  321. if(fut_active) { \
  322. unsigned long *__args __attribute__((unused))= \
  323. fut_getstampedbuffer(CODE, \
  324. FUT_SIZE(7)); \
  325. *(__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); \
  326. _STARPU_FUT_COMMIT(FUT_SIZE(7)); \
  327. } \
  328. } while (0)
  329. #endif
  330. #ifndef FUT_DO_PROBE7
  331. #define FUT_DO_PROBE7(CODE,P1,P2,P3,P4,P5,P6,P7) do { \
  332. FUT_RAW_PROBE7(FUT_CODE(CODE, 7),P1,P2,P3,P4,P5,P6,P7); \
  333. } while (0)
  334. #endif
  335. /* workerkind = _STARPU_FUT_CPU_KEY for instance */
  336. #define _STARPU_TRACE_NEW_MEM_NODE(nodeid) \
  337. FUT_DO_PROBE2(_STARPU_FUT_NEW_MEM_NODE, nodeid, _starpu_gettid());
  338. #define _STARPU_TRACE_WORKER_INIT_START(workerkind, workerid, devid, memnode) \
  339. FUT_DO_PROBE5(_STARPU_FUT_WORKER_INIT_START, workerkind, workerid, devid, memnode, _starpu_gettid());
  340. #define _STARPU_TRACE_WORKER_INIT_END(workerid) \
  341. FUT_DO_PROBE2(_STARPU_FUT_WORKER_INIT_END, _starpu_gettid(), (workerid));
  342. #define _STARPU_TRACE_START_CODELET_BODY(job, nimpl, archtype, workerid) \
  343. do { \
  344. const char *model_name = _starpu_job_get_model_name((job)); \
  345. if (model_name) \
  346. { \
  347. /* we include the symbol name */ \
  348. _STARPU_FUT_DO_PROBE4STR(_STARPU_FUT_START_CODELET_BODY, (job), ((job)->task)->sched_ctx, workerid, 1, model_name); \
  349. } \
  350. else { \
  351. FUT_DO_PROBE4(_STARPU_FUT_START_CODELET_BODY, (job), ((job)->task)->sched_ctx, workerid, 0); \
  352. } \
  353. { \
  354. if ((job)->task->cl) \
  355. { \
  356. const int __nbuffers = (job)->task->cl->nbuffers; \
  357. char __buf[FXT_MAX_PARAMS*sizeof(long)]; \
  358. int __i; \
  359. for (__i = 0; __i < __nbuffers; __i++) \
  360. { \
  361. starpu_data_handle_t __handle = STARPU_TASK_GET_HANDLE((job)->task, __i); \
  362. void *__interface = _STARPU_TASK_GET_INTERFACES((job)->task)[__i]; \
  363. if (__handle->ops->describe) \
  364. { \
  365. __handle->ops->describe(__interface, __buf, sizeof(__buf)); \
  366. _STARPU_FUT_DO_PROBE1STR(_STARPU_FUT_CODELET_DATA, workerid, __buf); \
  367. } \
  368. } \
  369. } \
  370. const size_t __job_size = _starpu_job_get_data_size((job)->task->cl?(job)->task->cl->model:NULL, archtype, nimpl, (job)); \
  371. const uint32_t __job_hash = _starpu_compute_buffers_footprint((job)->task->cl?(job)->task->cl->model:NULL, archtype, nimpl, (job));\
  372. FUT_DO_PROBE6(_STARPU_FUT_CODELET_DETAILS, (job), ((job)->task)->sched_ctx, __job_size, __job_hash, (job)->task->tag_id, workerid); \
  373. } \
  374. } while(0);
  375. #define _STARPU_TRACE_END_CODELET_BODY(job, nimpl, archtype, workerid) \
  376. do { \
  377. const size_t job_size = _starpu_job_get_data_size((job)->task->cl?(job)->task->cl->model:NULL, archtype, nimpl, (job)); \
  378. const uint32_t job_hash = _starpu_compute_buffers_footprint((job)->task->cl?(job)->task->cl->model:NULL, archtype, nimpl, (job));\
  379. FUT_DO_PROBE7(_STARPU_FUT_END_CODELET_BODY, (job), (job_size), (job_hash), (archtype)->type, (archtype)->devid, (archtype)->ncore, workerid); \
  380. } while(0);
  381. #define _STARPU_TRACE_START_EXECUTING() \
  382. FUT_DO_PROBE1(_STARPU_FUT_START_EXECUTING, _starpu_gettid());
  383. #define _STARPU_TRACE_END_EXECUTING() \
  384. FUT_DO_PROBE1(_STARPU_FUT_END_EXECUTING, _starpu_gettid());
  385. #define _STARPU_TRACE_START_CALLBACK(job) \
  386. FUT_DO_PROBE2(_STARPU_FUT_START_CALLBACK, job, _starpu_gettid());
  387. #define _STARPU_TRACE_END_CALLBACK(job) \
  388. FUT_DO_PROBE2(_STARPU_FUT_END_CALLBACK, job, _starpu_gettid());
  389. #define _STARPU_TRACE_JOB_PUSH(task, prio) \
  390. FUT_DO_PROBE3(_STARPU_FUT_JOB_PUSH, task, prio, _starpu_gettid());
  391. #define _STARPU_TRACE_JOB_POP(task, prio) \
  392. FUT_DO_PROBE3(_STARPU_FUT_JOB_POP, task, prio, _starpu_gettid());
  393. #define _STARPU_TRACE_UPDATE_TASK_CNT(counter) \
  394. FUT_DO_PROBE2(_STARPU_FUT_UPDATE_TASK_CNT, counter, _starpu_gettid())
  395. #define _STARPU_TRACE_START_FETCH_INPUT(job) \
  396. FUT_DO_PROBE2(_STARPU_FUT_START_FETCH_INPUT, job, _starpu_gettid());
  397. #define _STARPU_TRACE_END_FETCH_INPUT(job) \
  398. FUT_DO_PROBE2(_STARPU_FUT_END_FETCH_INPUT, job, _starpu_gettid());
  399. #define _STARPU_TRACE_START_PUSH_OUTPUT(job) \
  400. FUT_DO_PROBE2(_STARPU_FUT_START_PUSH_OUTPUT, job, _starpu_gettid());
  401. #define _STARPU_TRACE_END_PUSH_OUTPUT(job) \
  402. FUT_DO_PROBE2(_STARPU_FUT_END_PUSH_OUTPUT, job, _starpu_gettid());
  403. #define _STARPU_TRACE_TAG(tag, job) \
  404. FUT_DO_PROBE2(_STARPU_FUT_TAG, tag, (job)->job_id)
  405. #define _STARPU_TRACE_TAG_DEPS(tag_child, tag_father) \
  406. FUT_DO_PROBE2(_STARPU_FUT_TAG_DEPS, tag_child, tag_father)
  407. #define _STARPU_TRACE_TASK_DEPS(job_prev, job_succ) \
  408. FUT_DO_PROBE2(_STARPU_FUT_TASK_DEPS, (job_prev)->job_id, (job_succ)->job_id)
  409. #define _STARPU_TRACE_GHOST_TASK_DEPS(ghost_prev_id, job_succ_id) \
  410. FUT_DO_PROBE2(_STARPU_FUT_TASK_DEPS, (ghost_prev_id), (job_succ_id))
  411. #define _STARPU_TRACE_TASK_DONE(job) \
  412. do { \
  413. unsigned exclude_from_dag = (job)->exclude_from_dag; \
  414. const char *model_name = _starpu_job_get_model_name((job)); \
  415. if (model_name) \
  416. { \
  417. _STARPU_FUT_DO_PROBE4STR(_STARPU_FUT_TASK_DONE, (job)->job_id, _starpu_gettid(), (long unsigned)exclude_from_dag, 1, model_name);\
  418. } \
  419. else { \
  420. FUT_DO_PROBE4(_STARPU_FUT_TASK_DONE, (job)->job_id, _starpu_gettid(), (long unsigned)exclude_from_dag, 0);\
  421. } \
  422. } while(0);
  423. #define _STARPU_TRACE_TAG_DONE(tag) \
  424. do { \
  425. struct _starpu_job *job = (tag)->job; \
  426. const char *model_name = _starpu_job_get_model_name((job)); \
  427. if (model_name) \
  428. { \
  429. _STARPU_FUT_DO_PROBE3STR(_STARPU_FUT_TAG_DONE, (tag)->id, _starpu_gettid(), 1, model_name); \
  430. } \
  431. else { \
  432. FUT_DO_PROBE3(_STARPU_FUT_TAG_DONE, (tag)->id, _starpu_gettid(), 0);\
  433. } \
  434. } while(0);
  435. #define _STARPU_TRACE_DATA_COPY(src_node, dst_node, size) \
  436. FUT_DO_PROBE3(_STARPU_FUT_DATA_COPY, src_node, dst_node, size)
  437. #define _STARPU_TRACE_START_DRIVER_COPY(src_node, dst_node, size, com_id) \
  438. FUT_DO_PROBE4(_STARPU_FUT_START_DRIVER_COPY, src_node, dst_node, size, com_id)
  439. #define _STARPU_TRACE_END_DRIVER_COPY(src_node, dst_node, size, com_id) \
  440. FUT_DO_PROBE4(_STARPU_FUT_END_DRIVER_COPY, src_node, dst_node, size, com_id)
  441. #define _STARPU_TRACE_START_DRIVER_COPY_ASYNC(src_node, dst_node) \
  442. FUT_DO_PROBE2(_STARPU_FUT_START_DRIVER_COPY_ASYNC, src_node, dst_node)
  443. #define _STARPU_TRACE_END_DRIVER_COPY_ASYNC(src_node, dst_node) \
  444. FUT_DO_PROBE2(_STARPU_FUT_END_DRIVER_COPY_ASYNC, src_node, dst_node)
  445. #define _STARPU_TRACE_WORK_STEALING(empty_q, victim_q) \
  446. FUT_DO_PROBE2(_STARPU_FUT_WORK_STEALING, empty_q, victim_q)
  447. #define _STARPU_TRACE_WORKER_DEINIT_START \
  448. FUT_DO_PROBE1(_STARPU_FUT_WORKER_DEINIT_START, _starpu_gettid());
  449. #define _STARPU_TRACE_WORKER_DEINIT_END(workerkind) \
  450. FUT_DO_PROBE2(_STARPU_FUT_WORKER_DEINIT_END, workerkind, _starpu_gettid());
  451. #define _STARPU_TRACE_WORKER_SCHEDULING_START \
  452. FUT_DO_PROBE1(_STARPU_FUT_WORKER_SCHEDULING_START, _starpu_gettid());
  453. #define _STARPU_TRACE_WORKER_SCHEDULING_END \
  454. FUT_DO_PROBE1(_STARPU_FUT_WORKER_SCHEDULING_END, _starpu_gettid());
  455. #define _STARPU_TRACE_WORKER_SCHEDULING_PUSH \
  456. FUT_DO_PROBE1(_STARPU_FUT_WORKER_SCHEDULING_PUSH, _starpu_gettid());
  457. #define _STARPU_TRACE_WORKER_SCHEDULING_POP \
  458. FUT_DO_PROBE1(_STARPU_FUT_WORKER_SCHEDULING_POP, _starpu_gettid());
  459. #define _STARPU_TRACE_WORKER_SLEEP_START \
  460. FUT_DO_PROBE1(_STARPU_FUT_WORKER_SLEEP_START, _starpu_gettid());
  461. #define _STARPU_TRACE_WORKER_SLEEP_END \
  462. FUT_DO_PROBE1(_STARPU_FUT_WORKER_SLEEP_END, _starpu_gettid());
  463. #define _STARPU_TRACE_USER_DEFINED_START \
  464. FUT_DO_PROBE1(_STARPU_FUT_USER_DEFINED_START, _starpu_gettid());
  465. #define _STARPU_TRACE_USER_DEFINED_END \
  466. FUT_DO_PROBE1(_STARPU_FUT_USER_DEFINED_END, _starpu_gettid());
  467. #define _STARPU_TRACE_START_ALLOC(memnode, size) \
  468. FUT_DO_PROBE3(_STARPU_FUT_START_ALLOC, memnode, _starpu_gettid(), size);
  469. #define _STARPU_TRACE_END_ALLOC(memnode) \
  470. FUT_DO_PROBE2(_STARPU_FUT_END_ALLOC, memnode, _starpu_gettid());
  471. #define _STARPU_TRACE_START_ALLOC_REUSE(memnode, size) \
  472. FUT_DO_PROBE3(_STARPU_FUT_START_ALLOC_REUSE, memnode, _starpu_gettid(), size);
  473. #define _STARPU_TRACE_END_ALLOC_REUSE(memnode) \
  474. FUT_DO_PROBE2(_STARPU_FUT_END_ALLOC_REUSE, memnode, _starpu_gettid());
  475. #define _STARPU_TRACE_START_FREE(memnode, size) \
  476. FUT_DO_PROBE3(_STARPU_FUT_START_FREE, memnode, _starpu_gettid(), size);
  477. #define _STARPU_TRACE_END_FREE(memnode) \
  478. FUT_DO_PROBE2(_STARPU_FUT_END_FREE, memnode, _starpu_gettid());
  479. #define _STARPU_TRACE_START_WRITEBACK(memnode) \
  480. FUT_DO_PROBE2(_STARPU_FUT_START_WRITEBACK, memnode, _starpu_gettid());
  481. #define _STARPU_TRACE_END_WRITEBACK(memnode) \
  482. FUT_DO_PROBE2(_STARPU_FUT_END_WRITEBACK, memnode, _starpu_gettid());
  483. #define _STARPU_TRACE_START_MEMRECLAIM(memnode,is_prefetch) \
  484. FUT_DO_PROBE3(_STARPU_FUT_START_MEMRECLAIM, memnode, is_prefetch, _starpu_gettid());
  485. #define _STARPU_TRACE_END_MEMRECLAIM(memnode, is_prefetch) \
  486. FUT_DO_PROBE3(_STARPU_FUT_END_MEMRECLAIM, memnode, is_prefetch, _starpu_gettid());
  487. /* We skip these events becasue they are called so often that they cause FxT to
  488. * fail and make the overall trace unreadable anyway. */
  489. #define _STARPU_TRACE_START_PROGRESS(memnode) \
  490. do {} while (0)
  491. // FUT_DO_PROBE2(_STARPU_FUT_START_PROGRESS, memnode, _starpu_gettid());
  492. #define _STARPU_TRACE_END_PROGRESS(memnode) \
  493. do {} while (0)
  494. //FUT_DO_PROBE2(_STARPU_FUT_END_PROGRESS, memnode, _starpu_gettid());
  495. #define _STARPU_TRACE_USER_EVENT(code) \
  496. FUT_DO_PROBE2(_STARPU_FUT_USER_EVENT, code, _starpu_gettid());
  497. #define _STARPU_TRACE_SET_PROFILING(status) \
  498. FUT_DO_PROBE2(_STARPU_FUT_SET_PROFILING, status, _starpu_gettid());
  499. #define _STARPU_TRACE_TASK_WAIT_FOR_ALL \
  500. FUT_DO_PROBE0(_STARPU_FUT_TASK_WAIT_FOR_ALL)
  501. #define _STARPU_TRACE_EVENT(S) \
  502. FUT_DO_PROBESTR(_STARPU_FUT_EVENT,S)
  503. #define _STARPU_TRACE_THREAD_EVENT(S) \
  504. _STARPU_FUT_DO_PROBE1STR(_STARPU_FUT_THREAD_EVENT, _starpu_gettid(), S)
  505. #define _STARPU_TRACE_HYPERVISOR_BEGIN() \
  506. FUT_DO_PROBE1(_STARPU_FUT_HYPERVISOR_BEGIN, _starpu_gettid());
  507. #define _STARPU_TRACE_HYPERVISOR_END() \
  508. FUT_DO_PROBE1(_STARPU_FUT_HYPERVISOR_END, _starpu_gettid());
  509. #ifdef STARPU_FXT_LOCK_TRACES
  510. #define _STARPU_TRACE_LOCKING_MUTEX() do { \
  511. const char *file; \
  512. file = strrchr(__FILE__,'/') + 1; \
  513. _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_LOCKING_MUTEX,__LINE__,_starpu_gettid(),file); \
  514. } while (0)
  515. #define _STARPU_TRACE_MUTEX_LOCKED() do { \
  516. const char *file; \
  517. file = strrchr(__FILE__,'/') + 1; \
  518. _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_MUTEX_LOCKED,__LINE__,_starpu_gettid(),file); \
  519. } while(0)
  520. #define _STARPU_TRACE_UNLOCKING_MUTEX() do { \
  521. const char *file; \
  522. file = strrchr(__FILE__,'/') + 1; \
  523. _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_UNLOCKING_MUTEX,__LINE__,_starpu_gettid(),file); \
  524. } while(0)
  525. #define _STARPU_TRACE_MUTEX_UNLOCKED() do {\
  526. const char *file; \
  527. file = strrchr(__FILE__,'/') + 1; \
  528. _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_MUTEX_UNLOCKED,__LINE__,_starpu_gettid(),file); \
  529. } while(0)
  530. #define _STARPU_TRACE_TRYLOCK_MUTEX() do { \
  531. const char *file; \
  532. file = strrchr(__FILE__,'/') + 1; \
  533. _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_TRYLOCK_MUTEX,__LINE__,_starpu_gettid(),file); \
  534. } while(0)
  535. #define _STARPU_TRACE_RDLOCKING_RWLOCK() do { \
  536. const char *file; \
  537. file = strrchr(__FILE__,'/') + 1; \
  538. _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_RDLOCKING_RWLOCK,__LINE__,_starpu_gettid(),file); \
  539. } while(0)
  540. #define _STARPU_TRACE_RWLOCK_RDLOCKED() do { \
  541. const char *file; \
  542. file = strrchr(__FILE__,'/') + 1; \
  543. _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_RWLOCK_RDLOCKED,__LINE__,_starpu_gettid(),file); \
  544. } while(0)
  545. #define _STARPU_TRACE_WRLOCKING_RWLOCK() do { \
  546. const char *file; \
  547. file = strrchr(__FILE__,'/') + 1; \
  548. _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_WRLOCKING_RWLOCK,__LINE__,_starpu_gettid(),file); \
  549. } while(0)
  550. #define _STARPU_TRACE_RWLOCK_WRLOCKED() do { \
  551. const char *file; \
  552. file = strrchr(__FILE__,'/') + 1; \
  553. _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_RWLOCK_WRLOCKED,__LINE__,_starpu_gettid(),file); \
  554. } while(0)
  555. #define _STARPU_TRACE_UNLOCKING_RWLOCK() do { \
  556. const char *file; \
  557. file = strrchr(__FILE__,'/') + 1; \
  558. _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_UNLOCKING_RWLOCK,__LINE__,_starpu_gettid(),file); \
  559. } while(0)
  560. #define _STARPU_TRACE_RWLOCK_UNLOCKED() do { \
  561. const char *file; \
  562. file = strrchr(__FILE__,'/') + 1; \
  563. _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_RWLOCK_UNLOCKED,__LINE__,_starpu_gettid(),file); \
  564. } while(0)
  565. #define STARPU_TRACE_SPINLOCK_CONDITITION (starpu_worker_get_type(starpu_worker_get_id()) == STARPU_CUDA_WORKER)
  566. #define _STARPU_TRACE_LOCKING_SPINLOCK() do {\
  567. if (STARPU_TRACE_SPINLOCK_CONDITITION) { \
  568. const char *file; \
  569. file = strrchr(__FILE__,'/') + 1; \
  570. _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_LOCKING_SPINLOCK,__LINE__,_starpu_gettid(),file); \
  571. } \
  572. } while(0)
  573. #define _STARPU_TRACE_SPINLOCK_LOCKED() do { \
  574. if (STARPU_TRACE_SPINLOCK_CONDITITION) { \
  575. const char *file; \
  576. file = strrchr(__FILE__,'/') + 1; \
  577. _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_SPINLOCK_LOCKED,__LINE__,_starpu_gettid(),file); \
  578. } \
  579. } while(0)
  580. #define _STARPU_TRACE_UNLOCKING_SPINLOCK() do { \
  581. if (STARPU_TRACE_SPINLOCK_CONDITITION) { \
  582. const char *file; \
  583. file = strrchr(__FILE__,'/') + 1; \
  584. _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_UNLOCKING_SPINLOCK,__LINE__,_starpu_gettid(),file); \
  585. } \
  586. } while(0)
  587. #define _STARPU_TRACE_SPINLOCK_UNLOCKED() do { \
  588. if (STARPU_TRACE_SPINLOCK_CONDITITION) { \
  589. const char *file; \
  590. file = strrchr(__FILE__,'/') + 1; \
  591. _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_SPINLOCK_UNLOCKED,__LINE__,_starpu_gettid(),file); \
  592. } \
  593. } while(0)
  594. #define _STARPU_TRACE_TRYLOCK_SPINLOCK() do { \
  595. if (STARPU_TRACE_SPINLOCK_CONDITITION) { \
  596. const char *file; \
  597. file = strrchr(__FILE__,'/') + 1; \
  598. _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_TRYLOCK_SPINLOCK,__LINE__,_starpu_gettid(),file); \
  599. } \
  600. } while(0)
  601. #define _STARPU_TRACE_COND_WAIT_BEGIN() do { \
  602. const char *file; \
  603. file = strrchr(__FILE__,'/') + 1; \
  604. _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_COND_WAIT_BEGIN,__LINE__,_starpu_gettid(),file); \
  605. } while(0)
  606. #define _STARPU_TRACE_COND_WAIT_END() do { \
  607. const char *file; \
  608. file = strrchr(__FILE__,'/') + 1; \
  609. _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_COND_WAIT_END,__LINE__,_starpu_gettid(),file); \
  610. } while(0)
  611. #define _STARPU_TRACE_BARRIER_WAIT_BEGIN() do { \
  612. const char *file; \
  613. file = strrchr(__FILE__,'/') + 1; \
  614. _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_BARRIER_WAIT_BEGIN,__LINE__,_starpu_gettid(),file); \
  615. } while(0)
  616. #define _STARPU_TRACE_BARRIER_WAIT_END() do { \
  617. const char *file; \
  618. file = strrchr(__FILE__,'/') + 1; \
  619. _STARPU_FUT_DO_PROBE2STR(_STARPU_FUT_BARRIER_WAIT_END,__LINE__,_starpu_gettid(),file); \
  620. } while(0)
  621. #else // !STARPU_FXT_LOCK_TRACES
  622. #define _STARPU_TRACE_LOCKING_MUTEX() do {} while(0)
  623. #define _STARPU_TRACE_MUTEX_LOCKED() do {} while(0)
  624. #define _STARPU_TRACE_UNLOCKING_MUTEX() do {} while(0)
  625. #define _STARPU_TRACE_MUTEX_UNLOCKED() do {} while(0)
  626. #define _STARPU_TRACE_TRYLOCK_MUTEX() do {} while(0)
  627. #define _STARPU_TRACE_RDLOCKING_RWLOCK() do {} while(0)
  628. #define _STARPU_TRACE_RWLOCK_RDLOCKED() do {} while(0)
  629. #define _STARPU_TRACE_WRLOCKING_RWLOCK() do {} while(0)
  630. #define _STARPU_TRACE_RWLOCK_WRLOCKED() do {} while(0)
  631. #define _STARPU_TRACE_UNLOCKING_RWLOCK() do {} while(0)
  632. #define _STARPU_TRACE_RWLOCK_UNLOCKED() do {} while(0)
  633. #define _STARPU_TRACE_LOCKING_SPINLOCK() do {} while(0)
  634. #define _STARPU_TRACE_SPINLOCK_LOCKED() do {} while(0)
  635. #define _STARPU_TRACE_UNLOCKING_SPINLOCK() do {} while(0)
  636. #define _STARPU_TRACE_SPINLOCK_UNLOCKED() do {} while(0)
  637. #define _STARPU_TRACE_TRYLOCK_SPINLOCK() do {} while(0)
  638. #define _STARPU_TRACE_COND_WAIT_BEGIN() do {} while(0)
  639. #define _STARPU_TRACE_COND_WAIT_END() do {} while(0)
  640. #define _STARPU_TRACE_BARRIER_WAIT_BEGIN() do {} while(0)
  641. #define _STARPU_TRACE_BARRIER_WAIT_END() do {} while(0)
  642. #endif // STARPU_FXT_LOCK_TRACES
  643. #define _STARPU_TRACE_MEMORY_FULL(size) \
  644. FUT_DO_PROBE2(_STARPU_FUT_MEMORY_FULL,size,_starpu_gettid());
  645. #define _STARPU_TRACE_DATA_LOAD(workerid,size) \
  646. FUT_DO_PROBE2(_STARPU_FUT_DATA_LOAD, workerid, size);
  647. #define _STARPU_TRACE_START_UNPARTITION(handle, memnode) \
  648. FUT_DO_PROBE3(_STARPU_FUT_START_UNPARTITION, memnode, _starpu_gettid(), handle);
  649. #define _STARPU_TRACE_END_UNPARTITION(handle, memnode) \
  650. FUT_DO_PROBE3(_STARPU_FUT_END_UNPARTITION, memnode, _starpu_gettid(), handle);
  651. #else // !STARPU_USE_FXT
  652. /* Dummy macros in case FxT is disabled */
  653. #define _STARPU_TRACE_NEW_MEM_NODE(nodeid) do {} while(0)
  654. #define _STARPU_TRACE_WORKER_INIT_START(a,b,c) do {} while(0)
  655. #define _STARPU_TRACE_WORKER_INIT_END(workerid) do {} while(0)
  656. #define _STARPU_TRACE_START_CODELET_BODY(job, nimpl, archtype, workerid) do {} while(0)
  657. #define _STARPU_TRACE_END_CODELET_BODY(job, nimpl, a, workerid) do {} while(0)
  658. #define _STARPU_TRACE_START_EXECUTING() do {} while(0)
  659. #define _STARPU_TRACE_END_EXECUTING() do {} while(0)
  660. #define _STARPU_TRACE_START_CALLBACK(job) do {} while(0)
  661. #define _STARPU_TRACE_END_CALLBACK(job) do {} while(0)
  662. #define _STARPU_TRACE_JOB_PUSH(task, prio) do {} while(0)
  663. #define _STARPU_TRACE_JOB_POP(task, prio) do {} while(0)
  664. #define _STARPU_TRACE_UPDATE_TASK_CNT(counter) do {} while(0)
  665. #define _STARPU_TRACE_START_FETCH_INPUT(job) do {} while(0)
  666. #define _STARPU_TRACE_END_FETCH_INPUT(job) do {} while(0)
  667. #define _STARPU_TRACE_START_PUSH_OUTPUT(job) do {} while(0)
  668. #define _STARPU_TRACE_END_PUSH_OUTPUT(job) do {} while(0)
  669. #define _STARPU_TRACE_TAG(tag, job) do {} while(0)
  670. #define _STARPU_TRACE_TAG_DEPS(a, b) do {} while(0)
  671. #define _STARPU_TRACE_TASK_DEPS(a, b) do {} while(0)
  672. #define _STARPU_TRACE_GHOST_TASK_DEPS(a, b) do {} while(0)
  673. #define _STARPU_TRACE_TASK_DONE(a) do {} while(0)
  674. #define _STARPU_TRACE_TAG_DONE(a) do {} while(0)
  675. #define _STARPU_TRACE_DATA_COPY(a, b, c) do {} while(0)
  676. #define _STARPU_TRACE_START_DRIVER_COPY(a,b,c,d) do {} while(0)
  677. #define _STARPU_TRACE_END_DRIVER_COPY(a,b,c,d) do {} while(0)
  678. #define _STARPU_TRACE_START_DRIVER_COPY_ASYNC(a,b) do {} while(0)
  679. #define _STARPU_TRACE_END_DRIVER_COPY_ASYNC(a,b) do {} while(0)
  680. #define _STARPU_TRACE_WORK_STEALING(a, b) do {} while(0)
  681. #define _STARPU_TRACE_WORKER_DEINIT_START do {} while(0)
  682. #define _STARPU_TRACE_WORKER_DEINIT_END(a) do {} while(0)
  683. #define _STARPU_TRACE_WORKER_SCHEDULING_START do {} while(0)
  684. #define _STARPU_TRACE_WORKER_SCHEDULING_END do {} while(0)
  685. #define _STARPU_TRACE_WORKER_SCHEDULING_PUSH do {} while(0)
  686. #define _STARPU_TRACE_WORKER_SCHEDULING_POP do {} while(0)
  687. #define _STARPU_TRACE_WORKER_SLEEP_START do {} while(0)
  688. #define _STARPU_TRACE_WORKER_SLEEP_END do {} while(0)
  689. #define _STARPU_TRACE_USER_DEFINED_START do {} while(0)
  690. #define _STARPU_TRACE_USER_DEFINED_END do {} while(0)
  691. #define _STARPU_TRACE_START_ALLOC(memnode, size) do {} while(0)
  692. #define _STARPU_TRACE_END_ALLOC(memnode) do {} while(0)
  693. #define _STARPU_TRACE_START_ALLOC_REUSE(a, size) do {} while(0)
  694. #define _STARPU_TRACE_END_ALLOC_REUSE(a) do {} while(0)
  695. #define _STARPU_TRACE_START_FREE(memnode, size) do {} while(0)
  696. #define _STARPU_TRACE_END_FREE(memnode) do {} while(0)
  697. #define _STARPU_TRACE_START_WRITEBACK(memnode) do {} while(0)
  698. #define _STARPU_TRACE_END_WRITEBACK(memnode) do {} while(0)
  699. #define _STARPU_TRACE_START_MEMRECLAIM(memnode,is_prefetch) do {} while(0)
  700. #define _STARPU_TRACE_END_MEMRECLAIM(memnode,is_prefetch) do {} while(0)
  701. #define _STARPU_TRACE_START_PROGRESS(memnode) do {} while(0)
  702. #define _STARPU_TRACE_END_PROGRESS(memnode) do {} while(0)
  703. #define _STARPU_TRACE_USER_EVENT(code) do {} while(0)
  704. #define _STARPU_TRACE_SET_PROFILING(status) do {} while(0)
  705. #define _STARPU_TRACE_TASK_WAIT_FOR_ALL do {} while(0)
  706. #define _STARPU_TRACE_EVENT(S) do {} while(0)
  707. #define _STARPU_TRACE_THREAD_EVENT(S) do {} while(0)
  708. #define _STARPU_TRACE_LOCKING_MUTEX() do {} while(0)
  709. #define _STARPU_TRACE_MUTEX_LOCKED() do {} while(0)
  710. #define _STARPU_TRACE_UNLOCKING_MUTEX() do {} while(0)
  711. #define _STARPU_TRACE_MUTEX_UNLOCKED() do {} while(0)
  712. #define _STARPU_TRACE_TRYLOCK_MUTEX() do {} while(0)
  713. #define _STARPU_TRACE_RDLOCKING_RWLOCK() do {} while(0)
  714. #define _STARPU_TRACE_RWLOCK_RDLOCKED() do {} while(0)
  715. #define _STARPU_TRACE_WRLOCKING_RWLOCK() do {} while(0)
  716. #define _STARPU_TRACE_RWLOCK_WRLOCKED() do {} while(0)
  717. #define _STARPU_TRACE_UNLOCKING_RWLOCK() do {} while(0)
  718. #define _STARPU_TRACE_RWLOCK_UNLOCKED() do {} while(0)
  719. #define _STARPU_TRACE_LOCKING_SPINLOCK() do {} while(0)
  720. #define _STARPU_TRACE_SPINLOCK_LOCKED() do {} while(0)
  721. #define _STARPU_TRACE_UNLOCKING_SPINLOCK() do {} while(0)
  722. #define _STARPU_TRACE_SPINLOCK_UNLOCKED() do {} while(0)
  723. #define _STARPU_TRACE_TRYLOCK_SPINLOCK() do {} while(0)
  724. #define _STARPU_TRACE_COND_WAIT_BEGIN() do {} while(0)
  725. #define _STARPU_TRACE_COND_WAIT_END() do {} while(0)
  726. #define _STARPU_TRACE_BARRIER_WAIT_BEGIN() do {} while(0)
  727. #define _STARPU_TRACE_BARRIER_WAIT_END() do {} while(0)
  728. #define _STARPU_TRACE_MEMORY_FULL(size) do {} while(0)
  729. #define _STARPU_TRACE_DATA_LOAD(workerid,size) do {} while(0)
  730. #define _STARPU_TRACE_START_UNPARTITION(handle, memnode) do {} while(0)
  731. #define _STARPU_TRACE_END_UNPARTITION(handle, memnode) do {} while(0)
  732. #define _STARPU_TRACE_HYPERVISOR_BEGIN() do {} while(0)
  733. #define _STARPU_TRACE_HYPERVISOR_END() do {} while(0)
  734. #endif // STARPU_USE_FXT
  735. #endif // __FXT_H__