Re: [PATCH v2 2/2] perf symbol_conf: Remove now unused sort_by_name

From: Namhyung Kim
Date: Wed Jun 21 2023 - 23:52:21 EST


On Tue, Jun 20, 2023 at 11:37 PM Ian Rogers <irogers@xxxxxxxxxx> wrote:
>
> Previously used to specify symbol_name_rb_node was in use.
>
> Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
> ---
> tools/perf/builtin-kallsyms.c | 1 -
> tools/perf/builtin-lock.c | 2 --
> tools/perf/builtin-report.c | 1 -
> tools/perf/tests/builtin-test.c | 1 -
> tools/perf/util/probe-event.c | 1 -
> tools/perf/util/symbol_conf.h | 1 -
> 6 files changed, 7 deletions(-)
>
> diff --git a/tools/perf/builtin-kallsyms.c b/tools/perf/builtin-kallsyms.c
> index 3751df744577..7f75c5b73f26 100644
> --- a/tools/perf/builtin-kallsyms.c
> +++ b/tools/perf/builtin-kallsyms.c
> @@ -62,7 +62,6 @@ int cmd_kallsyms(int argc, const char **argv)
> if (argc < 1)
> usage_with_options(kallsyms_usage, options);
>
> - symbol_conf.sort_by_name = true;
> symbol_conf.try_vmlinux_path = (symbol_conf.vmlinux_name == NULL);
> if (symbol__init(NULL) < 0)
> return -1;
> diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c
> index 8b505e1e5002..da36ace66d68 100644
> --- a/tools/perf/builtin-lock.c
> +++ b/tools/perf/builtin-lock.c
> @@ -1774,7 +1774,6 @@ static int __cmd_report(bool display_info)
> }
>
> /* for lock function check */
> - symbol_conf.sort_by_name = true;

The comment also can go away.


> symbol_conf.allow_aliases = true;
> symbol__init(&session->header.env);
>
> @@ -1904,7 +1903,6 @@ static int __cmd_contention(int argc, const char **argv)
> con.save_callstack = true;
>
> /* for lock function check */
> - symbol_conf.sort_by_name = true;

Ditto.

Thanks,
Namhyung



> symbol_conf.allow_aliases = true;
> symbol__init(&session->header.env);
>
> diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
> index a31a23af5547..dcedfe00f04d 100644
> --- a/tools/perf/builtin-report.c
> +++ b/tools/perf/builtin-report.c
> @@ -1676,7 +1676,6 @@ int cmd_report(int argc, const char **argv)
> * See symbol__browser_index.
> */
> symbol_conf.priv_size += sizeof(u32);
> - symbol_conf.sort_by_name = true;
> }
> annotation_config__init(&report.annotation_opts);
> }
> diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c
> index aa44fdc84763..1f6557ce3b0a 100644
> --- a/tools/perf/tests/builtin-test.c
> +++ b/tools/perf/tests/builtin-test.c
> @@ -542,7 +542,6 @@ int cmd_test(int argc, const char **argv)
> return run_workload(workload, argc, argv);
>
> symbol_conf.priv_size = sizeof(int);
> - symbol_conf.sort_by_name = true;
> symbol_conf.try_vmlinux_path = true;
>
> if (symbol__init(NULL) < 0)
> diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
> index 277cb8f84cbc..16822a8a540f 100644
> --- a/tools/perf/util/probe-event.c
> +++ b/tools/perf/util/probe-event.c
> @@ -74,7 +74,6 @@ int init_probe_symbol_maps(bool user_only)
> {
> int ret;
>
> - symbol_conf.sort_by_name = true;
> symbol_conf.allow_aliases = true;
> ret = symbol__init(NULL);
> if (ret < 0) {
> diff --git a/tools/perf/util/symbol_conf.h b/tools/perf/util/symbol_conf.h
> index f26f81eb8252..0b589570d1d0 100644
> --- a/tools/perf/util/symbol_conf.h
> +++ b/tools/perf/util/symbol_conf.h
> @@ -18,7 +18,6 @@ struct symbol_conf {
> show_kernel_path,
> use_modules,
> allow_aliases,
> - sort_by_name,
> show_nr_samples,
> show_total_period,
> use_callchain,
> --
> 2.41.0.162.gfafddb0af9-goog
>