Skip to content

Add processed Gecko profile support - #15

Draft
chicoxyzzy wants to merge 4 commits into
discoveryjs:mainfrom
chicoxyzzy:gecko-profile-support
Draft

Add processed Gecko profile support#15
chicoxyzzy wants to merge 4 commits into
discoveryjs:mainfrom
chicoxyzzy:gecko-profile-support

Conversation

@chicoxyzzy

@chicoxyzzy chicoxyzzy commented Jul 17, 2026

Copy link
Copy Markdown

Summary

  • accept Firefox Profiler processed Gecko profiles across the per-thread v49 layout, hybrid v56–59 layout, and shared-table v60+ layout, including profiles recorded by Samply
  • convert the selected sampled thread into cpupro's CPU-profile model with stack trees, timing, source/module metadata, null-stack handling, and bounded positive sample-weight expansion
  • identify Firefox profiles as SpiderMonkey and recognize official Cynic executables while preserving the existing V8 runtime heuristics
  • document the new format and add fixture-based importer and runtime regression tests using Node's built-in test runner

Why

cpupro previously accepted V8-family profiles only. Samply emits Firefox Profiler's processed Gecko format for native applications, so profiles captured from engines such as Cynic could not be loaded. This adds that import path without changing cpupro's existing internal profile model or metadata shape.

Validation

  • npm test — 18/18 passing
  • npm run typecheck
  • npm run lint
  • npm run build
  • git diff --check
  • real Samply v49 Cynic profile smoke test: 2,470 nodes, 5,795 samples, 1,326 call frames, 7 modules, and 5.87 seconds of preserved profile time

Screenshots

Captured from the real Samply/Cynic smoke profile.

image image

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