@@ -266,7 +266,7 @@ __kmp_GOMP_microtask_wrapper(int *gtid, int *npr, void (*task)(void *),
266266
267267 // set task frame
268268 ompt_frame = __ompt_get_task_frame_internal (0 );
269- ompt_frame -> exit_runtime_frame = __builtin_frame_address (0 );
269+ ompt_frame -> exit_runtime_frame = __builtin_frame_address (1 );
270270 }
271271#endif
272272
@@ -311,7 +311,7 @@ __kmp_GOMP_parallel_microtask_wrapper(int *gtid, int *npr,
311311
312312 // set task frame
313313 ompt_frame = __ompt_get_task_frame_internal (0 );
314- ompt_frame -> exit_runtime_frame = __builtin_frame_address (0 );
314+ ompt_frame -> exit_runtime_frame = __builtin_frame_address (1 );
315315 }
316316#endif
317317
@@ -446,7 +446,7 @@ xexpand(KMP_API_NAME_GOMP_PARALLEL_START)(void (*task)(void *), void *data, unsi
446446
447447 if (ompt_enabled ) {
448448 parent_frame = __ompt_get_task_frame_internal (0 );
449- parent_frame -> reenter_runtime_frame = __builtin_frame_address (0 );
449+ parent_frame -> reenter_runtime_frame = __builtin_frame_address (1 );
450450 }
451451#endif
452452
@@ -499,7 +499,7 @@ xexpand(KMP_API_NAME_GOMP_PARALLEL_END)(void)
499499 // Record that we re-entered the runtime system in the implicit
500500 // task frame representing the parallel region.
501501 ompt_frame = & task_info -> frame ;
502- ompt_frame -> reenter_runtime_frame = __builtin_frame_address (0 );
502+ ompt_frame -> reenter_runtime_frame = __builtin_frame_address (1 );
503503
504504 // unlink if necessary. no-op if there is not a lightweight task.
505505 ompt_lw_taskteam_t * lwt = __ompt_lw_taskteam_unlink (thr );
@@ -513,7 +513,7 @@ xexpand(KMP_API_NAME_GOMP_PARALLEL_END)(void)
513513 // remaining deepest task knows the stack frame where the runtime
514514 // was reentered.
515515 ompt_frame = __ompt_get_task_frame_internal (0 );
516- ompt_frame -> reenter_runtime_frame = __builtin_frame_address (0 );
516+ ompt_frame -> reenter_runtime_frame = __builtin_frame_address (1 );
517517 }
518518#endif
519519 }
@@ -529,7 +529,7 @@ xexpand(KMP_API_NAME_GOMP_PARALLEL_END)(void)
529529 // Set reenter frame in parent task, which will become current task
530530 // in the midst of join. This is needed before the end_parallel callback.
531531 ompt_frame = __ompt_get_task_frame_internal (1 );
532- ompt_frame -> reenter_runtime_frame = __builtin_frame_address (0 );
532+ ompt_frame -> reenter_runtime_frame = __builtin_frame_address (1 );
533533 }
534534#endif
535535
@@ -559,7 +559,7 @@ xexpand(KMP_API_NAME_GOMP_PARALLEL_END)(void)
559559 if (ompt_enabled ) {
560560 // Record that we re-entered the runtime system in the frame that
561561 // created the parallel region.
562- ompt_frame -> reenter_runtime_frame = __builtin_frame_address (0 );
562+ ompt_frame -> reenter_runtime_frame = __builtin_frame_address (1 );
563563
564564 if (ompt_callbacks .ompt_callback (ompt_event_parallel_end )) {
565565 ompt_task_info_t * task_info = __ompt_get_taskinfo (0 );
@@ -907,7 +907,7 @@ LOOP_NEXT_ULL(xexpand(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_RUNTIME_NEXT), \
907907 ompt_frame_t *parent_frame; \
908908 if (ompt_enabled) { \
909909 parent_frame = __ompt_get_task_frame_internal(0); \
910- parent_frame->reenter_runtime_frame = __builtin_frame_address(0 ); \
910+ parent_frame->reenter_runtime_frame = __builtin_frame_address(1 ); \
911911 }
912912
913913
@@ -1000,7 +1000,7 @@ xexpand(KMP_API_NAME_GOMP_TASK)(void (*func)(void *), void *data, void (*copy_fu
10001000 thread -> th .ompt_thread_info .wait_id = 0 ;
10011001 thread -> th .ompt_thread_info .state = ompt_state_work_parallel ;
10021002 taskdata -> ompt_task_info .frame .exit_runtime_frame =
1003- __builtin_frame_address (0 );
1003+ __builtin_frame_address (1 );
10041004 }
10051005#endif
10061006
@@ -1110,7 +1110,7 @@ xexpand(KMP_API_NAME_GOMP_PARALLEL_SECTIONS_START)(void (*task) (void *), void *
11101110
11111111 if (ompt_enabled ) {
11121112 parent_frame = __ompt_get_task_frame_internal (0 );
1113- parent_frame -> reenter_runtime_frame = __builtin_frame_address (0 );
1113+ parent_frame -> reenter_runtime_frame = __builtin_frame_address (1 );
11141114 }
11151115#endif
11161116
0 commit comments