Add per-monitor 'enabled' flag to Perf hook#673
Open
excelle08 wants to merge 1 commit into
Open
Conversation
Summary: PerfSpect cannot collect uArch metrics on hosts where another perf consumer (PerfStat, dynologd, etc.) is also using the PMU — the hardware counters get multiplexed and most TMA/IPC fields end up NaN. The Perf hook used to bake in a hardcoded "if PerfSpect is on, skip PerfStat" rule, but that doesn't help when other PMU consumers (like dynologd, fb_power Intel events, etc.) are active or when we want PerfStat off for other reasons. This diff exposes a generic per-monitor `enabled` flag in DEFAULT_OPTIONS (default True for all monitors) and pops it before constructing the monitor. Disabled monitors are not instantiated and not run. The existing "auto-disable PerfStat when PerfSpect3 is detected" behavior is preserved. Differential Revision: D103055059
|
@excelle08 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D103055059. |
meta-codesync Bot
pushed a commit
that referenced
this pull request
May 30, 2026
Summary: Pull Request resolved: #673 PerfSpect cannot collect uArch metrics on hosts where another perf consumer (PerfStat, dynologd, etc.) is also using the PMU — the hardware counters get multiplexed and most TMA/IPC fields end up NaN. The Perf hook used to bake in a hardcoded "if PerfSpect is on, skip PerfStat" rule, but that doesn't help when other PMU consumers (like dynologd, fb_power Intel events, etc.) are active or when we want PerfStat off for other reasons. This diff exposes a generic per-monitor `enabled` flag in DEFAULT_OPTIONS (default True for all monitors) and pops it before constructing the monitor. Disabled monitors are not instantiated and not run. The existing "auto-disable PerfStat when PerfSpect3 is detected" behavior is preserved. Reviewed By: YifanYuan3 Differential Revision: D103055059 fbshipit-source-id: 729353643c122779f3ec3c6e0cfeff429297a4f1
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:
PerfSpect cannot collect uArch metrics on hosts where another perf consumer (PerfStat, dynologd, etc.) is also using the PMU — the hardware counters get multiplexed and most TMA/IPC fields end up NaN. The Perf hook used to bake in a hardcoded "if PerfSpect is on, skip PerfStat" rule, but that doesn't help when other PMU consumers (like dynologd, fb_power Intel events, etc.) are active or when we want PerfStat off for other reasons.
This diff exposes a generic per-monitor
enabledflag in DEFAULT_OPTIONS (default True for all monitors) and pops it before constructing the monitor. Disabled monitors are not instantiated and not run. The existing "auto-disable PerfStat when PerfSpect3 is detected" behavior is preserved.Differential Revision: D103055059