Skip to content

Conversation

qwe661234
Copy link
Collaborator

We enhance the original EBB by introducing trace EBB. Trace EBB employs two main strategies: recursive jump translation and retroactive block chaining. After decoding instructions, we can determine the target addresses of jal, cj, and cjal instructions. This enables us to recursively translate the instructions of the jump target into the same basic block. As for the second strategy, we chain the previous block to the current block after emulation since the branch target can be obtained during emulation.

Based on performance results below, we observed improvements resulting from the trace EBB strategy.

Test commit 1c11b39 trace EBB Speedup
CoreMark 1155.174 (Iterations/Sec) 1351.065 (Iterations/Sec) +16.64%
dhrystone 1017 DMIPS 1073 DMIPS +5.5%
nqueens 8630 msec 8295 msec +4.0%

@jserv jserv changed the title Add Trace EBB Employ tracing extended basic blocks May 22, 2023
@qwe661234 qwe661234 force-pushed the Add_trace_EBB branch 2 times, most recently from 2bdfa15 to f899d4d Compare May 22, 2023 11:47
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.

Proofread the git commit messages as following:

Enhancing the original extended basic block (EBB) with tracing EBB,
employing two main strategies: recursive jump translation and
retroactive block chaining.

Target addresses of jal, cj, and cjal instructions are determined
after instruction decoding, allowing for recursive translation of
jump target instructions into the same basic block. Additionally,
the previous block is chained to the current block after emulation
using the obtained branch target during emulation.

Performance improvements observed based on the results below,
resulting from the tracing EBB strategy.

We enhance the original EBB by introducing trace EBB. Trace EBB employs
two main strategies: recursive jump translation and retroactive block chaining.
After decoding instructions, we can determine the target addresses of jal,
cj, and cjal instructions. This enables us to recursively translate the
instructions of the jump target into the same basic block. As for the second
strategy, we chain the previous block to the current block after emulation
since the branch target can be obtained during emulation.

Based on performance results below, we observed improvements resulting
from the trace EBB strategy.

|   Test   |      commit 1c11b39    |         trace EBB       |Speedup|
|----------+------------------------+-------------------------+-------|
| CoreMark |1155.174(Iterations/Sec)|1351.065 (Iterations/Sec)|+16.6% |
|----------+------------------------+-------------------------+-------|
| dhrystone|        1017 DMIPS      |        1073 DMIPS       | +5.5% |
|----------+------------------------+-------------------------+-------|
| nqueens  |        8630 msec       |        8295 msec        | +4.0% |
@qwe661234 qwe661234 requested a review from jserv May 22, 2023 16:27
@jserv jserv merged commit 94b9699 into sysprog21:master May 22, 2023
@qwe661234 qwe661234 deleted the Add_trace_EBB branch May 23, 2023 10:30
2011eric pushed a commit to 2011eric/rv32emu that referenced this pull request Jul 22, 2023
Enhancing the original extended basic block (EBB) with tracing EBB,
employing two main strategies: recursive jump translation and
retroactive block chaining.

Target addresses of jal, cj, and cjal instructions are determined
after instruction decoding, allowing for recursive translation of
jump target instructions into the same basic block. Additionally,
the previous block is chained to the current block after emulation
using the obtained branch target during emulation.

Performance improvements observed based on the results below,
resulting from the tracing EBB strategy.

|   Test   |      commit 1c11b39    |         trace EBB       |Speedup|
|----------+------------------------+-------------------------+-------|
| CoreMark |1155.174(Iterations/Sec)|1351.065 (Iterations/Sec)|+16.6% |
|----------+------------------------+-------------------------+-------|
| dhrystone|        1017 DMIPS      |        1073 DMIPS       | +5.5% |
|----------+------------------------+-------------------------+-------|
| nqueens  |        8630 msec       |        8295 msec        | +4.0% |
vestata pushed a commit to vestata/rv32emu that referenced this pull request Jan 24, 2025
Enhancing the original extended basic block (EBB) with tracing EBB,
employing two main strategies: recursive jump translation and
retroactive block chaining.

Target addresses of jal, cj, and cjal instructions are determined
after instruction decoding, allowing for recursive translation of
jump target instructions into the same basic block. Additionally,
the previous block is chained to the current block after emulation
using the obtained branch target during emulation.

Performance improvements observed based on the results below,
resulting from the tracing EBB strategy.

|   Test   |      commit 994723f    |         trace EBB       |Speedup|
|----------+------------------------+-------------------------+-------|
| CoreMark |1155.174(Iterations/Sec)|1351.065 (Iterations/Sec)|+16.6% |
|----------+------------------------+-------------------------+-------|
| dhrystone|        1017 DMIPS      |        1073 DMIPS       | +5.5% |
|----------+------------------------+-------------------------+-------|
| nqueens  |        8630 msec       |        8295 msec        | +4.0% |
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.

2 participants