forked from andreas-abel/uiCA
-
Notifications
You must be signed in to change notification settings - Fork 0
DO NOT MERGE; placeholder for review upstream #1
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
Draft
mattgodbolt
wants to merge
7
commits into
master
Choose a base branch
from
pr/blocking-info
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tracks why ready uops don't dispatch each cycle, emitting blockedFromDispatch events when blocking reasons change. This helps visualize and understand pipeline bottlenecks beyond basic port contention. Blocking reasons tracked: - port_busy_older_uop: Older uop dispatched to the port instead - port_blocked_resource: Port blocked by microarchitectural constraint - port_removed_by_constraint: Port excluded by paired stores or 256-bit restrictions Uses BlockingEvent NamedTuple following codebase patterns. Only emits events when the blocking reason changes to minimize JSON size. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Extends the blocking information system to track why uops don't issue from the IDQ (instruction decode queue) each cycle. This complements the existing dispatch blocking tracking. Issue blocking reasons tracked: - issue_width_exceeded: Exceeded the CPU's issue width limit (4 on SKL) - register_merge_required: Waiting for register merge uops to be issued - serializing_instruction_waiting: Serializing instruction waiting for ROB to drain - reorder_buffer_full: ROB is full, preventing issue - reservation_station_full: RS is full, preventing issue The blocking events are emitted to the JSON output under the 'blockedFromIssue' array for each cycle. Like dispatch blocking, events are deduplicated to only emit when the blocking reason changes. This information enables visualizers (like CE's planned wavefront view) to explain why instructions are queued and unable to progress through the pipeline, without having to reverse-engineer the blocking reasons from dependencies and resource usage. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Extends the blocking information system to track why instructions can't be decoded from the instruction queue (IQ) into the IDQ (instruction decode queue) each cycle. This completes pipeline blocking coverage alongside the existing issue and dispatch blocking tracking. Front-end blocking reasons tracked: - idq_full: IDQ is full, preventing further decode. This occurs when the backend (issue/execute) can't keep up with the front-end decode rate, causing the IDQ to fill up. The blocking events are emitted to the JSON output under the 'blockedFromDecode' array for each cycle. Instructions waiting in the IQ are reported along with the IDQ size at the time of blocking. Test case: A long dependency chain (60 inc rax instructions) triggers IDQ full conditions in 43% of cycles, demonstrating real front-end bottlenecks where decode stalls because the backend is slow. This information enables visualizers (like CE's planned wavefront view) to explain why instructions in the predecode (P) state aren't progressing to the queue (Q) state, completing the pipeline blocking picture: P→Q→I→r→D→E→R. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Improve code consistency with original codebase conventions: - Move imports to module level - Use namedtuple with defaults instead of NamedTuple - Remove type annotations from instance variables - Simplify nested loops using existing getUnfusedUops() - Extract duplicate event processing into helper function Reduces code by 32 lines while maintaining all functionality. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Move json import to local scope in generateJSONOutput (matches existing style) - Remove unused Tuple and Any type imports - Remove namedtuple defaults parameter (requires Python 3.7+) - Add explicit empty dict arguments to maintain compatibility with Python 3.6 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
The deduplication logic was only comparing the 'reason' string, which caused loss of information when details differed between consecutive events. This particularly affected port_busy_older_uop events where different uops dispatch on consecutive cycles. Now compares both reason and details, preserving all events where either changes. This ensures dispatchedInstead information is not lost. Side effect: idq_full events will now record IDQ size fluctuations instead of collapsing to first occurrence. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Blocking info collection has O(N) overhead in the scheduler dispatch loop. This change makes it optional via command-line flag. Changes: - Add --trackBlocking argument to command-line parser - Thread trackBlocking flag through FrontEnd, Renamer, Scheduler - Guard all blockingInfo.append() calls with if self.trackBlocking - Add 'blockingTracked' to JSON parameters for consumers When disabled (default), no blocking info overhead during simulation. When enabled, full blocking diagnostics are collected. JSON consumers can check parameters.blockingTracked to distinguish "no blocking events" from "tracking was disabled". 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.