Skip to content

Overview: fix sum-detail display, add entry method coloring and time axis labels - #161

Merged
ritvikrao merged 4 commits into
mainfrom
overview-sumdetail-fixes
Jul 30, 2026
Merged

Overview: fix sum-detail display, add entry method coloring and time axis labels#161
ritvikrao merged 4 commits into
mainfrom
overview-sumdetail-fixes

Conversation

@lvkale

@lvkale lvkale commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

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

  • Utilization was indexed by absolute PE number. The panel indexes its rows by position in the selected PE list, but the data came from 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 uses getSystemUsageData(), which is already indexed by selected PE, relative to the loaded range, and converted to percent.
  • Idle was indexed by absolute PE and absolute .sum interval 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 .sumd intervals to .sum intervals 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.
  • The percent conversion stopped one interval short, leaving the last interval as raw microseconds (~1000 on a 1 ms bin) fed to a 0-255 color map. That is the source of the Warning: Invalid value ... being applied to the color map lines.
  • "Color By: Entry Method" was never offered, though .sumd files carry per-entry-method data. IntervalData now 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 .sum file says were mostly idle, draw as idle.
  • The NPE: the "Choose Entry Method Colors" button was created unconditionally while the radio button colorsHaveChanged() calls isSelected() on was created only for .log traces.

Color chooser

The chooser now gets an EntryMethodVisibility filter 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 .log traces, 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. And ChooseEntriesWindow now 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. ScalePanel gained an AxisLabeler hook 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. ScalePanel is 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 .log trace, which ran clean; the Done button was checked in Timeline, Histogram, Time Profile and Usage Profile. Each commit builds on its own. make test passes.

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.

lvkale and others added 4 commits July 29, 2026 21:02
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>
@ritvikrao
ritvikrao merged commit 5bd520a into main Jul 30, 2026
2 checks passed
@ritvikrao
ritvikrao deleted the overview-sumdetail-fixes branch July 30, 2026 11:18
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