bytecodealliance / lucet

Lucet, the Sandboxing WebAssembly Compiler.
Apache License 2.0
4.06k stars 165 forks source link

integrate wiggle tracing #545

Closed pchickey closed 4 years ago

pchickey commented 4 years ago

Update wasmtime dep to include improvements to wiggle to support error transformations and the switch to use tracing: https://github.com/bytecodealliance/wasmtime/pull/1796

Had to pull in some cranelift changes in the process - cranelift-wasm now keeps track of both the wasm function type and the cranelift signature, ends up being a net win that gets rid of some fallible code where we had to reverse-engineer the wasm function type back out of the signature. thank you @fitzgen!

pchickey commented 4 years ago

Requires the CI fixes from #546 to get circle ci to pass.

pchickey commented 4 years ago

One other change in this PR: lucet-wiggle can insert pre_hook and post_hook in each hostcall it generates, which is useful for timing and statistics gathering for now. We really ought to make lucet responsible for inserting hooks for timing and statistics gathering w/r/t hostcalls (or even just ordinary wasm calls) because wiggle isn't an ideal mechanism for this - we can't easily insert hooks for lucet-wasi if the hook is defined in a downstream crate. But it is a stopgap that will keep existing c@e stats working until we make it a runtime feature.