Skip to content

Advance timer properly during JIT execution #592

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

Merged
merged 1 commit into from
May 1, 2025

Conversation

vacantron
Copy link
Collaborator

@vacantron vacantron commented Apr 28, 2025

In the current implementation, the timer would not be updated until the control flow exits the JIT-ed code. This commit updates the timer correctly after every instruction has been dispatched.

Summary by Bito

This pull request enhances the timer functionality in the JIT execution context by replacing the static counter with a dynamic timer variable. It introduces new methods for timer management in JIT compilation and T2C generation, improving the accuracy of time-related operations.

Unit tests added: False

Estimated effort to review (1-5, lower is better): 2 - The changes are straightforward and well-defined, making the review process relatively simple.

@vacantron vacantron requested review from jserv and ChinYikMing April 28, 2025 09:09
Copy link
Contributor

@jserv jserv left a comment

Choose a reason for hiding this comment

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

Benchmarks

Benchmark suite Current: a27625b Previous: 5001cfd Ratio
Dhrystone 1285 Average DMIPS over 10 runs 1087 Average DMIPS over 10 runs 0.85
Coremark 915.126 Average iterations/sec over 10 runs 915.504 Average iterations/sec over 10 runs 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@vacantron vacantron marked this pull request as draft April 28, 2025 10:43
@sysprog21 sysprog21 deleted a comment from bito-code-review bot Apr 28, 2025
@sysprog21 sysprog21 deleted a comment from bito-code-review bot Apr 28, 2025
@vacantron vacantron force-pushed the timer branch 2 times, most recently from f478189 to e2a430a Compare April 29, 2025 04:16
@sysprog21 sysprog21 deleted a comment from bito-code-review bot Apr 29, 2025
@sysprog21 sysprog21 deleted a comment from bito-code-review bot Apr 29, 2025
@vacantron vacantron marked this pull request as ready for review April 29, 2025 07:14
@vacantron vacantron requested review from jserv and ChinYikMing and removed request for ChinYikMing April 29, 2025 07:15
@jserv jserv added this to the release-2025.1 milestone Apr 29, 2025
Copy link
Contributor

@jserv jserv left a comment

Choose a reason for hiding this comment

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

Fix typo: "untill"

@jserv jserv changed the title Update timer correctly Advance timer properly during JIT execution Apr 29, 2025
In the current implementation, the timer would not be updated until the
control flow exits the JIT-ed code. This commit updates the timer
correctly after every instruction has been dispatched.
@jserv jserv merged commit c168617 into sysprog21:master May 1, 2025
25 of 28 checks passed
@jserv
Copy link
Contributor

jserv commented May 1, 2025

Thank @vacantron for contributing!

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.

3 participants