lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 7 Sep 2012 16:42:23 +0800 From: Feng Tang <feng.tang@...el.com> To: acme@...hat.com Cc: mingo@...e.hu, a.p.zijlstra@...llo.nl, andi@...stfloor.org, namhyung@...nel.org, dsahern@...il.com, linux-kernel@...r.kernel.org, Feng Tang <feng.tang@...el.com> Subject: [PATCH v2 1/7] perf symbols: Filter samples with unresolved symbol when "--symbols" option is used Report/top commands support to only handle specific symbols with "--symbols" option, but current code will keep those samples whose symbol can't be resolved, which should actually be filtered. If we run following commands: $perf record -a tree $perf report --symbols intel_idle -n the output will be: Without the patch: ================== 46.27% 156 sshd [unknown] 26.05% 48 swapper [kernel.kallsyms] 17.26% 38 tree libc-2.12.1.so 7.69% 17 tree tree 2.73% 6 tree ld-2.12.1.so With the patch: =============== 100.00% 48 swapper [kernel.kallsyms] Signed-off-by: Feng Tang <feng.tang@...el.com> --- tools/perf/util/event.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index 3a0f1a5..08910f0 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c @@ -886,8 +886,9 @@ int perf_event__preprocess_sample(const union perf_event *event, al->sym = map__find_symbol(al->map, al->addr, filter); } - if (symbol_conf.sym_list && al->sym && - !strlist__has_entry(symbol_conf.sym_list, al->sym->name)) + if (symbol_conf.sym_list && + (!al->sym || !strlist__has_entry(symbol_conf.sym_list, + al->sym->name))) goto out_filtered; return 0; -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists