perf tools: Ditch the symbol_conf.nr_events global
authorArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 24 May 2018 20:38:51 +0000 (17:38 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 4 Jun 2018 13:28:52 +0000 (10:28 -0300)
Since over time the places where we need to pass this got reduced
because we can obtain it from evsel->evlist->nr_entries, no need to have
this global anymore.

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>
Link: https://lkml.kernel.org/n/tip-ovhikrfj8pzdv93yq3gt6sei@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-kvm.c
tools/perf/builtin-top.c
tools/perf/util/header.c
tools/perf/util/symbol.h

index 72e2ca096bf5da04e48246303085488d5e78f9c4..2b1ef704169f24da953a279c92da845fb150065d 100644 (file)
@@ -1438,8 +1438,6 @@ static int kvm_events_live(struct perf_kvm_stat *kvm,
                goto out;
        }
 
-       symbol_conf.nr_events = kvm->evlist->nr_entries;
-
        if (perf_evlist__create_maps(kvm->evlist, &kvm->opts.target) < 0)
                usage_with_options(live_usage, live_options);
 
index 04fe04885e99fad72063b3a281a30e33661f298e..4284840022a33bf37aa1e0f53a6fb21bba033565 100644 (file)
@@ -1462,8 +1462,6 @@ int cmd_top(int argc, const char **argv)
                goto out_delete_evlist;
        }
 
-       symbol_conf.nr_events = top.evlist->nr_entries;
-
        if (top.delay_secs < 1)
                top.delay_secs = 1;
 
index a8bff2178fbc0cbe5c8c56e6548f7027c09ca56f..2625cc38a0d62249cb08629b9859b9b4f6a34877 100644 (file)
@@ -3312,8 +3312,6 @@ int perf_session__read_header(struct perf_session *session)
                lseek(fd, tmp, SEEK_SET);
        }
 
-       symbol_conf.nr_events = nr_attrs;
-
        perf_header__process_sections(header, fd, &session->tevent,
                                      perf_file_section__process);
 
@@ -3739,8 +3737,6 @@ int perf_event__process_attr(struct perf_tool *tool __maybe_unused,
                perf_evlist__id_add(evlist, evsel, 0, i, event->attr.id[i]);
        }
 
-       symbol_conf.nr_events = evlist->nr_entries;
-
        return 0;
 }
 
index 1a16438eb3cea6de7714aca6a37142b5b9468122..1be9a6bad967253893892fb95bd2a335e0cb2df1 100644 (file)
@@ -90,7 +90,6 @@ struct intlist;
 
 struct symbol_conf {
        unsigned short  priv_size;
-       unsigned short  nr_events;
        bool            try_vmlinux_path,
                        init_annotation,
                        force,