perf script: Remove lots of unused arguments

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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent c2740a87
...@@ -405,9 +405,7 @@ static int perf_session__check_output_opt(struct perf_session *session) ...@@ -405,9 +405,7 @@ static int perf_session__check_output_opt(struct perf_session *session)
return 0; return 0;
} }
static void print_sample_iregs(union perf_event *event __maybe_unused, static void print_sample_iregs(struct perf_sample *sample,
struct perf_sample *sample,
struct thread *thread __maybe_unused,
struct perf_event_attr *attr) struct perf_event_attr *attr)
{ {
struct regs_dump *regs = &sample->intr_regs; struct regs_dump *regs = &sample->intr_regs;
...@@ -476,10 +474,7 @@ mispred_str(struct branch_entry *br) ...@@ -476,10 +474,7 @@ mispred_str(struct branch_entry *br)
return br->flags.predicted ? 'P' : 'M'; return br->flags.predicted ? 'P' : 'M';
} }
static void print_sample_brstack(union perf_event *event __maybe_unused, static void print_sample_brstack(struct perf_sample *sample)
struct perf_sample *sample,
struct thread *thread __maybe_unused,
struct perf_event_attr *attr __maybe_unused)
{ {
struct branch_stack *br = sample->branch_stack; struct branch_stack *br = sample->branch_stack;
u64 i; u64 i;
...@@ -498,10 +493,8 @@ static void print_sample_brstack(union perf_event *event __maybe_unused, ...@@ -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, static void print_sample_brstacksym(struct perf_sample *sample,
struct perf_sample *sample, struct thread *thread)
struct thread *thread __maybe_unused,
struct perf_event_attr *attr __maybe_unused)
{ {
struct branch_stack *br = sample->branch_stack; struct branch_stack *br = sample->branch_stack;
struct addr_location alf, alt; struct addr_location alf, alt;
...@@ -537,8 +530,7 @@ static void print_sample_brstacksym(union perf_event *event __maybe_unused, ...@@ -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, static void print_sample_addr(struct perf_sample *sample,
struct perf_sample *sample,
struct thread *thread, struct thread *thread,
struct perf_event_attr *attr) struct perf_event_attr *attr)
{ {
...@@ -566,8 +558,7 @@ static void print_sample_addr(union perf_event *event __maybe_unused, ...@@ -566,8 +558,7 @@ static void print_sample_addr(union perf_event *event __maybe_unused,
} }
} }
static void print_sample_bts(union perf_event *event, static void print_sample_bts(struct perf_sample *sample,
struct perf_sample *sample,
struct perf_evsel *evsel, struct perf_evsel *evsel,
struct thread *thread, struct thread *thread,
struct addr_location *al) struct addr_location *al)
...@@ -597,7 +588,7 @@ static void print_sample_bts(union perf_event *event, ...@@ -597,7 +588,7 @@ static void print_sample_bts(union perf_event *event,
((evsel->attr.sample_type & PERF_SAMPLE_ADDR) && ((evsel->attr.sample_type & PERF_SAMPLE_ADDR) &&
!output[attr->type].user_set)) { !output[attr->type].user_set)) {
printf(" => "); printf(" => ");
print_sample_addr(event, sample, thread, attr); print_sample_addr(sample, thread, attr);
} }
if (print_srcline_last) if (print_srcline_last)
...@@ -746,7 +737,7 @@ static size_t data_src__printf(u64 data_src) ...@@ -746,7 +737,7 @@ static size_t data_src__printf(u64 data_src)
return printf("%-*s", maxlen, out); 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 perf_sample *sample, struct perf_evsel *evsel,
struct addr_location *al) struct addr_location *al)
{ {
...@@ -775,7 +766,7 @@ static void process_event(struct perf_script *script, union perf_event *event, ...@@ -775,7 +766,7 @@ static void process_event(struct perf_script *script, union perf_event *event,
print_sample_flags(sample->flags); print_sample_flags(sample->flags);
if (is_bts_event(attr)) { if (is_bts_event(attr)) {
print_sample_bts(event, sample, evsel, thread, al); print_sample_bts(sample, evsel, thread, al);
return; return;
} }
...@@ -783,7 +774,7 @@ static void process_event(struct perf_script *script, union perf_event *event, ...@@ -783,7 +774,7 @@ static void process_event(struct perf_script *script, union perf_event *event,
event_format__print(evsel->tp_format, sample->cpu, event_format__print(evsel->tp_format, sample->cpu,
sample->raw_data, sample->raw_size); sample->raw_data, sample->raw_size);
if (PRINT_FIELD(ADDR)) if (PRINT_FIELD(ADDR))
print_sample_addr(event, sample, thread, attr); print_sample_addr(sample, thread, attr);
if (PRINT_FIELD(DATA_SRC)) if (PRINT_FIELD(DATA_SRC))
data_src__printf(sample->data_src); data_src__printf(sample->data_src);
...@@ -803,12 +794,12 @@ static void process_event(struct perf_script *script, union perf_event *event, ...@@ -803,12 +794,12 @@ static void process_event(struct perf_script *script, union perf_event *event,
} }
if (PRINT_FIELD(IREGS)) if (PRINT_FIELD(IREGS))
print_sample_iregs(event, sample, thread, attr); print_sample_iregs(sample, attr);
if (PRINT_FIELD(BRSTACK)) if (PRINT_FIELD(BRSTACK))
print_sample_brstack(event, sample, thread, attr); print_sample_brstack(sample);
else if (PRINT_FIELD(BRSTACKSYM)) 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)) if (perf_evsel__is_bpf_output(evsel) && PRINT_FIELD(BPF_OUTPUT))
print_sample_bpf_output(sample); print_sample_bpf_output(sample);
...@@ -919,7 +910,7 @@ static int process_sample_event(struct perf_tool *tool, ...@@ -919,7 +910,7 @@ static int process_sample_event(struct perf_tool *tool,
if (scripting_ops) if (scripting_ops)
scripting_ops->process_event(event, sample, evsel, &al); scripting_ops->process_event(event, sample, evsel, &al);
else else
process_event(scr, event, sample, evsel, &al); process_event(scr, sample, evsel, &al);
out_put: out_put:
addr_location__put(&al); addr_location__put(&al);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment