Overview: fix sum-detail display, add entry method coloring and time axis labels - #161
Merged
Conversation
The tick ruler already tracked pan and zoom and getTicks() already returned each tick's value in panel coordinates, but nothing drew that value. Add an AxisLabeler hook so the panel being displayed can turn its own coordinates into text, and reserve a text line below the ruler when one is set. Labels are placed longest tick first with collision avoidance, so the roundest numbers get the available room, shorter ticks fill the gaps, and zooming in reveals more labels instead of overprinting them. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Overview colors each PE/interval cell by the entry method that used the most time there, which nothing computed for summary detail traces. Pick it out while the RLE data is being expanded, indexed by position in the requested processor list like systemUsageData, with -1 for an interval holding no entry method time. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The summary detail path drew getSumDetailData_PE_interval(), which is
indexed by absolute PE number, while the panel indexes its rows by
position in the selected PE list: any PE subset drew the wrong rows and
showed zeros for unselected PEs. Idle came from the .sum files indexed
by absolute PE and absolute .sum interval but was read with a
range-relative index, so a range not starting at interval 0 reported
idle from the wrong point in time. The percent conversion also stopped
one interval short, leaving the last interval as raw microseconds fed to
a 0-255 color map ("Invalid value ... applied to the color map").
Take utilization from getSystemUsageData(), which is already indexed by
selected PE, relative to the loaded range, and converted to percent, and
rebuild idle per selected PE, mapping .sumd intervals to .sum intervals
by time since the two files can be binned differently. Idle is capped
at what the entry methods leave free, the same reconciliation Time
Profile and Usage Profile use.
"Color By: Entry Method" was also never offered for these traces even
though .sumd files carry per-entry-method data, while the unconditional
"Choose Entry Method Colors" button called isSelected() on the radio
button that was never created - an NPE on every color pick. Offer the
mode, guard the null, and restrict the color chooser to the entry
methods actually drawn, leaving out Idle and Overhead since this tool
always draws them white and black.
Finally, label the time axis with timestamps.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The window had no obvious way to be dismissed. Colors still take effect as they are picked; the button only disposes it. Also ask the EntryMethodVisibility for its entry list once instead of on every row: some tools answer that by scanning their whole display. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
lvkale
requested review from
ericjbohm,
matthiasdiener and
ritvikrao
as code owners
July 30, 2026 02:07
ritvikrao
approved these changes
Jul 30, 2026
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
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.
Follow-on to #159, in the same lightly-exercised summary-detail paths, this time in the Overview (Small Time Line) tool. What sent me looking was a flood of
NullPointerExceptions from picking entry colors; the display underneath turned out to be wrong in three further ways.Overview on summary-detail traces
getSumDetailData_PE_interval(), which is allocated over every PE in the run. Any PE subset drew the wrong rows, and rows for unselected PEs were zeros. It now usesgetSystemUsageData(), which is already indexed by selected PE, relative to the loaded range, and converted to percent..suminterval but read with a range-relative index, so any range not starting at interval 0 reported idle from the wrong point in time. Idle is now rebuilt per selected PE, mapping.sumdintervals to.sumintervals by time since the two files can be binned differently, and capped at what the entry methods leave free — the same reconciliation Sum-detail traces: reconcile .sum idle with .sumd entry times, and speed up bar drawing #159 gave Time Profile and Usage Profile.Warning: Invalid value ... being applied to the color maplines..sumdfiles carry per-entry-method data.IntervalDatanow records the dominant entry method per (PE, interval) while it expands the RLE data, and the mode is available. Intervals with no recorded entry method time, or that the.sumfile says were mostly idle, draw as idle.colorsHaveChanged()callsisSelected()on was created only for.logtraces.Color chooser
The chooser now gets an
EntryMethodVisibilityfilter from Overview, so it lists only the entry methods actually drawn instead of every one in the run (411 on my trace), reusing the mechanism #157 added for Time Profile. Idle and Overhead are left out, because Overview draws them white and black regardless of the palette — picking colors for them did nothing. Note this also removes those two rows for.logtraces, where they were previously listed but equally inert.It also gained a Done button. The window had no obvious way to be dismissed; colors still take effect as they are picked. This is in the shared
ChooseEntriesWindow, so Timeline, Histogram, Time Profile and Usage Profile get it too — those keep their Idle/Overhead rows, which is correct since they really do draw those colors. AndChooseEntriesWindownow asks for the entry list once instead of on every row, because some tools answer that question by scanning their whole display.Time axis labels
Overview's bottom ruler already drew tick marks that tracked pan and zoom, and
getTicks()already returned each tick's value — nothing drew it as text.ScalePanelgained anAxisLabelerhook and now writes timestamps under the ticks, placed longest-tick-first with collision avoidance so the roundest numbers get the room and zooming in reveals more labels.ScalePanelis used only by this tool.Testing
Manually verified by @lvkale on a 4-PE and a 1920-PE summary-detail trace (full range, PE subsets, sub-ranges, both color modes, axis labels) and a 120-PE
.logtrace, which ran clean; the Done button was checked in Timeline, Histogram, Time Profile and Usage Profile. Each commit builds on its own.make testpasses.Known limitation, filed separately as #160: Overview's per-PE-per-interval arrays are ~1.5 GB on the 1920-PE trace inside the launcher's 5 GB heap, so this will not scale far past that PE count. The issue lists three reclaims worth ~950 MB with no behavior change.