Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1234477

[PATCH 29/39] perf scripting python: Allow for max_stack greater than PERF_MAX_STACK_DEPTH

From Arnaldo Carvalho de Melo <acme@kernel.org>
Newsgroups linux.kernel
Subject [PATCH 29/39] perf scripting python: Allow for max_stack greater than PERF_MAX_STACK_DEPTH
Date 2015-09-28 23:20 +0200
Message-ID <qdO04-2Tc-35@gated-at.bofh.it> (permalink)
References <qdNQm-2GE-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Adrian Hunter <adrian.hunter@intel.com>

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>
---
 tools/perf/builtin-script.c                            | 2 +-
 tools/perf/util/scripting-engines/trace-event-python.c | 2 +-
 tools/perf/util/trace-event.h                          | 2 ++
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index a65b498df097..5c3c02d5af53 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -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,
diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c
index aa9e1257c1ee..a8e825fca42a 100644
--- a/tools/perf/util/scripting-engines/trace-event-python.c
+++ b/tools/perf/util/scripting-engines/trace-event-python.c
@@ -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;
 	}
diff --git a/tools/perf/util/trace-event.h b/tools/perf/util/trace-event.h
index da6cc4cc2a4f..b85ee55cca0c 100644
--- a/tools/perf/util/trace-event.h
+++ b/tools/perf/util/trace-event.h
@@ -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);
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[GIT PULL 00/39] perf/core improvements and fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 23:10 +0200
  [PATCH 06/39] tools build: Add test for missing include Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 23:10 +0200
  [PATCH 02/39] perf hists browser: Use the map to determine if a DSO is being used as a kernel Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 23:10 +0200
  [PATCH 20/39] perf report: Adjust sample type validation for synthesized branch stacks Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 23:10 +0200
  [PATCH 37/39] perf tools: Show proper error message for wrong terms of hw/sw events Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 23:20 +0200
  [PATCH 31/39] perf evlist: Add perf_evlist__id2evsel_strict() Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 23:20 +0200
  [PATCH 15/39] perf intel-pt: Make logging slightly more efficient Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 23:20 +0200
  [PATCH 26/39] perf report: Make max_stack value allow for synthesized callchains Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 23:20 +0200
  [PATCH 27/39] perf hists: Allow for max_stack greater than PERF_MAX_STACK_DEPTH Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 23:20 +0200
  [PATCH 34/39] perf inject: Add --strip option to strip out non-synthesized events Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 23:20 +0200
  [PATCH 29/39] perf scripting python: Allow for max_stack greater than PERF_MAX_STACK_DEPTH Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 23:20 +0200
  [PATCH 01/39] perf top: Filter symbols based on __map__is_kernel(map) Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 23:20 +0200
  [PATCH 03/39] perf tools: Use __map__is_kernel() when synthesizing kernel module mmap records Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 23:20 +0200
  [PATCH 13/39] perf report: Fix sample type validation for synthesized callchains Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 23:20 +0200
  [PATCH 32/39] perf evlist: Add perf_evlist__remove() Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 23:20 +0200
  [PATCH 30/39] perf script: Make scripting_max_stack value allow for synthesized callchains Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 23:20 +0200
  [PATCH 10/39] perf tools: Rename the 'single_dep' target to 'prepare' Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 23:20 +0200
  [PATCH 11/39] tools build: Build fixdep helper from perf and basic libs Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 23:20 +0200
  [PATCH 04/39] tools lib api fs: Store tracing mountpoint for better error message Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 23:20 +0200
  [PATCH 14/39] perf intel-pt: Fix potential loop forever Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 23:20 +0200
  [PATCH 07/39] tools build: Add fixdep dependency helper Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 23:20 +0200
  [PATCH 35/39] perf intel-pt: Add mispred-all config option to aid use with autofdo Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 23:20 +0200
  [PATCH 28/39] perf script: Add a setting for maximum stack depth Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 23:30 +0200
  [PATCH 24/39] perf intel-pt: Move branch filter logic Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 23:30 +0200
  [PATCH 23/39] perf inject: Set branch stack feature flag when synthesizing branch stacks Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 23:30 +0200
  [PATCH 33/39] perf inject: Remove more aux-related stuff when processing instruction traces Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 23:30 +0200
  [PATCH 18/39] perf tools: Add more documentation to export-to-postgresql.py script Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 23:30 +0200
  [PATCH 17/39] perf session: Warn when AUX data has been lost Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 23:30 +0200
  [PATCH 16/39] perf script: Allow time to be displayed in nanoseconds Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 23:30 +0200
  [PATCH 25/39] perf intel-pt: Support generating branch stack Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 23:30 +0200
  [PATCH 21/39] perf report: Also do default setup for synthesized branch stacks Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 23:30 +0200
  [PATCH 22/39] perf report: Skip events with null branch stacks Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 23:30 +0200
  [PATCH 05/39] tools build: Add Makefile.include Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 23:30 +0200
  Re: [GIT PULL 00/39] perf/core improvements and fixes Ingo Molnar <mingo@kernel.org> - 2015-09-29 09:50 +0200

csiph-web