Add calls to stop and wait for a debugger (#916)
Co-authored-by: Benjamin Welton <ben@amd.com>
Este commit está contenido en:
@@ -123,3 +123,29 @@ read_command_line(pid_t _pid)
|
||||
}
|
||||
} // namespace common
|
||||
} // namespace rocprofiler
|
||||
|
||||
namespace
|
||||
{
|
||||
std::atomic<bool>&
|
||||
debugger_block()
|
||||
{
|
||||
static std::atomic<bool> block = {true};
|
||||
return block;
|
||||
}
|
||||
} // namespace
|
||||
|
||||
extern "C" {
|
||||
void
|
||||
rocprofiler_debugger_block()
|
||||
{
|
||||
while(debugger_block().load() == true)
|
||||
{};
|
||||
// debugger_block().exchange(true);
|
||||
}
|
||||
|
||||
void
|
||||
rocprofiler_debugger_continue()
|
||||
{
|
||||
debugger_block().exchange(false);
|
||||
}
|
||||
}
|
||||
@@ -265,3 +265,10 @@ yield(PredicateT&& predicate,
|
||||
}
|
||||
} // namespace common
|
||||
} // namespace rocprofiler
|
||||
|
||||
extern "C" {
|
||||
void
|
||||
rocprofiler_debugger_block();
|
||||
void
|
||||
rocprofiler_debugger_continue();
|
||||
}
|
||||
Referencia en una nueva incidencia
Block a user