mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Raul E Rangel <rrangel@chromium.org>
To: linux-trace-devel@vger.kernel.org, linux-mmc@vger.kernel.org
Cc: djkurtz@chromium.org, zwisler@chromium.org,
	Raul E Rangel <rrangel@chromium.org>,
	Ludovic Barre <ludovic.barre@st.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Jisheng Zhang <Jisheng.Zhang@synaptics.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Faiz Abbas <faiz_abbas@ti.com>,
	linux-kernel@vger.kernel.org,
	Oleksij Rempel <linux@rempel-privat.de>,
	Liming Sun <lsun@mellanox.com>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Ingo Molnar <mingo@redhat.com>,
	Prabu Thangamuthu <Prabu.T@synopsys.com>,
	Chunyan Zhang <chunyan.zhang@unisoc.com>,
	Ulf Hansson <ulf.hansson@linaro.org>
Subject: [PATCH v1 0/4] Add tracing for SDHCI register access
Date: Thu, 11 Apr 2019 16:08:18 -0600	[thread overview]
Message-ID: <20190411220822.81845-1-rrangel@chromium.org> (raw)

I was debugging a SDHC hardware bug and got tired of having to
translate the register values by hand. This patch set makes it so all
SDHC register read and write operations can be traced and easily read by
a human.

An example trace can be seen here: https://pastebin.com/x73d5cvL

I ended up defining a new tracing function `trace_print_register`. This
method takes a register definition and pretty prints it. It's a hybrid
of `trace_print_flags_seq` and `trace_print_symbols_seq`. It supports
printing bit fields, enum fields, and numeric fields. See the
documentation for usage.

I hope this makes someone else's life easier when debugging SDHC
hardware problems.

Raul E Rangel (4):
  trace_events: Add trace_print_register to print register fields
  mmc/sdhci: Rename sdhci.c to sdhci-core.c
  mmc/host/sdhci: Add register read and write trace events
  mmc/host/sdhci: Make sdhci_read/sdhci_write call trace functions

 drivers/mmc/host/Makefile                  |   4 +
 drivers/mmc/host/{sdhci.c => sdhci-core.c} | 136 +++++++++
 drivers/mmc/host/sdhci-trace.c             | 319 +++++++++++++++++++++
 drivers/mmc/host/sdhci-trace.h             |  93 ++++++
 drivers/mmc/host/sdhci.h                   |  89 +-----
 include/linux/trace_events.h               |   4 +
 include/linux/tracepoint-defs.h            |   6 +
 include/trace/trace_events.h               |   9 +
 kernel/trace/trace_output.c                | 121 ++++++++
 9 files changed, 698 insertions(+), 83 deletions(-)
 rename drivers/mmc/host/{sdhci.c => sdhci-core.c} (97%)
 create mode 100644 drivers/mmc/host/sdhci-trace.c
 create mode 100644 drivers/mmc/host/sdhci-trace.h

-- 
2.21.0.392.gf8f6787159e-goog


             reply	other threads:[~2019-04-11 22:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-11 22:08 Raul E Rangel [this message]
2019-04-11 22:08 ` [PATCH v1 1/4] trace_events: Add trace_print_register to print register fields Raul E Rangel
2019-04-11 22:39   ` Steven Rostedt
2019-04-12 15:30     ` Raul Rangel
2019-04-12 15:42       ` Steven Rostedt
2019-04-11 22:08 ` [PATCH v1 2/4] mmc/sdhci: Rename sdhci.c to sdhci-core.c Raul E Rangel
2019-04-11 22:08 ` [PATCH v1 3/4] mmc/host/sdhci: Add register read and write trace events Raul E Rangel
2019-04-11 22:08 ` [PATCH v1 4/4] mmc/host/sdhci: Make sdhci_read/sdhci_write call trace functions Raul E Rangel
2019-04-12  6:26 ` [PATCH v1 0/4] Add tracing for SDHCI register access Adrian Hunter
2019-04-12 14:50   ` Raul Rangel
2019-04-18  6:24     ` Adrian Hunter
2019-04-19 18:40       ` Raul Rangel
2019-04-19 19:08         ` Steven Rostedt

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=20190411220822.81845-1-rrangel@chromium.org \
    --to=rrangel@chromium.org \
    --cc=Jisheng.Zhang@synaptics.com \
    --cc=Prabu.T@synopsys.com \
    --cc=adrian.hunter@intel.com \
    --cc=chunyan.zhang@unisoc.com \
    --cc=djkurtz@chromium.org \
    --cc=faiz_abbas@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=linux@rempel-privat.de \
    --cc=lsun@mellanox.com \
    --cc=ludovic.barre@st.com \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=ulf.hansson@linaro.org \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=yamada.masahiro@socionext.com \
    --cc=zwisler@chromium.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®