From: David Ahern <dsahern@gmail.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@kernel.org>,
Namhyung Kim <namhyung.kim@lge.com>,
LKML <linux-kernel@vger.kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Jiri Olsa <jolsa@redhat.com>,
Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH 06/19] perf ftrace: Add support for --pid option
Date: Thu, 27 Jun 2013 07:56:57 -0600 [thread overview]
Message-ID: <51CC44A9.60809@gmail.com> (raw)
In-Reply-To: <87ehbo15zx.fsf@sejong.aot.lge.com>
On 6/26/13 11:23 PM, Namhyung Kim wrote:
> On Wed, 26 Jun 2013 11:12:19 -0600, David Ahern wrote:
>> On 6/26/13 1:14 AM, Namhyung Kim wrote:
>>> @@ -196,6 +222,8 @@ int cmd_ftrace(int argc, const char **argv, const char *prefix __maybe_unused)
>>> const struct option ftrace_options[] = {
>>> OPT_STRING('t', "tracer", &ftrace.tracer, "tracer",
>>> "tracer to use"),
>>> + OPT_STRING('p', "pid", &ftrace.target.tid, "pid",
>>> + "trace on existing process id"),
>>> OPT_INCR('v', "verbose", &verbose,
>>> "be more verbose"),
>>> OPT_END()
>>
>> You are calling it pid but assigning it as a tid which is inconsistent
>> with other perf commands. e.g., perf-record allows a list of pids (-p)
>> or tids (-t). Why not support that in perf-ftrace? And that leads to
>> the comment about consistency of options across perf commands: -t is
>> used here for tracer type to use.
>
> Sorry, I should've mentioned it.
>
> The pid filtering in ftrace is done via set_ftrace_pid file under the
> tracing debugfs directory. IIRC It only supports process filtering not
> thread filtering by iterating all threads in the kernel code. So --tid
> option cannot be implemented as other perf commands.
>
> So I chose not to and assigned -t option to --tracer.
Could that ever change? With the current code why call it pid in the
option but assign it to target.tid? Seems a like a source for confusion
later. Would be better to just assign to target.pid and let the
machinery do the right thing.
David
next prev parent reply other threads:[~2013-06-27 13:57 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-26 7:14 [PATCHSET 00/19] perf tools: Introduce new 'ftrace' command (v3) Namhyung Kim
2013-06-26 7:14 ` [PATCH 01/19] perf util: Move debugfs/tracing helper functions to util.c Namhyung Kim
2013-07-19 7:43 ` [tip:perf/core] perf util: Move debugfs/ tracing " tip-bot for Namhyung Kim
2013-06-26 7:14 ` [PATCH 02/19] perf util: Use evsel->name to get tracepoint_paths Namhyung Kim
2013-07-19 7:44 ` [tip:perf/core] perf util: Use evsel-> name " tip-bot for Namhyung Kim
2013-06-26 7:14 ` [PATCH 03/19] perf util: Save pid-cmdline mapping into tracing header Namhyung Kim
2013-06-26 7:14 ` [PATCH 04/19] perf util: Add more debug message on failure path Namhyung Kim
2013-06-26 7:14 ` [PATCH 05/19] perf tools: Introduce new 'ftrace' tool Namhyung Kim
2013-06-26 17:10 ` David Ahern
2013-06-27 5:04 ` Namhyung Kim
2013-06-27 13:51 ` David Ahern
2013-06-27 14:22 ` Namhyung Kim
2013-06-26 7:14 ` [PATCH 06/19] perf ftrace: Add support for --pid option Namhyung Kim
2013-06-26 17:12 ` David Ahern
2013-06-27 5:23 ` Namhyung Kim
2013-06-27 13:56 ` David Ahern [this message]
2013-06-27 14:12 ` Namhyung Kim
2013-07-10 14:18 ` Jiri Olsa
2013-07-11 7:56 ` Namhyung Kim
2013-07-18 6:38 ` Namhyung Kim
2013-06-26 7:14 ` [PATCH 07/19] perf ftrace: Add support for -a and -C option Namhyung Kim
2013-06-26 7:14 ` [PATCH 08/19] perf ftrace: Split "live" sub-command Namhyung Kim
2013-06-26 7:14 ` [PATCH 09/19] perf ftrace: Add 'record' sub-command Namhyung Kim
2013-07-10 14:28 ` Jiri Olsa
2013-07-11 8:00 ` Namhyung Kim
2013-06-26 7:14 ` [PATCH 10/19] perf ftrace: Add 'show' sub-command Namhyung Kim
2013-07-10 14:41 ` Jiri Olsa
2013-07-11 8:01 ` Namhyung Kim
2013-06-26 7:14 ` [PATCH 11/19] perf ftrace: Add 'report' sub-command Namhyung Kim
2013-07-10 14:45 ` Jiri Olsa
2013-07-11 8:10 ` Namhyung Kim
2013-06-26 7:14 ` [PATCH 12/19] perf evlist: Enhance perf_evlist__start_workload() Namhyung Kim
2013-07-12 8:50 ` [tip:perf/urgent] " tip-bot for Namhyung Kim
2013-06-26 7:14 ` [PATCH 13/19] perf ftrace: Use pager for displaying result Namhyung Kim
2013-06-26 7:14 ` [PATCH 14/19] perf ftrace: Cleanup using ftrace_setup/teardown() Namhyung Kim
2013-06-26 7:14 ` [PATCH 15/19] perf tools: Add document for perf-ftrace command Namhyung Kim
2013-07-10 14:22 ` Jiri Olsa
2013-07-11 8:18 ` Namhyung Kim
2013-07-11 11:43 ` Jiri Olsa
2013-06-26 7:14 ` [PATCH 16/19] perf ftrace: Add a signal handler for SIGSEGV Namhyung Kim
2013-06-26 7:14 ` [PATCH 17/19] perf ftrace: Add --clock option Namhyung Kim
2013-06-26 7:14 ` [PATCH 18/19] perf ftrace: Show leaf-functions as oneliner Namhyung Kim
2013-06-26 7:14 ` [PATCH 19/19] perf ftrace: Tidy up the function graph output of 'show' subcommand Namhyung Kim
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=51CC44A9.60809@gmail.com \
--to=dsahern@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung.kim@lge.com \
--cc=namhyung@kernel.org \
--cc=paulus@samba.org \
--cc=rostedt@goodmis.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.