Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1363724
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 11/23] perf script: Remove lots of unused arguments |
| Date | 2016-03-23 22:30 +0100 |
| Message-ID | <rfYvN-Xc-41@gated-at.bofh.it> (permalink) |
| References | <rfYm5-S2-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-script.c | 37 ++++++++++++++-----------------------
1 file changed, 14 insertions(+), 23 deletions(-)
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 4bc92070363b..3770c3dffe5e 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -405,9 +405,7 @@ out:
return 0;
}
-static void print_sample_iregs(union perf_event *event __maybe_unused,
- struct perf_sample *sample,
- struct thread *thread __maybe_unused,
+static void print_sample_iregs(struct perf_sample *sample,
struct perf_event_attr *attr)
{
struct regs_dump *regs = &sample->intr_regs;
@@ -476,10 +474,7 @@ mispred_str(struct branch_entry *br)
return br->flags.predicted ? 'P' : 'M';
}
-static void print_sample_brstack(union perf_event *event __maybe_unused,
- struct perf_sample *sample,
- struct thread *thread __maybe_unused,
- struct perf_event_attr *attr __maybe_unused)
+static void print_sample_brstack(struct perf_sample *sample)
{
struct branch_stack *br = sample->branch_stack;
u64 i;
@@ -498,10 +493,8 @@ static void print_sample_brstack(union perf_event *event __maybe_unused,
}
}
-static void print_sample_brstacksym(union perf_event *event __maybe_unused,
- struct perf_sample *sample,
- struct thread *thread __maybe_unused,
- struct perf_event_attr *attr __maybe_unused)
+static void print_sample_brstacksym(struct perf_sample *sample,
+ struct thread *thread)
{
struct branch_stack *br = sample->branch_stack;
struct addr_location alf, alt;
@@ -537,8 +530,7 @@ static void print_sample_brstacksym(union perf_event *event __maybe_unused,
}
-static void print_sample_addr(union perf_event *event __maybe_unused,
- struct perf_sample *sample,
+static void print_sample_addr(struct perf_sample *sample,
struct thread *thread,
struct perf_event_attr *attr)
{
@@ -566,8 +558,7 @@ static void print_sample_addr(union perf_event *event __maybe_unused,
}
}
-static void print_sample_bts(union perf_event *event,
- struct perf_sample *sample,
+static void print_sample_bts(struct perf_sample *sample,
struct perf_evsel *evsel,
struct thread *thread,
struct addr_location *al)
@@ -597,7 +588,7 @@ static void print_sample_bts(union perf_event *event,
((evsel->attr.sample_type & PERF_SAMPLE_ADDR) &&
!output[attr->type].user_set)) {
printf(" => ");
- print_sample_addr(event, sample, thread, attr);
+ print_sample_addr(sample, thread, attr);
}
if (print_srcline_last)
@@ -746,7 +737,7 @@ static size_t data_src__printf(u64 data_src)
return printf("%-*s", maxlen, out);
}
-static void process_event(struct perf_script *script, union perf_event *event,
+static void process_event(struct perf_script *script,
struct perf_sample *sample, struct perf_evsel *evsel,
struct addr_location *al)
{
@@ -775,7 +766,7 @@ static void process_event(struct perf_script *script, union perf_event *event,
print_sample_flags(sample->flags);
if (is_bts_event(attr)) {
- print_sample_bts(event, sample, evsel, thread, al);
+ print_sample_bts(sample, evsel, thread, al);
return;
}
@@ -783,7 +774,7 @@ static void process_event(struct perf_script *script, union perf_event *event,
event_format__print(evsel->tp_format, sample->cpu,
sample->raw_data, sample->raw_size);
if (PRINT_FIELD(ADDR))
- print_sample_addr(event, sample, thread, attr);
+ print_sample_addr(sample, thread, attr);
if (PRINT_FIELD(DATA_SRC))
data_src__printf(sample->data_src);
@@ -803,12 +794,12 @@ static void process_event(struct perf_script *script, union perf_event *event,
}
if (PRINT_FIELD(IREGS))
- print_sample_iregs(event, sample, thread, attr);
+ print_sample_iregs(sample, attr);
if (PRINT_FIELD(BRSTACK))
- print_sample_brstack(event, sample, thread, attr);
+ print_sample_brstack(sample);
else if (PRINT_FIELD(BRSTACKSYM))
- print_sample_brstacksym(event, sample, thread, attr);
+ print_sample_brstacksym(sample, thread);
if (perf_evsel__is_bpf_output(evsel) && PRINT_FIELD(BPF_OUTPUT))
print_sample_bpf_output(sample);
@@ -919,7 +910,7 @@ static int process_sample_event(struct perf_tool *tool,
if (scripting_ops)
scripting_ops->process_event(event, sample, evsel, &al);
else
- process_event(scr, event, sample, evsel, &al);
+ process_event(scr, sample, evsel, &al);
out_put:
addr_location__put(&al);
--
2.5.5
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[GIT PULL 00/23] perf/core improvements and fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:20 +0100 [PATCH 03/23] perf symbols: Record text offset in dso to calculate objdump address Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:20 +0100 [PATCH 06/23] perf tools: Remove misplaced __maybe_unused Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 17/23] perf tools: Do not include stringify.h from the kernel sources Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 04/23] perf bench numa: Fix assertion for nodes bitfield Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 13/23] perf tools: Simplify die() mechanism Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 10/23] perf thread: Rename perf_event__preprocess_sample_addr to thread__resolve Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 14/23] perf tools: Remove needless 'extern' from function prototypes Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 07/23] perf tests: Forward the perf_sample in the dwarf unwind test Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 18/23] perf tools: Remove unused perf_pathdup, xstrdup functions Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 12/23] perf tools: Remove unused DIE_IF macro Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 01/23] perf test: Remove 'core_id' check in topo test Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 11/23] perf script: Remove lots of unused arguments Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 15/23] tools lib traceevent: Remove redundant CPU output Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 02/23] tools: Move utilities.mak from perf to tools/scripts/ Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 09/23] perf machine: Rename perf_event__preprocess_sample to machine__resolve Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 19/23] perf help: Use asprintf instead of adhoc equivalents Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 [PATCH 20/23] perf probe: No need to use formatting strbuf method Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-23 22:30 +0100 Re: [GIT PULL 00/23] perf/core improvements and fixes Ingo Molnar <mingo@kernel.org> - 2016-03-24 08:40 +0100
csiph-web