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

Configure Feed

Select the types of activity you want to include in your feed.

perf script: Move scripting_max_stack out of builtin

scripting_max_stack is used in util code which is linked into the
python module. Move the variable declaration to
util/trace-event-scripting.c to avoid conditional compilation.

Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Cc: Colin Ian King <colin.i.king@gmail.com>
Cc: Dapeng Mi <dapeng1.mi@linux.intel.com>
Cc: Howard Chu <howardchu95@gmail.com>
Cc: Ilya Leoshkevich <iii@linux.ibm.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Cc: Veronika Molnarova <vmolnaro@redhat.com>
Cc: Weilin Wang <weilin.wang@intel.com>
Link: https://lore.kernel.org/r/20241119011644.971342-5-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Ian Rogers and committed by
Arnaldo Carvalho de Melo
702c7a4a c027e637

+3 -4
-2
tools/perf/builtin-script.c
··· 92 92 static int dlargc; 93 93 static char **dlargv; 94 94 95 - unsigned int scripting_max_stack = PERF_MAX_STACK_DEPTH; 96 - 97 95 enum perf_output_field { 98 96 PERF_OUTPUT_COMM = 1ULL << 0, 99 97 PERF_OUTPUT_TID = 1ULL << 1,
-2
tools/perf/util/python.c
··· 1307 1307 /* The following are stubs to avoid dragging in builtin-* objects. */ 1308 1308 /* TODO: move the code out of the builtin-* file into util. */ 1309 1309 1310 - unsigned int scripting_max_stack = PERF_MAX_STACK_DEPTH; 1311 - 1312 1310 #ifdef HAVE_KVM_STAT_SUPPORT 1313 1311 bool kvm_entry_event(struct evsel *evsel __maybe_unused) 1314 1312 {
+3
tools/perf/util/trace-event-scripting.c
··· 16 16 #include "debug.h" 17 17 #include "trace-event.h" 18 18 #include "evsel.h" 19 + #include <linux/perf_event.h> 19 20 #include <linux/zalloc.h> 20 21 #include "util/sample.h" 22 + 23 + unsigned int scripting_max_stack = PERF_MAX_STACK_DEPTH; 21 24 22 25 struct scripting_context *scripting_context; 23 26