Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1432953 > unrolled thread
| Started by | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| First post | 2016-06-28 14:40 +0200 |
| Last post | 2016-06-30 22:00 +0200 |
| Articles | 9 — 4 participants |
Back to article view | Back to linux.kernel
[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
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2016-06-28 14:40 +0200 |
| Subject | [BUG] perf test 29 crashing |
| Message-ID | <rP0t4-730-23@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-06-28 19:00 +0200 |
| Message-ID | <rP4wG-18P-19@gated-at.bofh.it> |
| In reply to | #1432953 |
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]$
[toc] | [prev] | [next] | [standalone]
| From | David Ahern <dsahern@gmail.com> |
|---|---|
| Date | 2016-06-28 20:00 +0200 |
| Message-ID | <rP5sK-1HV-21@gated-at.bofh.it> |
| In reply to | #1433123 |
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)
[toc] | [prev] | [next] | [standalone]
| From | Namhyung Kim <namhyung@kernel.org> |
|---|---|
| Date | 2016-06-29 04:40 +0200 |
| Message-ID | <rPdzX-6MM-5@gated-at.bofh.it> |
| In reply to | #1433194 |
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
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2016-06-30 17:20 +0200 |
| Message-ID | <rPLV0-2Lc-9@gated-at.bofh.it> |
| In reply to | #1433412 |
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
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2016-06-30 18:20 +0200 |
| Message-ID | <rPMR4-3kx-9@gated-at.bofh.it> |
| In reply to | #1434654 |
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
};
/*
[toc] | [prev] | [next] | [standalone]
| From | David Ahern <dsahern@gmail.com> |
|---|---|
| Date | 2016-06-30 21:50 +0200 |
| Message-ID | <rPQ8h-5co-3@gated-at.bofh.it> |
| In reply to | #1434706 |
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.
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2016-07-01 09:10 +0200 |
| Message-ID | <rQ0Kl-3Cg-5@gated-at.bofh.it> |
| In reply to | #1434815 |
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;
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-06-30 22:00 +0200 |
| Message-ID | <rPQhX-5fz-15@gated-at.bofh.it> |
| In reply to | #1434706 |
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
> };
>
> /*
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web