summaryrefslogtreecommitdiff
path: root/offload/include/Shared
diff options
context:
space:
mode:
authorEthan Luis McDonough <ethanluismcdonough@gmail.com>2025-02-11 21:30:54 -0800
committerGitHub <noreply@github.com>2025-02-11 23:30:54 -0600
commit9e5c136d5a1a8acee9e7acfbe14cc6d4490dee2e (patch)
treeb6b15d2e65de24a35909f5b4ccbff4a3219d4fc8 /offload/include/Shared
parent84e3c6ff9591d4e93b5a30dbcffc985d41d87bda (diff)
[PGO][Offload] Profile profraw generation for GPU instrumentation #76587 (#93365)
This pull request is the second part of an ongoing effort to extends PGO instrumentation to GPU device code and depends on #76587. This PR makes the following changes: - Introduces `__llvm_write_custom_profile` to PGO compiler-rt library. This is an external function that can be used to write profiles with custom data to target-specific files. - Adds `__llvm_write_custom_profile` as weak symbol to libomptarget so that it can write the collected data to a profraw file. - Adds `PGODump` debug flag and only displays dump when the aforementioned flag is set
Diffstat (limited to 'offload/include/Shared')
-rw-r--r--offload/include/Shared/Environment.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/offload/include/Shared/Environment.h b/offload/include/Shared/Environment.h
index 147583c209fc..db8443a7be93 100644
--- a/offload/include/Shared/Environment.h
+++ b/offload/include/Shared/Environment.h
@@ -30,6 +30,7 @@ enum class DeviceDebugKind : uint32_t {
FunctionTracing = 1U << 1,
CommonIssues = 1U << 2,
AllocationTracker = 1U << 3,
+ PGODump = 1U << 4,
};
struct DeviceEnvironmentTy {