-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_transitions_benchmark.sh
executable file
·103 lines (88 loc) · 3.24 KB
/
run_transitions_benchmark.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#!/bin/bash
SLEEP_TIME=3
sleep $SLEEP_TIME
echo "Transition: Func"
cd rlbox_sandboxing_api/build_release
echo -n "Direct call: "
./test_rlbox_glue "sandbox glue tests rlbox_noop_sandbox" | egrep "Unsandboxed function|Unsandboxed syscall"
echo -n "Callback and Indirect call: "
./test_rlbox_glue_indirect | grep "Sandboxed function invocation time"
cd ../..
echo "----------------------------"
sleep $SLEEP_TIME
echo "Transition: WasmLucet"
cd rlbox_lucetstock_sandbox/build_release
echo -n "Indirect call: "
./test_rlbox_glue "sandbox glue tests rlbox_lucet_sandbox" | grep "Sandboxed function invocation"
echo "Direct call, Callback, Syscall: N/A"
cd ../..
echo "----------------------------"
sleep $SLEEP_TIME
echo "Transition: WasmFullSave"
cd zerocost_testing_sandbox/build_release
echo -n "Indirect call: "
./test_rlbox_glue "sandbox glue tests rlbox_lucet_sandbox" | grep "Sandboxed"
cd ../../rlbox_lucet_directcall_benchmarks/build_release
echo -n "Direct call: "
./main_fullsave
cd ../..
echo "----------------------------"
sleep $SLEEP_TIME
echo "Transition: WasmRegSave"
cd zerocost_testing_sandbox/build_release
echo -n "Indirect call: "
./test_rlbox_glue_noswitchstack "sandbox glue tests rlbox_lucet_sandbox" | grep "Sandboxed"
cd ../../rlbox_lucet_directcall_benchmarks/build_release
echo -n "Direct call: "
./main_regsave
cd ../..
echo "----------------------------"
sleep $SLEEP_TIME
echo "Transition: WasmZero"
cd rlbox_lucet_sandbox/build_release
echo -n "Indirect call: "
./test_rlbox_glue "sandbox glue tests rlbox_lucet_sandbox" | grep "Sandboxed"
cd ../../rlbox_lucet_directcall_benchmarks/build_release
echo -n "Direct call: "
./main_zerocost
cd ../..
echo "----------------------------"
sleep $SLEEP_TIME
echo "Transition: Func (32-bit)"
cd rlbox_sandboxing_api/build_release_32bit
echo -n "Direct call: "
./test_rlbox_glue "sandbox glue tests rlbox_noop_sandbox" | egrep "Unsandboxed function|Unsandboxed syscall"
echo -n "Callback and Indirect call: "
./test_rlbox_glue_indirect | grep "Sandboxed function invocation time"
cd ../..
echo "----------------------------"
sleep $SLEEP_TIME
echo "Transition: IdealFullSave"
cd rlbox_mpk_sandbox/build_release
echo -n "Indirect call: "
./test_rlbox_glue "sandbox glue tests rlbox_mpk_sandbox" | grep "Sandboxed"
cd ../../rlbox_lucet_directcall_benchmarks/build_release
echo -n "Direct call: "
./main_mpkfullsave
cd ../..
echo "----------------------------"
sleep $SLEEP_TIME
echo "Transition: NaClFullSave"
cd rlbox_nacl_sandbox/build_release
echo -n "Indirect call: "
./test_rlbox_glue "sandbox glue tests rlbox_nacl_sandbox" | grep "Sandboxed"
echo -n "Syscall: "
../../Sandboxing_NaCl/native_client/scons-out-firefox/opt-linux-x86-32/staging/sel_ldr -f ./nacl/syscall_bench_nacl.nexe -B ../../Sandboxing_NaCl/native_client/scons-out-firefox/nacl_irt-x86-32/staging/irt_core.nexe 2>&1 | grep "syscall invocation"
echo "Direct call: N/A"
cd ../..
echo "----------------------------"
sleep $SLEEP_TIME
echo "Transition: SegmentZero"
cd rlbox_segmentsfizerocost_sandbox/build_release
echo -n "Indirect call: "
./test_rlbox_glue "sandbox glue tests rlbox_segmentsfi_sandbox" | grep "Sandboxed"
cd ../../rlbox_lucet_directcall_benchmarks/build_release
echo -n "Direct call: "
./main_segmentsfi
cd ../..
echo "----------------------------"