Skip to content

More typed arrays: frameTable.func#6140

Closed
mstange wants to merge 7 commits into
firefox-devtools:mainfrom
mstange:typed-frametable-func
Closed

More typed arrays: frameTable.func#6140
mstange wants to merge 7 commits into
firefox-devtools:mainfrom
mstange:typed-frametable-func

Conversation

@mstange

@mstange mstange commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

@codecov

codecov Bot commented Jul 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.56604% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.43%. Comparing base (2880a96) to head (f7c1d0c).
⚠️ Report is 16 commits behind head on main.

Files with missing lines Patch % Lines
src/profile-logic/data-structures.ts 76.19% 5 Missing ⚠️
src/profile-logic/profile-data.ts 91.30% 2 Missing ⚠️
src/test/fixtures/utils.ts 71.42% 2 Missing ⚠️
src/profile-logic/process-profile.ts 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6140      +/-   ##
==========================================
- Coverage   83.50%   83.43%   -0.08%     
==========================================
  Files         342      342              
  Lines       36183    36410     +227     
  Branches    10133    10129       -4     
==========================================
+ Hits        30216    30378     +162     
- Misses       5539     5604      +65     
  Partials      428      428              

☔ 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 typed-frametable-func branch 2 times, most recently from 0a523cb to b4697db Compare July 6, 2026 15:27
mstange added 3 commits July 6, 2026 11:38
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.
@mstange mstange force-pushed the typed-frametable-func branch from b4697db to 5ff3cc0 Compare July 6, 2026 18:00
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 force-pushed the typed-frametable-func branch 3 times, most recently from d903a12 to f7c1d0c Compare July 6, 2026 18:43
mstange added 3 commits July 7, 2026 00:27
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.
@mstange mstange force-pushed the typed-frametable-func branch from f7c1d0c to fcdcf3d Compare July 7, 2026 04:39
@mstange

mstange commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

I'm folding this into #6139.

@mstange mstange closed this Jul 7, 2026
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