Skip to content

Instantly share code, notes, and snippets.

diff --git a/Cargo.toml b/Cargo.toml
index 24752f0..d63708f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -41,20 +41,20 @@ log = "0.4.22"
semver = "1.0.25"
js-component-bindgen = { path = "./crates/js-component-bindgen" }
structopt = "0.3.26"
-wasm-encoder = "0.221.2"
-wasm-metadata = "0.221.2"
[~/code/wasmtime[pulley-less-instruction-loads]] $ /opt/intel/oneapi/vtune/latest/bin64/vtune -collect uarch-exploration ./target/x86_64-unknown-linux-gnu/release/wasmtime run -C cache=n --target pulley64 --invoke run --preload env=time.wasm ../wasmi-benchmarks/benches/res/wasm/coremark-minimal.wasm
vtune: Warning: To profile kernel modules during the session, make sure they are available in the /lib/modules/kernel_version/ location.
vtune: Collection started. To stop the collection, either press CTRL-C or enter from another console window: vtune -r /home/alex/code/wasmtime/r001ue -command stop.
warning: using `--invoke` with a function that returns values is experimental and may break in the future
1557.9965
vtune: Collection stopped.
vtune: Using result path `/home/alex/code/wasmtime/r001ue'
vtune: Executing actions 19 % Resolving information for `libc.so.6'
vtune: Warning: Cannot locate file `vmlinux'.
vtune: Executing actions 20 % Resolving information for `wasmtime'
use wasmtime::{Module, Store};
fn main() {
let _ = env_logger::try_init();
for i in 0.. {
if i % 1000 == 0 {
println!("{i}");
}
#include <stdio.h>
#include <thread>
#include <sys/mman.h>
#include <assert.h>
struct Foo {
int a;
void *ptr;
Foo() : a(4) {
ptr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
This file has been truncated, but you can view the full file.
==2444257== Helgrind, a thread error detector
==2444257== Copyright (C) 2007-2017, and GNU GPL'd, by OpenWorks LLP et al.
==2444257== Using Valgrind-3.23.0.GIT and LibVEX; rerun with -h for copyright info
==2444257== Command: target/x86_64-unknown-linux-gnu/release/wat
==2444257==
0
==2444257== ---Thread-Announcement------------------------------------------
==2444257==
==2444257== Thread #1 is the program's root thread
==2444257==
Finished `release` profile [optimized + debuginfo] target(s) in 0.10s
Running `target/x86_64-unknown-linux-gnu/release/wat`
0
==================
WARNING: ThreadSanitizer: data race (pid=2339260)
Write of size 8 at 0x7faaa6b96000 by thread T3:
#0 __tsan_memcpy /rustc/llvm/src/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_memintrinsics.cpp:27:3 (wat+0xe69be) (BuildId: 2ed7393f2cc8e94b8a2c0cace5ca376100e9035a)
#1 core::intrinsics::copy_nonoverlapping::h557b8d907fa657c7 /home/alex/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/intrinsics/mod.rs:4390:14 (wat+0x3979bd) (BuildId: 2ed7393f2cc8e94b8a2c0cace5ca376100e9035a)
#2 core::slice::_$LT$impl$u20$$u5b$T$u5d$$GT$::copy_from_slice::h12b494d3c29e653e /home/alex/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:3735:13 (wat+0x3979bd)
#3 _$LT$$LT$wasmtime..compile..runtime..MmapVecWrapper$u20$as$u20$wasmtime_environ..compile..module_art
Finished `release` profile [optimized] target(s) in 0.10s
Running `target/x86_64-unknown-linux-gnu/release/wat`
0
==================
WARNING: ThreadSanitizer: data race (pid=2285684)
Write of size 8 at 0x724000008028 by thread T1:
#0 memmove <null> (wat+0xe893e) (BuildId: a3a6796c17d7de568cd8820845c07bac41837262)
#1 <null> <null> (libgcc_s.so.1+0x243c3) (BuildId: 3072445288dd2aba348bf583c65f70509aab8141)
#2 wasmtime::runtime::code_memory::CodeMemory::publish::hb3246a7a669651d2 <null> (wat+0x31a75b) (BuildId: a3a6796c17d7de568cd8820845c07bac41837262)
#3 wasmtime::compile::runtime::publish_mmap::he7291abf92f4259c <null> (wat+0x3c610e) (BuildId: a3a6796c17d7de568cd8820845c07bac41837262)
diff --git a/src/vms/wasmtime.rs b/src/vms/wasmtime.rs
index 115f93d..befdc3d 100644
--- a/src/vms/wasmtime.rs
+++ b/src/vms/wasmtime.rs
@@ -3,7 +3,13 @@ use crate::utils::{CompileTestFilter, ExecuteTestFilter, TestFilter};
use wasmi_new::ModuleImportsIter;
pub struct Wasmtime {
- pub strategy: wasmtime::Strategy,
+ pub strategy: Strategy,
@alexcrichton
alexcrichton / top.js
Created November 19, 2024 00:03
top triggers
// Installation:
//
// 1. Place this file in a folder "$somewhere/raidboss/top.js".
// a. example: C:/Users/alex/Downloads/tmp/raidboss/top.js
// 2. ACT > Plugins > OverlayPlugin.dll > Cactbot Config
// 3. Set "Cactbot user directory" to "$somewhere" from above.
// a. example: C:/Users/alex/Downloads/tmp
// 4. Reload the overlay
// 5. In "Cactbot Config" under "Raidboss" at the bottom you should see a path to "top.js"
// 6. Under "top.js" you should see "The Omega Protocol (Ultimate)"
128.cwasm: file format elf64-x86-64
Disassembly of section .text:
0000000000000000 <wasm[0]::function[0]>:
0: 55 push %rbp
1: 48 89 e5 mov %rsp,%rbp
4: 4c 8b 4f 58 mov 0x58(%rdi),%r9