All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: "Liang, Kan" <kan.liang@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>,
	"jolsa@kernel.org" <jolsa@kernel.org>,
	"namhyung@kernel.org" <namhyung@kernel.org>,
	"ak@linux.intel.com" <ak@linux.intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH 1/1] perf,stat: reduce interval-print to 10ms
Date: Fri, 2 Oct 2015 17:40:26 -0300	[thread overview]
Message-ID: <20151002204026.GC20515@kernel.org> (raw)
In-Reply-To: <37D7C6CF3E00A74B8858931C1DB2F07701953D23@SHSMSX103.ccr.corp.intel.com>

Em Fri, Oct 02, 2015 at 08:22:06PM +0000, Liang, Kan escreveu:
> > > > +		if (interval < 10) {
> > > > +			pr_err("print interval must be >= 10ms\n");
> > > > +			parse_options_usage(stat_usage, options, "I", 1);
> > > > +			goto out;
> > > > +		} else
> > > > +			pr_warning("print interval < 100ms. "
> > > > +				   "The overhead percentage could be high
> > in some cases. "
> > > > +				   "Please proceed with caution.\n");
> > >
> > > with '-I' 10 this warning flies away quite fast ;-)
> > >
> > > I guess it's better than nothing, and I'm not sure about putting some
> > > sleep after that warning..
> > >
> > > Acked-by: Jiri Olsa <jolsa@kernel.org>
> > 
> > Right, this should appear in the man page as well, I added the patch below,
> > we could also print that warning when the workload ends.
 
> OK. We can print the warning message again at the end as the patch below.
> 
> +++ b/tools/perf/builtin-stat.c
> @@ -1377,6 +1377,11 @@ int cmd_stat(int argc, const char **argv, const char *prefix __maybe_unused)
>  	if (!forever && status != -1 && !interval)
>  		print_counters(NULL, argc, argv);
>  
> +	if (interval && interval < 100)
> +		pr_warning("print interval < 100ms. "
> +			   "The overhead percentage could be high in some cases. "
> +			   "Please proceed with caution.\n");

Yeah, something like that, but the warning then becomes strange,
"proceed"? I guess that something like:

		pr_warning("print interval < 100ms. "
			   "The overhead percentage could have been high. "
			   "Take that into account when interpreting the these numbers.\n");

Right?

- Arnaldo

> +
>  	perf_evlist__free_stats(evsel_list);
>  out:
>  	perf_evlist__delete(evsel_list);

  reply	other threads:[~2015-10-02 20:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-02  9:04 [PATCH 1/1] perf,stat: reduce interval-print to 10ms kan.liang
2015-10-02 16:56 ` Jiri Olsa
2015-10-02 20:08   ` Arnaldo Carvalho de Melo
2015-10-02 20:22     ` Liang, Kan
2015-10-02 20:40       ` Arnaldo Carvalho de Melo [this message]
2015-10-02 20:50         ` Liang, Kan
2015-10-03  7:51 ` [tip:perf/core] perf stat: Reduce min --interval-print " tip-bot for Kan Liang

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=20151002204026.GC20515@kernel.org \
    --to=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=eranian@google.com \
    --cc=jolsa@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=kan.liang@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.