hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/tools/perf/arch/s390/util/kvm-stat.c
....@@ -1,16 +1,15 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Arch specific functions for perf kvm stat.
34 *
45 * Copyright 2014 IBM Corp.
56 * Author(s): Alexander Yarygin <yarygin@linux.vnet.ibm.com>
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License (version 2 only)
9
- * as published by the Free Software Foundation.
107 */
118
129 #include <errno.h>
10
+#include <string.h>
1311 #include "../../util/kvm-stat.h"
12
+#include "../../util/evsel.h"
1413 #include <asm/sie.h>
1514
1615 define_exit_reasons_table(sie_exit_reasons, sie_intercept_code);
....@@ -25,38 +24,38 @@
2524 const char *kvm_entry_trace = "kvm:kvm_s390_sie_enter";
2625 const char *kvm_exit_trace = "kvm:kvm_s390_sie_exit";
2726
28
-static void event_icpt_insn_get_key(struct perf_evsel *evsel,
27
+static void event_icpt_insn_get_key(struct evsel *evsel,
2928 struct perf_sample *sample,
3029 struct event_key *key)
3130 {
3231 unsigned long insn;
3332
34
- insn = perf_evsel__intval(evsel, sample, "instruction");
33
+ insn = evsel__intval(evsel, sample, "instruction");
3534 key->key = icpt_insn_decoder(insn);
3635 key->exit_reasons = sie_icpt_insn_codes;
3736 }
3837
39
-static void event_sigp_get_key(struct perf_evsel *evsel,
38
+static void event_sigp_get_key(struct evsel *evsel,
4039 struct perf_sample *sample,
4140 struct event_key *key)
4241 {
43
- key->key = perf_evsel__intval(evsel, sample, "order_code");
42
+ key->key = evsel__intval(evsel, sample, "order_code");
4443 key->exit_reasons = sie_sigp_order_codes;
4544 }
4645
47
-static void event_diag_get_key(struct perf_evsel *evsel,
46
+static void event_diag_get_key(struct evsel *evsel,
4847 struct perf_sample *sample,
4948 struct event_key *key)
5049 {
51
- key->key = perf_evsel__intval(evsel, sample, "code");
50
+ key->key = evsel__intval(evsel, sample, "code");
5251 key->exit_reasons = sie_diagnose_codes;
5352 }
5453
55
-static void event_icpt_prog_get_key(struct perf_evsel *evsel,
54
+static void event_icpt_prog_get_key(struct evsel *evsel,
5655 struct perf_sample *sample,
5756 struct event_key *key)
5857 {
59
- key->key = perf_evsel__intval(evsel, sample, "code");
58
+ key->key = evsel__intval(evsel, sample, "code");
6059 key->exit_reasons = sie_icpt_prog_codes;
6160 }
6261