From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934195AbbI2Irg (ORCPT ); Tue, 29 Sep 2015 04:47:36 -0400 Received: from terminus.zytor.com ([198.137.202.10]:37908 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933363AbbI2Ir1 (ORCPT ); Tue, 29 Sep 2015 04:47:27 -0400 Date: Tue, 29 Sep 2015 01:47:16 -0700 From: tip-bot for Adrian Hunter Message-ID: Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, adrian.hunter@intel.com, jolsa@redhat.com, acme@redhat.com, tglx@linutronix.de, mingo@kernel.org Reply-To: hpa@zytor.com, linux-kernel@vger.kernel.org, adrian.hunter@intel.com, jolsa@redhat.com, acme@redhat.com, tglx@linutronix.de, mingo@kernel.org In-Reply-To: <1443186956-18718-20-git-send-email-adrian.hunter@intel.com> References: <1443186956-18718-20-git-send-email-adrian.hunter@intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf scripting python: Allow for max_stack greater than PERF_MAX_STACK_DEPTH Git-Commit-ID: 44cbe7295c3808977159f500a5bcdebf12a7db5f 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: 44cbe7295c3808977159f500a5bcdebf12a7db5f Gitweb: http://git.kernel.org/tip/44cbe7295c3808977159f500a5bcdebf12a7db5f Author: Adrian Hunter AuthorDate: Fri, 25 Sep 2015 16:15:50 +0300 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 28 Sep 2015 17:09:12 -0300 perf scripting python: Allow for max_stack greater than PERF_MAX_STACK_DEPTH Use the scripting_max_stack value to allow for values greater than PERF_MAX_STACK_DEPTH. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/1443186956-18718-20-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-script.c | 2 +- tools/perf/util/scripting-engines/trace-event-python.c | 2 +- tools/perf/util/trace-event.h | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index a65b498..5c3c02d 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -33,7 +33,7 @@ static bool nanosecs; static const char *cpu_list; static DECLARE_BITMAP(cpu_bitmap, MAX_NR_CPUS); -static unsigned int scripting_max_stack = PERF_MAX_STACK_DEPTH; +unsigned int scripting_max_stack = PERF_MAX_STACK_DEPTH; enum perf_output_field { PERF_OUTPUT_COMM = 1U << 0, diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c index aa9e125..a8e825f 100644 --- a/tools/perf/util/scripting-engines/trace-event-python.c +++ b/tools/perf/util/scripting-engines/trace-event-python.c @@ -319,7 +319,7 @@ static PyObject *python_process_callchain(struct perf_sample *sample, if (thread__resolve_callchain(al->thread, evsel, sample, NULL, NULL, - PERF_MAX_STACK_DEPTH) != 0) { + scripting_max_stack) != 0) { pr_err("Failed to resolve callchain. Skipping\n"); goto exit; } diff --git a/tools/perf/util/trace-event.h b/tools/perf/util/trace-event.h index da6cc4c..b85ee55 100644 --- a/tools/perf/util/trace-event.h +++ b/tools/perf/util/trace-event.h @@ -78,6 +78,8 @@ struct scripting_ops { int (*generate_script) (struct pevent *pevent, const char *outfile); }; +extern unsigned int scripting_max_stack; + int script_spec_register(const char *spec, struct scripting_ops *ops); void setup_perl_scripting(void);