From: Steven Rostedt <rostedt@goodmis.org>
To: Raul E Rangel <rrangel@chromium.org>
Cc: linux-trace-devel@vger.kernel.org, eballetbo@gmail.com,
zwisler@chromium.org, djkurtz@chromium.org,
Ross Zwisler <zwisler@google.com>,
Enric Balletbo i Serra <enric.balletbo@collabora.com>,
Guenter Roeck <groeck@chromium.org>,
linux-kernel@vger.kernel.org, Benson Leung <bleung@chromium.org>
Subject: Re: [PATCH v5] chrome/platform: cros_ec_proto: Add trace event to trace EC commands
Date: Mon, 15 Apr 2019 17:46:31 -0400 [thread overview]
Message-ID: <20190415174631.471a8e87@gandalf.local.home> (raw)
In-Reply-To: <20190415205704.46726-1-rrangel@chromium.org>
On Mon, 15 Apr 2019 14:57:04 -0600
Raul E Rangel <rrangel@chromium.org> wrote:
> This is useful to see which EC commands are being executed and when.
>
> To enable:
>
> echo 'cros_ec:*' >> /sys/kernel/debug/tracing/set_event
Note, you can accomplish the same thing with:
echo 1 > /sys/kernel/debug/tracing/events/cros_ec/enable
That's the "new" way to do things. The set_event only hangs around for
historical (and compatibility) reasons.
>
> Example:
>
> /* cros_ec_cmd: version: 0, command: EC_CMD_GET_VERSION */
> /* cros_ec_cmd: version: 0, command: EC_CMD_GET_PROTOCOL_INFO */
> /* cros_ec_cmd: version: 1, command: EC_CMD_GET_CMD_VERSIONS */
> /* cros_ec_cmd: version: 1, command: EC_CMD_USB_PD_CONTROL */
>
> Signed-off-by: Raul E Rangel <rrangel@chromium.org>
> Reviewed-by: Ross Zwisler <zwisler@google.com>
For the tracing side of things:
Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-- Steve
> ---
>
> Changes in v5:
> - Rebased on upstream/master. It turns out upstream/master is missing a
> lot of changes to cros_ec_commands.h.
> - Replace SYM with SYMBOL in macro name.
>
> Changes in v4:
> - Use the full command name so go to definition continues to work in my
> editor.
>
> Changes in v3:
> - Use a macro to avoid duplicating the ec command names.
>
> Changes in v2:
> - Changed comment style to match other cros_ec files.
> - Fixed commit tag.
>
> drivers/platform/chrome/Makefile | 4 +-
> drivers/platform/chrome/cros_ec_proto.c | 4 +
> drivers/platform/chrome/cros_ec_trace.c | 121 ++++++++++++++++++++++++
> drivers/platform/chrome/cros_ec_trace.h | 51 ++++++++++
> 4 files changed, 179 insertions(+), 1 deletion(-)
> create mode 100644 drivers/platform/chrome/cros_ec_trace.c
> create mode 100644 drivers/platform/chrome/cros_ec_trace.h
next prev parent reply other threads:[~2019-04-15 21:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-15 20:57 [PATCH v5] chrome/platform: cros_ec_proto: Add trace event to trace EC commands Raul E Rangel
2019-04-15 21:46 ` Steven Rostedt [this message]
2019-04-16 11:33 ` Enric Balletbo i Serra
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=20190415174631.471a8e87@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=bleung@chromium.org \
--cc=djkurtz@chromium.org \
--cc=eballetbo@gmail.com \
--cc=enric.balletbo@collabora.com \
--cc=groeck@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-devel@vger.kernel.org \
--cc=rrangel@chromium.org \
--cc=zwisler@chromium.org \
--cc=zwisler@google.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).