Update gotcha submodule from timemory (#277)

* Update gotcha submodule from timemory

* Fix build failure and add copilot suggestions

* Fix formatting errors

[ROCm/rocprofiler-systems commit: d26486ad83]
这个提交包含在:
Sajina PK 编写, GitHub 于 2025-07-14 21:12:10 -04:00 提交
1 父节点 a5ca94ab9c
当前提交 d4da72bf2d
3 个文件已更改
+26 -2

没有与搜索条件相匹配的文件

+1
查看文件
@@ -1,6 +1,7 @@
[submodule "external/timemory"]
path = external/timemory
url = https://github.com/ROCm/timemory.git
branch = rocprofiler-systems
[submodule "external/perfetto"]
path = external/perfetto
url = https://github.com/google/perfetto.git
子模块 projects/rocprofiler-systems/external/timemory 已更新:5400e1349c...469eced5c6。
@@ -411,7 +411,30 @@ pthread_create_gotcha::shutdown()
{
// skip sending signals to internal threads
if(internal_native_handles.count(itr) != 0) continue;
if(pthread_equal(pthread_self(), itr) == 0 && pthread_equal(itr, itr) != 0)
bool has_bundle = false;
std::unique_lock<std::mutex> _bundle_lk{ *bundles_mutex };
const auto& thread_info = thread_info::get(itr);
// Check if this thread has a corresponding bundle entry
// With the new gotcha update more external threads are tracked
// but we only want to send signals to threads that have bundles
for(const auto& bundle_itr : *bundles)
{
try
{
if(thread_info && thread_info->index_data &&
bundle_itr.first == thread_info->index_data->sequent_value)
{
has_bundle = true;
break;
}
} catch(...)
{
continue;
}
}
if(has_bundle && pthread_equal(pthread_self(), itr) == 0)
{
::pthread_kill(itr, shutdown_signal_v);
++_expected_shutdown_signals_delivered;