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

feat(inspector): Share call/create inputs in Inspector call_end/create_end #1003

Merged
merged 2 commits into from
Jan 23, 2024

Conversation

rakita
Copy link
Member

@rakita rakita commented Jan 22, 2024

Added Rc<RefCell<>> to call/create inspector handler so we can share inputs stack.

This functionality was removed with a call loop as the input is discarded after the frame is created and not available in *_end Inspector function, this removal became a problem for downstream libraries that use Inspector.

Copy link
Contributor

Valgrind Results:

==4006== Cachegrind, a cache and branch-prediction profiler
==4006== Copyright (C) 2002-2017, and GNU GPL'd, by Nicholas Nethercote et al.
==4006== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==4006== Command: target/release/snailtracer
==4006== 
--4006-- warning: L3 cache found, using its data for the LL simulation.
Snailtracer Host+Interpreter benchmark (2.1s) ...            not enough samples
==4006== 
==4006== I   refs:      455,350,272
==4006== I1  misses:         16,085
==4006== LLi misses:          2,878
==4006== I1  miss rate:        0.00%
==4006== LLi miss rate:        0.00%
==4006== 
==4006== D   refs:      237,389,203  (160,565,491 rd   + 76,823,712 wr)
==4006== D1  misses:        349,538  (    209,229 rd   +    140,309 wr)
==4006== LLd misses:        137,564  (      4,050 rd   +    133,514 wr)
==4006== D1  miss rate:         0.1% (        0.1%     +        0.2%  )
==4006== LLd miss rate:         0.1% (        0.0%     +        0.2%  )
==4006== 
==4006== LL refs:           365,623  (    225,314 rd   +    140,309 wr)
==4006== LL misses:         140,442  (      6,928 rd   +    133,514 wr)
==4006== LL miss rate:          0.0% (        0.0%     +        0.2%  )

let out = context.evm.make_call_frame(&call_inputs, 0..0);
call_input_stack_inner
.borrow_mut()
.push(Box::new(call_inputs));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this need to be boxed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't need to be, but in other places, it is a Box

@rakita rakita merged commit 1ead59d into main Jan 23, 2024
25 checks passed
@github-actions github-actions bot mentioned this pull request Jan 23, 2024
@rakita rakita deleted the rc_inspector_inputs branch January 23, 2024 13:35
Jeanclaudeaoun pushed a commit to DogeXLabs/dogex-node that referenced this pull request May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants