Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,041 changes: 0 additions & 2,041 deletions Cargo.lock

This file was deleted.

13 changes: 10 additions & 3 deletions as_std/src/agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,16 @@ mod refer_based_impl {
}
} else {
let fingerprint = T::__fingerprint();

libos!(buffer_alloc(&slot, l, fingerprint)).expect("alloc failed.") as *mut T

let ptr = libos!(buffer_alloc(&slot, l, fingerprint));
let ptr = ptr.expect("alloc failed.") as *mut T;
if ptr.is_null() {
panic!("buffer_alloc returned null pointer!");
}
// key:Initialize memory immediately after allocation
unsafe {
core::ptr::write(ptr, T::default());
}
ptr
// let val = T::default();
// println!("will write addr=0x{:x}", addr as usize);
// unsafe { core::ptr::write(addr, val) };
Expand Down
12 changes: 7 additions & 5 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

set positional-arguments

enable_mpk := "0"
enable_mpk := "1"
enable_pkey_per_func := "0"
enable_file_buffer := "0"

Expand Down Expand Up @@ -29,7 +29,8 @@ rust_func func_name:

libos lib_name:
cargo build {{ release_flag }} {{ if enable_mpk == "1" { "--features mpk" } else { "" } }} \
--manifest-path common_service/{{ lib_name }}/Cargo.toml
--manifest-path common_service/{{ lib_name }}/Cargo.toml &&\
cp common_service/{{ lib_name }}/target/{{ profile }}/lib{{ lib_name }}.so ./target/{{ profile }}

pass_args:
just rust_func func_a
Expand Down Expand Up @@ -72,7 +73,7 @@ all_rust:
run_rust_test:
just all_libos
just all_rust
./scripts/run_tests.sh {{ mpk_flag }}
./scripts/run_tests.sh {{release_flag}} {{ mpk_flag }}

cc_flags_p1 := "-Wl,--gc-sections -nostdlib -Wl,--whole-archive"
cc_flags_p2 := "-Wl,--no-whole-archive -shared"
Expand Down Expand Up @@ -140,8 +141,9 @@ gen_data:
sudo -E ./scripts/gen_data.py

init:
rustup override set 'nightly-2023-12-01'
rustup override set 'nightly-2024-01-04'
rustup target add x86_64-unknown-linux-musl
rustup target add x86_64-unknown-none
[ -f fs_images/fatfs.img ] || unzip fs_images/fatfs.zip -d fs_images
[ -d image_content ] || mkdir image_content

Expand Down Expand Up @@ -248,7 +250,7 @@ breakdown: asvisor all_libos
target/{{profile}}/asvisor --files isol_config/parallel_sort_c5.json --metrics total-dur 2>&1 | grep 'total_dur'
target/{{profile}}/asvisor --files isol_config/long_chain_n15.json --metrics total-dur 2>&1 | grep 'total_dur'

p99: asvisor all_libos parallel_sort
p99_latency: asvisor all_libos parallel_sort
-sudo mount fs_images/fatfs.img image_content 2>/dev/null
sudo -E ./scripts/gen_data.py 0 0 3 '25 * 1024 * 1024'

Expand Down
13 changes: 9 additions & 4 deletions scripts/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,20 @@ declare -A results

# 获取脚本参数(feature)
feature_arg=""
if [ $# -gt 0 ]; then
feature_arg="--features $1"
fi
release_arg=""
for arg in "$@"; do
if [[ $arg == --features* ]]; then
feature_arg="$arg"
elif [[ $arg == --release ]]; then
release_arg="--release"
fi
done

for group in "${!test_groups[@]}"; do
names=${test_groups[$group]}

for name in $names; do
output=$(RUST_LOG=info cargo run $feature_arg -- --files "isol_config/$name.json")
output=$(RUST_LOG=info cargo run $release_arg $feature_arg -- --files "isol_config/$name.json")
if [ $? -eq 0 ]; then
results[$name]="passed"
((passed_count++)) # 增加通过计数
Expand Down
2 changes: 1 addition & 1 deletion user/wasmtime_checker/Cargo.lock

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

1 change: 0 additions & 1 deletion user/wasmtime_cpython_func/Cargo.lock

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

1 change: 0 additions & 1 deletion user/wasmtime_cpython_parallel_sort/Cargo.lock

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

1 change: 0 additions & 1 deletion user/wasmtime_cpython_wordcount/Cargo.lock

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

2 changes: 1 addition & 1 deletion user/wasmtime_longchain/Cargo.lock

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

2 changes: 1 addition & 1 deletion user/wasmtime_mapper/Cargo.lock

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

2 changes: 1 addition & 1 deletion user/wasmtime_merger/Cargo.lock

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

2 changes: 1 addition & 1 deletion user/wasmtime_reducer/Cargo.lock

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

2 changes: 1 addition & 1 deletion user/wasmtime_sorter/Cargo.lock

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

2 changes: 1 addition & 1 deletion user/wasmtime_spliter/Cargo.lock

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

4 changes: 2 additions & 2 deletions wasmtime_wasi_api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ hashbrown = { version = "0.14", default-features = false, features = ["ahash"] }
lazy_static = { version = "1.4.0", features = ["spin_no_std"] }
sjlj = { version = "0.1.3" }

# wasmtime = { path = "../wasmtime-as-lib", default-features = false, features = [
wasmtime = { git = "https://gitee.com/tju-cloud-computing/wasmtime-as-lib", branch = "master", default-features = false, features = [
# wasmtime = { path = "../../wasmtime-as-lib", default-features = false, features = [
wasmtime = { git = "https://gitee.com/tanksys/wasmtime-as-lib", branch = "dev-0720", default-features = false, features = [
"runtime",
"gc",
"component-model",
Expand Down
Loading