linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/4] Add tracing for SDHCI register access
@ 2019-04-11 22:08 Raul E Rangel
  2019-04-11 22:08 ` [PATCH v1 1/4] trace_events: Add trace_print_register to print register fields Raul E Rangel
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Raul E Rangel @ 2019-04-11 22:08 UTC (permalink / raw)
  To: linux-trace-devel, linux-mmc
  Cc: djkurtz, zwisler, Raul E Rangel, Ludovic Barre, Steven Rostedt,
	Jisheng Zhang, Adrian Hunter, Masahiro Yamada, Faiz Abbas,
	linux-kernel, Oleksij Rempel, Liming Sun, Wolfram Sang,
	Ingo Molnar, Prabu Thangamuthu, Chunyan Zhang, Ulf Hansson

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


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-04-19 19:08 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-11 22:08 [PATCH v1 0/4] Add tracing for SDHCI register access Raul E Rangel
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

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).