Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

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

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

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants