Skip to content

feat(topdown): add OoO-window bottleneck attribution#6173

Draft
lewislzh wants to merge 10 commits into
kunminghu-v3from
new-topdown
Draft

feat(topdown): add OoO-window bottleneck attribution#6173
lewislzh wants to merge 10 commits into
kunminghu-v3from
new-topdown

Conversation

@lewislzh

Copy link
Copy Markdown
Member

This PR extends elaborated TopDown analysis with a ROB-head-centered bottleneck attribution
flow. It uses the oldest in-flight instruction as the key observation point,
tracks its issue/readiness/cancel/resource state, and attributes exposed
performance loss to the dominant bottleneck during that instruction's lifetime.

The oldest unfinished instruction in the ROB is often the point where internal
pipeline bottlenecks become visible: it can block commit and delay ROB, physical
register, issue queue, and other resource release. Observing the ROB head gives a
direct signal for identifying where performance loss is exposed.

Since multiple stall events may overlap in the same cycle, this PR avoids simply
summing every event duration. Instead, it divides the ROB-head instruction
lifetime into time slices and attributes each slice to the dominant bottleneck,
so the final accounting better matches the actual exposed performance-loss
cycles.

  • Classify ROB-head stalls into execution not-ready, issue delay, issue cancel,
    not-issued, memory, and other resource-related categories.
  • Track source-ready and ideal issue timing to identify issue-delay contribution.
  • Track cancel source and multi-cancel contribution by source, avoiding repeated
    over-counting when events overlap.
  • Support TopDown collection across uniform and distributed issue queues.
  • Move part of ROB/IQ TopDown collection to DPI-C to reduce compile overhead.
  • Add ROB-head FP wait counters and Intel Topdown/ROB-head analysis scripts.
  • Fix memory stall attribution using replay allocation, SQ full, and SBuffer full
    signals.
  • Update top-down README and bump the difftest submodule.

lewislzh and others added 10 commits June 30, 2026 10:29
	Refine the sub-pipeline execution efficiency issue at the ROB head
by dividing sub-pipeline execution stalls into those interrupted by cancellation
(multi issue) and those caused by excessive execution latency after the final issue.
    Track ROB-head issue state for topdown analysis and classify stalls by
not-issued, issue-delay, and issue-cancel reasons.

	- Add ROB-head not-issued accounting to topdown counters
	- Propagate issue queue cancel source/debug info to ROB
	- Split issue cancel stalls into og0, og1, load, store, and other types
	- Update topdown config rename maps and extraction targets
    Track source-ready state in issue queues and use it to estimate the
ROB entry's ideal issue timing for topdown stall classification.

	- Add src-ready information to TopdownIQInfo
	- Propagate per-entry src-ready state from issue entries to ROB
	- Track topdownSrcReady and topdownLastShouldIssueTime in ROB entries
	- Use ideal issue timing to distinguish issue-delay stalls from execution latency
     - trans collect logic to DPI-C to optimize compile speed
     - trans ROB collect logic to DPI-C to optimize compile speed
    Track cancel time per IQ cancel source in ROB entries and use the dominant
cancel source to classify ROB-head issue-cancel stalls.

    Accumulate repeated cancels from the same source instead of overwriting their
time, initialize the new per-source ROB state on enqueue, and expose
IQCancelSource metadata for vector sizing. Also fix the IssueCancelStallSt
counter name to match the other TopDown counters.
@github-actions github-actions Bot added module: backend Decode, Rename, Issue, Dispatch, Rob, Alu, Csr, fudian, yunsuan module: memory Memblock, DCache, TLB, Prefetcher, coupledL2, huancun module: tool non-RTL tools like difftest, gsim, XSpdb, Makefiles, scripts, CI/CD, etc. module: top XSTop, XSTile, XSParameters, configs note: submodule bump (PR) For maintainer: this bumps submodule, merge carefully labels Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: backend Decode, Rename, Issue, Dispatch, Rob, Alu, Csr, fudian, yunsuan module: memory Memblock, DCache, TLB, Prefetcher, coupledL2, huancun module: tool non-RTL tools like difftest, gsim, XSpdb, Makefiles, scripts, CI/CD, etc. module: top XSTop, XSTile, XSParameters, configs note: submodule bump (PR) For maintainer: this bumps submodule, merge carefully

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants