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

JIT Stopwatch #197

Merged
merged 1 commit into from
Jul 13, 2021
Merged

JIT Stopwatch #197

merged 1 commit into from
Jul 13, 2021

Conversation

Lichtso
Copy link

@Lichtso Lichtso commented Jul 13, 2021

Counts CPU cycles by lfence ; rdtsc ; lfence

@Lichtso Lichtso added the enhancement New feature or request label Jul 13, 2021
@Lichtso Lichtso requested a review from dmakarov July 13, 2021 08:36
@dmakarov
Copy link
Collaborator

This is nice, but wouldn't it be simpler to instrument the map method MemoryRegions

pub fn map<E: UserDefinedError>(
by inserting a call to time::Instant::now() at the entrance to the function and at the exit from it?

@Lichtso
Copy link
Author

Lichtso commented Jul 13, 2021

That would only work for the Interpreter.
The JIT has to do a context switch to Rust and back, which is expensive and should be included in the measurement I think.

@dmakarov
Copy link
Collaborator

That would only work for the Interpreter.
The JIT has to do a context switch to Rust and back, which is expensive and should be included in the measurement I think.

ok, makes sense. Yes, context switch should be accounted for as part of the address translation overhead in this case.

@Lichtso Lichtso merged commit 38ba6a5 into main Jul 13, 2021
@Lichtso Lichtso deleted the feature/jit_stopwatch branch July 19, 2021 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants