summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/auxtrace.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2019-07-30 10:02:25 +0200
committerIngo Molnar <mingo@kernel.org>2019-07-30 10:02:25 +0200
commit7f06d0aa530cc61cb5e048d4eb34921dee12058a (patch)
tree575a3fce988575a37272cdd22d82ad7c174bc947 /tools/perf/util/auxtrace.c
parentb3c303be4c35856945cb17ec639b94637447dae2 (diff)
parent123a039d0d54de6d5bafd551e7aa17569e13e315 (diff)
downloadlinux-7f06d0aa530cc61cb5e048d4eb34921dee12058a.tar.gz
linux-7f06d0aa530cc61cb5e048d4eb34921dee12058a.tar.bz2
linux-7f06d0aa530cc61cb5e048d4eb34921dee12058a.zip
Merge tag 'perf-core-for-mingo-5.4-20190729' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: perf trace: Arnaldo Carvalho de Melo: - Use BPF_MAP_TYPE_PROG_ARRAY + bpf_tail_call() for augmenting raw syscalls, i.e. copy pointers passed to/from userspace. The use of a table per syscall to tell the BPF program what to copy made the raw_syscalls:sys_enter/exit programs a bit complex, the scratch space would have to be bigger to allow for checking all args to see which ones were a pathname, so use a PROG_ARRAY map instead, test it with syscalls that receive multiple pathnames at different registers (rename, renameat, etc). - Beautify various syscalls using this new infrastructure, and also add code that looks for syscalls with BPF augmenters, such as "open", and then reuse it with syscalls not yet having a specific augmenter, but that copies the same argument with the same type, say "statfs" can initially reuse "open", beautifier, as both have as its first arg a "const char *". - Do not using fd->pathname beautifier when the 'close' syscall isn't enabled, as we can't invalidate that mapping. core: Jiri Olsa: - Introduce tools/perf/lib/, that eventually will move to tools/lib/perf/, to allow other tools to use the abstractions and code perf uses to set up the perf ring buffer and set up the many possible combinations in allowed by the kernel, starting with 'struct perf_evsel' and 'struct perf_evlist'. perf vendor events: Michael Petlan: - Add missing event description to power9 event definitions. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util/auxtrace.c')
-rw-r--r--tools/perf/util/auxtrace.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c
index ec0af36697c4..65728cdeefb6 100644
--- a/tools/perf/util/auxtrace.c
+++ b/tools/perf/util/auxtrace.c
@@ -124,20 +124,20 @@ void auxtrace_mmap_params__init(struct auxtrace_mmap_params *mp,
}
void auxtrace_mmap_params__set_idx(struct auxtrace_mmap_params *mp,
- struct perf_evlist *evlist, int idx,
+ struct evlist *evlist, int idx,
bool per_cpu)
{
mp->idx = idx;
if (per_cpu) {
- mp->cpu = evlist->cpus->map[idx];
- if (evlist->threads)
- mp->tid = thread_map__pid(evlist->threads, 0);
+ mp->cpu = evlist->core.cpus->map[idx];
+ if (evlist->core.threads)
+ mp->tid = thread_map__pid(evlist->core.threads, 0);
else
mp->tid = -1;
} else {
mp->cpu = -1;
- mp->tid = thread_map__pid(evlist->threads, idx);
+ mp->tid = thread_map__pid(evlist->core.threads, idx);
}
}
@@ -503,7 +503,7 @@ void auxtrace_heap__pop(struct auxtrace_heap *heap)
}
size_t auxtrace_record__info_priv_size(struct auxtrace_record *itr,
- struct perf_evlist *evlist)
+ struct evlist *evlist)
{
if (itr)
return itr->info_priv_size(itr, evlist);
@@ -556,7 +556,7 @@ int auxtrace_record__find_snapshot(struct auxtrace_record *itr, int idx,
}
int auxtrace_record__options(struct auxtrace_record *itr,
- struct perf_evlist *evlist,
+ struct evlist *evlist,
struct record_opts *opts)
{
if (itr)
@@ -585,7 +585,7 @@ int auxtrace_parse_snapshot_options(struct auxtrace_record *itr,
}
struct auxtrace_record *__weak
-auxtrace_record__init(struct perf_evlist *evlist __maybe_unused, int *err)
+auxtrace_record__init(struct evlist *evlist __maybe_unused, int *err)
{
*err = 0;
return NULL;
@@ -2084,7 +2084,7 @@ static char *addr_filter__to_str(struct addr_filter *filt)
return err < 0 ? NULL : filter;
}
-static int parse_addr_filter(struct perf_evsel *evsel, const char *filter,
+static int parse_addr_filter(struct evsel *evsel, const char *filter,
int max_nr)
{
struct addr_filters filts;
@@ -2135,19 +2135,19 @@ out_exit:
return err;
}
-static struct perf_pmu *perf_evsel__find_pmu(struct perf_evsel *evsel)
+static struct perf_pmu *perf_evsel__find_pmu(struct evsel *evsel)
{
struct perf_pmu *pmu = NULL;
while ((pmu = perf_pmu__scan(pmu)) != NULL) {
- if (pmu->type == evsel->attr.type)
+ if (pmu->type == evsel->core.attr.type)
break;
}
return pmu;
}
-static int perf_evsel__nr_addr_filter(struct perf_evsel *evsel)
+static int perf_evsel__nr_addr_filter(struct evsel *evsel)
{
struct perf_pmu *pmu = perf_evsel__find_pmu(evsel);
int nr_addr_filters = 0;
@@ -2160,9 +2160,9 @@ static int perf_evsel__nr_addr_filter(struct perf_evsel *evsel)
return nr_addr_filters;
}
-int auxtrace_parse_filters(struct perf_evlist *evlist)
+int auxtrace_parse_filters(struct evlist *evlist)
{
- struct perf_evsel *evsel;
+ struct evsel *evsel;
char *filter;
int err, max_nr;