Skip to content

Commit 27cf2b6

Browse files
committed
Remove thread profiler completely from non-pthreads builds. NFC
Split out from #26487
1 parent 7840305 commit 27cf2b6

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": 577323,
4-
"total": 821690,
3+
"a.out.nodebug.wasm": 577288,
4+
"total": 821655,
55
"sent": [
66
"IMG_Init",
77
"IMG_Load",
@@ -2243,7 +2243,6 @@
22432243
"emscripten_proxy_sync",
22442244
"emscripten_proxy_sync_with_ctx",
22452245
"emscripten_scan_stack",
2246-
"emscripten_set_thread_name",
22472246
"emscripten_stack_get_base",
22482247
"emscripten_stack_get_current",
22492248
"emscripten_stack_get_end",
@@ -4100,7 +4099,6 @@
41004099
"$emscripten_proxy_async",
41014100
"$emscripten_proxy_execute_queue",
41024101
"$emscripten_scan_stack",
4103-
"$emscripten_set_thread_name",
41044102
"$emscripten_stack_get_base",
41054103
"$emscripten_stack_get_current",
41064104
"$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)