Add C++ sampling profiler support with FANTOM_PROFILE_CPP#55735
Closed
sammy-SC wants to merge 1 commit intofacebook:mainfrom
Closed
Add C++ sampling profiler support with FANTOM_PROFILE_CPP#55735sammy-SC wants to merge 1 commit intofacebook:mainfrom
sammy-SC wants to merge 1 commit intofacebook:mainfrom
Conversation
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
|
This pull request has been merged in 1eca581. |
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Add support for profiling C++ code in Fantom tests using Linux
perf.When
FANTOM_PROFILE_CPP=1is set, the fantom_tester binary is wrapped withperf recordto capture sampling profiler data with DWARF call graphs.Usage:
Output is saved to
.out/cpp-traces/perf-<timestamp>.dataand can be analyzed with:Differential Revision: D92155573