Skip to content

Don't include memory tracing callback in INCOMING_MODULE_JS_API by default. NFC#26363

Merged
sbc100 merged 1 commit intoemscripten-core:mainfrom
sbc100:onMalloc
Feb 27, 2026
Merged

Don't include memory tracing callback in INCOMING_MODULE_JS_API by default. NFC#26363
sbc100 merged 1 commit intoemscripten-core:mainfrom
sbc100:onMalloc

Conversation

@sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Feb 27, 2026

These are only ever used by EMSCRIPTEN_TRACING so we know exactly when to include them.

I noticed this while reviewing #26175

@dschuff
Copy link
Member

dschuff commented Feb 27, 2026

So the reason that the codesize gets bigger is because we now emit code that checks for the presence of those APIs before using them?

@sbc100
Copy link
Collaborator Author

sbc100 commented Feb 27, 2026

So the reason that the codesize gets bigger is because we now emit code that checks for the presence of those APIs before using them?

Its only in debug builds where we emit code to catch incorrect usage

@sbc100 sbc100 merged commit fd59f68 into emscripten-core:main Feb 27, 2026
36 checks passed
@sbc100 sbc100 deleted the onMalloc branch February 27, 2026 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants