@@ -132,7 +132,7 @@ EXTERN void __tgt_target_data_begin_mapper(ident_t *loc, int64_t device_id,
132
132
int64_t *arg_types,
133
133
map_var_info_t *arg_names,
134
134
void **arg_mappers) {
135
- TIMESCOPE ( );
135
+ TIMESCOPE_WITH_IDENT (loc );
136
136
if (IsOffloadDisabled ()) return ;
137
137
138
138
DP (" Entering data begin region for device %" PRId64 " with %d mappings\n " ,
@@ -164,7 +164,7 @@ EXTERN void __tgt_target_data_begin_mapper(ident_t *loc, int64_t device_id,
164
164
}
165
165
#endif
166
166
167
- int rc = targetDataBegin (Device, arg_num, args_base, args, arg_sizes,
167
+ int rc = targetDataBegin (loc, Device, arg_num, args_base, args, arg_sizes,
168
168
arg_types, arg_names, arg_mappers, nullptr );
169
169
HandleTargetOutcome (rc == OFFLOAD_SUCCESS, loc);
170
170
}
@@ -174,7 +174,7 @@ EXTERN void __tgt_target_data_begin_nowait_mapper(
174
174
void **args, int64_t *arg_sizes, int64_t *arg_types,
175
175
map_var_info_t *arg_names, void **arg_mappers, int32_t depNum,
176
176
void *depList, int32_t noAliasDepNum, void *noAliasDepList) {
177
- TIMESCOPE ( );
177
+ TIMESCOPE_WITH_IDENT (loc );
178
178
if (depNum + noAliasDepNum > 0 )
179
179
__kmpc_omp_taskwait (loc, __kmpc_global_thread_num (loc));
180
180
@@ -210,7 +210,7 @@ EXTERN void __tgt_target_data_end_mapper(ident_t *loc, int64_t device_id,
210
210
int64_t *arg_types,
211
211
map_var_info_t *arg_names,
212
212
void **arg_mappers) {
213
- TIMESCOPE ( );
213
+ TIMESCOPE_WITH_IDENT (loc );
214
214
if (IsOffloadDisabled ()) return ;
215
215
DP (" Entering data end region with %d mappings\n " , arg_num);
216
216
@@ -247,8 +247,8 @@ EXTERN void __tgt_target_data_end_mapper(ident_t *loc, int64_t device_id,
247
247
}
248
248
#endif
249
249
250
- int rc = targetDataEnd (Device, arg_num, args_base, args, arg_sizes, arg_types ,
251
- arg_names, arg_mappers, nullptr );
250
+ int rc = targetDataEnd (loc, Device, arg_num, args_base, args, arg_sizes,
251
+ arg_types, arg_names, arg_mappers, nullptr );
252
252
HandleTargetOutcome (rc == OFFLOAD_SUCCESS, loc);
253
253
}
254
254
@@ -257,7 +257,7 @@ EXTERN void __tgt_target_data_end_nowait_mapper(
257
257
void **args, int64_t *arg_sizes, int64_t *arg_types,
258
258
map_var_info_t *arg_names, void **arg_mappers, int32_t depNum,
259
259
void *depList, int32_t noAliasDepNum, void *noAliasDepList) {
260
- TIMESCOPE ( );
260
+ TIMESCOPE_WITH_IDENT (loc );
261
261
if (depNum + noAliasDepNum > 0 )
262
262
__kmpc_omp_taskwait (loc, __kmpc_global_thread_num (loc));
263
263
@@ -290,7 +290,7 @@ EXTERN void __tgt_target_data_update_mapper(ident_t *loc, int64_t device_id,
290
290
int64_t *arg_types,
291
291
map_var_info_t *arg_names,
292
292
void **arg_mappers) {
293
- TIMESCOPE ( );
293
+ TIMESCOPE_WITH_IDENT (loc );
294
294
if (IsOffloadDisabled ()) return ;
295
295
DP (" Entering data update with %d mappings\n " , arg_num);
296
296
@@ -310,7 +310,7 @@ EXTERN void __tgt_target_data_update_mapper(ident_t *loc, int64_t device_id,
310
310
arg_names, " Updating OpenMP data" );
311
311
312
312
DeviceTy &Device = PM->Devices [device_id];
313
- int rc = targetDataUpdate (Device, arg_num, args_base, args, arg_sizes,
313
+ int rc = targetDataUpdate (loc, Device, arg_num, args_base, args, arg_sizes,
314
314
arg_types, arg_names, arg_mappers);
315
315
HandleTargetOutcome (rc == OFFLOAD_SUCCESS, loc);
316
316
}
@@ -320,7 +320,7 @@ EXTERN void __tgt_target_data_update_nowait_mapper(
320
320
void **args, int64_t *arg_sizes, int64_t *arg_types,
321
321
map_var_info_t *arg_names, void **arg_mappers, int32_t depNum,
322
322
void *depList, int32_t noAliasDepNum, void *noAliasDepList) {
323
- TIMESCOPE ( );
323
+ TIMESCOPE_WITH_IDENT (loc );
324
324
if (depNum + noAliasDepNum > 0 )
325
325
__kmpc_omp_taskwait (loc, __kmpc_global_thread_num (loc));
326
326
@@ -351,7 +351,7 @@ EXTERN int __tgt_target_mapper(ident_t *loc, int64_t device_id, void *host_ptr,
351
351
int32_t arg_num, void **args_base, void **args,
352
352
int64_t *arg_sizes, int64_t *arg_types,
353
353
map_var_info_t *arg_names, void **arg_mappers) {
354
- TIMESCOPE ( );
354
+ TIMESCOPE_WITH_IDENT (loc );
355
355
if (IsOffloadDisabled ()) return OFFLOAD_FAIL;
356
356
DP (" Entering target region with entry point " DPxMOD " and device Id %"
357
357
PRId64 " \n " , DPxPTR (host_ptr), device_id);
@@ -378,7 +378,7 @@ EXTERN int __tgt_target_mapper(ident_t *loc, int64_t device_id, void *host_ptr,
378
378
}
379
379
#endif
380
380
381
- int rc = target (device_id, host_ptr, arg_num, args_base, args, arg_sizes,
381
+ int rc = target (loc, device_id, host_ptr, arg_num, args_base, args, arg_sizes,
382
382
arg_types, arg_names, arg_mappers, 0 , 0 , false /* team*/ );
383
383
HandleTargetOutcome (rc == OFFLOAD_SUCCESS, loc);
384
384
return rc;
@@ -389,7 +389,7 @@ EXTERN int __tgt_target_nowait_mapper(
389
389
void **args_base, void **args, int64_t *arg_sizes, int64_t *arg_types,
390
390
map_var_info_t *arg_names, void **arg_mappers, int32_t depNum,
391
391
void *depList, int32_t noAliasDepNum, void *noAliasDepList) {
392
- TIMESCOPE ( );
392
+ TIMESCOPE_WITH_IDENT (loc );
393
393
if (depNum + noAliasDepNum > 0 )
394
394
__kmpc_omp_taskwait (loc, __kmpc_global_thread_num (loc));
395
395
@@ -426,7 +426,6 @@ EXTERN int __tgt_target_teams_mapper(ident_t *loc, int64_t device_id,
426
426
map_var_info_t *arg_names,
427
427
void **arg_mappers, int32_t team_num,
428
428
int32_t thread_limit) {
429
- TIMESCOPE ();
430
429
if (IsOffloadDisabled ()) return OFFLOAD_FAIL;
431
430
DP (" Entering target region with entry point " DPxMOD " and device Id %"
432
431
PRId64 " \n " , DPxPTR (host_ptr), device_id);
@@ -453,7 +452,7 @@ EXTERN int __tgt_target_teams_mapper(ident_t *loc, int64_t device_id,
453
452
}
454
453
#endif
455
454
456
- int rc = target (device_id, host_ptr, arg_num, args_base, args, arg_sizes,
455
+ int rc = target (loc, device_id, host_ptr, arg_num, args_base, args, arg_sizes,
457
456
arg_types, arg_names, arg_mappers, team_num, thread_limit,
458
457
true /* team*/ );
459
458
HandleTargetOutcome (rc == OFFLOAD_SUCCESS, loc);
@@ -466,7 +465,7 @@ EXTERN int __tgt_target_teams_nowait_mapper(
466
465
map_var_info_t *arg_names, void **arg_mappers, int32_t team_num,
467
466
int32_t thread_limit, int32_t depNum, void *depList, int32_t noAliasDepNum,
468
467
void *noAliasDepList) {
469
- TIMESCOPE ( );
468
+ TIMESCOPE_WITH_IDENT (loc );
470
469
if (depNum + noAliasDepNum > 0 )
471
470
__kmpc_omp_taskwait (loc, __kmpc_global_thread_num (loc));
472
471
@@ -502,7 +501,7 @@ EXTERN void __tgt_push_mapper_component(void *rt_mapper_handle, void *base,
502
501
503
502
EXTERN void __kmpc_push_target_tripcount (ident_t *loc, int64_t device_id,
504
503
uint64_t loop_tripcount) {
505
- TIMESCOPE ( );
504
+ TIMESCOPE_WITH_IDENT (loc );
506
505
if (IsOffloadDisabled ())
507
506
return ;
508
507
0 commit comments