Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasmtime: In-process sampling profiler #6282

Merged
merged 11 commits into from
May 2, 2023
52 changes: 41 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion crates/runtime/src/traphandlers/backtrace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,9 @@ impl Backtrace {
}

/// Iterate over the frames inside this backtrace.
pub fn frames<'a>(&'a self) -> impl ExactSizeIterator<Item = &'a Frame> + 'a {
pub fn frames<'a>(
&'a self,
) -> impl ExactSizeIterator<Item = &'a Frame> + DoubleEndedIterator + 'a {
self.0.iter()
}
}
2 changes: 1 addition & 1 deletion crates/wasi-common/src/snapshots/preview_1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1355,7 +1355,7 @@ fn dirent_bytes(dirent: types::Dirent) -> Vec<u8> {
use wiggle::GuestType;
assert_eq!(
types::Dirent::guest_size(),
std::mem::size_of::<types::Dirent>() as _,
std::mem::size_of::<types::Dirent>() as u32,
"Dirent guest repr and host repr should match"
);
assert_eq!(
Expand Down
2 changes: 2 additions & 0 deletions crates/wasmtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ cfg-if = "1.0"
log = { workspace = true }
wat = { workspace = true, optional = true }
serde = { version = "1.0.94", features = ["derive"] }
serde_json = { workspace = true }
bincode = "1.2.1"
indexmap = "1.6"
paste = "1.0.3"
Expand All @@ -45,6 +46,7 @@ object = { workspace = true }
async-trait = { workspace = true, optional = true }
encoding_rs = { version = "0.8.31", optional = true }
bumpalo = "3.11.0"
fxprof-processed-profile = "0.6.0"

[target.'cfg(target_os = "windows")'.dependencies.windows-sys]
workspace = true
Expand Down
2 changes: 2 additions & 0 deletions crates/wasmtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ mod limits;
mod linker;
mod memory;
mod module;
mod profiling;
mod r#ref;
mod signatures;
mod store;
Expand All @@ -416,6 +417,7 @@ pub use crate::limits::*;
pub use crate::linker::*;
pub use crate::memory::*;
pub use crate::module::Module;
pub use crate::profiling::GuestProfiler;
pub use crate::r#ref::ExternRef;
#[cfg(feature = "async")]
pub use crate::store::CallHookHandler;
Expand Down
Loading