From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>, Thomas Gleixner <tglx@linutronix.de>
Cc: Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
Clark Williams <williams@redhat.com>,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Song Liu <songliubraving@fb.com>
Subject: [PATCH 31/33] perf tools: Rename perf_event::bpf_event to perf_event::bpf
Date: Mon, 26 Aug 2019 22:36:32 -0300 [thread overview]
Message-ID: <20190827013634.3173-32-acme@kernel.org> (raw)
In-Reply-To: <20190827013634.3173-1-acme@kernel.org>
From: Arnaldo Carvalho de Melo <acme@redhat.com>
Just like all the other meta events, that extra _event suffix is just
redundant, ditch it.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Song Liu <songliubraving@fb.com>
Link: https://lkml.kernel.org/n/tip-505qwpaizq1k0t6pk13v1ibd@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/bpf-event.c | 18 ++++++++----------
tools/perf/util/event.c | 3 +--
tools/perf/util/event.h | 2 +-
3 files changed, 10 insertions(+), 13 deletions(-)
diff --git a/tools/perf/util/bpf-event.c b/tools/perf/util/bpf-event.c
index 69795c32ecf3..28fa2b1ce66e 100644
--- a/tools/perf/util/bpf-event.c
+++ b/tools/perf/util/bpf-event.c
@@ -35,7 +35,7 @@ static int machine__process_bpf_event_load(struct machine *machine,
struct bpf_prog_info_linear *info_linear;
struct bpf_prog_info_node *info_node;
struct perf_env *env = machine->env;
- int id = event->bpf_event.id;
+ int id = event->bpf.id;
unsigned int i;
/* perf-record, no need to handle bpf-event */
@@ -71,7 +71,7 @@ int machine__process_bpf_event(struct machine *machine __maybe_unused,
if (dump_trace)
perf_event__fprintf_bpf_event(event, stdout);
- switch (event->bpf_event.type) {
+ switch (event->bpf.type) {
case PERF_BPF_EVENT_PROG_LOAD:
return machine__process_bpf_event_load(machine, event, sample);
@@ -83,8 +83,7 @@ int machine__process_bpf_event(struct machine *machine __maybe_unused,
*/
break;
default:
- pr_debug("unexpected bpf_event type of %d\n",
- event->bpf_event.type);
+ pr_debug("unexpected bpf_event type of %d\n", event->bpf.type);
break;
}
return 0;
@@ -162,7 +161,7 @@ static int perf_event__synthesize_one_bpf_prog(struct perf_session *session,
struct record_opts *opts)
{
struct perf_record_ksymbol *ksymbol_event = &event->ksymbol;
- struct perf_record_bpf_event *bpf_event = &event->bpf_event;
+ struct perf_record_bpf_event *bpf_event = &event->bpf;
struct bpf_prog_info_linear *info_linear;
struct perf_tool *tool = session->tool;
struct bpf_prog_info_node *info_node;
@@ -302,7 +301,7 @@ int perf_event__synthesize_bpf_events(struct perf_session *session,
int err;
int fd;
- event = malloc(sizeof(event->bpf_event) + KSYM_NAME_LEN + machine->id_hdr_size);
+ event = malloc(sizeof(event->bpf) + KSYM_NAME_LEN + machine->id_hdr_size);
if (!event)
return -1;
while (true) {
@@ -399,9 +398,9 @@ static int bpf_event__sb_cb(union perf_event *event, void *data)
if (event->header.type != PERF_RECORD_BPF_EVENT)
return -1;
- switch (event->bpf_event.type) {
+ switch (event->bpf.type) {
case PERF_BPF_EVENT_PROG_LOAD:
- perf_env__add_bpf_info(env, event->bpf_event.id);
+ perf_env__add_bpf_info(env, event->bpf.id);
case PERF_BPF_EVENT_PROG_UNLOAD:
/*
@@ -411,8 +410,7 @@ static int bpf_event__sb_cb(union perf_event *event, void *data)
*/
break;
default:
- pr_debug("unexpected bpf_event type of %d\n",
- event->bpf_event.type);
+ pr_debug("unexpected bpf_event type of %d\n", event->bpf.type);
break;
}
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index bdeaad434e52..17304df44fc2 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -1494,8 +1494,7 @@ size_t perf_event__fprintf_ksymbol(union perf_event *event, FILE *fp)
size_t perf_event__fprintf_bpf_event(union perf_event *event, FILE *fp)
{
return fprintf(fp, " type %u, flags %u, id %u\n",
- event->bpf_event.type, event->bpf_event.flags,
- event->bpf_event.id);
+ event->bpf.type, event->bpf.flags, event->bpf.id);
}
size_t perf_event__fprintf(union perf_event *event, FILE *fp)
diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h
index 34190e01f307..7251e2eee441 100644
--- a/tools/perf/util/event.h
+++ b/tools/perf/util/event.h
@@ -560,7 +560,7 @@ union perf_event {
struct perf_record_read read;
struct perf_record_throttle throttle;
struct perf_record_sample sample;
- struct perf_record_bpf_event bpf_event;
+ struct perf_record_bpf_event bpf;
struct perf_record_ksymbol ksymbol;
struct attr_event attr;
struct event_update_event event_update;
--
2.21.0
next prev parent reply other threads:[~2019-08-27 1:36 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-27 1:36 [GIT PULL] perf/core improvements and fixes Arnaldo Carvalho de Melo
2019-08-27 1:36 ` [PATCH 01/33] perf cpumap: No need to include perf.h, ditch it Arnaldo Carvalho de Melo
2019-08-27 1:36 ` [PATCH 02/33] perf stat: Remove needless headers from stat.h Arnaldo Carvalho de Melo
2019-08-27 1:36 ` [PATCH 03/33] perf record: Move record_opts and other record decls out of perf.h Arnaldo Carvalho de Melo
2019-08-27 1:36 ` [PATCH 04/33] perf cacheline: Move cacheline related routines to separate files Arnaldo Carvalho de Melo
2019-08-27 1:36 ` [PATCH 05/33] perf srcline: Add missing srcline.h header to files needing its defs Arnaldo Carvalho de Melo
2019-08-27 1:36 ` [PATCH 06/33] perf sort: Remove needless headers from sort.h, provide fwd struct decls Arnaldo Carvalho de Melo
2019-08-27 1:36 ` [PATCH 07/33] perf tests: Fixes hang in zstd compression test by changing the source of random data Arnaldo Carvalho de Melo
2019-08-27 1:36 ` [PATCH 08/33] perf trace beauty ioctl: Fix off-by-one error in cmd->string table Arnaldo Carvalho de Melo
2019-08-27 1:36 ` [PATCH 09/33] perf augmented_raw_syscalls: Rename augmented_filename to augmented_arg Arnaldo Carvalho de Melo
2019-08-27 1:36 ` [PATCH 10/33] perf augmented_raw_syscalls: Postpone tmp map lookup to after pid_filter Arnaldo Carvalho de Melo
2019-08-27 1:36 ` [PATCH 11/33] perf augmented_raw_syscalls: Introduce helper to get the scratch space Arnaldo Carvalho de Melo
2019-08-27 1:36 ` [PATCH 12/33] perf augmented_raw_syscalls: Reduce perf_event_output() boilerplate Arnaldo Carvalho de Melo
2019-08-27 1:36 ` [PATCH 13/33] perf tools: Remove duplicate headers Arnaldo Carvalho de Melo
2019-08-27 1:36 ` [PATCH 14/33] perf report: Use timestamp__scnprintf_nsec() for time sort key Arnaldo Carvalho de Melo
2019-08-27 1:36 ` [PATCH 15/33] perf report: Fix --ns time sort key output Arnaldo Carvalho de Melo
2019-08-27 1:36 ` [PATCH 16/33] perf script: Fix memory leaks in list_scripts() Arnaldo Carvalho de Melo
2019-08-27 1:36 ` [PATCH 17/33] libperf: Add PERF_RECORD_MMAP 'struct mmap_event' to perf/event.h Arnaldo Carvalho de Melo
2019-08-27 1:36 ` [PATCH 18/33] libperf: Add PERF_RECORD_MMAP2 'struct mmap2_event' " Arnaldo Carvalho de Melo
2019-08-27 1:36 ` [PATCH 19/33] libperf: Add PERF_RECORD_COMM 'struct comm_event' " Arnaldo Carvalho de Melo
2019-08-27 1:36 ` [PATCH 20/33] libperf: Add PERF_RECORD_NAMESPACES 'struct namespaces_event' " Arnaldo Carvalho de Melo
2019-08-27 1:36 ` [PATCH 21/33] libperf: Add PERF_RECORD_FORK 'struct fork_event' " Arnaldo Carvalho de Melo
2019-08-27 1:36 ` [PATCH 22/33] libperf: Add PERF_RECORD_LOST 'struct lost_event' " Arnaldo Carvalho de Melo
2019-08-27 1:36 ` [PATCH 23/33] libperf: Add PERF_RECORD_LOST_SAMPLES 'struct lost_samples_event' " Arnaldo Carvalho de Melo
2019-08-27 1:36 ` [PATCH 24/33] libperf: Add PERF_RECORD_READ 'struct read_event' " Arnaldo Carvalho de Melo
2019-08-27 1:36 ` [PATCH 25/33] libperf: Add PERF_RECORD_THROTTLE 'struct throttle_event' " Arnaldo Carvalho de Melo
2019-08-27 1:36 ` [PATCH 26/33] libperf: Add PERF_RECORD_KSYMBOL 'struct ksymbol_event' " Arnaldo Carvalho de Melo
2019-08-27 1:36 ` [PATCH 27/33] libperf: Add PERF_RECORD_BPF_EVENT 'struct bpf_event' " Arnaldo Carvalho de Melo
2019-08-27 1:36 ` [PATCH 28/33] libperf: Add PERF_RECORD_SAMPLE 'struct sample_event' " Arnaldo Carvalho de Melo
2019-08-27 1:36 ` [PATCH 29/33] libperf: Rename the PERF_RECORD_ structs to have a "perf" suffix Arnaldo Carvalho de Melo
2019-08-27 1:36 ` [PATCH 30/33] perf tools: Rename perf_event::ksymbol_event to perf_event::ksymbol Arnaldo Carvalho de Melo
2019-08-27 1:36 ` Arnaldo Carvalho de Melo [this message]
2019-08-27 1:36 ` [PATCH 32/33] perf tool: Rename perf_tool::bpf_event to bpf Arnaldo Carvalho de Melo
2019-08-27 1:36 ` [PATCH 33/33] perf evsel: Rename perf_missing_features::bpf_event to ::bpf Arnaldo Carvalho de Melo
2019-08-27 8:24 ` [GIT PULL] perf/core improvements and fixes Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190827013634.3173-32-acme@kernel.org \
--to=acme@kernel.org \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=songliubraving@fb.com \
--cc=tglx@linutronix.de \
--cc=williams@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).