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


Groups > linux.kernel > #1238610

RE: [PATCH 1/1] perf,stat: reduce interval-print to 10ms

From "Liang, Kan" <kan.liang@intel.com>
Newsgroups linux.kernel
Subject RE: [PATCH 1/1] perf,stat: reduce interval-print to 10ms
Date 2015-10-02 23:00 +0200
Message-ID <qffAS-6a6-15@gated-at.bofh.it> (permalink)
References <qfbnB-cS-29@gated-at.bofh.it> <qfbQB-KP-11@gated-at.bofh.it> <qfeOv-5fB-11@gated-at.bofh.it> <qff7Q-5Cf-13@gated-at.bofh.it> <qffrc-5YK-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



> -----Original Message-----
> From: Arnaldo Carvalho de Melo [mailto:acme@kernel.org]
> Sent: Friday, October 02, 2015 4:40 PM
> To: Liang, Kan
> Cc: Jiri Olsa; jolsa@kernel.org; namhyung@kernel.org; ak@linux.intel.com;
> linux-kernel@vger.kernel.org; Stephane Eranian
> Subject: Re: [PATCH 1/1] perf,stat: reduce interval-print to 10ms
> 
> 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?

Yes.

Thanks,
Kan

> 
> - Arnaldo
> 
> > +
> >  	perf_evlist__free_stats(evsel_list);
> >  out:
> >  	perf_evlist__delete(evsel_list);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


Thread

[PATCH 1/1] perf,stat: reduce interval-print to 10ms kan.liang@intel.com - 2015-10-02 18:30 +0200
  Re: [PATCH 1/1] perf,stat: reduce interval-print to 10ms Jiri Olsa <jolsa@redhat.com> - 2015-10-02 19:00 +0200
    Re: [PATCH 1/1] perf,stat: reduce interval-print to 10ms Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-02 22:10 +0200
      RE: [PATCH 1/1] perf,stat: reduce interval-print to 10ms "Liang, Kan" <kan.liang@intel.com> - 2015-10-02 22:30 +0200
        Re: [PATCH 1/1] perf,stat: reduce interval-print to 10ms Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-02 22:50 +0200
          RE: [PATCH 1/1] perf,stat: reduce interval-print to 10ms "Liang, Kan" <kan.liang@intel.com> - 2015-10-02 23:00 +0200
  [tip:perf/core] perf stat: Reduce min --interval-print to 10ms tip-bot for Kan Liang <tipbot@zytor.com> - 2015-10-03 10:00 +0200

csiph-web