Skip to content

Add per-monitor 'enabled' flag to Perf hook#673

Open
excelle08 wants to merge 1 commit into
facebookresearch:v2-betafrom
excelle08:export-D103055059-to-v2-beta
Open

Add per-monitor 'enabled' flag to Perf hook#673
excelle08 wants to merge 1 commit into
facebookresearch:v2-betafrom
excelle08:export-D103055059-to-v2-beta

Conversation

@excelle08

Copy link
Copy Markdown
Contributor

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

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
@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 May 29, 2026
@meta-codesync

meta-codesync Bot commented May 29, 2026

Copy link
Copy Markdown

@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
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 meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant