From: Jiri Olsa Date: Tue, 7 Jan 2014 12:47:24 +0000 (+0100) Subject: perf callchain: Do not report zero address in unwind X-Git-Tag: next-20140306~34^2~14^2~6^2~20 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1cf0382af98f6365b01b59453fe18dffe3c73d2f;p=karo-tx-linux.git perf callchain: Do not report zero address in unwind We are not interested in zero addresses in callchain, do not report them. Signed-off-by: Jiri Olsa Acked-by: Jean Pihet Cc: Corey Ashford Cc: David Ahern Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Jean Pihet Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1389098853-14466-8-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/unwind.c b/tools/perf/util/unwind.c index bff3209305e1..3b7018102dfb 100644 --- a/tools/perf/util/unwind.c +++ b/tools/perf/util/unwind.c @@ -563,7 +563,7 @@ static int get_entries(struct unwind_info *ui, unwind_entry_cb_t cb, unw_word_t ip; unw_get_reg(&c, UNW_REG_IP, &ip); - ret = entry(ip, ui->thread, ui->machine, cb, arg); + ret = ip ? entry(ip, ui->thread, ui->machine, cb, arg) : 0; } unw_destroy_addr_space(addr_space);