From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751804AbcDPJSd (ORCPT ); Sat, 16 Apr 2016 05:18:33 -0400 Received: from terminus.zytor.com ([198.137.202.10]:41274 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751287AbcDPJS3 (ORCPT ); Sat, 16 Apr 2016 05:18:29 -0400 Date: Sat, 16 Apr 2016 02:18:09 -0700 From: tip-bot for Arnaldo Carvalho de Melo Message-ID: Cc: acme@redhat.com, adrian.hunter@intel.com, wangnan0@huawei.com, linux-kernel@vger.kernel.org, jolsa@kernel.org, tglx@linutronix.de, mingo@kernel.org, namhyung@kernel.org, dsahern@gmail.com, hpa@zytor.com Reply-To: tglx@linutronix.de, mingo@kernel.org, wangnan0@huawei.com, adrian.hunter@intel.com, acme@redhat.com, jolsa@kernel.org, linux-kernel@vger.kernel.org, hpa@zytor.com, dsahern@gmail.com, namhyung@kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf script: Add --max-stack knob Git-Commit-ID: 6125cc8dac432948a31df4d4ac20dd2d4f8c6c27 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: 6125cc8dac432948a31df4d4ac20dd2d4f8c6c27 Gitweb: http://git.kernel.org/tip/6125cc8dac432948a31df4d4ac20dd2d4f8c6c27 Author: Arnaldo Carvalho de Melo AuthorDate: Thu, 14 Apr 2016 18:15:18 -0300 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 14 Apr 2016 19:46:57 -0300 perf script: Add --max-stack knob Works just like with 'perf report'. In some cases we may want to have more than 127 entries, the default maximum. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-mqkz2p5ok2978gztb0vsnocc@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/Documentation/perf-script.txt | 10 ++++++++++ tools/perf/builtin-script.c | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/tools/perf/Documentation/perf-script.txt b/tools/perf/Documentation/perf-script.txt index 22ef393..4fc44c7 100644 --- a/tools/perf/Documentation/perf-script.txt +++ b/tools/perf/Documentation/perf-script.txt @@ -259,6 +259,16 @@ include::itrace.txt[] --full-source-path:: Show the full path for source files for srcline output. +--max-stack:: + Set the stack depth limit when parsing the callchain, anything + beyond the specified depth will be ignored. This is a trade-off + between information loss and faster processing especially for + workloads that can have a very long callchain stack. + Note that when using the --itrace option the synthesized callchain size + will override this value if the synthesized callchain size is bigger. + + Default: 127 + --ns:: Use 9 decimal places when displaying time (i.e. show the nanoseconds) diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index 875d84e..0e93282b 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -22,6 +22,7 @@ #include "util/thread_map.h" #include "util/stat.h" #include +#include #include "asm/bug.h" #include "util/mem-events.h" @@ -2027,6 +2028,10 @@ int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused) "only consider symbols in these pids"), OPT_STRING(0, "tid", &symbol_conf.tid_list_str, "tid[,tid...]", "only consider symbols in these tids"), + OPT_UINTEGER(0, "max-stack", &scripting_max_stack, + "Set the maximum stack depth when parsing the callchain, " + "anything beyond the specified depth will be ignored. " + "Default: " __stringify(PERF_MAX_STACK_DEPTH)), OPT_BOOLEAN('I', "show-info", &show_full_info, "display extended information from perf.data file"), OPT_BOOLEAN('\0', "show-kernel-path", &symbol_conf.show_kernel_path,