From: Jiri Olsa <jolsa@redhat.com>
To: kan.liang@intel.com
Cc: acme@kernel.org, jolsa@kernel.org, namhyung@kernel.org,
ak@linux.intel.com, 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 18:56:24 +0200 [thread overview]
Message-ID: <20151002165624.GC1673@krava.brq.redhat.com> (raw)
In-Reply-To: <1443776674-42511-1-git-send-email-kan.liang@intel.com>
On Fri, Oct 02, 2015 at 05:04:34AM -0400, kan.liang@intel.com wrote:
> From: Kan Liang <kan.liang@intel.com>
>
SNIP
> diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
> index a96fb5c..5ef88f7 100644
> --- a/tools/perf/builtin-stat.c
> +++ b/tools/perf/builtin-stat.c
> @@ -1179,7 +1179,7 @@ int cmd_stat(int argc, const char **argv, const char *prefix __maybe_unused)
> OPT_STRING(0, "post", &post_cmd, "command",
> "command to run after to the measured command"),
> OPT_UINTEGER('I', "interval-print", &stat_config.interval,
> - "print counts at regular interval in ms (>= 100)"),
> + "print counts at regular interval in ms (>= 10)"),
> OPT_SET_UINT(0, "per-socket", &stat_config.aggr_mode,
> "aggregate counts per processor socket", AGGR_SOCKET),
> OPT_SET_UINT(0, "per-core", &stat_config.aggr_mode,
> @@ -1332,9 +1332,14 @@ int cmd_stat(int argc, const char **argv, const char *prefix __maybe_unused)
> thread_map__read_comms(evsel_list->threads);
>
> if (interval && interval < 100) {
> - pr_err("print interval must be >= 100ms\n");
> - parse_options_usage(stat_usage, options, "I", 1);
> - goto out;
> + 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>
thanks,
jirka
next prev parent reply other threads:[~2015-10-02 16:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-02 9:04 kan.liang
2015-10-02 16:56 ` Jiri Olsa [this message]
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
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=20151002165624.GC1673@krava.brq.redhat.com \
--to=jolsa@redhat.com \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=eranian@google.com \
--cc=jolsa@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®