aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-script.c
diff options
context:
space:
mode:
authorAdrian Hunter <[email protected]>2015-09-25 13:15:49 +0000
committerArnaldo Carvalho de Melo <[email protected]>2015-09-28 20:08:48 +0000
commit03cd1fed2b8730271d3a8dbabd87989abddc33c4 (patch)
tree598fa85343b188b3a72de6e6a8d09b9411d31d54 /tools/perf/builtin-script.c
parentperf hists: Allow for max_stack greater than PERF_MAX_STACK_DEPTH (diff)
downloadkernel-03cd1fed2b8730271d3a8dbabd87989abddc33c4.tar.gz
kernel-03cd1fed2b8730271d3a8dbabd87989abddc33c4.zip
perf script: Add a setting for maximum stack depth
Add a setting for maximum stack depth in preparation for allowing for synthesized callchains. Signed-off-by: Adrian Hunter <[email protected]> Cc: Jiri Olsa <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/builtin-script.c')
-rw-r--r--tools/perf/builtin-script.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 092843968791..a65b498df097 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -33,6 +33,8 @@ 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;
+
enum perf_output_field {
PERF_OUTPUT_COMM = 1U << 0,
PERF_OUTPUT_TID = 1U << 1,
@@ -475,7 +477,7 @@ static void print_sample_bts(union perf_event *event,
}
}
perf_evsel__print_ip(evsel, sample, al, print_opts,
- PERF_MAX_STACK_DEPTH);
+ scripting_max_stack);
}
/* print branch_to information */
@@ -552,7 +554,7 @@ static void process_event(union perf_event *event, struct perf_sample *sample,
perf_evsel__print_ip(evsel, sample, al,
output[attr->type].print_ip_opts,
- PERF_MAX_STACK_DEPTH);
+ scripting_max_stack);
}
if (PRINT_FIELD(IREGS))