linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>,
	David Ahern <dsahern@gmail.com>,
	Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [BUG] perf test 29 crashing
Date: Thu, 30 Jun 2016 16:56:56 -0300	[thread overview]
Message-ID: <20160630195656.GD5324@kernel.org> (raw)
In-Reply-To: <20160630161816.GA2939@krava>

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
>  };
>  
>  /*

      parent reply	other threads:[~2016-06-30 19:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160630195656.GD5324@kernel.org \
    --to=acme@kernel.org \
    --cc=arnaldo.melo@gmail.com \
    --cc=dsahern@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).