[lkml]   [2015]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[RFC][PATCH 12/17 v2] f2fs: Export the enums in the tracepoints to userspace
From: "Steven Rostedt (Red Hat)" <>

The tracepoints that use __print_symbolic() use enums as the value
to convert to strings. Unfortunately, the format files for these
tracepoints show the enum name and not their value. This causes some
userspace tools not to know how to convert __print_symbolic() to
their strings.

Add TRACE_DEFINE_ENUM() macros to export the enums used to userspace
to let those tools know what those enum values are.

Cc: Namjae Jeon <>
Cc: Pankaj Kumar <>
Cc: Jaegeuk Kim <>
Signed-off-by: Steven Rostedt <>
include/trace/events/f2fs.h | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
index 5422dbfaf97d..36f4536b6149 100644
--- a/include/trace/events/f2fs.h
+++ b/include/trace/events/f2fs.h
@@ -9,6 +9,36 @@
#define show_dev(entry) MAJOR(entry->dev), MINOR(entry->dev)
#define show_dev_ino(entry) show_dev(entry), (unsigned long)entry->ino

#define show_block_type(type) \
__print_symbolic(type, \
{ NODE, "NODE" }, \

 \ /
  Last update: 2015-04-02 04:41    [W:0.153 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site