From: David Ahern <dsahern@gmail.com>
To: 禹舟键 <ufo19890607@gmail.com>,
"Peter Zijlstra" <peterz@infradead.org>,
"Ingo Molnar" <mingo@redhat.com>,
"Alexander Shishkin" <alexander.shishkin@linux.intel.com>,
"Jiri Olsa" <jolsa@kernel.org>,
"Namhyung Kim" <namhyung@kernel.org>,
"Milian Wolff" <milian.wolff@kdab.com>,
"Arnaldo Carvalho de Melo" <arnaldo.melo@gmail.com>,
windyu@tencent.com, "Adrian Hunter" <adrian.hunter@intel.com>,
"Wang Nan" <wangnan0@huawei.com>
Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
acme@redhat.com
Subject: Re: [PATCH] Add input file_name support for perf sched {map|latency|replay|timehist}
Date: Mon, 9 Sep 2019 09:50:18 +0100 [thread overview]
Message-ID: <37eecde1-52de-0d7a-608f-8b8125ee1155@gmail.com> (raw)
In-Reply-To: <CAHCio2iLvOSDEJ8JSnBx6w_65yekWNWu0B8wTAWbLDjy65J9JQ@mail.gmail.com>
On 9/9/19 4:49 AM, 禹舟键 wrote:
>> diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
>> index 025151dcb651..8e51fbb88549 100644
>> --- a/tools/perf/builtin-sched.c
>> +++ b/tools/perf/builtin-sched.c
>> @@ -3374,6 +3374,7 @@ int cmd_sched(int argc, const char **argv)
>> const struct option latency_options[] = {
>> OPT_STRING('s', "sort", &sched.sort_order, "key[,key2...]",
>> "sort by key(s): runtime, switch, avg, max"),
>> + OPT_STRING('i', "input", &input_name, "file", "input file name"),
>> OPT_INTEGER('C', "CPU", &sched.profile_cpu,
>> "CPU to profile on"),
>> OPT_BOOLEAN('p', "pids", &sched.skip_merge,
>> @@ -3381,11 +3382,13 @@ int cmd_sched(int argc, const char **argv)
>> OPT_PARENT(sched_options)
>> };
>> const struct option replay_options[] = {
>> + OPT_STRING('i', "input", &input_name, "file", "input file name"),
>> OPT_UINTEGER('r', "repeat", &sched.replay_repeat,
>> "repeat the workload replay N times (-1: infinite)"),
>> OPT_PARENT(sched_options)
>> };
>> const struct option map_options[] = {
>> + OPT_STRING('i', "input", &input_name, "file", "input file name"),
>> OPT_BOOLEAN(0, "compact", &sched.map.comp,
>> "map output in compact mode"),
>> OPT_STRING(0, "color-pids", &sched.map.color_pids_str, "pids",
>> @@ -3397,6 +3400,7 @@ int cmd_sched(int argc, const char **argv)
>> OPT_PARENT(sched_options)
>> };
>> const struct option timehist_options[] = {
>> + OPT_STRING('i', "input", &input_name, "file", "input file name"),
>> OPT_STRING('k', "vmlinux", &symbol_conf.vmlinux_name,
>> "file", "vmlinux pathname"),
>> OPT_STRING(0, "kallsyms", &symbol_conf.kallsyms_name,
>> --
>> 2.23.0.37.g745f681
>>
This is not needed; -i already works with timehist (and others as I
recall). I believe OPT_PARENT passes the option to the subcommand.
prev parent reply other threads:[~2019-09-09 8:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-03 8:55 [PATCH] Add input file_name support for perf sched {map|latency|replay|timehist} yuzhoujian
2019-09-09 3:49 ` 禹舟键
2019-09-09 8:50 ` David Ahern [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=37eecde1-52de-0d7a-608f-8b8125ee1155@gmail.com \
--to=dsahern@gmail.com \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=arnaldo.melo@gmail.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=milian.wolff@kdab.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=ufo19890607@gmail.com \
--cc=wangnan0@huawei.com \
--cc=windyu@tencent.com \
/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).