xref: /linux/tools/perf/arch/x86/util/evlist.c (revision a1c3be890440a1769ed6f822376a3e3ab0d42994)
1 // SPDX-License-Identifier: GPL-2.0
2 #include <stdio.h>
3 #include "util/pmu.h"
4 #include "util/evlist.h"
5 #include "util/parse-events.h"
6 
7 #define TOPDOWN_L1_EVENTS	"{slots,topdown-retiring,topdown-bad-spec,topdown-fe-bound,topdown-be-bound}"
8 
9 int arch_evlist__add_default_attrs(struct evlist *evlist)
10 {
11 	if (!pmu_have_event("cpu", "slots"))
12 		return 0;
13 
14 	return parse_events(evlist, TOPDOWN_L1_EVENTS, NULL);
15 }
16