perf jevents: Drop duplicate pending metrics

Drop adding a pending metric if there is an existing one. Ensure the
PMUs differ for hybrid systems.

Signed-off-by: Ian Rogers <irogers@google.com>
Tested-by: Thomas Falcon <thomas.falcon@intel.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
This commit is contained in:
Ian Rogers
2025-12-02 09:50:06 -08:00
committed by Namhyung Kim
parent 3f31651a06
commit a1d9bb1a04

View File

@@ -501,7 +501,8 @@ def add_events_table_entries(item: os.DirEntry, topic: str) -> None:
for e in read_json_events(item.path, topic):
if e.name:
_pending_events.append(e)
if e.metric_name:
if e.metric_name and not any(e.metric_name == x.metric_name and
e.pmu == x.pmu for x in _pending_metrics):
_pending_metrics.append(e)