commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
b647561c44aacc69ea7bb195dcbb8df377f851e3
Alex Crichton
2022-02-03T15:17:04
memfd: Some minor follow-ups (#3759) * Tweak memfd-related features crates This commit changes the `memfd` feature for the `wasmtime-cli` crate from an always-on feature to a default-on feature which can be disabled at compile time. Additionally the `pooling-allocator` feature is also given similar treatment. ...
diff --git a/Cargo.toml b/Cargo.toml index e618593f0..9fd56d95f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ path = "src/bin/wasmtime.rs" doc = false [dependencies] -wasmtime = { path = "crates/wasmtime", version = "0.33.0", default-features = false, features = ['cache', 'cranelift', 'pooling-allocato...
11
38
21
8ed79c8f57ab0cd7929908c050841823f7a4ce1d
Alex Crichton
2022-02-02T22:09:47
memfd: Reduce some syscalls in the on-demand case (#3757) * memfd: Reduce some syscalls in the on-demand case This tweaks the internal organization of the `MemFdSlot` to avoid some syscalls in the default case as well as opportunistically in the pooling case. The two cases added here are: * A `MemFdSlot` is no...
diff --git a/crates/runtime/src/instance/allocator/pooling.rs b/crates/runtime/src/instance/allocator/pooling.rs index 90db21fde..ae860588b 100644 --- a/crates/runtime/src/instance/allocator/pooling.rs +++ b/crates/runtime/src/instance/allocator/pooling.rs @@ -754,6 +754,7 @@ impl MemoryPool { maybe_slot.unwra...
5
79
72
1cbd39393074e71c06f4aec8ed305a814d78ac85
Chris Fallin
2022-01-31T22:39:21
Review comments.
diff --git a/crates/runtime/src/instance/allocator/pooling.rs b/crates/runtime/src/instance/allocator/pooling.rs index b5685c876..90db21fde 100644 --- a/crates/runtime/src/instance/allocator/pooling.rs +++ b/crates/runtime/src/instance/allocator/pooling.rs @@ -25,7 +25,7 @@ use wasmtime_environ::{ }; mod index_allo...
2
278
124
60114205570f91cad21cce66d389e3102bb80a06
Chris Fallin
2022-01-29T00:03:05
Pooling allocator: add a reuse-affinity policy. This policy attempts to reuse the same instance slot for subsequent instantiations of the same module. This is particularly useful when using a pooling backend such as memfd that benefits from this reuse: for example, in the memfd case, instantiating the same module into...
diff --git a/crates/runtime/src/instance.rs b/crates/runtime/src/instance.rs index 9c56dfb22..d2afb4d87 100644 --- a/crates/runtime/src/instance.rs +++ b/crates/runtime/src/instance.rs @@ -11,7 +11,7 @@ use crate::vmcontext::{ VMCallerCheckedAnyfunc, VMContext, VMFunctionImport, VMGlobalDefinition, VMGlobalImport,...
11
567
126
9880eba2a8514da3cfd1daa45949ba9b257f9eb6
Chris Fallin
2022-02-02T20:25:20
Skip memfd tests when on qemu, due to differing madvise semantics.
diff --git a/crates/runtime/src/memfd.rs b/crates/runtime/src/memfd.rs index 16d41d1fb..cf26e9b76 100644 --- a/crates/runtime/src/memfd.rs +++ b/crates/runtime/src/memfd.rs @@ -594,6 +594,10 @@ mod test { #[test] fn instantiate_no_image() { + if skip_tests_due_to_qemu_madvise_semantics() { + ...
1
23
0
d7b04f5ced25a1adf31aadfb919f7d15d672cc83
Chris Fallin
2022-02-02T19:41:31
Review comments.
diff --git a/crates/runtime/src/memfd.rs b/crates/runtime/src/memfd.rs index 8ccea6907..16d41d1fb 100644 --- a/crates/runtime/src/memfd.rs +++ b/crates/runtime/src/memfd.rs @@ -7,8 +7,8 @@ use libc::c_void; use memfd::{Memfd, MemfdOptions}; use rustix::fd::AsRawFd; use rustix::fs::FileExt; -use std::convert::TryFrom...
1
9
17
0ec45d3ae439b9ce8aa314a50b0b19480ef914b7
Chris Fallin
2022-02-02T19:28:47
Add additional tests for MemFdSlot.
diff --git a/crates/runtime/src/memfd.rs b/crates/runtime/src/memfd.rs index 9b8c25a69..8ccea6907 100644 --- a/crates/runtime/src/memfd.rs +++ b/crates/runtime/src/memfd.rs @@ -81,6 +81,16 @@ fn unsupported_initializer(segment: &MemoryInitializer, plan: &MemoryPlan) -> bo false } +fn create_memfd() -> Result<Me...
1
118
13
3f5cbddab5febaf2c1dc534cca570128e766b2d6
Alex Crichton
2022-02-02T18:17:18
Fix a text format test expectation
diff --git a/crates/fuzzing/src/generators/table_ops.rs b/crates/fuzzing/src/generators/table_ops.rs index f8104d6f1..04456b73d 100644 --- a/crates/fuzzing/src/generators/table_ops.rs +++ b/crates/fuzzing/src/generators/table_ops.rs @@ -424,7 +424,7 @@ mod tests { br 0 (;@1;) end) (table (;0;) 20 externr...
1
1
1
94410a8d4bed9423bfc09de9abc5b0401f4d0bef
Chris Fallin
2022-02-02T18:03:31
Review comments.
diff --git a/crates/runtime/src/memfd.rs b/crates/runtime/src/memfd.rs index e94d17fe2..9b8c25a69 100644 --- a/crates/runtime/src/memfd.rs +++ b/crates/runtime/src/memfd.rs @@ -402,21 +402,30 @@ impl MemFdSlot { // // We map these inaccessible at first then mprotect() the // whole of the init...
1
27
18
9d1e517615bf163a4a7a4019f97cc0e3327b0374
Alex Crichton
2022-02-02T17:51:27
Update some more version reqs
diff --git a/Cargo.toml b/Cargo.toml index 1fb55378a..f1ffca534 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -60,7 +60,7 @@ num_cpus = "1.13.0" winapi = { version = "0.3.9", features = ['memoryapi'] } memchr = "2.4" async-trait = "0.1" -wat = "1.0.40" +wat = "1.0.41" [build-dependencies] anyhow = "1.0.19" diff --...
2
2
2
c83968575ac7e5decc9205ba7f569f0b6dde0c85
Alex Crichton
2022-02-02T15:43:29
Lazily populate a store's trampoline map (#3742) * Lazily populate a store's trampoline map This commit is another installment of "how fast can we make instantiation". Currently when instantiating a module with many function imports each function, typically from the host, is inserted into the store. This inserti...
diff --git a/crates/wasmtime/src/func.rs b/crates/wasmtime/src/func.rs index 023cbdac4..0bc9d0777 100644 --- a/crates/wasmtime/src/func.rs +++ b/crates/wasmtime/src/func.rs @@ -718,7 +718,7 @@ impl Func { } pub(crate) fn sig_index(&self, data: &StoreData) -> VMSharedSignatureIndex { - unsafe { data[s...
3
96
20
ffa9fe32aaad58625bf2a4a53e8565c90f73346a
Dan Gohman
2022-01-24T18:56:47
Use is-terminal instead of atty. Following up on #3696, use the new is-terminal crate to test for a tty rather than having platform-specific logic in Wasmtime. The is-terminal crate has a platform-independent API which takes a handle. This also updates the tree to cap-std 0.24 etc., to avoid depending on multiple ver...
diff --git a/Cargo.lock b/Cargo.lock index 7cbce8960..bb5c56495 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -123,7 +123,7 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi...
14
84
82
84a8368e88ceee972348f5d4dfe0b4b1f81beece
Chris Fallin
2022-02-02T00:34:06
Fix to the optimization: mprotect(NONE) sometimes needed after skipping the initial mmap.
diff --git a/crates/runtime/src/memfd.rs b/crates/runtime/src/memfd.rs index da335a53f..e94d17fe2 100644 --- a/crates/runtime/src/memfd.rs +++ b/crates/runtime/src/memfd.rs @@ -292,6 +292,12 @@ pub struct MemFdSlot { /// instantiation). Set by `instantiate()` and cleared by /// `clear_and_remain_ready()`, and...
1
18
3
01e6bb81fb6d2aab64e6d3c4de783042c2a4bf31
Chris Fallin
2022-02-01T23:49:44
Review feedback.
diff --git a/crates/runtime/build.rs b/crates/runtime/build.rs index 9c2741714..1b5d21a93 100644 --- a/crates/runtime/build.rs +++ b/crates/runtime/build.rs @@ -16,9 +16,8 @@ fn main() { // will work. let os = env::var("CARGO_CFG_TARGET_OS").unwrap(); let is_memfd = env::var("CARGO_FEATURE_MEMFD").is_ok(...
7
60
34
aa4c81a4e73a070c96fda2331c95db91507a6a4d
Pat Hickey
2022-02-01T17:46:46
fix #3749: returns count should count the returns, not the params.
diff --git a/crates/types/src/lib.rs b/crates/types/src/lib.rs index 573c699f4..7db21a2a0 100644 --- a/crates/types/src/lib.rs +++ b/crates/types/src/lib.rs @@ -97,7 +97,10 @@ impl WasmFuncType { #[inline] pub fn new(params: Box<[WasmType]>, returns: Box<[WasmType]>) -> Self { let externref_params_co...
1
4
1
ccfa245261bea22b2a5ef381a915606f6e1773d0
Chris Fallin
2022-02-01T01:03:42
Optimization: only mprotect the *new* bit of heap, not all of it. (This was not a correctness bug, but is an obvious performance bug...)
diff --git a/crates/runtime/src/memfd.rs b/crates/runtime/src/memfd.rs index 1740aba32..2a0aea640 100644 --- a/crates/runtime/src/memfd.rs +++ b/crates/runtime/src/memfd.rs @@ -316,7 +316,12 @@ impl MemFdSlot { } pub(crate) fn set_heap_limit(&mut self, size_bytes: usize) -> Result<()> { - assert!(siz...
1
9
1
982df2f2e5e7018ae8bdbf9b534743a816ab3c60
Chris Fallin
2022-02-01T00:11:25
Review feedback.
diff --git a/crates/runtime/src/instance/allocator.rs b/crates/runtime/src/instance/allocator.rs index 739313da7..1ee7a195f 100644 --- a/crates/runtime/src/instance/allocator.rs +++ b/crates/runtime/src/instance/allocator.rs @@ -25,16 +25,6 @@ use wasmtime_environ::{ #[cfg(feature = "pooling-allocator")] mod pooling;...
7
332
310
570dee63f321975a55b4c3a00347ed5738622a2d
Chris Fallin
2022-01-31T21:59:51
Use MemFdSlot in the on-demand allocator as well.
diff --git a/crates/runtime/src/instance/allocator.rs b/crates/runtime/src/instance/allocator.rs index 12fa88ddc..739313da7 100644 --- a/crates/runtime/src/instance/allocator.rs +++ b/crates/runtime/src/instance/allocator.rs @@ -392,15 +392,15 @@ fn initialize_memories( initializers: &[MemoryInitializer], ) -> Re...
5
120
32
3702e81d30888875d468636daca9035af661114a
Chris Fallin
2022-01-31T19:13:43
Remove ftruncate-trick for heap growth with memfd backend. Testing so far with recent Wasmtime has not been able to show the need for avoiding the process-wide mmap lock in real-world use-cases. As such, the technique of using an anonymous file and ftruncate() to extend it seems unnecessary; instead, memfd can always ...
diff --git a/crates/runtime/src/instance/allocator/memfd.rs b/crates/runtime/src/instance/allocator/memfd.rs index 871379482..67741f8bb 100644 --- a/crates/runtime/src/instance/allocator/memfd.rs +++ b/crates/runtime/src/instance/allocator/memfd.rs @@ -5,8 +5,6 @@ use crate::InstantiationError; use anyhow::Result; us...
3
85
121
a25f7bdba565c14887ee15a41d575befd37fea0b
Alex Crichton
2022-01-28T22:24:34
Don't copy `VMBuiltinFunctionsArray` into each `VMContext` (#3741) * Don't copy `VMBuiltinFunctionsArray` into each `VMContext` This is another PR along the lines of "let's squeeze all possible performance we can out of instantiation". Before this PR we would copy, by value, the contents of `VMBuiltinFunctionsArr...
diff --git a/crates/cranelift/src/func_environ.rs b/crates/cranelift/src/func_environ.rs index 71bcf215d..9c1f4afa4 100644 --- a/crates/cranelift/src/func_environ.rs +++ b/crates/cranelift/src/func_environ.rs @@ -281,10 +281,15 @@ impl<'module_environment> FuncEnvironment<'module_environment> { let mut mem_fla...
5
86
110
2f494240f8e9b6c01192a763da48db76f57a974e
Alex Crichton
2022-01-28T22:10:05
Lazily allocate the bump-alloc chunk in the externref table (#3739) This commit updates the allocation of a `VMExternRefActivationsTable` structure to perform zero malloc memory allocations. Previously it would allocate a page-size of `chunk` plus some space in hash sets for future insertions. The main trick here i...
diff --git a/crates/runtime/src/externref.rs b/crates/runtime/src/externref.rs index 573dd4b24..6dd59ad74 100644 --- a/crates/runtime/src/externref.rs +++ b/crates/runtime/src/externref.rs @@ -566,8 +566,13 @@ impl VMExternRefActivationsTable { /// Create a new `VMExternRefActivationsTable`. pub fn new() ->...
1
19
5
19f8d94959a78d6251a51c74195232e56a02a865
Nick Fitzgerald
2022-01-28T17:47:05
Expand on activations table invariants comment in `libcalls.rs`
diff --git a/crates/runtime/src/libcalls.rs b/crates/runtime/src/libcalls.rs index 841dfaa1a..a6b291167 100644 --- a/crates/runtime/src/libcalls.rs +++ b/crates/runtime/src/libcalls.rs @@ -406,7 +406,10 @@ pub unsafe extern "C" fn wasmtime_activations_table_insert_with_gc( // Invariant: all `externref`s on the sta...
1
4
1
f292ff55cfb8306939fc2e03324007fe015d839e
Nick Fitzgerald
2022-01-27T22:13:16
Do another GC after running Wasm in the `table_ops` test oracle
diff --git a/crates/fuzzing/src/oracles.rs b/crates/fuzzing/src/oracles.rs index 3b443e5e1..c1feba550 100644 --- a/crates/fuzzing/src/oracles.rs +++ b/crates/fuzzing/src/oracles.rs @@ -540,6 +540,9 @@ pub fn table_ops(mut fuzz_config: generators::Config, ops: generators::table_ops .map(|_| Val::ExternRef(S...
1
3
0
cc8d7778e2739dc7c5058122889853de141e8191
Nick Fitzgerald
2022-01-27T21:59:05
Make the `table_ops` test case generator use globals as well This will make it generate `table.set`s that come from `global.get`s and `global.get`s that come from `table.set`s. Ultimately, it should give us much more fuzzing coverage of `externref` globals, their barriers, and passing `externref`s into and out of Wasm...
diff --git a/crates/fuzzing/src/generators/table_ops.rs b/crates/fuzzing/src/generators/table_ops.rs index 0bf3e9ce5..f8104d6f1 100644 --- a/crates/fuzzing/src/generators/table_ops.rs +++ b/crates/fuzzing/src/generators/table_ops.rs @@ -3,8 +3,8 @@ use arbitrary::Arbitrary; use std::ops::Range; use wasm_encoder::{ -...
1
127
25
90bfa123e095371691c43679ae7c8f11380d8bf6
Andrew Brown
2022-01-28T00:36:33
docs: render the `fcmp` tables as code (#3735) Looking at [the `fcmp` documentation](https://docs.rs/cranelift-codegen/0.80.0/cranelift_codegen/ir/trait.InstBuilder.html#method.fcmp)--generated from Cranelift's instruction definitions, the charts explaining the logic for the various conditions is unreadable. Since ...
diff --git a/cranelift/codegen/meta/src/shared/instructions.rs b/cranelift/codegen/meta/src/shared/instructions.rs index 8b693c370..82780f72a 100644 --- a/cranelift/codegen/meta/src/shared/instructions.rs +++ b/cranelift/codegen/meta/src/shared/instructions.rs @@ -3035,12 +3035,14 @@ pub(crate) fn define( Two ...
1
6
0
cbc6f6071fae3868c750d3873db92501bd655623
Nick Fitzgerald
2022-01-27T21:22:53
Fix a debug assertion in `externref` garbage collections When we GC, we assert the invariant that all `externref`s we find on the stack have a corresponding entry in the `VMExternRefActivationsTable`. However, we also might be in code that is in the process of fixing up this invariant and adding an entry to the table,...
diff --git a/crates/runtime/src/externref.rs b/crates/runtime/src/externref.rs index 9677b39af..573dd4b24 100644 --- a/crates/runtime/src/externref.rs +++ b/crates/runtime/src/externref.rs @@ -463,7 +463,7 @@ impl Deref for VMExternRef { /// /// We use this so that we can morally put `VMExternRef`s inside of `HashSet...
2
11
2
7928a3ffb4ddce1d60ef7634a9cf79c68258c1c0
Alex Crichton
2022-01-26T20:23:37
Lazily load types into `Func` (#3727) * Lazily load types into `Func` This commit changes the construction of a `Func` to lazily load the type information if required instead of always loading the type information at `Func`-construction time. The main purpose of this change is to accelerate instantiation of inst...
diff --git a/crates/wasmtime/src/func.rs b/crates/wasmtime/src/func.rs index 3f4b2ad49..023cbdac4 100644 --- a/crates/wasmtime/src/func.rs +++ b/crates/wasmtime/src/func.rs @@ -183,7 +183,12 @@ pub struct Func(Stored<FuncData>); pub(crate) struct FuncData { kind: FuncKind, - ty: FuncType, + + // This is s...
1
43
16
9c7de7692b579ffbcb7a108e4c70cee9d3029c9e
Nick Fitzgerald
2022-01-25T17:59:39
cranelift: Use `emit` helper function on aarch64 ...instead of pushing to the `emitted_insts` vec directly.
diff --git a/cranelift/codegen/src/isa/aarch64/lower/isle.rs b/cranelift/codegen/src/isa/aarch64/lower/isle.rs index 24e4ade82..c4d418522 100644 --- a/cranelift/codegen/src/isa/aarch64/lower/isle.rs +++ b/cranelift/codegen/src/isa/aarch64/lower/isle.rs @@ -152,17 +152,14 @@ where let imm = ...
1
3
6
906f6a35cf03a0933f07fde903b3acea5ffc28cb
Ulrich Weigand
2022-01-25T13:21:41
ISLE: Allow emitting safepoint insns Change the implementation of emitted_insts in IsleContext from a plain vector of instructions into a vector of tuples, where the second element is a boolean that indicates whether this instruction should be emitted as a safepoint. This allows targets to emit safepoint insns via IS...
diff --git a/cranelift/codegen/src/isa/aarch64/lower/isle.rs b/cranelift/codegen/src/isa/aarch64/lower/isle.rs index b08d3cd17..24e4ade82 100644 --- a/cranelift/codegen/src/isa/aarch64/lower/isle.rs +++ b/cranelift/codegen/src/isa/aarch64/lower/isle.rs @@ -152,14 +152,17 @@ where let imm = ...
4
19
12
5fc01bafc7185b797f71c37352cbe66aa740893c
Dan Gohman
2022-01-24T19:45:16
Fix `isatty` in WASI. (#3696) WASI doesn't have an `isatty` ioctl or syscall, so wasi-libc's `isatty` implementation uses the file descriptor type and rights to determine if the file descriptor is likely to be a tty. The real fix here will be to add an `isatty` call to WASI. But for now, have Wasmtime set the file...
diff --git a/Cargo.lock b/Cargo.lock index 6362f3b41..488e4f7b3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3129,6 +3129,7 @@ version = "0.33.0" dependencies = [ "anyhow", "async-trait", + "atty", "cap-fs-ext", "cap-rand", "cap-std", diff --git a/crates/wasi-common/cap-std-sync/Cargo.toml b/crates/wasi-comm...
8
74
8
881c19473d4f461b2fdbe067fc86d4ed4c06f25f
Dan Gohman
2022-01-21T21:03:17
Use `ptr::cast` instead of `as` casts in several places. (#3507) `ptr::cast` has the advantage of being unable to silently cast `*const T` to `*mut T`. This turned up several places that were performing such casts, which this PR also fixes.
diff --git a/cranelift/jit/src/backend.rs b/cranelift/jit/src/backend.rs index ed4573413..a1f63e694 100644 --- a/cranelift/jit/src/backend.rs +++ b/cranelift/jit/src/backend.rs @@ -874,7 +874,7 @@ fn lookup_with_dlsym(name: &str) -> Option<*const u8> { // try to find the searched symbol in the currently ru...
14
64
58
ef1b2d2fa81f02d559da1b493d5ddff6d8f26e6d
Chris Fallin
2022-01-20T23:40:56
Cranelift: Fix cold-blocks-related lowering bug. If a block is marked cold but has side-effect-free code that is only used by side-effectful code in non-cold blocks, we will erroneously fail to emit it, causing a regalloc failure. This is due to the interaction of block ordering and lowering: we rely on block orderin...
diff --git a/cranelift/codegen/src/isa/x64/mod.rs b/cranelift/codegen/src/isa/x64/mod.rs index 6c8782e9c..fbd7dad61 100644 --- a/cranelift/codegen/src/isa/x64/mod.rs +++ b/cranelift/codegen/src/isa/x64/mod.rs @@ -179,3 +179,106 @@ fn isa_constructor( let backend = X64Backend::new_with_flags(triple, shared_flags, i...
3
143
17
2b04466955d4a0cd78cb727fa1833554f8f847a8
Alex Crichton
2022-01-21T17:16:27
Document epoch interruption in async documentation (#3712) I, after-the-fact, now recall that we document fuel and other interruption schemes in the `Config::async_support` documentation so I've re-worded that section to mention epoch-based interruption as well.
diff --git a/crates/wasmtime/src/config.rs b/crates/wasmtime/src/config.rs index b507dc901..b2f47c8a4 100644 --- a/crates/wasmtime/src/config.rs +++ b/crates/wasmtime/src/config.rs @@ -213,14 +213,24 @@ impl Config { /// arbitrarily long in the worst case, likely blocking all other /// asynchronous tasks. ...
1
39
13
51649d56b75d45cb30900b72d7c474d6210c7658
Chris Fallin
2022-01-20T23:37:07
Add syntax for cold blocks to CLIF. This commit adds support for denoting cold blocks in the CLIF text format as follows: ```plain function %f() { block0(...): ... block1 cold: ... block2(...) cold: ... block3: ... ``` With this syntax, we are able to see the cold-block flag in CLIF, we can write tests u...
diff --git a/cranelift/codegen/src/write.rs b/cranelift/codegen/src/write.rs index 72496a319..d046da505 100644 --- a/cranelift/codegen/src/write.rs +++ b/cranelift/codegen/src/write.rs @@ -216,12 +216,18 @@ pub fn write_block_header( block: Block, indent: usize, ) -> fmt::Result { + let cold = if func.lay...
3
65
6
f489b83835803523844908b9beacdfee312f9365
Chris Fallin
2022-01-19T01:19:08
Cranelift: add support for cold blocks. This PR adds a flag to each block that can be set via the frontend/builder interface that indicates that the block will not be frequently executed. As such, the compiler backend should place the block "out of line" in the final machine code, so that the ordinary, more frequent e...
diff --git a/cranelift/codegen/src/ir/layout.rs b/cranelift/codegen/src/ir/layout.rs index 37842b59b..47ec6b1fd 100644 --- a/cranelift/codegen/src/ir/layout.rs +++ b/cranelift/codegen/src/ir/layout.rs @@ -469,6 +469,19 @@ impl Layout { pub fn next_block(&self, block: Block) -> Option<Block> { self.blocks[...
3
36
1
2649d2352c415979ea0fe7f43eacb2f3f65d771c
Benjamin Bouvier
2022-01-19T15:49:23
Support vtune profiling of trampolines too (#3687) * Provide helpers for demangling function names * Profile trampolines in vtune too * get rid of mapping * avoid code duplication with jitdump_linux * maintain previous default display name for wasm functions * no dash, grrr * Remove unused profiling ...
diff --git a/Cargo.lock b/Cargo.lock index 499faa59d..6362f3b41 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3339,7 +3339,6 @@ dependencies = [ "backtrace", "bincode", "cfg-if 1.0.0", - "cpp_demangle", "indexmap", "lazy_static", "libc", @@ -3349,7 +3348,6 @@ dependencies = [ "psm", "rayon", "region", ...
13
191
141
2afd6900f430a6efb0bd0ad1f1b0e94a24d11399
Mrmaxmeier
2022-01-18T15:17:33
runtime: expose DefaultMemoryCreator (#3670)
diff --git a/crates/runtime/src/lib.rs b/crates/runtime/src/lib.rs index ba8b544b3..af4c7ee35 100644 --- a/crates/runtime/src/lib.rs +++ b/crates/runtime/src/lib.rs @@ -48,7 +48,7 @@ pub use crate::instance::{ InstanceLimits, ModuleLimits, PoolingAllocationStrategy, PoolingInstanceAllocator, }; pub use crate::ji...
1
1
1
89919f4b1fedfba8de9228f9eeb40bd7824f7da0
Anton Kirilov
2021-11-16T23:40:19
Pass the ISA-specific compilation flags to the ABI implementations Copyright (c) 2021, Arm Limited.
diff --git a/cranelift/codegen/src/isa/aarch64/abi.rs b/cranelift/codegen/src/isa/aarch64/abi.rs index 44b848edc..97ad2abd9 100644 --- a/cranelift/codegen/src/isa/aarch64/abi.rs +++ b/cranelift/codegen/src/isa/aarch64/abi.rs @@ -619,7 +619,10 @@ impl ABIMachineSpec for AArch64MachineDeps { } } - fn g...
6
21
8
4120e4031820598dcb7163333aeb7b58e69381d3
Nick Fitzgerald
2022-01-13T21:19:51
cranelift: Update assertions to indicate that `rotl` is fully ported to ISLE on x64
diff --git a/cranelift/codegen/src/isa/x64/lower.rs b/cranelift/codegen/src/isa/x64/lower.rs index 606b208c1..576a3fdf3 100644 --- a/cranelift/codegen/src/isa/x64/lower.rs +++ b/cranelift/codegen/src/isa/x64/lower.rs @@ -1541,17 +1541,14 @@ fn lower_insn_to_regs<C: LowerCtx<I = Inst>>( | Opcode::Vselect ...
1
3
6
46ade3dab30e8dbf181245bc8877d519ae77bf70
Alex Crichton
2022-01-13T22:38:32
Try to fix CI for Rust 1.58 (#3689) PATH lookup for WIndows command execution was tweaked slightly to not search the cwd, so let's see if this fixes things...
diff --git a/crates/misc/run-examples/src/main.rs b/crates/misc/run-examples/src/main.rs index 362f9e177..93c515ff4 100644 --- a/crates/misc/run-examples/src/main.rs +++ b/crates/misc/run-examples/src/main.rs @@ -89,7 +89,7 @@ fn main() -> anyhow::Result<()> { .arg("ole32.lib") ...
1
1
1
e53f213ac426f32f27d9f89087753ac8ea81d849
Benjamin Bouvier
2022-01-12T18:17:42
Try demangling names before forwarding them to the profiler Before this PR, each profiler (perf/vtune, at the moment) had to have a demangler for each of the programming languages that could have been compiled to wasm and fed into wasmtime. With this, wasmtime now demangles names before even forwarding them to the und...
diff --git a/Cargo.lock b/Cargo.lock index 0f897137f..499faa59d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3560,10 +3560,12 @@ dependencies = [ "anyhow", "bincode", "cfg-if 1.0.0", + "cpp_demangle", "gimli", "ittapi-rs", "object", "region", + "rustc-demangle", "rustix", "serde", "target-lexicon", ...
3
8
1
17021bc77ae0ac9486eac8476b9a0ebca8ece715
bjorn3
2022-01-12T16:19:34
Extract helper functions
diff --git a/crates/cranelift/src/compiler.rs b/crates/cranelift/src/compiler.rs index 5adcce21e..05da81ff5 100644 --- a/crates/cranelift/src/compiler.rs +++ b/crates/cranelift/src/compiler.rs @@ -172,79 +172,21 @@ impl wasmtime_environ::Compiler for Compiler { let result = context.mach_compile_result.as_ref...
1
88
71
f0e821b9e014f48be935d2d20a66165c03237ee3
bjorn3
2022-01-11T18:03:10
Remove all Sink traits
diff --git a/cranelift/codegen/src/binemit/memorysink.rs b/cranelift/codegen/src/binemit/memorysink.rs deleted file mode 100644 index 149fed67b..000000000 --- a/cranelift/codegen/src/binemit/memorysink.rs +++ /dev/null @@ -1,79 +0,0 @@ -//! Code sink that writes binary machine code into contiguous memory. -//! -//! The...
13
188
504
b803514d55e265094d2c8cae26798a6318e97d02
bjorn3
2022-01-11T17:17:29
Remove sink arguments from compile_and_emit The data can be accessed after the fact using context.mach_compile_result
diff --git a/cranelift/codegen/src/context.rs b/cranelift/codegen/src/context.rs index 2cebe0d3c..91781d189 100644 --- a/cranelift/codegen/src/context.rs +++ b/cranelift/codegen/src/context.rs @@ -9,7 +9,7 @@ //! contexts concurrently. Typically, you would have one context per compilation thread and only a //! single...
13
155
138
55d722db05da65621eb17c95050d475d2d632565
bjorn3
2022-01-11T16:10:37
Remove CodeSink
diff --git a/cranelift/codegen/src/binemit/memorysink.rs b/cranelift/codegen/src/binemit/memorysink.rs index 651921609..149fed67b 100644 --- a/cranelift/codegen/src/binemit/memorysink.rs +++ b/cranelift/codegen/src/binemit/memorysink.rs @@ -13,47 +13,9 @@ //! that a `MemoryCodeSink` will always write binary machine co...
8
23
103
a48a60f958316d15d8c58ef6dff72a1f884230fc
bjorn3
2022-01-11T15:54:27
Remove reloc_external from CodeSink And introduce MachBufferFinalized::relocs() in the place.
diff --git a/cranelift/codegen/src/binemit/memorysink.rs b/cranelift/codegen/src/binemit/memorysink.rs index d462dd700..651921609 100644 --- a/cranelift/codegen/src/binemit/memorysink.rs +++ b/cranelift/codegen/src/binemit/memorysink.rs @@ -29,30 +29,22 @@ use core::ptr::write_unaligned; /// /// Note that `MemoryCode...
6
38
61
63e23603461b8d8010caecfb1cfa63e180a6912c
bjorn3
2022-01-11T15:42:52
Remove trap from CodeSink And introduce MachBufferFinalized::traps() in the place.
diff --git a/cranelift/codegen/src/binemit/memorysink.rs b/cranelift/codegen/src/binemit/memorysink.rs index 8b5e02e73..d462dd700 100644 --- a/cranelift/codegen/src/binemit/memorysink.rs +++ b/cranelift/codegen/src/binemit/memorysink.rs @@ -35,7 +35,6 @@ pub struct MemoryCodeSink<'a> { /// Offset is isize because ...
6
25
35
38aaa6e1daecfbf52b2f5265bbfec4dcff9832bb
bjorn3
2022-01-11T15:32:57
Remove add_call_site from CodeSink and RelocSink And introduce MachBufferFinalized::call_sites() in the place.
diff --git a/cranelift/codegen/src/binemit/memorysink.rs b/cranelift/codegen/src/binemit/memorysink.rs index 42ff627b6..8b5e02e73 100644 --- a/cranelift/codegen/src/binemit/memorysink.rs +++ b/cranelift/codegen/src/binemit/memorysink.rs @@ -15,7 +15,7 @@ //! `CodeSink::put*` methods, so the performance impact of the v...
4
24
38
379c9c65a3cb817359d7e14dae72ad4cb9c073f8
bjorn3
2022-01-11T14:10:02
Inline MemoryCodeSink::write
diff --git a/cranelift/codegen/src/binemit/memorysink.rs b/cranelift/codegen/src/binemit/memorysink.rs index 96a1ac461..42ff627b6 100644 --- a/cranelift/codegen/src/binemit/memorysink.rs +++ b/cranelift/codegen/src/binemit/memorysink.rs @@ -92,19 +92,12 @@ pub trait TrapSink { fn trap(&mut self, _: CodeOffset, _: ...
1
4
11
37598ad17058011b16db8e61e46009adabeb7e4f
bjorn3
2022-01-11T13:51:27
Remove end_codegen method from CodeSink
diff --git a/cranelift/codegen/src/binemit/memorysink.rs b/cranelift/codegen/src/binemit/memorysink.rs index d40d5e728..96a1ac461 100644 --- a/cranelift/codegen/src/binemit/memorysink.rs +++ b/cranelift/codegen/src/binemit/memorysink.rs @@ -36,8 +36,6 @@ pub struct MemoryCodeSink<'a> { offset: isize, relocs: ...
5
8
15
354c4f7bf855aa4851debd12744d6bbc63fe7b33
bjorn3
2022-01-11T13:45:21
Remove unused CodeSink methods
diff --git a/cranelift/codegen/src/binemit/memorysink.rs b/cranelift/codegen/src/binemit/memorysink.rs index 6635bff87..d40d5e728 100644 --- a/cranelift/codegen/src/binemit/memorysink.rs +++ b/cranelift/codegen/src/binemit/memorysink.rs @@ -99,26 +99,10 @@ impl<'a> MemoryCodeSink<'a> { } impl<'a> CodeSink for Memor...
4
4
60
88baac4ca6f52d96ebc448f1c7100fbd656d326a
bjorn3
2022-01-11T13:40:53
Move the TestCodeSink functionality to MachBufferFinalized
diff --git a/cranelift/codegen/src/isa/aarch64/inst/emit_tests.rs b/cranelift/codegen/src/isa/aarch64/inst/emit_tests.rs index 915657c2f..3d7016af2 100644 --- a/cranelift/codegen/src/isa/aarch64/inst/emit_tests.rs +++ b/cranelift/codegen/src/isa/aarch64/inst/emit_tests.rs @@ -1,7 +1,6 @@ use crate::ir::types::*; use ...
7
15
93
fd2636c25afd3af8711ce5eb6ec002d009c59294
Alex Crichton
2022-01-10T16:47:35
wasmtime: Make rustix an unconditional dependency (#3675) This is unconditionally used on aarch64 and otherwise trying to manage the precise clause for making it conditional vs unconditional probably isn't worth it. Closes #3672
diff --git a/crates/jit/Cargo.toml b/crates/jit/Cargo.toml index 203746fde..9768b8b7a 100644 --- a/crates/jit/Cargo.toml +++ b/crates/jit/Cargo.toml @@ -29,10 +29,10 @@ bincode = "1.2.1" winapi = { version = "0.3.8", features = ["winnt", "impl-default"] } [target.'cfg(target_os = "linux")'.dependencies] -rustix = {...
1
2
2
2459776424830e2a193d5c59c4c3f8b6e3bbab46
Alex Crichton
2022-01-09T01:18:23
fuzz: Fix infinite loops in table_ops fuzzers I forgot in the recent refactoring to add back in fuel support to the `table_ops` fuzzer. This commit re-adds the previously existent logic to always use fuel to cancel execution of the table_ops fuzzer.
diff --git a/crates/fuzzing/src/generators.rs b/crates/fuzzing/src/generators.rs index 6d025f665..0af5246dd 100644 --- a/crates/fuzzing/src/generators.rs +++ b/crates/fuzzing/src/generators.rs @@ -58,7 +58,7 @@ pub struct WasmtimeConfig { debug_info: bool, canonicalize_nans: bool, interruptable: bool, - ...
2
9
4
894a4d8301aa8dd72f9a74079a6dc5fb2e6b2e92
Cheng Kai
2022-01-07T23:35:51
Remove unnecessary into_iter/collect (#3667) * Remove unnecessary into_iter/collect flags and isa_flags were already of the correct type in HashedEngineCompileEnv's implementation. * Cargo fmt
diff --git a/crates/wasmtime/src/module.rs b/crates/wasmtime/src/module.rs index 9fc2a471d..04c695f21 100644 --- a/crates/wasmtime/src/module.rs +++ b/crates/wasmtime/src/module.rs @@ -942,21 +942,11 @@ struct HashedEngineCompileEnv<'a>(&'a Engine); #[cfg(all(feature = "cache", compiler))] impl std::hash::Hash for Ha...
1
2
12
8d50cf3e2309be0fc5cf9025d5452a54ae4f4048
Teymour Aldridge
2022-01-07T16:08:05
Add a link to the JIT demo.
diff --git a/cranelift/jit/src/lib.rs b/cranelift/jit/src/lib.rs index 6e66ca8dd..5315bad72 100644 --- a/cranelift/jit/src/lib.rs +++ b/cranelift/jit/src/lib.rs @@ -1,4 +1,7 @@ //! Top-level lib.rs for `cranelift_jit`. +//! +//! There is an [example project](https://github.com/bytecodealliance/cranelift-jit-demo/) +//...
1
3
0
6e0f7329936f7040808aa750ae82bd74a15aef26
Nick Fitzgerald
2022-01-06T18:46:09
Fix warning about deprecated `std::array::IntoIter`
diff --git a/crates/wasmtime/src/func.rs b/crates/wasmtime/src/func.rs index c011b52d2..3f4b2ad49 100644 --- a/crates/wasmtime/src/func.rs +++ b/crates/wasmtime/src/func.rs @@ -1459,7 +1459,7 @@ macro_rules! impl_wasm_host_results { fn func_type(params: impl Iterator<Item = ValType>) -> FuncType { ...
2
9
9
23efaf2196d4053b00bc20f03d57c956cbedf8d3
Nick Fitzgerald
2022-01-06T17:41:57
cranelift: Remove unused x64 instruction helpers
diff --git a/cranelift/codegen/src/isa/x64/inst/mod.rs b/cranelift/codegen/src/isa/x64/inst/mod.rs index 3ab8f89b1..f40d3c46e 100644 --- a/cranelift/codegen/src/isa/x64/inst/mod.rs +++ b/cranelift/codegen/src/isa/x64/inst/mod.rs @@ -1301,36 +1301,6 @@ impl Inst { } } - /// Choose which instruction to...
1
0
30
376c93bda0eeef9f203da34411b314ad1183fe8b
bjorn3
2022-01-06T13:39:24
Remove MachBackend It is identical to TargetIsa
diff --git a/cranelift/codegen/src/isa/aarch64/mod.rs b/cranelift/codegen/src/isa/aarch64/mod.rs index 95987b1f0..ae19034dd 100644 --- a/cranelift/codegen/src/isa/aarch64/mod.rs +++ b/cranelift/codegen/src/isa/aarch64/mod.rs @@ -3,14 +3,14 @@ use crate::ir::condcodes::IntCC; use crate::ir::Function; use crate::isa::...
8
75
189
58c25d9e24c681667dd0c724e49fed4e0bb56acb
bjorn3
2022-01-04T18:41:42
Add text_section_builder method to TargetIsa
diff --git a/cranelift/codegen/src/isa/mod.rs b/cranelift/codegen/src/isa/mod.rs index 6e9c68266..270889c86 100644 --- a/cranelift/codegen/src/isa/mod.rs +++ b/cranelift/codegen/src/isa/mod.rs @@ -49,7 +49,7 @@ use crate::flowgraph; use crate::ir::{self, Function}; #[cfg(feature = "unwind")] use crate::isa::unwind::...
3
16
2
03dc74d8e73fd9536e99dacea1f4a60212336c21
bjorn3
2022-01-04T18:38:55
Add emit_unwind_info method to TargetIsa
diff --git a/cranelift/codegen/src/context.rs b/cranelift/codegen/src/context.rs index 107e74053..67fc48d77 100644 --- a/cranelift/codegen/src/context.rs +++ b/cranelift/codegen/src/context.rs @@ -241,10 +241,9 @@ impl Context { &self, isa: &dyn TargetIsa, ) -> CodegenResult<Option<crate::isa::un...
3
20
2
9eba87a6c86cb3111da4c67cec48a23e3de6a001
bjorn3
2022-01-04T18:36:49
Add compile_function method to TargetIsa
diff --git a/cranelift/codegen/src/context.rs b/cranelift/codegen/src/context.rs index d416ef8be..107e74053 100644 --- a/cranelift/codegen/src/context.rs +++ b/cranelift/codegen/src/context.rs @@ -167,8 +167,7 @@ impl Context { self.remove_constant_phis(isa)?; - let backend = isa.get_mach_backend();...
3
19
4
d50f27e8f97674ba0353cc5eae0c46c54e37bcea
bjorn3
2022-01-04T18:28:10
Remove reg_universe method from MachBackend and MachInst
diff --git a/cranelift/codegen/src/isa/aarch64/inst/mod.rs b/cranelift/codegen/src/isa/aarch64/inst/mod.rs index 83d878b74..66a6e536d 100644 --- a/cranelift/codegen/src/isa/aarch64/inst/mod.rs +++ b/cranelift/codegen/src/isa/aarch64/inst/mod.rs @@ -2017,10 +2017,6 @@ impl MachInst for Inst { } } - fn...
9
6
44
96b8879e4b14f03df3684c8711d052221150cd89
bjorn3
2022-01-04T18:21:30
Take reg_universe as argument to machinst::compile
diff --git a/cranelift/codegen/src/isa/aarch64/mod.rs b/cranelift/codegen/src/isa/aarch64/mod.rs index 06302d820..47ccbeb18 100644 --- a/cranelift/codegen/src/isa/aarch64/mod.rs +++ b/cranelift/codegen/src/isa/aarch64/mod.rs @@ -58,7 +58,7 @@ impl AArch64Backend { ) -> CodegenResult<VCode<inst::Inst>> { l...
5
10
9
40072f844ef73113646fb6cc2256f0bf4415a8a4
Teymour Aldridge
2022-01-04T19:15:19
Clarify some documentation. (#3641)
diff --git a/cranelift/codegen/src/ir/immediates.rs b/cranelift/codegen/src/ir/immediates.rs index 473a8e5ed..ca9f8a978 100644 --- a/cranelift/codegen/src/ir/immediates.rs +++ b/cranelift/codegen/src/ir/immediates.rs @@ -69,7 +69,7 @@ impl Imm64 { Self(self.0.wrapping_neg()) } - /// Return bits of th...
1
1
1
17c3c1813f4ab9b29f5da09a409ec765a525c51a
bjorn3
2022-01-03T19:43:35
Remove MachInstEmitInfo
diff --git a/cranelift/codegen/src/isa/aarch64/inst/emit.rs b/cranelift/codegen/src/isa/aarch64/inst/emit.rs index 19c2764e9..b60ed3723 100644 --- a/cranelift/codegen/src/isa/aarch64/inst/emit.rs +++ b/cranelift/codegen/src/isa/aarch64/inst/emit.rs @@ -669,12 +669,6 @@ impl EmitInfo { } } -impl MachInstEmitInfo...
7
12
43
552c801557dc9703f2aef8e5f54c9a769f5dce33
bjorn3
2022-01-03T18:56:22
Remove unused create_unwind_info method
diff --git a/cranelift/codegen/src/isa/mod.rs b/cranelift/codegen/src/isa/mod.rs index f43e9650a..ce034ec01 100644 --- a/cranelift/codegen/src/isa/mod.rs +++ b/cranelift/codegen/src/isa/mod.rs @@ -50,7 +50,6 @@ use crate::ir; #[cfg(feature = "unwind")] use crate::isa::unwind::systemv::RegisterMappingError; use crate...
1
0
13
8d1fc75b6bbb9aa7aac4d38978bee9be913b28d4
bjorn3
2022-01-03T18:47:33
Make MachBackend::triple return &Triple This avoids an unnecessary clone
diff --git a/cranelift/codegen/src/isa/aarch64/mod.rs b/cranelift/codegen/src/isa/aarch64/mod.rs index 183fe1c77..06302d820 100644 --- a/cranelift/codegen/src/isa/aarch64/mod.rs +++ b/cranelift/codegen/src/isa/aarch64/mod.rs @@ -98,8 +98,8 @@ impl MachBackend for AArch64Backend { "aarch64" } - fn tri...
6
10
13
4915162230ccbb32ec744eff5270a76adbce7540
bjorn3
2022-01-03T18:33:30
Remove unnecessary fields from CodeInfo
diff --git a/cranelift/codegen/src/binemit/memorysink.rs b/cranelift/codegen/src/binemit/memorysink.rs index dc86530b7..6635bff87 100644 --- a/cranelift/codegen/src/binemit/memorysink.rs +++ b/cranelift/codegen/src/binemit/memorysink.rs @@ -55,12 +55,7 @@ impl<'a> MemoryCodeSink<'a> { Self { data,...
9
7
98
e98a85e1e2fe8841a77495f0e467883ff19166a7
bjorn3
2022-01-03T18:32:42
Make get_mach_backend non-optional
diff --git a/cranelift/codegen/src/context.rs b/cranelift/codegen/src/context.rs index cf0b20e67..d416ef8be 100644 --- a/cranelift/codegen/src/context.rs +++ b/cranelift/codegen/src/context.rs @@ -167,8 +167,7 @@ impl Context { self.remove_constant_phis(isa)?; - // FIXME: make this non optional - ...
4
13
55
b3aa692a449b2d4eaebe1555581dfe2403d05c0f
bjorn3
2022-01-04T14:48:05
Don't return CodeInfo from Context::compile_and_emit It is already available through ctx.mach_compile_result and rarely needed.
diff --git a/cranelift/codegen/src/context.rs b/cranelift/codegen/src/context.rs index f7cfb8c0c..cf0b20e67 100644 --- a/cranelift/codegen/src/context.rs +++ b/cranelift/codegen/src/context.rs @@ -114,7 +114,7 @@ impl Context { relocs: &mut dyn RelocSink, traps: &mut dyn TrapSink, stack_maps:...
5
20
23
28ede8356a5305300524979610913ce4b7636da9
Teymour Aldridge
2022-01-02T18:17:04
Add a doclink.
diff --git a/cranelift/codegen/src/ir/layout.rs b/cranelift/codegen/src/ir/layout.rs index 0f724a841..37842b59b 100644 --- a/cranelift/codegen/src/ir/layout.rs +++ b/cranelift/codegen/src/ir/layout.rs @@ -480,7 +480,7 @@ struct BlockNode { seq: SequenceNumber, } -/// Iterate over blocks in layout order. See `La...
1
1
1
ad6f76a789cf93ca01970fe5802a5f67864cc440
Andrew Brown
2021-12-18T01:23:03
x64: upgrade ittapi-rs crate (for VTune support) (#3623) This update is no real change in functionality but brings in several of the latest changes to the `ittapi-rs` library: minor fixes to the C library, a new license expression for the Cargo crate, better documentation, updated Rust bindings, and the removal of ...
diff --git a/Cargo.lock b/Cargo.lock index c3fe65add..4122fd11e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -375,9 +375,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.68" +version = "1.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a72c244c1ff497a746a7e1fb3d14bd...
2
6
6
1dbb747d598280d57ee9f7f33793960e2e90535a
bjorn3
2021-12-17T19:39:53
Fix popcnt for small integers
diff --git a/cranelift/codegen/src/isa/x64/lower.rs b/cranelift/codegen/src/isa/x64/lower.rs index f75a9511b..d0d0debfd 100644 --- a/cranelift/codegen/src/isa/x64/lower.rs +++ b/cranelift/codegen/src/isa/x64/lower.rs @@ -2236,14 +2236,25 @@ fn lower_insn_to_regs<C: LowerCtx<I = Inst>>( Opcode::Popcnt => { ...
1
22
5
48a17e95027cfbe7a4d31a1e6c22a30f0f301468
Alex Crichton
2021-12-16T16:10:19
Add CLI options for more configuration options (#3603) This commit adds a few more CLI flags for random fiddly bits in the `Config` structure to make it a bit easier to play around on the command line and see the effect of various flags on compiled code.
diff --git a/src/lib.rs b/src/lib.rs index bd11c77f4..bb62f4d6e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -231,6 +231,19 @@ struct CommonOptions { /// Enable Cranelift's internal NaN canonicalization #[structopt(long)] enable_cranelift_nan_canonicalization: bool, + + /// Executing wasm code will con...
1
17
0
2cdbf32a0674ef2f4abece39a56724c58de08931
Alex Crichton
2021-12-14T22:57:52
Enable the SIMD proposal by default (#3601) * Enable the SIMD proposal by default This commit updates Wasmtime to enable the SIMD proposal for WebAssembly by default. Support has been implemented for quite some time and recently fuzzing has been running for multiple weeks without incident, so it seems like it mi...
diff --git a/crates/wasmtime/src/config.rs b/crates/wasmtime/src/config.rs index a2ee71dbf..bb76ae470 100644 --- a/crates/wasmtime/src/config.rs +++ b/crates/wasmtime/src/config.rs @@ -138,6 +138,7 @@ impl Config { ret.wasm_reference_types(true); ret.wasm_multi_value(true); ret.wasm_bulk_memo...
2
95
87
f1225dfd930e263287fb61a12fe577b206092574
Alex Crichton
2021-12-13T19:48:05
Add a compilation section to disable address maps (#3598) * Add a compilation section to disable address maps This commit adds a new `Config::generate_address_map` compilation setting which is used to disable emission of the `.wasmtime.addrmap` section of compiled artifacts. This section is currently around the s...
diff --git a/crates/c-api/src/trap.rs b/crates/c-api/src/trap.rs index 941ec465a..6a1da6b3f 100644 --- a/crates/c-api/src/trap.rs +++ b/crates/c-api/src/trap.rs @@ -157,7 +157,9 @@ pub extern "C" fn wasmtime_frame_module_name(frame: &wasm_frame_t) -> Option<&wa #[no_mangle] pub extern "C" fn wasm_frame_func_offset(...
12
147
49
0d6688f81a9407a86d0b165fb5cd2c3972905585
Monadic Cat
2021-12-10T22:55:03
rustfmt compiled_blob.rs
diff --git a/cranelift/jit/src/compiled_blob.rs b/cranelift/jit/src/compiled_blob.rs index 3e36283d1..5af006742 100644 --- a/cranelift/jit/src/compiled_blob.rs +++ b/cranelift/jit/src/compiled_blob.rs @@ -98,7 +98,9 @@ impl CompiledBlob { let chop = 32 - 26; let imm26 = (diff a...
1
3
1
b6ade800257ad1f2206ff10d76db1081fc057650
Monadic Cat
2021-12-10T22:42:55
use an unaligned read and write on compiled blob
diff --git a/cranelift/jit/src/compiled_blob.rs b/cranelift/jit/src/compiled_blob.rs index c6c9ad25b..3e36283d1 100644 --- a/cranelift/jit/src/compiled_blob.rs +++ b/cranelift/jit/src/compiled_blob.rs @@ -97,7 +97,8 @@ impl CompiledBlob { // immediate offset argument. let chop ...
1
2
1
dcb64dc311c0b5b99f15340046807d766a044455
Monadic Cat
2021-12-10T22:28:09
assert that offset is in bounds for Arm64Call
diff --git a/cranelift/jit/src/compiled_blob.rs b/cranelift/jit/src/compiled_blob.rs index 5dfa6d481..c6c9ad25b 100644 --- a/cranelift/jit/src/compiled_blob.rs +++ b/cranelift/jit/src/compiled_blob.rs @@ -85,11 +85,18 @@ impl CompiledBlob { let base = get_address(name); // The ...
1
9
2
ad36df54951d562c6a0e2c59d37c85bd7d3c7b6b
Monadic Cat
2021-12-10T21:15:59
add support for Arm64Call relocations in cranelift-jit
diff --git a/cranelift/jit/src/compiled_blob.rs b/cranelift/jit/src/compiled_blob.rs index f00165dba..5dfa6d481 100644 --- a/cranelift/jit/src/compiled_blob.rs +++ b/cranelift/jit/src/compiled_blob.rs @@ -81,6 +81,17 @@ impl CompiledBlob { write_unaligned(at as *mut i32, pcrel) ...
1
11
0
acaa84068d91e2d59214c123a8bd38a07d480ff5
Andrew Brown
2021-12-08T19:46:26
aarch64: assert that temporary and destination registers match during renaming
diff --git a/cranelift/codegen/src/isa/aarch64/lower/isle.rs b/cranelift/codegen/src/isa/aarch64/lower/isle.rs index 221c7362e..c88010626 100644 --- a/cranelift/codegen/src/isa/aarch64/lower/isle.rs +++ b/cranelift/codegen/src/isa/aarch64/lower/isle.rs @@ -50,6 +50,23 @@ where let temp_regs = generated_code::const...
1
17
0
594509b734428023074cdfe3da0bff2c3c1a85c8
Andrew Brown
2021-12-07T19:21:53
x64: assert that temporary and destination registers match during renaming
diff --git a/cranelift/codegen/src/isa/x64/lower/isle.rs b/cranelift/codegen/src/isa/x64/lower/isle.rs index c976ee10c..380ab29a8 100644 --- a/cranelift/codegen/src/isa/x64/lower/isle.rs +++ b/cranelift/codegen/src/isa/x64/lower/isle.rs @@ -47,6 +47,23 @@ where let temp_regs = generated_code::constructor_lower(&mu...
1
17
0
6af8d2a2923f0f2726d238264aa320fb3fac93bb
Nick Fitzgerald
2021-12-07T22:53:40
Rename the `isle` crate to `cranelift-isle` The `isle` crate name is already taken on crates.io :(
diff --git a/Cargo.lock b/Cargo.lock index 085872a36..1fbad642e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -539,10 +539,10 @@ dependencies = [ "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", + "cranelift-isle", "criterion", "gimli", "hashbrown", - "isle", "log", "miette", "r...
8
21
19
7e80c061f2b60661cdef1b5703651809d592771a
Nick Fitzgerald
2021-12-07T22:23:41
cranelift-codegen: depend on an exact version of `isle` This should (hopefully) fix our publish script.
diff --git a/cranelift/codegen/Cargo.toml b/cranelift/codegen/Cargo.toml index 3a3ca5b61..3bc372460 100644 --- a/cranelift/codegen/Cargo.toml +++ b/cranelift/codegen/Cargo.toml @@ -35,7 +35,7 @@ criterion = "0.3" [build-dependencies] cranelift-codegen-meta = { path = "meta", version = "0.78.0" } -isle = { path = "....
1
1
1
ce67e7fcd1d2d6da1899d2b46cc41ef877bd9462
Amanieu d'Antras
2021-12-02T11:53:04
Fix ownership in *_vec_new functions in the C API These functions are specified to take ownership of the objects in the given slice, not clone them.
diff --git a/crates/c-api/src/vec.rs b/crates/c-api/src/vec.rs index 9091fa7e2..77835b415 100644 --- a/crates/c-api/src/vec.rs +++ b/crates/c-api/src/vec.rs @@ -120,8 +120,8 @@ macro_rules! declare_vecs { size: usize, ptr: *const $elem_ty, ) { - let slice = slice::from_raw_...
1
2
2
6d61c1578f067c1d6b121142cb00b729b92f964f
Amanieu d'Antras
2021-12-02T11:51:02
Add a proper implementation of Clone for C API vector types The previous implementation used a shallow copy, which is incorrect and could lead to a use-after-free.
diff --git a/crates/c-api/src/vec.rs b/crates/c-api/src/vec.rs index 1b45aeff2..9091fa7e2 100644 --- a/crates/c-api/src/vec.rs +++ b/crates/c-api/src/vec.rs @@ -29,7 +29,6 @@ macro_rules! declare_vecs { ))* ) => {$( #[repr(C)] - #[derive(Clone)] pub struct $name { siz...
1
6
1
cf03b2a513026c13f6c85f3e3b964141a25dbf25
Pat Hickey
2021-12-03T18:33:09
cranelift codegen & filetests: silence new dead code warnings in rust 1.57
diff --git a/cranelift/codegen/src/machinst/blockorder.rs b/cranelift/codegen/src/machinst/blockorder.rs index 8c84be4f4..73c5ea245 100644 --- a/cranelift/codegen/src/machinst/blockorder.rs +++ b/cranelift/codegen/src/machinst/blockorder.rs @@ -86,6 +86,7 @@ pub struct BlockLoweringOrder { lowered_order: Vec<Lower...
3
4
0
0e90d4b903f9effda9f7a4d16853b675beb08c49
Alex Crichton
2021-12-01T21:48:36
Update addr2line and gimli deps (#3580) Just a routine update, figured it was good to stay close to their most recent versions
diff --git a/Cargo.lock b/Cargo.lock index 407c418ab..358b104f8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e61f2b7f93d2c7d2b08263acaa4a363b...
7
14
12
1b33553cea1f2666fd75a6373fe79419d2e45fcc
Benjamin Bouvier
2021-12-01T10:33:27
Tidy up unused dependencies
diff --git a/Cargo.lock b/Cargo.lock index 804fea191..407c418ab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1445,7 +1445,6 @@ version = "0.1.0" dependencies = [ "env_logger 0.8.3", "isle", - "log", "miette", "structopt", ] @@ -3163,7 +3162,6 @@ dependencies = [ "bitflags", "cap-rand", "cap-std", - "io-...
5
1
11
b34788ae8afd8010a7b68b905a03e60dfa7179ad
Benjamin Bouvier
2021-12-01T10:24:59
Make miette optional in cranelift-codegen, as it's only used when rebuilding isle
diff --git a/cranelift/codegen/Cargo.toml b/cranelift/codegen/Cargo.toml index 9f5a5fcdd..6e3e25144 100644 --- a/cranelift/codegen/Cargo.toml +++ b/cranelift/codegen/Cargo.toml @@ -36,7 +36,7 @@ criterion = "0.3" [build-dependencies] cranelift-codegen-meta = { path = "meta", version = "0.78.0" } isle = { path = "../...
1
2
2
ca7c54b5f8f00865a06241030fa6140bd6d1c036
Scott McMurray
2021-11-30T00:48:03
Add `Type::int_with_byte_size` constructor
diff --git a/cranelift/codegen/src/ir/types.rs b/cranelift/codegen/src/ir/types.rs index bb2056926..59e6a871b 100644 --- a/cranelift/codegen/src/ir/types.rs +++ b/cranelift/codegen/src/ir/types.rs @@ -104,6 +104,8 @@ impl Type { } /// Get an integer type with the requested number of bits. + /// + /// ...
2
29
7
42b23dac4a5ff1c61529f98b6aa11ec23eeaff6b
Dan Gohman
2021-11-29T23:55:10
Make the trap name for `unreachable` traps more descriptive. (#3568) Following up on WebAssembly/wasi-sdk#210, this makes the trap message for `unreachable` traps more descriptive of what actually caused the trap, so that it doesn't sound like maybe Wasmtime itself executed a `unreachable!()` macro in Rust. Befo...
diff --git a/crates/wasmtime/src/trap.rs b/crates/wasmtime/src/trap.rs index 39f557dcf..93dfe12a1 100644 --- a/crates/wasmtime/src/trap.rs +++ b/crates/wasmtime/src/trap.rs @@ -119,7 +119,7 @@ impl fmt::Display for TrapCode { IntegerOverflow => "integer overflow", IntegerDivisionByZero => "int...
2
6
6
d55a19365e0ebcee3c7e20f9596c2667574bd856
Scott McMurray
2021-06-01T15:41:56
Add FunctionBuilder::emit_small_memory_compare This takes an IntCC for the comparison to do, though panics for Signed* since memcmp is an unsigned comparison. Currently it's most useful for (Not)Equal, but once big-endian loads are implemented it'll be able to support the other Unsigned* comparisons nicely on more th...
diff --git a/cranelift/frontend/src/frontend.rs b/cranelift/frontend/src/frontend.rs index 957c0c8a0..eb87cb0e6 100644 --- a/cranelift/frontend/src/frontend.rs +++ b/cranelift/frontend/src/frontend.rs @@ -4,6 +4,7 @@ use crate::variable::Variable; use cranelift_codegen::cursor::{Cursor, FuncCursor}; use cranelift_cod...
1
293
4
c266f7f4c3141436571eee0a70421756a253a1ee
Scott McMurray
2021-05-31T19:27:29
Cranelift: Add `LibCall::Memcmp` The comment says the enum is "likely to grow" and the function's been in libc since C89, so hopefully this is ok. I'd like to use it for emitting things like array equality.
diff --git a/cranelift/codegen/src/ir/libcall.rs b/cranelift/codegen/src/ir/libcall.rs index e8298d8ee..5dbbd7232 100644 --- a/cranelift/codegen/src/ir/libcall.rs +++ b/cranelift/codegen/src/ir/libcall.rs @@ -56,6 +56,8 @@ pub enum LibCall { Memset, /// libc.memmove Memmove, + /// libc.memcmp + Mem...
3
112
0
9f6efe0e22e7faa59c01699cc90248ee6585a144
Benjamin Bouvier
2021-11-23T15:09:31
Bump regalloc in Cranelift (#3558) This regalloc version contains a performance fix around creation of very large logs that might be unused.
diff --git a/Cargo.lock b/Cargo.lock index 1e20bca4e..804fea191 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2360,9 +2360,9 @@ dependencies = [ [[package]] name = "regalloc" -version = "0.0.32" +version = "0.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6304468554ed921da3d32c...
2
3
3
ec43254292122f5bf6b4f366d8ffb91349258dfd
Alex Crichton
2021-11-22T18:21:26
Enable nan canonicalization in differential fuzzing (#3557) This fixes a fuzz issue discovered over the weekend where stores with different values for nan canonicalization may produce different results. This is expected, however, so the fix for differential execution is to always enable nan canonicalization.
diff --git a/crates/fuzzing/src/oracles.rs b/crates/fuzzing/src/oracles.rs index 8d2fd334c..d3b440e55 100644 --- a/crates/fuzzing/src/oracles.rs +++ b/crates/fuzzing/src/oracles.rs @@ -265,6 +265,12 @@ pub fn differential_execution( // to accept modules that would otherwise be broken by module linking. ...
1
6
0
e08bcd6aadea220176b08605b6a6bd2c45e1d8c6
Alex Crichton
2021-11-19T20:33:11
Revert "Temporarily disable SIMD fuzzing on CI" (#3555) This reverts commit 95e8723d0767556f0ddbc9151bce269464852bb1.
diff --git a/crates/fuzzing/src/generators.rs b/crates/fuzzing/src/generators.rs index 295ea29a4..9c52c30f6 100644 --- a/crates/fuzzing/src/generators.rs +++ b/crates/fuzzing/src/generators.rs @@ -213,6 +213,12 @@ impl wasm_smith::Config for WasmtimeDefaultConfig { 4 } + // Turn some wasm features de...
3
8
1
4c75616a7cebf01cd26f7b0f32ac52aa2493576c
bjorn3
2021-11-18T17:51:35
Remove unused constants from cranelift-codegen-shared (#3479)
diff --git a/cranelift/codegen/shared/src/constants.rs b/cranelift/codegen/shared/src/constants.rs index b3f137785..e052cc356 100644 --- a/cranelift/codegen/shared/src/constants.rs +++ b/cranelift/codegen/shared/src/constants.rs @@ -20,11 +20,3 @@ pub const REFERENCE_BASE: u8 = 0x7E; /// Start of the 2-lane vector t...
1
0
8
1697e32afa955ac1354feb7f3f2767a3b81f8981
Chris Fallin
2021-11-16T23:22:43
Let's try canonicalizing file paths in the manifest too...
diff --git a/cranelift/codegen/build.rs b/cranelift/codegen/build.rs index ef045fef7..651377fb5 100644 --- a/cranelift/codegen/build.rs +++ b/cranelift/codegen/build.rs @@ -189,12 +189,8 @@ impl IsleCompilation { // One line in the manifest: <filename> <sha-512 hash>. let mut hasher = Sha512::...
1
2
6