Skip to content

Commit 3e1efdb

Browse files
committed
Remove thread profiler completely from non-pthreads builds. NFC
Split out from #26487
1 parent 428432a commit 3e1efdb

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

system/lib/pthread/threading_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void _emscripten_thread_exit_joinable(pthread_t thread);
6969
void _emscripten_thread_exit(void* result);
7070
void _emscripten_process_dlopen_queue(void);
7171

72-
#ifdef NDEBUG
72+
#if !defined(__EMSCRIPTEN_PTHREADS__) || defined(NDEBUG)
7373
#define emscripten_set_current_thread_status(newStatus)
7474
#define emscripten_conditional_set_current_thread_status(expectedStatus, newStatus)
7575
#else

test/codesize/test_codesize_hello_dylink_all.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"a.out.js": 244367,
3-
"a.out.nodebug.wasm": 577720,
4-
"total": 822087,
3+
"a.out.nodebug.wasm": 577685,
4+
"total": 822052,
55
"sent": [
66
"IMG_Init",
77
"IMG_Load",
@@ -2242,7 +2242,6 @@
22422242
"emscripten_proxy_sync",
22432243
"emscripten_proxy_sync_with_ctx",
22442244
"emscripten_scan_stack",
2245-
"emscripten_set_thread_name",
22462245
"emscripten_stack_get_base",
22472246
"emscripten_stack_get_current",
22482247
"emscripten_stack_get_end",
@@ -4099,7 +4098,6 @@
40994098
"$emscripten_proxy_async",
41004099
"$emscripten_proxy_execute_queue",
41014100
"$emscripten_scan_stack",
4102-
"$emscripten_set_thread_name",
41034101
"$emscripten_stack_get_base",
41044102
"$emscripten_stack_get_current",
41054103
"$emscripten_stack_get_end",

tools/system_libs.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,6 +1211,7 @@ def get_files(self):
12111211
'pthread_kill.c',
12121212
'emscripten_thread_init.c',
12131213
'emscripten_yield.c',
1214+
'thread_profiler.c',
12141215
])
12151216
else:
12161217
ignore += ['thread']
@@ -1412,10 +1413,6 @@ def get_files(self):
14121413
if settings.MAIN_MODULE:
14131414
libc_files += files_in_path(path='system/lib/libc', filenames=['dynlink.c'])
14141415

1415-
libc_files += files_in_path(
1416-
path='system/lib/pthread',
1417-
filenames=['thread_profiler.c'])
1418-
14191416
libc_files += glob_in_path('system/lib/libc/compat', '*.c')
14201417

14211418
# Check for missing file in non_lto_files list. Do this here

0 commit comments

Comments
 (0)