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


Groups > linux.kernel > #1238588

[PATCH 05/10] perf callchain: Allow for max_stack greater than PERF_MAX_STACK_DEPTH

From Arnaldo Carvalho de Melo <acme@kernel.org>
Newsgroups linux.kernel
Subject [PATCH 05/10] perf callchain: Allow for max_stack greater than PERF_MAX_STACK_DEPTH
Date 2015-10-02 22:30 +0200
Message-ID <qff7Q-5Cf-21@gated-at.bofh.it> (permalink)
References <qff7P-5Cf-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Adjust the validation to allow for max_stack 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-18-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/machine.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 76fe167c359e..5ef90be2a249 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -1831,7 +1831,7 @@ static int thread__resolve_callchain_sample(struct thread *thread,
 	}
 
 check_calls:
-	if (chain->nr > PERF_MAX_STACK_DEPTH) {
+	if (chain->nr > PERF_MAX_STACK_DEPTH && (int)chain->nr > max_stack) {
 		pr_warning("corrupted callchain. skipping...\n");
 		return 0;
 	}
-- 
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/10] perf/cover improvements and fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-02 22:30 +0200
  [PATCH 09/10] perf record: Change 'record.samples' type to unsigned long long Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-02 22:30 +0200
  [PATCH 05/10] perf callchain: Allow for max_stack greater than PERF_MAX_STACK_DEPTH Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-02 22:30 +0200
  [PATCH 03/10] perf top: Register idle thread Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-02 22:30 +0200
  [PATCH 01/10] perf record: Allocate area for sample_id_hdr in a synthesized comm event Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-02 22:30 +0200
  [PATCH 02/10] perf top: Fix unresolved comm when -s comm is used Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-02 22:30 +0200
  [PATCH 06/10] perf list: Do event name substring search as last resort when no events found Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-02 22:30 +0200
  [PATCH 08/10] perf probe: Allow probing on kmodules without dwarf Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-02 22:30 +0200
  Re: [GIT PULL 00/10] perf/cover improvements and fixes Ingo Molnar <mingo@kernel.org> - 2015-10-03 08:40 +0200

csiph-web