All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Jiri Olsa <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: acme@redhat.com, linux-kernel@vger.kernel.org, paulus@samba.org,
	hpa@zytor.com, mingo@kernel.org, a.p.zijlstra@chello.nl,
	jean.pihet@linaro.org, namhyung@kernel.org, jolsa@redhat.com,
	fweisbec@gmail.com, dsahern@gmail.com, tglx@linutronix.de,
	cjashfor@linux.vnet.ibm.com
Subject: [tip:perf/core] perf tools: Fix dwarf unwind max_stack processing
Date: Sat, 22 Feb 2014 09:57:44 -0800	[thread overview]
Message-ID: <tip-b42dc32d4f91e4c0f34b628fdb012eb423da9e69@git.kernel.org> (raw)
In-Reply-To: <1389098853-14466-7-git-send-email-jolsa@redhat.com>

Commit-ID:  b42dc32d4f91e4c0f34b628fdb012eb423da9e69
Gitweb:     http://git.kernel.org/tip/b42dc32d4f91e4c0f34b628fdb012eb423da9e69
Author:     Jiri Olsa <jolsa@redhat.com>
AuthorDate: Tue, 7 Jan 2014 13:47:23 +0100
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 18 Feb 2014 09:34:47 -0300

perf tools: Fix dwarf unwind max_stack processing

The 'unwind__get_entries' function currently returns 'max_stack + 1'
entries (instead of exact max_stack entries), because max_stack value
does not get decremented for the first entry.

This fix makes dwarf-unwind test pass.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Acked-by: Jean Pihet <jean.pihet@linaro.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jean Pihet <jean.pihet@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1389098853-14466-7-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/unwind.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/unwind.c b/tools/perf/util/unwind.c
index 742f23b..bff3209 100644
--- a/tools/perf/util/unwind.c
+++ b/tools/perf/util/unwind.c
@@ -595,5 +595,5 @@ int unwind__get_entries(unwind_entry_cb_t cb, void *arg,
 	if (ret)
 		return -ENOMEM;
 
-	return get_entries(&ui, cb, arg, max_stack);
+	return --max_stack > 0 ? get_entries(&ui, cb, arg, max_stack) : 0;
 }

  reply	other threads:[~2014-02-22 17:58 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-07 12:47 [PATCH 00/16] perf tools: Add libdw DWARF unwind support Jiri Olsa
2014-01-07 12:47 ` [PATCH 01/16] perf tools: Automate setup of FEATURE_CHECK_(C|LD)FLAGS-all variables Jiri Olsa
2014-01-14 16:38   ` [tip:perf/core] perf tools: Automate setup of FEATURE_CHECK_(C|LD )FLAGS-all variables tip-bot for Jiri Olsa
2014-01-07 12:47 ` [PATCH 02/16] perf tools: Fix machine initialization Jiri Olsa
2014-01-07 14:14   ` Arnaldo Carvalho de Melo
2014-01-07 14:22     ` Jiri Olsa
2014-01-14 16:39   ` [tip:perf/core] perf machine: Fix id_hdr_size initialization tip-bot for Jiri Olsa
2014-01-07 12:47 ` [PATCH 03/16] perf tools: Make perf_event__synthesize_mmap_events global Jiri Olsa
2014-01-14 16:39   ` [tip:perf/core] " tip-bot for Jiri Olsa
2014-01-07 12:47 ` [PATCH 04/16] perf tests x86: Introduce perf_regs_load function Jiri Olsa
2014-02-22 17:57   ` [tip:perf/core] " tip-bot for Jiri Olsa
2014-01-07 12:47 ` [PATCH 05/16] perf tests x86: Add dwarf unwind test Jiri Olsa
2014-02-22 17:57   ` [tip:perf/core] " tip-bot for Jiri Olsa
2014-01-07 12:47 ` [PATCH 06/16] perf tools: Fix dwarf unwind max_stack processing Jiri Olsa
2014-02-22 17:57   ` tip-bot for Jiri Olsa [this message]
2014-01-07 12:47 ` [PATCH 07/16] perf tools: Do not report zero address in unwind Jiri Olsa
2014-02-22 17:57   ` [tip:perf/core] perf callchain: " tip-bot for Jiri Olsa
2014-01-07 12:47 ` [PATCH 08/16] perf tools: Add mask into struct regs_dump Jiri Olsa
2014-02-22 17:58   ` [tip:perf/core] perf callchain: " tip-bot for Jiri Olsa
2014-01-07 12:47 ` [PATCH 09/16] perf tools: Separate libunwind code to special object Jiri Olsa
2014-02-22 17:58   ` [tip:perf/core] perf callchain: " tip-bot for Jiri Olsa
2014-01-07 12:47 ` [PATCH 10/16] perf tools: Rename unwind__arch_reg_id into libunwind__arch_reg_id Jiri Olsa
2014-02-22 17:58   ` [tip:perf/core] perf callchain: " tip-bot for Jiri Olsa
2014-01-07 12:47 ` [PATCH 11/16] perf tools: Introduce HAVE_DWARF_UNWIND_SUPPORT macro Jiri Olsa
2014-02-22 17:58   ` [tip:perf/core] perf callchain: " tip-bot for Jiri Olsa
2014-01-07 12:47 ` [PATCH 12/16] perf tools: Separate perf_reg_value function in perf_regs object Jiri Olsa
2014-02-22 17:58   ` [tip:perf/core] perf callchain: " tip-bot for Jiri Olsa
2014-01-07 12:47 ` [PATCH 13/16] perf tools: Add feature check for libdw dwarf unwind Jiri Olsa
2014-01-07 12:47 ` [PATCH 14/16] perf tools: Add libdw DWARF post unwind support Jiri Olsa
2014-01-07 12:47 ` [PATCH 15/16] perf tools: Setup default dwarf post unwinder Jiri Olsa
2014-01-07 12:47 ` [PATCH 16/16] perf tests: Add NO_LIBDW_DWARF_UNWIND make test Jiri Olsa
2014-01-09 15:45 ` [PATCH 00/16] perf tools: Add libdw DWARF unwind support Jean Pihet
2014-01-17 12:24 ` Jiri Olsa
2014-01-17 12:27   ` Jean Pihet
2014-01-17 12:34     ` Jiri Olsa
2014-01-28 13:04     ` Jiri Olsa
2014-01-28 16:46       ` Jean Pihet
2014-02-04 16:46         ` Jean Pihet
2014-01-17 14:28   ` Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-b42dc32d4f91e4c0f34b628fdb012eb423da9e69@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=cjashfor@linux.vnet.ibm.com \
    --cc=dsahern@gmail.com \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jean.pihet@linaro.org \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=paulus@samba.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.