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


Groups > linux.kernel > #1434706

Re: [BUG] perf test 29 crashing

From Jiri Olsa <jolsa@redhat.com>
Newsgroups linux.kernel
Subject Re: [BUG] perf test 29 crashing
Date 2016-06-30 18:20 +0200
Message-ID <rPMR4-3kx-9@gated-at.bofh.it> (permalink)
References <rP0t4-730-23@gated-at.bofh.it> <rP4wG-18P-19@gated-at.bofh.it> <rP5sK-1HV-21@gated-at.bofh.it> <rPdzX-6MM-5@gated-at.bofh.it> <rPLV0-2Lc-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Jun 30, 2016 at 05:10:16PM +0200, Jiri Olsa wrote:

SNIP

> 
> hate to be the only one with this.. now I need to dive in ;-)

it was the setup in my .perfconfig:

[call-graph]
threshold=10

caused some of the callchains to disappear and screw the test,
I think we should make that test using default values, like in
attached patch

however maybe we should think about disabling ~/.perfconfig
overload for perf test at all

I'll post patch below with my other stuff if there are no
objection or another solution

thanks,
jirka

---
diff --git a/tools/perf/tests/hists_cumulate.c b/tools/perf/tests/hists_cumulate.c
index a9e3db3afac4..1208284a7338 100644
--- a/tools/perf/tests/hists_cumulate.c
+++ b/tools/perf/tests/hists_cumulate.c
@@ -666,6 +666,8 @@ static int test4(struct perf_evsel *evsel, struct machine *machine)
 	perf_evsel__set_sample_bit(evsel, CALLCHAIN);
 
 	setup_sorting(NULL);
+
+	callchain_param = callchain_param_default;
 	callchain_register_param(&callchain_param);
 
 	err = add_hist_entries(hists, machine);
diff --git a/tools/perf/util/callchain.h b/tools/perf/util/callchain.h
index a70f6b54eb92..13e75549c440 100644
--- a/tools/perf/util/callchain.h
+++ b/tools/perf/util/callchain.h
@@ -106,6 +106,7 @@ struct callchain_param {
 };
 
 extern struct callchain_param callchain_param;
+extern struct callchain_param callchain_param_default;
 
 struct callchain_list {
 	u64			ip;
diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c
index e08b9a092a23..5f44a21955cd 100644
--- a/tools/perf/util/util.c
+++ b/tools/perf/util/util.c
@@ -19,12 +19,19 @@
 #include "callchain.h"
 #include "strlist.h"
 
-struct callchain_param	callchain_param = {
-	.mode	= CHAIN_GRAPH_ABS,
-	.min_percent = 0.5,
-	.order  = ORDER_CALLEE,
-	.key	= CCKEY_FUNCTION,
-	.value	= CCVAL_PERCENT,
+#define CALLCHAIN_PARAM_DEFAULT			\
+	.mode		= CHAIN_GRAPH_ABS,	\
+	.min_percent	= 0.5,			\
+	.order		= ORDER_CALLEE,		\
+	.key		= CCKEY_FUNCTION,	\
+	.value		= CCVAL_PERCENT,	\
+
+struct callchain_param callchain_param = {
+	CALLCHAIN_PARAM_DEFAULT
+};
+
+struct callchain_param callchain_param_default = {
+	CALLCHAIN_PARAM_DEFAULT
 };
 
 /*

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


Thread

[BUG] perf test 29 crashing Jiri Olsa <jolsa@redhat.com> - 2016-06-28 14:40 +0200
  Re: [BUG] perf test 29 crashing Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-06-28 19:00 +0200
    Re: [BUG] perf test 29 crashing David Ahern <dsahern@gmail.com> - 2016-06-28 20:00 +0200
      Re: [BUG] perf test 29 crashing Namhyung Kim <namhyung@kernel.org> - 2016-06-29 04:40 +0200
        Re: [BUG] perf test 29 crashing Jiri Olsa <jolsa@redhat.com> - 2016-06-30 17:20 +0200
          Re: [BUG] perf test 29 crashing Jiri Olsa <jolsa@redhat.com> - 2016-06-30 18:20 +0200
            Re: [BUG] perf test 29 crashing David Ahern <dsahern@gmail.com> - 2016-06-30 21:50 +0200
              Re: [BUG] perf test 29 crashing Jiri Olsa <jolsa@redhat.com> - 2016-07-01 09:10 +0200
            Re: [BUG] perf test 29 crashing Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-06-30 22:00 +0200

csiph-web