Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf jevents: Allow multiple metricgroups.json files

Allow multiple metricgroups.json files by handling any file ending
with metricgroups.json as a metricgroups file.

Signed-off-by: Ian Rogers <irogers@google.com>
Tested-by: Thomas Falcon <thomas.falcon@intel.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>

authored by

Ian Rogers and committed by
Namhyung Kim
33c44bbc 4b11c983

+2 -2
+2 -2
tools/perf/pmu-events/jevents.py
··· 640 640 if not item.is_file() or not item.name.endswith('.json'): 641 641 return 642 642 643 - if item.name == 'metricgroups.json': 643 + if item.name.endswith('metricgroups.json'): 644 644 metricgroup_descriptions = json.load(open(item.path)) 645 645 for mgroup in metricgroup_descriptions: 646 646 assert len(mgroup) > 1, parents ··· 693 693 694 694 # Ignore other directories. If the file name does not have a .json 695 695 # extension, ignore it. It could be a readme.txt for instance. 696 - if not item.is_file() or not item.name.endswith('.json') or item.name == 'metricgroups.json': 696 + if not item.is_file() or not item.name.endswith('.json') or item.name.endswith('metricgroups.json'): 697 697 return 698 698 699 699 add_events_table_entries(item, get_topic(item.name))