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

WIP: DON'T MERGE: compare init #49

Open
wants to merge 161 commits into
base: init
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
161 commits
Select commit Hold shift + click to select a range
b5155dd
update tracer
junyu0312 Jun 22, 2022
0d2cddf
use Rc for tracer
junyu0312 Jun 27, 2022
c15a16a
dump values of dropkeep for Return
junyu0312 Jun 29, 2022
1f0f120
replace the type of BrIfNez's top with i32
junyu0312 Jun 29, 2022
3a26f81
option tracer
junyu0312 Jul 11, 2022
22094c0
add run_start_tracer
junyu0312 Jul 11, 2022
08f3a68
depends on specs workspace
junyu0312 Jul 12, 2022
b78c150
fix compiling warning
junyu0312 Jul 12, 2022
dc4f353
support drop
junyu0312 Jul 13, 2022
0e1942a
get type of Local
junyu0312 Jul 13, 2022
0a82e88
add dropkeep info for Return
junyu0312 Jul 13, 2022
761a99a
expose type of keep of Return
junyu0312 Jul 14, 2022
5ff693b
bugfix: dropkeep
junyu0312 Jul 14, 2022
d6d838d
add jtable
junyu0312 Jul 14, 2022
32de987
fill jtable
junyu0312 Jul 14, 2022
e1b8cba
remove bid
lanbones Jul 14, 2022
7b10e72
bugfix: get block type from Blocktype
junyu0312 Jul 15, 2022
023827b
remove print
junyu0312 Jul 15, 2022
788122f
adapt sp, mmid
junyu0312 Jul 15, 2022
9587ddb
fid starts from 1
junyu0312 Jul 15, 2022
9d10882
bugfix: incr func_index correctly
junyu0312 Jul 15, 2022
5c7ea9b
bugfix: set the index of start function to zero
junyu0312 Jul 16, 2022
851f597
add i32const
junyu0312 Jul 18, 2022
b518a3b
add i32or, i32ne supporting
junyu0312 Jul 18, 2022
0ba3833
add call op
junyu0312 Jul 18, 2022
9e855cf
bugfix: fix func tranlation
junyu0312 Jul 18, 2022
7734101
bugfix: read top of valuestack correctly
junyu0312 Jul 18, 2022
92fa011
add inst type for binop
junyu0312 Jul 19, 2022
614a8b7
adapt zkWasm
junyu0312 Jul 19, 2022
c7d09bf
support i32.eq
junyu0312 Jul 20, 2022
620c614
support br if
junyu0312 Jul 20, 2022
049ae20
fix jentry
junyu0312 Jul 21, 2022
eccb428
bugfix: convert i32 to u64 correctly
junyu0312 Jul 21, 2022
23f04d4
remove print
junyu0312 Jul 21, 2022
3d6193e
support i32.store/load, teelocal
junyu0312 Jul 25, 2022
af0996d
push imtable
junyu0312 Jul 25, 2022
9799c41
fill all mem initialization in imtable
junyu0312 Jul 25, 2022
f429edb
bugfix: dont push imtable if mem inst is not exist
junyu0312 Jul 25, 2022
44b7f41
support store/load
junyu0312 Jul 26, 2022
6315e32
load block_value
junyu0312 Jul 26, 2022
513132d
support host_function
junyu0312 Jul 27, 2022
1f92d88
seperate host call from wasm call
junyu0312 Jul 27, 2022
c076061
update callhosttime stepinfo
junyu0312 Jul 28, 2022
a302968
give type of time function to u64
junyu0312 Jul 28, 2022
ffdcef9
support store
junyu0312 Jul 29, 2022
5901532
support ge gt
junyu0312 Aug 1, 2022
f5f8966
support shl, shr_u
junyu0312 Aug 1, 2022
71dc455
support br and setlocal
junyu0312 Aug 2, 2022
d39ed07
support le_u and lt_u
junyu0312 Aug 3, 2022
41e5377
support some i64 insts
junyu0312 Aug 22, 2022
e3e54ac
support i64const
junyu0312 Aug 22, 2022
682edb8
support insts for sha
junyu0312 Aug 24, 2022
88c6597
support i64.sub
junyu0312 Aug 25, 2022
bcf87e3
group eqz into test
junyu0312 Aug 25, 2022
524b14d
group wrap and extend
junyu0312 Aug 25, 2022
058c6f6
support select and call host
junyu0312 Aug 26, 2022
0df0adb
save args for host call
junyu0312 Aug 29, 2022
16fb283
export signature for host function
junyu0312 Aug 29, 2022
2e7046b
bugfix: i32.load should use type u32
junyu0312 Aug 31, 2022
0f93287
remove primitive type u64 and u32
junyu0312 Aug 31, 2022
14cabb9
support I32Sub/Mul
xgaozoyoe Sep 8, 2022
16481df
Add I32Load8S
lanbones Oct 4, 2022
723de9c
support select
junyu0312 Oct 4, 2022
b340d6d
dump more info for foreign call
junyu0312 Oct 3, 2022
22f7378
Add more I64BinShiftOp
lanbones Oct 5, 2022
a3b39e4
Add more BinBitOp
lanbones Oct 5, 2022
226e26f
support i64.extend_i32_s
junyu0312 Oct 6, 2022
43c8b07
Merge pull request #6 from DelphinusLab/zhangjunyu/convert
junyu0312 Oct 6, 2022
33f48da
fix value cast according to its vtype
lanbones Oct 10, 2022
da209bf
Merge pull request #7 from DelphinusLab/fix-value
junyu0312 Oct 10, 2022
9cea473
explicitly push local var
junyu0312 Oct 10, 2022
d8e0f5c
add op_index_in_plugin for callhost
junyu0312 Oct 10, 2022
03a803f
Merge pull request #8 from DelphinusLab/sha256
junyu0312 Oct 11, 2022
23b328b
feat: support I64GeU
junyu0312 Oct 13, 2022
4d32e3b
Merge pull request #9 from DelphinusLab/zhangjunyu/wasm_input
junyu0312 Oct 13, 2022
64e83c8
feat: add a batch of rel insts
junyu0312 Oct 13, 2022
d5ca266
Merge pull request #10 from DelphinusLab/zhangjunyu/rel
junyu0312 Oct 13, 2022
a47f71b
add support for global
lanbones Oct 18, 2022
b949cc5
Merge pull request #11 from DelphinusLab/heng/global
junyu0312 Oct 18, 2022
64693c7
feat: Load more info for global var
junyu0312 Oct 19, 2022
d734baa
feat: Enable I64Store8 inst
junyu0312 Oct 19, 2022
0feac65
Merge pull request #12 from DelphinusLab/zhangjunyu/global
junyu0312 Oct 20, 2022
26d2881
fix: fix compile warning
junyu0312 Oct 25, 2022
8f39408
Merge pull request #13 from DelphinusLab/zhangjunyu/warning
junyu0312 Oct 25, 2022
ef0d0a6
feat: impl more bin ops
lanbones Nov 2, 2022
765729d
Merge pull request #14 from DelphinusLab/binop
junyu0312 Nov 3, 2022
1b89542
fix: fix dump args
junyu0312 Nov 26, 2022
c1c4c02
fix: fill signed instruction
Akas1337 Dec 1, 2022
6fa7199
Merge pull request #17 from DelphinusLab/hzx/merge
junyu0312 Dec 1, 2022
62ab65c
feat: support clz/ctz instruction
junyu0312 Dec 7, 2022
8e72678
Merge pull request #18 from DelphinusLab/zhangjunyu/unary
junyu0312 Dec 8, 2022
42444f7
feat: support br_table instruction
junyu0312 Dec 12, 2022
5c7889c
Merge pull request #19 from DelphinusLab/zhangjunyu/br_table
junyu0312 Dec 12, 2022
b5eb0e8
impl all load case
lanbones Dec 16, 2022
273ad49
impl all store case
lanbones Dec 16, 2022
50a5162
add missing load case
lanbones Dec 16, 2022
e700d70
support store cross
Akas1337 Dec 26, 2022
f5e3036
Merge pull request #23 from DelphinusLab/hzx/merge
junyu0312 Dec 26, 2022
4a5bae4
feat: support call_indirect
junyu0312 Dec 18, 2022
1d5eb51
Merge pull request #22 from DelphinusLab/zhangjunyu/call_indirect
junyu0312 Dec 28, 2022
144ec6c
feat: support load cross
Akas1337 Dec 29, 2022
82e9033
Merge pull request #24 from DelphinusLab/hzx/merge
junyu0312 Dec 29, 2022
6c78965
feat: support memory.size/memory.grow instruction
junyu0312 Jan 4, 2023
ffc80a6
Merge pull request #25 from DelphinusLab/bulk_memory
junyu0312 Jan 10, 2023
8debc77
feat: support i64eqz
junyu0312 Jan 18, 2023
4a14ff1
Merge pull request #26 from DelphinusLab/i64eqz
junyu0312 Jan 18, 2023
4d22067
refactor: unify tables strucutre with zkwasm
junyu0312 Jan 30, 2023
a2f04cd
Merge pull request #27 from DelphinusLab/refactor_table
junyu0312 Jan 31, 2023
ccacdf1
feat: support external host call
junyu0312 Feb 6, 2023
71b3ef2
Merge pull request #28 from DelphinusLab/zhangjunyu/host
junyu0312 Feb 10, 2023
67f1bcf
refactor: remove moid and mmid
junyu0312 Feb 17, 2023
1dbffed
fix: use GlobalRef as key is incorrect
junyu0312 Feb 15, 2023
c86bbac
feat: support start function
junyu0312 Feb 16, 2023
8d9b9a6
Merge pull request #29 from DelphinusLab/zhangjunyu/jtable
junyu0312 Feb 18, 2023
d23ffce
refactor: unify common range
junyu0312 Feb 21, 2023
1787904
Merge pull request #31 from DelphinusLab/encode
junyu0312 Feb 21, 2023
b434678
unify imtable
junyu0312 Mar 18, 2023
16df454
Merge pull request #32 from DelphinusLab/v2
junyu0312 Jun 7, 2023
023b9ba
fix: add index to distinguish between same functions
junyu0312 Jun 30, 2023
bf1851a
Merge pull request #33 from DelphinusLab/funcref_fix
junyu0312 Jun 30, 2023
a6dc6e9
feat: perf: support phantom function to enhance performance
junyu0312 Jul 24, 2023
fa91eb0
chore: adapt zkwasm
junyu0312 Aug 2, 2023
e844381
feat: support ext-sign feature
junyu0312 Sep 6, 2023
14e5523
Merge pull request #35 from DelphinusLab/zhangjunyu/sign-ext
junyu0312 Sep 20, 2023
9a136cb
bugfix: create matched value stack with DEFAULT_VALUE_STACK_LIMIT
junyu0312 Sep 19, 2023
69e58bf
Merge pull request #36 from DelphinusLab/dev
junyu0312 Sep 20, 2023
21875f7
feat: support regex for phantom function
junyu0312 Nov 15, 2023
80f4776
Merge pull request #40 from DelphinusLab/regex_phantom
junyu0312 Nov 15, 2023
126160a
trace counter
cwbhhjl Nov 16, 2023
3dba40c
fix phantom
cwbhhjl Nov 16, 2023
8c0d7ec
fix phantom
cwbhhjl Nov 16, 2023
7b1f8a5
trace count
cwbhhjl Nov 23, 2023
73361e5
fmt
cwbhhjl Nov 23, 2023
91048a6
code compatibility
cwbhhjl Nov 23, 2023
7ca4830
rename
cwbhhjl Nov 27, 2023
2d02ed1
Merge branch 'main' into wc/trace-counter
cwbhhjl Nov 27, 2023
be3e598
Merge pull request #43 from okx/wc/trace-counter
junyu0312 Nov 27, 2023
322ac1f
refactor of filltrace
xgaozoyoe Nov 30, 2023
4d2a383
Merge pull request #44 from DelphinusLab/refact-filltrace
junyu0312 Nov 30, 2023
7ac2bb5
refactor: unify function index with binary
junyu0312 Dec 1, 2023
09105f1
dump function name for perf monitor
junyu0312 Oct 12, 2023
cf89916
refine lookup_function with hashmap
junyu0312 Dec 1, 2023
c21a994
perf: Remove instruction entry from event table
junyu0312 Dec 1, 2023
58a705f
Merge pull request #45 from DelphinusLab/refine_func_addr
junyu0312 Dec 3, 2023
eee8fb1
feat: add Observer into Tracer to expose current state
junyu0312 Dec 26, 2023
2fdf6f5
Merge pull request #47 from DelphinusLab/zhangjunyu/observer
junyu0312 Dec 26, 2023
c38b082
feat: expose phantom status to Observer
junyu0312 Jan 12, 2024
c888d0b
Merge pull request #48 from DelphinusLab/zhangjunyu/expose_phantom
junyu0312 Jan 12, 2024
d0b7e3e
remove unused param for imtable
junyu0312 Oct 18, 2023
50d495f
revert init memory table initialization
junyu0312 Oct 19, 2023
2700e88
chore: remove k for init memory table
junyu0312 Nov 9, 2023
581a5b6
WIP: adapt imtable
junyu0312 Nov 24, 2023
1f02655
perf: reduce imtable
junyu0312 Dec 11, 2023
4b4f571
rebase main
junyu0312 Jan 18, 2024
0637ae6
avoid unused clone
junyu0312 Feb 1, 2024
1171290
perf: optimize lookup_function
junyu0312 Feb 3, 2024
df05af0
perf: avoid tracing when dry-run
junyu0312 Feb 20, 2024
0972bda
feat: introduce file backend to support huge execution
junyu0312 Apr 4, 2024
f6ed20c
rewrite tracer
junyu0312 Apr 17, 2024
2043f60
add memory snapshot for phantom call
junyu0312 Mar 28, 2024
7b715a2
remove unused code
junyu0312 Apr 26, 2024
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
Prev Previous commit
Next Next commit
fix: fix compile warning
junyu0312 committed Oct 25, 2022
commit 26d2881f975c7a1cac9811c3218a8beed3d2bb77
6 changes: 3 additions & 3 deletions src/runner.rs
Original file line number Diff line number Diff line change
@@ -32,7 +32,6 @@ use specs::{
itable::{BinOp, BitOp, RelOp, ShiftOp},
mtable::{MemoryReadSize, MemoryStoreSize, VarType},
step::StepInfo,
types::Value,
};
use std::rc::Rc;
use validation::{DEFAULT_MEMORY_INDEX, DEFAULT_TABLE_INDEX};
@@ -2502,8 +2501,8 @@ impl FunctionContext {

pub fn initialize(
&mut self,
locals: &[Local],
value_stack: &mut ValueStack,
_locals: &[Local],
_value_stack: &mut ValueStack,
) -> Result<(), TrapCode> {
debug_assert!(!self.is_initialized);

@@ -2659,6 +2658,7 @@ impl ValueStack {
Ok(())
}

#[allow(dead_code)]
fn extend(&mut self, len: usize) -> Result<(), TrapCode> {
let cells = self
.buf
1 change: 1 addition & 0 deletions src/tracer/mod.rs
Original file line number Diff line number Diff line change
@@ -146,6 +146,7 @@ impl Tracer {
}
}

#[allow(dead_code)]
pub(crate) fn statistics_instructions<'a>(&mut self, module_instance: &ModuleRef) {
let mut func_index = 0;
let mut insts = vec![];