All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] Fix enum values print in tracepoints
@ 2020-06-19 12:24 Nikolay Borisov
  2020-06-19 12:24 ` [PATCH 1/6] btrfs: tracepoints: Fix btrfs_trigger_flush printout Nikolay Borisov
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Nikolay Borisov @ 2020-06-19 12:24 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Nikolay Borisov

While looking at tracepoint dumps with trace-cmd report I observed that
tracepoints that should have printed text instead of raw values weren't
doing so:

13 kworker/u8:1-61    [000]    66.299527: btrfs_flush_space:    5302ee13-c65e-45bb-98ef-8fe3835bd943: state=3(0x3) flags=4(METADATA) num_bytes=2621440 ret=0

In the above line instead of (0x3) BTRFS_RESERVE_FLUSH_ALL should be printed. I.e
the correct output should be:

6 fio-370   [002]    56.762402: btrfs_trigger_flush:  d04cd7ac-38e2-452f-a7f5-8157529fd5f0: preempt: flush=3(BTRFS_RESERVE_FLUSH_ALL) flags=4(METADATA) bytes=655360

Investigating this turned out to be caused  because enum values weren't exported
to user space via TRACE_DEFINE_ENUM. This is required in order for user space
tools to correctly map the raw binary values to their textual representation.
More information can be found in commit 190f0b76ca49 ("mm: tracing: Export enums in tracepoints to user space")

This series follows the approach taken by 190f0b76ca49 in defining the various
enum mapping structures.

Nikolay Borisov (6):
  btrfs: tracepoints: Fix btrfs_trigger_flush printout
  btrfs: tracepoints: Fix extent type symbolic name print
  btrfs: tracepoints: Move FLUSH_ACTIONS define
  btrfs: tracepoints: Fix qgroup reservation type printing
  btrfs: tracepoints: Switch extent_io_tree_owner to using EM macro
  btrfs: tracepoints: Convert flush states to using EM macros

 include/trace/events/btrfs.h | 128 +++++++++++++++++++----------------
 1 file changed, 68 insertions(+), 60 deletions(-)

--
2.17.1


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

end of thread, other threads:[~2020-06-29 20:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-19 12:24 [PATCH 0/6] Fix enum values print in tracepoints Nikolay Borisov
2020-06-19 12:24 ` [PATCH 1/6] btrfs: tracepoints: Fix btrfs_trigger_flush printout Nikolay Borisov
2020-06-19 12:24 ` [PATCH 2/6] btrfs: tracepoints: Fix extent type symbolic name print Nikolay Borisov
2020-06-19 12:24 ` [PATCH 3/6] btrfs: tracepoints: Move FLUSH_ACTIONS define Nikolay Borisov
2020-06-19 12:24 ` [PATCH 4/6] btrfs: tracepoints: Fix qgroup reservation type printing Nikolay Borisov
2020-06-19 12:24 ` [PATCH 5/6] btrfs: tracepoints: Switch extent_io_tree_owner to using EM macro Nikolay Borisov
2020-06-19 12:24 ` [PATCH 6/6] btrfs: tracepoints: Convert flush states to using EM macros Nikolay Borisov
2020-06-22 14:21 ` [PATCH 0/6] Fix enum values print in tracepoints David Sterba
2020-06-22 15:19   ` Nikolay Borisov
2020-06-22 16:05     ` David Sterba
2020-06-29 20:52 ` David Sterba

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.