auxtrace.c (9c3a985f88fa4de82bf4bda906095ce6444e9039) auxtrace.c (1eaf496ed386934f1c2439a120fe84a05194f91a)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * auxtrace.c: AUX area tracing support
4 * Copyright (c) 2013-2014, Intel Corporation.
5 */
6
7#include <errno.h>
8#include <stdbool.h>
9
10#include "../../../util/header.h"
11#include "../../../util/debug.h"
12#include "../../../util/pmu.h"
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * auxtrace.c: AUX area tracing support
4 * Copyright (c) 2013-2014, Intel Corporation.
5 */
6
7#include <errno.h>
8#include <stdbool.h>
9
10#include "../../../util/header.h"
11#include "../../../util/debug.h"
12#include "../../../util/pmu.h"
13#include "../../../util/pmus.h"
13#include "../../../util/auxtrace.h"
14#include "../../../util/intel-pt.h"
15#include "../../../util/intel-bts.h"
16#include "../../../util/evlist.h"
17
18static
19struct auxtrace_record *auxtrace_record__init_intel(struct evlist *evlist,
20 int *err)
21{
22 struct perf_pmu *intel_pt_pmu;
23 struct perf_pmu *intel_bts_pmu;
24 struct evsel *evsel;
25 bool found_pt = false;
26 bool found_bts = false;
27
14#include "../../../util/auxtrace.h"
15#include "../../../util/intel-pt.h"
16#include "../../../util/intel-bts.h"
17#include "../../../util/evlist.h"
18
19static
20struct auxtrace_record *auxtrace_record__init_intel(struct evlist *evlist,
21 int *err)
22{
23 struct perf_pmu *intel_pt_pmu;
24 struct perf_pmu *intel_bts_pmu;
25 struct evsel *evsel;
26 bool found_pt = false;
27 bool found_bts = false;
28
28 intel_pt_pmu = perf_pmu__find(INTEL_PT_PMU_NAME);
29 intel_bts_pmu = perf_pmu__find(INTEL_BTS_PMU_NAME);
29 intel_pt_pmu = perf_pmus__find(INTEL_PT_PMU_NAME);
30 intel_bts_pmu = perf_pmus__find(INTEL_BTS_PMU_NAME);
30
31 evlist__for_each_entry(evlist, evsel) {
32 if (intel_pt_pmu && evsel->core.attr.type == intel_pt_pmu->type)
33 found_pt = true;
34 if (intel_bts_pmu && evsel->core.attr.type == intel_bts_pmu->type)
35 found_bts = true;
36 }
37

--- 34 unchanged lines hidden ---
31
32 evlist__for_each_entry(evlist, evsel) {
33 if (intel_pt_pmu && evsel->core.attr.type == intel_pt_pmu->type)
34 found_pt = true;
35 if (intel_bts_pmu && evsel->core.attr.type == intel_bts_pmu->type)
36 found_bts = true;
37 }
38

--- 34 unchanged lines hidden ---