Rename TP_LOGLEVEL to tp_loglevel
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 26 Nov 2011 01:57:56 +0000 (02:57 +0100)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 26 Nov 2011 01:57:56 +0000 (02:57 +0100)
Within the loglevel enumeration, the entries are not separated by a
comma. To match the style used for TP_FIELDS() ctf_*() entries, use
lower-case, which denotes that these entries must not be separated by
commas.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/lttng/tracepoint.h
include/lttng/ust-tracepoint-event.h
tests/demo/ust_tests_demo.h

index bce84e53670c7e623a8d838d7e7a21b48eec3525..dc7832cb25531b1912d2e0449976da8a58ce5cd3 100644 (file)
@@ -293,29 +293,30 @@ static void __attribute__((destructor)) __tracepoints__destroy(void)
  * Typical use of these loglevels:
  *
  * 1) Declare the mapping between loglevel names and an integer values
- *    within TRACEPOINT_LOGLEVEL_ENUM, using TP_LOGLEVEL for each tuple.
- *    Do _NOT_ add comma (,) nor semicolon (;) between the
- *    TRACEPOINT_LOGLEVEL_ENUM entries. Do _NOT_ add comma (,) nor
- *    semicolon (;) after the TRACEPOINT_LOGLEVEL_ENUM declaration.  The
- *    name should be a proper C99 identifier.
+ *    within TRACEPOINT_LOGLEVEL_ENUM(), using tp_loglevel() for each
+ *    tuple. Do _NOT_ add comma (,) nor semicolon (;) between the
+ *    tp_loglevel entries contained within TRACEPOINT_LOGLEVEL_ENUM().
+ *    Do _NOT_ add comma (,) nor semicolon (;) after the
+ *    TRACEPOINT_LOGLEVEL_ENUM() declaration.  The name should be a
+ *    proper C99 identifier.
  *
  *      TRACEPOINT_LOGLEVEL_ENUM(
- *              TP_LOGLEVEL( < loglevel_name >, < value > )
- *              TP_LOGLEVEL( < loglevel_name >, < value > )
+ *              tp_loglevel( < loglevel_name >, < value > )
+ *              tp_loglevel( < loglevel_name >, < value > )
  *              ...
  *      )
  *
  *    e.g.:
  *
  *      TRACEPOINT_LOGLEVEL_ENUM(
- *              TP_LOGLEVEL(LOG_EMERG,   0)
- *              TP_LOGLEVEL(LOG_ALERT,   1)
- *              TP_LOGLEVEL(LOG_CRIT,    2)
- *              TP_LOGLEVEL(LOG_ERR,     3)
- *              TP_LOGLEVEL(LOG_WARNING, 4)
- *              TP_LOGLEVEL(LOG_NOTICE,  5)
- *              TP_LOGLEVEL(LOG_INFO,    6)
- *              TP_LOGLEVEL(LOG_DEBUG,   7)
+ *              tp_loglevel(LOG_EMERG,   0)
+ *              tp_loglevel(LOG_ALERT,   1)
+ *              tp_loglevel(LOG_CRIT,    2)
+ *              tp_loglevel(LOG_ERR,     3)
+ *              tp_loglevel(LOG_WARNING, 4)
+ *              tp_loglevel(LOG_NOTICE,  5)
+ *              tp_loglevel(LOG_INFO,    6)
+ *              tp_loglevel(LOG_DEBUG,   7)
  *      )
  *
  * 2) Then, declare tracepoint loglevels for tracepoints. A
index ac36362e1787062ec6fcc6488e38f2fc8e8ac3ac..685ef5d1dfaef79304136665a24607961ca65755 100644 (file)
@@ -449,8 +449,8 @@ static void __event_probe__##_provider##___##_name(_TP_ARGS_DATA_PROTO(_args))\
 #undef TRACEPOINT_LOGLEVEL_ENUM
 #define TRACEPOINT_LOGLEVEL_ENUM(...)  __VA_ARGS__
 
-#undef TP_LOGLEVEL
-#define TP_LOGLEVEL(_identifier, _value)               \
+#undef tp_loglevel
+#define tp_loglevel(_identifier, _value)               \
 static const struct tracepoint_loglevel_enum_entry     \
        _TP_COMBINE_TOKENS(_TP_COMBINE_TOKENS(TRACEPOINT_PROVIDER, __tp_loglevel_enum_entry__), _identifier) =  \
        {                                               \
@@ -472,8 +472,8 @@ static const struct tracepoint_loglevel_enum_entry  \
 #undef TRACEPOINT_LOGLEVEL_ENUM
 #define TRACEPOINT_LOGLEVEL_ENUM(...)  __VA_ARGS__
 
-#undef TP_LOGLEVEL
-#define TP_LOGLEVEL(_identifier, _value)               \
+#undef tp_loglevel
+#define tp_loglevel(_identifier, _value)               \
        &_TP_COMBINE_TOKENS(_TP_COMBINE_TOKENS(TRACEPOINT_PROVIDER, __tp_loglevel_enum_entry__), _identifier),
 
 static const struct tracepoint_loglevel_enum_entry *_TP_COMBINE_TOKENS(__tracepoint_loglevel_enum__, TRACEPOINT_PROVIDER)[] __attribute__((unused)) =
index 9231fb71e0bd767ac43d93fee84be564e8e7d22d..d74932825d2cf1dae8a9c31bdabeee0e00f24487 100644 (file)
@@ -24,9 +24,9 @@ extern "C" {
 #include <lttng/tracepoint.h>
 
 TRACEPOINT_LOGLEVEL_ENUM(
-       TP_LOGLEVEL(critical, 0)
-       TP_LOGLEVEL(warning, 1)
-       TP_LOGLEVEL(debug, 2)
+       tp_loglevel(critical, 0)
+       tp_loglevel(warning, 1)
+       tp_loglevel(debug, 2)
 )
 
 TRACEPOINT_EVENT(ust_tests_demo, loop,
This page took 0.027103 seconds and 4 git commands to generate.