From: Namhyung Kim Date: Mon, 12 Dec 2011 15:16:55 +0000 (+0900) Subject: perf events: Tidy up perf_event__preprocess_sample X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cb8f4e9aa37c469ddd80dda51469f327606c0118;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Cc: Paul Mackerras Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1323703017-6060-7-git-send-email-namhyung@gmail.com Signed-off-by: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index 97c479bcb0dc..b7c7f39a8f6d 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c @@ -814,13 +814,14 @@ int perf_event__preprocess_sample(const union perf_event *event, al->cpu = sample->cpu; if (al->map) { + struct dso *dso = al->map->dso; + if (symbol_conf.dso_list && - (!al->map || !al->map->dso || - !(strlist__has_entry(symbol_conf.dso_list, - al->map->dso->short_name) || - (al->map->dso->short_name != al->map->dso->long_name && - strlist__has_entry(symbol_conf.dso_list, - al->map->dso->long_name))))) + (!dso || !(strlist__has_entry(symbol_conf.dso_list, + dso->short_name) || + (dso->short_name != dso->long_name && + strlist__has_entry(symbol_conf.dso_list, + dso->long_name))))) goto out_filtered; al->sym = map__find_symbol(al->map, al->addr, filter);