[all-commits] [llvm/llvm-project] 0d7f23: [libomptarget] [OMPT] Fixed return address computa...
dhruvachak via All-commits
all-commits at lists.llvm.org
Wed Feb 7 17:29:20 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0d7f232baf6103529844c8977324bd45b21ad923
https://github.com/llvm/llvm-project/commit/0d7f232baf6103529844c8977324bd45b21ad923
Author: dhruvachak <Dhruva.Chakrabarti at amd.com>
Date: 2024-02-07 (Wed, 07 Feb 2024)
Changed paths:
M openmp/libomptarget/include/OpenMP/OMPT/Interface.h
M openmp/libomptarget/src/LegacyAPI.cpp
M openmp/libomptarget/src/OpenMP/API.cpp
M openmp/libomptarget/src/OpenMP/OMPT/Callback.cpp
M openmp/libomptarget/src/device.cpp
M openmp/libomptarget/src/interface.cpp
M openmp/libomptarget/test/ompt/callbacks.h
A openmp/libomptarget/test/ompt/target_memcpy.c
M openmp/libomptarget/test/ompt/veccopy.c
M openmp/libomptarget/test/ompt/veccopy_data.c
M openmp/libomptarget/test/ompt/veccopy_emi.c
Log Message:
-----------
[libomptarget] [OMPT] Fixed return address computation for OMPT events. (#80498)
Currently, __builtin_return_address is used to generate the return
address when the callback invoker is created. However, this may result
in the return address pointing to an internal runtime function. This is
not what a tool would typically want. A tool would want to know the
corresponding user code from where the runtime entry point is invoked.
This change adds a thread local variable that is assigned the return
address at the OpenMP runtime entry points. An RAII is used to manage
the modifications to the thread local variable. Whenever the return
address is required for OMPT events, it is read from the thread local
variable.
More information about the All-commits
mailing list