.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Arch specific functions for perf kvm stat. |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright 2014 IBM Corp. |
---|
5 | 6 | * 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. |
---|
10 | 7 | */ |
---|
11 | 8 | |
---|
12 | 9 | #include <errno.h> |
---|
| 10 | +#include <string.h> |
---|
13 | 11 | #include "../../util/kvm-stat.h" |
---|
| 12 | +#include "../../util/evsel.h" |
---|
14 | 13 | #include <asm/sie.h> |
---|
15 | 14 | |
---|
16 | 15 | define_exit_reasons_table(sie_exit_reasons, sie_intercept_code); |
---|
.. | .. |
---|
25 | 24 | const char *kvm_entry_trace = "kvm:kvm_s390_sie_enter"; |
---|
26 | 25 | const char *kvm_exit_trace = "kvm:kvm_s390_sie_exit"; |
---|
27 | 26 | |
---|
28 | | -static void event_icpt_insn_get_key(struct perf_evsel *evsel, |
---|
| 27 | +static void event_icpt_insn_get_key(struct evsel *evsel, |
---|
29 | 28 | struct perf_sample *sample, |
---|
30 | 29 | struct event_key *key) |
---|
31 | 30 | { |
---|
32 | 31 | unsigned long insn; |
---|
33 | 32 | |
---|
34 | | - insn = perf_evsel__intval(evsel, sample, "instruction"); |
---|
| 33 | + insn = evsel__intval(evsel, sample, "instruction"); |
---|
35 | 34 | key->key = icpt_insn_decoder(insn); |
---|
36 | 35 | key->exit_reasons = sie_icpt_insn_codes; |
---|
37 | 36 | } |
---|
38 | 37 | |
---|
39 | | -static void event_sigp_get_key(struct perf_evsel *evsel, |
---|
| 38 | +static void event_sigp_get_key(struct evsel *evsel, |
---|
40 | 39 | struct perf_sample *sample, |
---|
41 | 40 | struct event_key *key) |
---|
42 | 41 | { |
---|
43 | | - key->key = perf_evsel__intval(evsel, sample, "order_code"); |
---|
| 42 | + key->key = evsel__intval(evsel, sample, "order_code"); |
---|
44 | 43 | key->exit_reasons = sie_sigp_order_codes; |
---|
45 | 44 | } |
---|
46 | 45 | |
---|
47 | | -static void event_diag_get_key(struct perf_evsel *evsel, |
---|
| 46 | +static void event_diag_get_key(struct evsel *evsel, |
---|
48 | 47 | struct perf_sample *sample, |
---|
49 | 48 | struct event_key *key) |
---|
50 | 49 | { |
---|
51 | | - key->key = perf_evsel__intval(evsel, sample, "code"); |
---|
| 50 | + key->key = evsel__intval(evsel, sample, "code"); |
---|
52 | 51 | key->exit_reasons = sie_diagnose_codes; |
---|
53 | 52 | } |
---|
54 | 53 | |
---|
55 | | -static void event_icpt_prog_get_key(struct perf_evsel *evsel, |
---|
| 54 | +static void event_icpt_prog_get_key(struct evsel *evsel, |
---|
56 | 55 | struct perf_sample *sample, |
---|
57 | 56 | struct event_key *key) |
---|
58 | 57 | { |
---|
59 | | - key->key = perf_evsel__intval(evsel, sample, "code"); |
---|
| 58 | + key->key = evsel__intval(evsel, sample, "code"); |
---|
60 | 59 | key->exit_reasons = sie_icpt_prog_codes; |
---|
61 | 60 | } |
---|
62 | 61 | |
---|