* [BUG] perf test 29 crashing @ 2016-06-28 12:34 Jiri Olsa 2016-06-28 16:59 ` Arnaldo Carvalho de Melo 0 siblings, 1 reply; 9+ messages in thread From: Jiri Olsa @ 2016-06-28 12:34 UTC (permalink / raw) To: Arnaldo Carvalho de Melo, lkml, David Ahern, Namhyung Kim hi, I'm having test 29 crashing on latest Arnaldo's perf/core: [jolsa@krava perf]$ ./perf test hist 15: Test matching and linking multiple hists : Ok 25: Test filtering hist entries : Ok 28: Test output sorting of hist entries : Ok 29: Test cumulation of child hist entries : FAILED! I was hunting this, because I though it was caused by one of my local changes, but then realized it's public bug ;-) but can't find the reason so far.. thanks, jirka ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [BUG] perf test 29 crashing 2016-06-28 12:34 [BUG] perf test 29 crashing Jiri Olsa @ 2016-06-28 16:59 ` Arnaldo Carvalho de Melo 2016-06-28 17:52 ` David Ahern 0 siblings, 1 reply; 9+ messages in thread From: Arnaldo Carvalho de Melo @ 2016-06-28 16:59 UTC (permalink / raw) To: Jiri Olsa; +Cc: lkml, David Ahern, Namhyung Kim Em Tue, Jun 28, 2016 at 02:34:10PM +0200, Jiri Olsa escreveu: > hi, > I'm having test 29 crashing on latest Arnaldo's perf/core: > > [jolsa@krava perf]$ ./perf test hist > 15: Test matching and linking multiple hists : Ok > 25: Test filtering hist entries : Ok > 28: Test output sorting of hist entries : Ok > 29: Test cumulation of child hist entries : FAILED! > > I was hunting this, because I though it was caused by one > of my local changes, but then realized it's public bug ;-) > > but can't find the reason so far.. Huh? [acme@jouet linux]$ perf test 29 29: Test cumulation of child hist entries : Ok [acme@jouet linux]$ perf --version perf version 4.7.rc5.g1c1e35c [acme@jouet linux]$ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [BUG] perf test 29 crashing 2016-06-28 16:59 ` Arnaldo Carvalho de Melo @ 2016-06-28 17:52 ` David Ahern 2016-06-29 2:20 ` Namhyung Kim 0 siblings, 1 reply; 9+ messages in thread From: David Ahern @ 2016-06-28 17:52 UTC (permalink / raw) To: Arnaldo Carvalho de Melo, Jiri Olsa; +Cc: lkml, Namhyung Kim On 6/28/16 10:59 AM, Arnaldo Carvalho de Melo wrote: > Em Tue, Jun 28, 2016 at 02:34:10PM +0200, Jiri Olsa escreveu: >> hi, >> I'm having test 29 crashing on latest Arnaldo's perf/core: >> >> [jolsa@krava perf]$ ./perf test hist >> 15: Test matching and linking multiple hists : Ok >> 25: Test filtering hist entries : Ok >> 28: Test output sorting of hist entries : Ok >> 29: Test cumulation of child hist entries : FAILED! >> >> I was hunting this, because I though it was caused by one >> of my local changes, but then realized it's public bug ;-) >> >> but can't find the reason so far.. > > Huh? > > [acme@jouet linux]$ perf test 29 > 29: Test cumulation of child hist entries : Ok > [acme@jouet linux]$ perf --version > perf version 4.7.rc5.g1c1e35c > [acme@jouet linux]$ > If this helps break the tie: dsa@kenny:~/kernel.git$ /tmp/perf/perf test 29 29: Test cumulation of child hist entries : Ok dsa@kenny:~/kernel.git$ /tmp/perf/perf --version perf version 4.7.rc5.g02184c But running on net-next kernel from a few days ago + 1 local patch: dsa@kenny:~/kernel.git$ uname -r 4.7.0-rc2-00862-g23854048c919 (I do get a few other failures) ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [BUG] perf test 29 crashing 2016-06-28 17:52 ` David Ahern @ 2016-06-29 2:20 ` Namhyung Kim 2016-06-30 15:10 ` Jiri Olsa 0 siblings, 1 reply; 9+ messages in thread From: Namhyung Kim @ 2016-06-29 2:20 UTC (permalink / raw) To: David Ahern; +Cc: Arnaldo Carvalho de Melo, Jiri Olsa, lkml Hi, On Tue, Jun 28, 2016 at 11:52:09AM -0600, David Ahern wrote: > On 6/28/16 10:59 AM, Arnaldo Carvalho de Melo wrote: > > Em Tue, Jun 28, 2016 at 02:34:10PM +0200, Jiri Olsa escreveu: > > > hi, > > > I'm having test 29 crashing on latest Arnaldo's perf/core: > > > > > > [jolsa@krava perf]$ ./perf test hist > > > 15: Test matching and linking multiple hists : Ok > > > 25: Test filtering hist entries : Ok > > > 28: Test output sorting of hist entries : Ok > > > 29: Test cumulation of child hist entries : FAILED! > > > > > > I was hunting this, because I though it was caused by one > > > of my local changes, but then realized it's public bug ;-) > > > > > > but can't find the reason so far.. > > > > Huh? > > > > [acme@jouet linux]$ perf test 29 > > 29: Test cumulation of child hist entries : Ok > > [acme@jouet linux]$ perf --version > > perf version 4.7.rc5.g1c1e35c > > [acme@jouet linux]$ > > > > If this helps break the tie: > > dsa@kenny:~/kernel.git$ /tmp/perf/perf test 29 > 29: Test cumulation of child hist entries : Ok > > dsa@kenny:~/kernel.git$ /tmp/perf/perf --version > perf version 4.7.rc5.g02184c > > But running on net-next kernel from a few days ago + 1 local patch: > dsa@kenny:~/kernel.git$ uname -r > 4.7.0-rc2-00862-g23854048c919 > > (I do get a few other failures) Running latest acme/perf/core: $ perf test hist 15: Test matching and linking multiple hists : Ok 25: Test filtering hist entries : Ok 28: Test output sorting of hist entries : Ok 29: Test cumulation of child hist entries : Ok $ perf --version perf version 4.6.g6d9c67 But I saw a build failure which was fixed by below patch: >From 0b011dbf5ba60f78dd3198dc3f72005334507eb4 Mon Sep 17 00:00:00 2001 From: Namhyung Kim <namhyung@kernel.org> Date: Wed, 29 Jun 2016 11:10:22 +0900 Subject: [PATCH] perf tools: Fix build failture on perl script context MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CC scripts/perl/Perf-Trace-Util/Context.o In file included from /usr/lib/perl5/core_perl/CORE/perl.h:3905:0, from Context.xs:23: /usr/lib/perl5/core_perl/CORE/inline.h: In function ‘S_cx_popsub_args’: /usr/lib/perl5/core_perl/CORE/cop.h:612:13: warning: declaration of ‘av' shadows a previous local [-Werror=shadow] AV *av = GvAV(PL_defgv); ^ /usr/lib/perl5/core_perl/CORE/inline.h:526:5: note: in expansion of macro ‘CX_POP_SAVEARRAY’ CX_POP_SAVEARRAY(cx); ^~~~~~~~~~~~~~~~ In file included from /usr/lib/perl5/core_perl/CORE/perl.h:5853:0, from Context.xs:23: /usr/lib/perl5/core_perl/CORE/inline.h:518:9: note: shadowed declaration is here AV *av; ^~ Signed-off-by: Namhyung Kim <namhyung@kernel.org> --- tools/perf/scripts/perl/Perf-Trace-Util/Build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/perf/scripts/perl/Perf-Trace-Util/Build b/tools/perf/scripts/perl/Perf-Trace-Util/Build index 928e110179cb..34faecf774ae 100644 --- a/tools/perf/scripts/perl/Perf-Trace-Util/Build +++ b/tools/perf/scripts/perl/Perf-Trace-Util/Build @@ -1,3 +1,5 @@ libperf-y += Context.o -CFLAGS_Context.o += $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-nested-externs -Wno-undef -Wno-switch-default +CFLAGS_Context.o += $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes +CFLAGS_Context.o += -Wno-unused-parameter -Wno-nested-externs -Wno-undef +CFLAGS_Context.o += -Wno-switch-default -Wno-shadow -- 2.9.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [BUG] perf test 29 crashing 2016-06-29 2:20 ` Namhyung Kim @ 2016-06-30 15:10 ` Jiri Olsa 2016-06-30 16:18 ` Jiri Olsa 0 siblings, 1 reply; 9+ messages in thread From: Jiri Olsa @ 2016-06-30 15:10 UTC (permalink / raw) To: Namhyung Kim; +Cc: David Ahern, Arnaldo Carvalho de Melo, lkml On Wed, Jun 29, 2016 at 11:20:06AM +0900, Namhyung Kim wrote: SNIP > > > > If this helps break the tie: > > > > dsa@kenny:~/kernel.git$ /tmp/perf/perf test 29 > > 29: Test cumulation of child hist entries : Ok > > > > dsa@kenny:~/kernel.git$ /tmp/perf/perf --version > > perf version 4.7.rc5.g02184c > > > > But running on net-next kernel from a few days ago + 1 local patch: > > dsa@kenny:~/kernel.git$ uname -r > > 4.7.0-rc2-00862-g23854048c919 > > > > (I do get a few other failures) > > Running latest acme/perf/core: > > $ perf test hist > 15: Test matching and linking multiple hists : Ok > 25: Test filtering hist entries : Ok > 28: Test output sorting of hist entries : Ok > 29: Test cumulation of child hist entries : Ok > $ perf --version > perf version 4.6.g6d9c67 > hum.. I still see it: (latest acme's perf/core) [jolsa@krava perf]$ ./perf --version perf version 4.7.rc5.ga059d59 [jolsa@krava perf]$ ./perf test hist 15: Test matching and linking multiple hists : Ok 25: Test filtering hist entries : Ok 28: Test output sorting of hist entries : Ok 29: Test cumulation of child hist entries : FAILED! [jolsa@krava perf]$ ./perf test 29 -v 29: Test cumulation of child hist entries : --- start --- test child forked, pid 11925 perf: Segmentation fault Obtained 11 stack frames. ./perf(sighandler_dump_stack+0x41) [0x4f57f1] /lib64/libc.so.6(+0x34a50) [0x7f5e22695a50] ./perf() [0x47b2cc] ./perf(test__hists_cumulate+0x10c) [0x47c79c] ./perf() [0x4698b6] ./perf(cmd_test+0x5be) [0x469eae] ./perf() [0x487561] ./perf(main+0x6f6) [0x424cb6] /lib64/libc.so.6(__libc_start_main+0xf0) [0x7f5e22681700] ./perf(_start+0x29) [0x424da9] [(nil)] test child interrupted ---- end ---- Test cumulation of child hist entries: FAILED! hate to be the only one with this.. now I need to dive in ;-) jirka ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [BUG] perf test 29 crashing 2016-06-30 15:10 ` Jiri Olsa @ 2016-06-30 16:18 ` Jiri Olsa 2016-06-30 19:41 ` David Ahern 2016-06-30 19:56 ` Arnaldo Carvalho de Melo 0 siblings, 2 replies; 9+ messages in thread From: Jiri Olsa @ 2016-06-30 16:18 UTC (permalink / raw) To: Namhyung Kim; +Cc: David Ahern, Arnaldo Carvalho de Melo, lkml 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 }; /* ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [BUG] perf test 29 crashing 2016-06-30 16:18 ` Jiri Olsa @ 2016-06-30 19:41 ` David Ahern 2016-07-01 7:02 ` Jiri Olsa 2016-06-30 19:56 ` Arnaldo Carvalho de Melo 1 sibling, 1 reply; 9+ messages in thread From: David Ahern @ 2016-06-30 19:41 UTC (permalink / raw) To: Jiri Olsa, Namhyung Kim; +Cc: Arnaldo Carvalho de Melo, lkml On 6/30/16 10:18 AM, Jiri Olsa wrote: > it was the setup in my .perfconfig: > > [call-graph] > threshold=10 > > caused some of the callchains to disappear and screw the test, Did you find out why it caused a segfault? > 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 Agree. The tests need a known config. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [BUG] perf test 29 crashing 2016-06-30 19:41 ` David Ahern @ 2016-07-01 7:02 ` Jiri Olsa 0 siblings, 0 replies; 9+ messages in thread From: Jiri Olsa @ 2016-07-01 7:02 UTC (permalink / raw) To: David Ahern; +Cc: Namhyung Kim, Arnaldo Carvalho de Melo, lkml On Thu, Jun 30, 2016 at 01:41:57PM -0600, David Ahern wrote: > On 6/30/16 10:18 AM, Jiri Olsa wrote: > > it was the setup in my .perfconfig: > > > > [call-graph] > > threshold=10 > > > > caused some of the callchains to disappear and screw the test, > > Did you find out why it caused a segfault? yep, the code of tests/hists_cumulate.c::do_test expects each hist_entry to carry callchain, and the option above cause only some of the had it: do_test { root = &he->callchain->node.rb_root; cnode = rb_entry(rb_first(root), struct callchain_node, rb_node); c = 0; list_for_each_entry(clist, &cnode->val, list) { ^ - root is empty, cnode is trash and this itaration segfaults maybe we could also add check below jirka --- diff --git a/tools/perf/tests/hists_cumulate.c b/tools/perf/tests/hists_cumulate.c index 1208284a7338..9fd54b79a788 100644 --- a/tools/perf/tests/hists_cumulate.c +++ b/tools/perf/tests/hists_cumulate.c @@ -216,6 +216,8 @@ static int do_test(struct hists *hists, struct result *expected, size_t nr_expec /* check callchain entries */ root = &he->callchain->node.rb_root; + + TEST_ASSERT_VAL("callchains expected", !RB_EMPTY_ROOT(root)); cnode = rb_entry(rb_first(root), struct callchain_node, rb_node); c = 0; ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [BUG] perf test 29 crashing 2016-06-30 16:18 ` Jiri Olsa 2016-06-30 19:41 ` David Ahern @ 2016-06-30 19:56 ` Arnaldo Carvalho de Melo 1 sibling, 0 replies; 9+ messages in thread From: Arnaldo Carvalho de Melo @ 2016-06-30 19:56 UTC (permalink / raw) To: Jiri Olsa; +Cc: Namhyung Kim, David Ahern, Arnaldo Carvalho de Melo, lkml Em Thu, Jun 30, 2016 at 06:18:16PM +0200, Jiri Olsa escreveu: > 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 Yeah, tests expect things in a certain way, so shouldn't be affect by local .perfconfig stuff, ignoring it in tests is the way to go. But probably we should instead check if the subcommand is 'test' when calling into perf_config(), no? I.e. Other tests may suffer from this issue. - Arnaldo > 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 > }; > > /* ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-07-01 7:02 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-06-28 12:34 [BUG] perf test 29 crashing Jiri Olsa 2016-06-28 16:59 ` Arnaldo Carvalho de Melo 2016-06-28 17:52 ` David Ahern 2016-06-29 2:20 ` Namhyung Kim 2016-06-30 15:10 ` Jiri Olsa 2016-06-30 16:18 ` Jiri Olsa 2016-06-30 19:41 ` David Ahern 2016-07-01 7:02 ` Jiri Olsa 2016-06-30 19:56 ` Arnaldo Carvalho de Melo
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).