Skip to content

Add C++ sampling profiler support with FANTOM_PROFILE_CPP#55735

Closed
sammy-SC wants to merge 1 commit intofacebook:mainfrom
sammy-SC:export-D92155573
Closed

Add C++ sampling profiler support with FANTOM_PROFILE_CPP#55735
sammy-SC wants to merge 1 commit intofacebook:mainfrom
sammy-SC:export-D92155573

Conversation

@sammy-SC
Copy link
Copy Markdown
Contributor

Summary:
Add support for profiling C++ code in Fantom tests using Linux perf.

When FANTOM_PROFILE_CPP=1 is set, the fantom_tester binary is wrapped with perf record to capture sampling profiler data with DWARF call graphs.

Usage:

FANTOM_PROFILE_CPP=1 yarn fantom --benchmarks --testPathPattern="View-benchmark"

Output is saved to .out/cpp-traces/perf-<timestamp>.data and can be analyzed with:

perf report -i .out/cpp-traces/perf-<timestamp>.data

Differential Revision: D92155573

Summary:
Add support for profiling C++ code in Fantom tests using Linux `perf`. 

When `FANTOM_PROFILE_CPP=1` is set, the fantom_tester binary is wrapped with `perf record` to capture sampling profiler data with DWARF call graphs.

Usage:
```
FANTOM_PROFILE_CPP=1 yarn fantom --benchmarks --testPathPattern="View-benchmark"
```

Output is saved to `.out/cpp-traces/perf-<timestamp>.data` and can be analyzed with:
```
perf report -i .out/cpp-traces/perf-<timestamp>.data
```

Differential Revision: D92155573
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 25, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Feb 25, 2026

@sammy-SC has exported this pull request. If you are a Meta employee, you can view the originating Diff in D92155573.

@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Feb 27, 2026

This pull request has been merged in 1eca581.

@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @sammy-SC in 1eca581

When will my fix make it into a release? | How to file a pick request?

zoontek pushed a commit to zoontek/react-native that referenced this pull request Mar 9, 2026
…5735)

Summary:
Pull Request resolved: facebook#55735

changelog: [internal]

Add support for profiling C++ code in Fantom tests using Linux `perf`.

When `FANTOM_PROFILE_CPP=1` is set, the fantom_tester binary is wrapped with `perf record` to capture sampling profiler data with DWARF call graphs.

Usage:
```
FANTOM_PROFILE_CPP=1 yarn fantom --benchmarks --testPathPattern="View-benchmark"
```

Output is saved to `.out/cpp-traces/perf-<timestamp>.data` and can be analyzed with:
```
perf report -i .out/cpp-traces/perf-<timestamp>.data
```

Reviewed By: rubennorte

Differential Revision: D92155573

fbshipit-source-id: bde3ffcd11468e4ad88bec4b547726bed7cbde41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants