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

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 <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/1443186956-18718-20-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
44cbe729 03cd1fed

+4 -2
+1 -1
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; 36 + unsigned int scripting_max_stack = PERF_MAX_STACK_DEPTH; 37 37 38 38 enum perf_output_field { 39 39 PERF_OUTPUT_COMM = 1U << 0,
+1 -1
tools/perf/util/scripting-engines/trace-event-python.c
··· 319 319 320 320 if (thread__resolve_callchain(al->thread, evsel, 321 321 sample, NULL, NULL, 322 - PERF_MAX_STACK_DEPTH) != 0) { 322 + scripting_max_stack) != 0) { 323 323 pr_err("Failed to resolve callchain. Skipping\n"); 324 324 goto exit; 325 325 }
+2
tools/perf/util/trace-event.h
··· 78 78 int (*generate_script) (struct pevent *pevent, const char *outfile); 79 79 }; 80 80 81 + extern unsigned int scripting_max_stack; 82 + 81 83 int script_spec_register(const char *spec, struct scripting_ops *ops); 82 84 83 85 void setup_perl_scripting(void);