From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752097AbbJCHuN (ORCPT ); Sat, 3 Oct 2015 03:50:13 -0400 Received: from terminus.zytor.com ([198.137.202.10]:59142 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751712AbbJCHuK (ORCPT ); Sat, 3 Oct 2015 03:50:10 -0400 Date: Sat, 3 Oct 2015 00:49:59 -0700 From: tip-bot for Adrian Hunter Message-ID: Cc: tglx@linutronix.de, linux-kernel@vger.kernel.org, jolsa@redhat.com, adrian.hunter@intel.com, mingo@kernel.org, hpa@zytor.com, acme@redhat.com Reply-To: hpa@zytor.com, acme@redhat.com, mingo@kernel.org, adrian.hunter@intel.com, linux-kernel@vger.kernel.org, jolsa@redhat.com, tglx@linutronix.de In-Reply-To: <1443186956-18718-18-git-send-email-adrian.hunter@intel.com> References: <1443186956-18718-18-git-send-email-adrian.hunter@intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf callchain: Allow for max_stack greater than PERF_MAX_STACK_DEPTH Git-Commit-ID: 0edd453368c6b9cdb756bde2b6675bb0d5d0eb0a X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 0edd453368c6b9cdb756bde2b6675bb0d5d0eb0a Gitweb: http://git.kernel.org/tip/0edd453368c6b9cdb756bde2b6675bb0d5d0eb0a Author: Adrian Hunter AuthorDate: Fri, 25 Sep 2015 16:15:48 +0300 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 1 Oct 2015 09:56:06 -0300 perf callchain: Allow for max_stack greater than PERF_MAX_STACK_DEPTH Adjust the validation to allow for max_stack greater than PERF_MAX_STACK_DEPTH. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/1443186956-18718-18-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c index 76fe167..5ef90be 100644 --- a/tools/perf/util/machine.c +++ b/tools/perf/util/machine.c @@ -1831,7 +1831,7 @@ static int thread__resolve_callchain_sample(struct thread *thread, } check_calls: - if (chain->nr > PERF_MAX_STACK_DEPTH) { + if (chain->nr > PERF_MAX_STACK_DEPTH && (int)chain->nr > max_stack) { pr_warning("corrupted callchain. skipping...\n"); return 0; }