Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/1443186956-18718-19-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Adrian Hunter and committed by
Arnaldo Carvalho de Melo
03cd1fed 96b40f3c

+5 -3
+4 -2
tools/perf/builtin-script.c
··· 33 33 static const char *cpu_list; 34 34 static DECLARE_BITMAP(cpu_bitmap, MAX_NR_CPUS); 35 35 36 + static unsigned int scripting_max_stack = PERF_MAX_STACK_DEPTH; 37 + 36 38 enum perf_output_field { 37 39 PERF_OUTPUT_COMM = 1U << 0, 38 40 PERF_OUTPUT_TID = 1U << 1, ··· 477 475 } 478 476 } 479 477 perf_evsel__print_ip(evsel, sample, al, print_opts, 480 - PERF_MAX_STACK_DEPTH); 478 + scripting_max_stack); 481 479 } 482 480 483 481 /* print branch_to information */ ··· 554 552 555 553 perf_evsel__print_ip(evsel, sample, al, 556 554 output[attr->type].print_ip_opts, 557 - PERF_MAX_STACK_DEPTH); 555 + scripting_max_stack); 558 556 } 559 557 560 558 if (PRINT_FIELD(IREGS))
+1 -1
tools/perf/util/session.c
··· 1800 1800 1801 1801 if (thread__resolve_callchain(al->thread, evsel, 1802 1802 sample, NULL, NULL, 1803 - PERF_MAX_STACK_DEPTH) != 0) { 1803 + stack_depth) != 0) { 1804 1804 if (verbose) 1805 1805 error("Failed to resolve callchain. Skipping\n"); 1806 1806 return;