Conversation
…#2346) For a number of common instructions, gem5's built-in ARM disassembler doesn't print the instruction operands. This can be a bit of a headache when you don't want to use libcapstone, and are looking at instruction traces. Reproducer: test.S ``` .text .globl _start _start: ldr x30, [sp] ldr x30, [sp], gem5#16 str x30, [sp] str x30, [sp], gem5#16 ldp x10, x20, [x30] stp x10, x20, [x30] ldp w10, w20, [x30] stp w10, w20, [x30] ldp x10, x20, [x30], #-8 // post-index, negative stp x10, x20, [x30, gem5#16]! // pre-index, write-back ldp w10, w20, [x30, gem5#32] // pre-index, no write-back stp w10, w20, [x30], gem5#128 // post-index, positive dc zva, x17 dc cvac, x17 isb isb #10 dsb nsh dsb sy dsb #8 .long 0xff210110 // m5_op EXIT ``` ``` # Build binary aarch64-linux-gnu-gcc -c test.S -o test.o aarch64-linux-gnu-ld -o test.arm64 test.o -N -Ttext 0x10 -static # objdump disassembly aarch64-linux-gnu-objdump -D test.arm64 # gem5 disassembly ./build/ARM/gem5.opt configs/example/arm/baremetal.py --tarmac-gen --kernel test.arm64 | grep ' IT ' ```
dhschall
left a comment
There was a problem hiding this comment.
Thanks for already cleaning up things.
The main comment I have at the moment is formatting. Mainly indentation.
Check this: https://github.com/gem5/gem5/pull/2313/files
They will soon merge it. But you might be able to copy already the .clang-format in your gem5 dir and then run git clang-format.
| "Backend Bound, fraction of slots lost due to backend resource " | ||
| "constraints."), | ||
| ADD_STAT( | ||
| retiring, |
| ADD_STAT(fetchLatency, | ||
| statistics::units::Rate<statistics::units::Count, | ||
| statistics::units::Count>::get(), | ||
| "Fetch Latency Bound, frontend stalls due to instruction cache " |
There was a problem hiding this comment.
Its not only instruction cache but also TLB and BTB
src/cpu/o3/cpu.cc
Outdated
| cpu->cpuStats.topDownStats.topDownL1.frontendBound - fetchLatency; | ||
| } | ||
|
|
||
| // CPU::CPUStats::TopDownStats::TopDownFrontendBoundL2::TopDownFrontendBoundL2(CPU |
There was a problem hiding this comment.
Is that not ready or why is it commented?
| statistics::units::Count>::get(), | ||
| "Core Bound, backend stalls due to functional unit constraints") { | ||
| // Backend L2 | ||
| executionStalls = (cpu->iew.instQueue.getStats().numInstsExec0 - |
There was a problem hiding this comment.
This is not properly indented. Should be consistent. 4 spaces.
Same in the lines below and a lot of other places
src/cpu/o3/cpu.cc
Outdated
| statistics::units::Count>::get(), | ||
| "Store Bound") { | ||
| // Backend Bound / Memory Bound L3 | ||
| l1Bound = (cpu->iew.instQueue.getStats().loadStallCycles - |
|
|
||
| if (decodeStatus[tid] == Blocked) { | ||
| ++stats.blockedCycles; | ||
| fetchBubbles -= decodeWidth; |
| */ | ||
| bool squashAfterDelaySlot[MaxThreads]; | ||
|
|
||
| unsigned fetchBubbles = 0; |
There was a problem hiding this comment.
IMHO it's redundant. Just use inst_availabe
| : statistics::Group(cpu), | ||
| ADD_STAT(instsAdded, statistics::units::Count::get(), | ||
| "Number of instructions added to the IQ (excludes non-spec)"), | ||
| "Number of instructions added to the IQ (excludes non-spec)"), |
There was a problem hiding this comment.
Can you revert that. Its not currently indented and not part of your PR
| .flags(statistics::pdf); | ||
| idleRate | ||
| .prereq(idleRate); | ||
| ADD_STAT(predictedBranches, statistics::units::Count::get(), |
There was a problem hiding this comment.
Why did that change? Most of it is still the same.
| ADD_STAT(fetchBubblesMax, statistics::units::Count::get(), | ||
| "Stat for Top-Down Methodology, number of cycles in which no " | ||
| "instructions are delivered to backend") { | ||
| predictedBranches.prereq(predictedBranches); |
No description provided.