From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934063AbbI2Is1 (ORCPT ); Tue, 29 Sep 2015 04:48:27 -0400 Received: from terminus.zytor.com ([198.137.202.10]:37920 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933165AbbI2Irq (ORCPT ); Tue, 29 Sep 2015 04:47:46 -0400 Date: Tue, 29 Sep 2015 01:47:34 -0700 From: tip-bot for Adrian Hunter Message-ID: Cc: jolsa@redhat.com, adrian.hunter@intel.com, linux-kernel@vger.kernel.org, mingo@kernel.org, tglx@linutronix.de, acme@redhat.com, hpa@zytor.com Reply-To: acme@redhat.com, tglx@linutronix.de, hpa@zytor.com, linux-kernel@vger.kernel.org, adrian.hunter@intel.com, jolsa@redhat.com, mingo@kernel.org In-Reply-To: <1443186956-18718-21-git-send-email-adrian.hunter@intel.com> References: <1443186956-18718-21-git-send-email-adrian.hunter@intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf script: Make scripting_max_stack value allow for synthesized callchains Git-Commit-ID: 3c5b645faee7afbd417f6127694adbd26778a9eb 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: 3c5b645faee7afbd417f6127694adbd26778a9eb Gitweb: http://git.kernel.org/tip/3c5b645faee7afbd417f6127694adbd26778a9eb Author: Adrian Hunter AuthorDate: Fri, 25 Sep 2015 16:15:51 +0300 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 28 Sep 2015 17:09:41 -0300 perf script: Make scripting_max_stack value allow for synthesized callchains perf script has a setting to set the maximum stack depth when processing callchains. The setting defaults to the hard-coded maximum definition PERF_MAX_STACK_DEPTH which is 127. It is possible, when processing instruction traces, to synthesize callchains. Synthesized callchains do not have the kernel size limitation and are whatever size the user requests, although validation presently prevents the user requested a value greater that 1024. The default value is 16. To allow for synthesized callchains, make the scripting_max_stack value at least the same size as the synthesized callchain size. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/1443186956-18718-21-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-script.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index 5c3c02d..8ce1c6b 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -1748,6 +1748,10 @@ int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused) } } + if (itrace_synth_opts.callchain && + itrace_synth_opts.callchain_sz > scripting_max_stack) + scripting_max_stack = itrace_synth_opts.callchain_sz; + /* make sure PERF_EXEC_PATH is set for scripts */ perf_set_argv_exec_path(perf_exec_path());