Skip to content

More typed arrays: sample + counter times, some frametable columns#6139

Open
mstange wants to merge 7 commits into
firefox-devtools:mainfrom
mstange:time-f64
Open

More typed arrays: sample + counter times, some frametable columns#6139
mstange wants to merge 7 commits into
firefox-devtools:mainfrom
mstange:time-f64

Conversation

@mstange

@mstange mstange commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Main | Deploy preview

Here's a JSLB size profile for this sp3 profile before the changes from this PR: https://share.firefox.dev/4vleTif

This PR takes care of a few more columns, i.e. lets us store more of them as separate slabs.

@codecov

codecov Bot commented Jul 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.46405% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.51%. Comparing base (a812a34) to head (3b38bd6).
⚠️ Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
src/profile-logic/data-structures.ts 84.84% 4 Missing and 1 partial ⚠️
src/profile-logic/process-profile.ts 75.00% 2 Missing ⚠️
src/test/fixtures/utils.ts 71.42% 2 Missing ⚠️
src/profile-logic/merge-compare.ts 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6139      +/-   ##
==========================================
+ Coverage   83.43%   83.51%   +0.08%     
==========================================
  Files         342      342              
  Lines       36356    36598     +242     
  Branches    10099    10161      +62     
==========================================
+ Hits        30333    30566     +233     
- Misses       5595     5603       +8     
- Partials      428      429       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mstange mstange force-pushed the time-f64 branch 7 times, most recently from f7c1d0c to fcdcf3d Compare July 7, 2026 04:39
@mstange mstange changed the title More typed arrays: sample + counter times More typed arrays: sample + counter times, some frametable columns Jul 7, 2026
mstange added 4 commits July 7, 2026 00:41
We already have this split for the SamplesTable, but not yet for the
other tables. Having it for all tables means that SamplesLikeTable can
always be one of the derived tables.

The goal is to make the derived SamplesTable have a Float64Array for the
time column, and for the raw tables to allow both number[] and Float64Array
for their time or timeDeltas columns. This will be easier once
SamplesLikeTable is always a derived table.
The following derived tables now use `Float64Array` for their `time` column:

- `SamplesTable` (derived samples)
- `CounterSamplesTable`
- `JsAllocationsTable` and `UnbalancedNativeAllocationsTable`
  (derived allocations, introduced by the previous commit)
- `SamplesLikeTable`

The raw tables still use `number[]`, as before, so the profile format is unchanged.
Same principle as what we've done for the stack table and the samples table.

The goal is to have the columns in the derived version always be typed arrays,
and the raw ones can take either a typed array or a plain array.

This commit doesn't introduce any differences between the raw and derived
frame table; the two are identical for now.
Specifically:
  - `func` as Int32Array
  - `address` as Int32Array (already uses -1 for "no address")
  - `inlineDepth` as a Uint8Array.

The raw frame table is unchanged, so this does not affect the profile format.
@mstange mstange marked this pull request as ready for review July 7, 2026 04:41
@mstange mstange requested a review from canova July 7, 2026 04:42
@mstange mstange force-pushed the time-f64 branch 2 times, most recently from ba80ceb to 0c3feb0 Compare July 7, 2026 04:49
mstange added 3 commits July 7, 2026 14:29
Similar to what we've done for the raw stack table builder:
The builder always has plain arrays so that we can add frames
one by one by pushing to the column arrays.
…tables.

Same idea as with the other builders.
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.

1 participant