rocr: Move _loader_debug_state to rocr namespace

This avoids exposing the symbol to the default namespace

Change-Id: I2fe5fbab4b59f271effacab93eeb2d95c236ae02
Этот коммит содержится в:
David Yat Sin
2024-11-25 18:27:00 +00:00
родитель c066ec13dd
Коммит 147abb6ca0
2 изменённых файлов: 8 добавлений и 7 удалений
+1 -1
Просмотреть файл
@@ -101,9 +101,9 @@ ROCPROFILER_REGISTER_DEFINE_IMPORT(hsa, ROCP_REG_VERSION)
const char rocrbuildid[] __attribute__((used)) = "ROCR BUILD ID: " STRING(ROCR_BUILD_ID);
extern r_debug _amdgpu_r_debug;
extern void _loader_debug_state();
namespace rocr {
extern void _loader_debug_state();
namespace core {
bool g_use_interrupt_wait;
bool g_use_mwaitx;
+7 -6
Просмотреть файл
@@ -66,12 +66,6 @@
using namespace rocr::amd::hsa;
using namespace rocr::amd::hsa::common;
// Having a side effect prevents call site optimization that allows removal of a noinline function call
// with no side effect.
__attribute__((noinline)) void _loader_debug_state() {
static volatile int function_needs_a_side_effect = 0;
function_needs_a_side_effect ^= 1;
}
// r_version history:
// 1: Initial debug protocol
// 2: New trap handler ABI. The reason for halting a wave is recorded in ttmp11[8:7].
@@ -92,6 +86,13 @@ static __forceinline link_map*& r_debug_tail() {
}
namespace rocr {
// Having a side effect prevents call site optimization that allows removal of a noinline function call
// with no side effect.
__attribute__((noinline)) void _loader_debug_state() {
static volatile int function_needs_a_side_effect = 0;
function_needs_a_side_effect ^= 1;
}
namespace amd {
namespace hsa {
namespace loader {