perf: Remove unused struct
cover perf: Remove unused struct
This series contains five cleanup patches, remove unused struct.
Yuan Can (5):
perf machine: Remove unused struct process_args perf annotate: Remove unused struct disasm_line_samples perf metric: Remove unused struct metric_ref_node perf jit: Remove unused struct debug_line_info perf lock: Remove unused struct lock_contention_key
tools/perf/ui/browsers/annotate.c | 5 ----- tools/perf/util/bpf_lock_contention.c | 5 ----- tools/perf/util/jitdump.c | 7 ------- tools/perf/util/machine.c | 4 ---- tools/perf/util/metricgroup.c | 11 ----------- 5 files changed, 32 deletions(-)
Signature · 1 line
2.17.1
PATCH 1/5 perf machine: Remove unused struct process_args
After commit a93f0e551af9("perf symbols: Get kernel start address by symbol name"), no one uses struct process_args any more, so remove it.
--- tools/perf/util/machine.c | 4 ---- 1 file changed, 4 deletions(-)
tools/perf/util/machine.c +0 -4
@@ -1128,10 +1128,6 @@ static struct dso *machine__get_kernel(struct machine *machine)return kernel; } -struct process_args { -u64 start; -}; -void machine__get_kallsyms_filename (struct machine *machine,char *buf,size_t bufsz) {
Signature · 1 line
2.17.1
Re: [PATCH 1/5] perf machine: Remove unused struct process_args
Em Tue, Sep 27, 2022 at 01:39:27AM +0000, Yuan Can escreveu:
Quoted 2 lines
After commit
a93f0e551af9("perf symbols: Get kernel start address by symbol name"), no one uses structprocess_argsany more, so remove it.
Thanks, applied.
- Arnaldo
Quoted 22 lines
Signed-off-by Yuan Can <[email protected]>--- tools/perf/util/machine.c | 4 ---- 1 file changed, 4 deletions(-)tools/perf/util/machine.c +0
-4@@ -1128,10 +1128,6 @@ static struct dso *machine__get_kernel(struct machine *machine)return kernel; } -struct process_args { -u64 start; -}; -void machine__get_kallsyms_filename (struct machine *machine,char *buf,size_t bufsz) {Signature · 1 line
2.17.1
Signature · 1 line
- Arnaldo
PATCH 2/5 perf annotate: Remove unused struct disasm_line_samples
In reply to Yuan CanAfter commit 3ab6db8d0f3b("perf annotate browser: Use samples data from struct annotation_line"), no one use struct disasm_line_samples, so remove it.
--- tools/perf/ui/browsers/annotate.c | 5 ----- 1 file changed, 5 deletions(-)
tools/perf/ui/browsers/annotate.c +0 -5
@@ -19,11 +19,6 @@#include <sys/ttydefaults.h> #include <asm/bug.h> -struct disasm_line_samples { -double percent; -struct sym_hist_entry he; -}; -struct arch ;struct annotate_browser {
Signature · 1 line
2.17.1
PATCH 3/5 perf metric: Remove unused struct metric_ref_node
In reply to Yuan CanAfter commit 46bdc0bf8d21("perf metric: Simplify metric_refs calculation"), no one use struct metric_ref_node, so remove it.
--- tools/perf/util/metricgroup.c | 11 ----------- 1 file changed, 11 deletions(-)
tools/perf/util/metricgroup.c +0 -11
@@ -109,17 +109,6 @@ void metricgroup__rblist_exit(struct rblist *metric_events)rblist__exit (metric_events); } -/* -* A node in the list of referenced metrics. metric_expr -* is held as a convenience to avoid a search through the -* metric list. -*/ -struct metric_ref_node { -const char *metric_name; -const char *metric_expr; -struct list_head list; -}; -/** * The metric under construction. The data held here will be placed in a * metric_expr.
Signature · 1 line
2.17.1
PATCH 4/5 perf jit: Remove unused struct debug_line_info
In reply to Yuan CanThe struct debug_line_info is never used, remove it.
--- tools/perf/util/jitdump.c | 7 ------- 1 file changed, 7 deletions(-)
tools/perf/util/jitdump.c +0 -7
@@ -56,13 +56,6 @@ struct jit_buf_desc {char dir[PATH_MAX ]; }; -struct debug_line_info { -unsigned long vma; -unsigned int lineno; -/* The filename format is unspecified, absolute path, relative etc. */ -char const filename[]; -}; -struct jit_tool {struct perf_tool tool;struct perf_data output;
Signature · 1 line
2.17.1
PATCH 5/5 perf lock: Remove unused struct lock_contention_key
In reply to Yuan CanThe struct lock_contention_key is never used, remove it.
--- tools/perf/util/bpf_lock_contention.c | 5 ----- 1 file changed, 5 deletions(-)
tools/perf/util/bpf_lock_contention.c +0 -5
@@ -14,11 +14,6 @@static struct lock_contention_bpf *skel; -/* should be same as bpf_skel/lock_contention.bpf.c */ -struct lock_contention_key { -s32 stack_id; -}; -struct lock_contention_data {u64 total_time;u64 min_time;
Signature · 1 line
2.17.1
Em Tue, Sep 27, 2022 at 01:39:26AM +0000, Yuan Can escreveu:
Quoted 1 line
This series contains five cleanup patches, remove unused struct.
Thanks, applied.
- Arnaldo
Quoted 16 lines
Yuan Can (5):
perf machine: Remove unused structprocess_argsperf annotate: Remove unused structdisasm_line_samplesperf metric: Remove unused structmetric_ref_nodeperf jit: Remove unused structdebug_line_infoperf lock: Remove unused structlock_contention_keytools/perf/ui/browsers/annotate.c | 5 ----- tools/perf/util/bpf_lock_contention.c | 5 ----- tools/perf/util/jitdump.c | 7 ------- tools/perf/util/machine.c | 4 ---- tools/perf/util/metricgroup.c | 11 ----------- 5 files changed, 32 deletions(-)Signature · 1 line
2.17.1
Signature · 1 line
- Arnaldo