Commit cb8f4e9a authored by Namhyung Kim's avatar Namhyung Kim Committed by Arnaldo Carvalho de Melo

perf events: Tidy up perf_event__preprocess_sample

Use local variable 'dso' to reduce typing a bit and rearrange the if
condition. Also NULL check of al->map in the condition is not necessary.

Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1323703017-6060-7-git-send-email-namhyung@gmail.comSigned-off-by: default avatarNamhyung Kim <namhyung@gmail.com>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 5f9273d6
...@@ -814,13 +814,14 @@ int perf_event__preprocess_sample(const union perf_event *event, ...@@ -814,13 +814,14 @@ int perf_event__preprocess_sample(const union perf_event *event,
al->cpu = sample->cpu; al->cpu = sample->cpu;
if (al->map) { if (al->map) {
struct dso *dso = al->map->dso;
if (symbol_conf.dso_list && if (symbol_conf.dso_list &&
(!al->map || !al->map->dso || (!dso || !(strlist__has_entry(symbol_conf.dso_list,
!(strlist__has_entry(symbol_conf.dso_list, dso->short_name) ||
al->map->dso->short_name) || (dso->short_name != dso->long_name &&
(al->map->dso->short_name != al->map->dso->long_name && strlist__has_entry(symbol_conf.dso_list,
strlist__has_entry(symbol_conf.dso_list, dso->long_name)))))
al->map->dso->long_name)))))
goto out_filtered; goto out_filtered;
al->sym = map__find_symbol(al->map, al->addr, filter); al->sym = map__find_symbol(al->map, al->addr, filter);
......
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