Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 44cbe729 authored by Adrian Hunter's avatar Adrian Hunter Committed by Arnaldo Carvalho de Melo
Browse files

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: default avatarAdrian 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 03cd1fed
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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,
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}
+2 −0
Original line number Diff line number Diff line
@@ -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);