From 1213ad507041050b3c6b0f78feeaebb95df2dbb5 Mon Sep 17 00:00:00 2001 From: BiteTheDDDDt Date: Wed, 2 Apr 2025 18:58:52 +0800 Subject: [PATCH] add attribute noinline to tls_bls --- src/bthread/task_group.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bthread/task_group.cpp b/src/bthread/task_group.cpp index 0c924ac3d8..fa33e6d685 100644 --- a/src/bthread/task_group.cpp +++ b/src/bthread/task_group.cpp @@ -58,7 +58,7 @@ BAIDU_VOLATILE_THREAD_LOCAL(TaskGroup*, tls_task_group, NULL); // Sync with TaskMeta::local_storage when a bthread is created or destroyed. // During running, the two fields may be inconsistent, use tls_bls as the // groundtruth. -__thread LocalStorage tls_bls = BTHREAD_LOCAL_STORAGE_INITIALIZER; +__thread LocalStorage tls_bls __attribute__((noinline)) = BTHREAD_LOCAL_STORAGE_INITIALIZER; // defined in bthread/key.cpp extern void return_keytable(bthread_keytable_pool_t*, KeyTable*);