Skip to content

Add some tracing to wasm-emscripten-finalize#2505

Merged
sbc100 merged 2 commits intomasterfrom
add_tracing
Dec 6, 2019
Merged

Add some tracing to wasm-emscripten-finalize#2505
sbc100 merged 2 commits intomasterfrom
add_tracing

Conversation

@sbc100
Copy link
Copy Markdown
Member

@sbc100 sbc100 commented Dec 5, 2019

Also fix, but in splitting the names of the trace channels. Obviously
I can't write string.split correctly in C first time around.

@sbc100 sbc100 requested a review from tlively December 5, 2019 19:39
Copy link
Copy Markdown
Contributor

@jgravelle-google jgravelle-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay debugging/instrumentation

Comment thread src/tools/wasm-emscripten-finalize.cpp Outdated
std::cerr << "Module before:\n";
WasmPrinter::printModule(&wasm, std::cerr);
}
// Useful for debugging
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels weird to go from a runtime check to a compile-time thing here. Maybe add a new runtime option here? --dump-module?
I do agree that I usually don't want a pre-module dump, so I do support decoupling debug from dump here.

Also we should update the "Module after" dump to BYN_TRACE + BYN_DEBUG too? (Line293, can't comment it directly)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread src/wasm/wasm-emscripten.cpp
Comment thread src/wasm/wasm-emscripten.cpp
Also fix, but in splitting the names of the trace channels.  Obviously
I can't write string.split correctly in C first time around.
Comment thread src/support/debug.cpp
type_end = types + end;
}
size_t type_size = type_end - types + start;
size_t type_size = type_end - (types + start);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@sbc100 sbc100 merged commit bc46254 into master Dec 6, 2019
@sbc100 sbc100 deleted the add_tracing branch December 6, 2019 03:16
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.

4 participants