mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
perf annotate: Initialize the priv are in symbol__new()
We need to initializa some fields (right now just a mutex) when we allocate the per symbol annotation struct, so do it at the symbol constructor instead of (ab)using the filter mechanism for that. This way we remove one of the few cases we have for that symbol filter, which will eventually led to removing it. 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: http://lkml.kernel.org/n/tip-cvz34avlz1lez888lob95390@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
ffe67c2fab
commit
b01141f4f5
7 changed files with 37 additions and 16 deletions
|
@ -204,8 +204,6 @@ static int __cmd_annotate(struct perf_annotate *ann)
|
|||
struct perf_evsel *pos;
|
||||
u64 total_nr_samples;
|
||||
|
||||
machines__set_symbol_filter(&session->machines, symbol__annotate_init);
|
||||
|
||||
if (ann->cpu_list) {
|
||||
ret = perf_session__cpu_bitmap(session, ann->cpu_list,
|
||||
ann->cpu_bitmap);
|
||||
|
@ -367,7 +365,10 @@ int cmd_annotate(int argc, const char **argv, const char *prefix __maybe_unused)
|
|||
if (annotate.session == NULL)
|
||||
return -1;
|
||||
|
||||
symbol_conf.priv_size = sizeof(struct annotation);
|
||||
ret = symbol__annotation_init();
|
||||
if (ret < 0)
|
||||
goto out_delete;
|
||||
|
||||
symbol_conf.try_vmlinux_path = true;
|
||||
|
||||
ret = symbol__init(&annotate.session->header.env);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue