From: Michael Jeanson Date: Wed, 17 Mar 2021 20:00:33 +0000 (-0400) Subject: Move public tracepoint definition headers to 'lttng/tp' X-Git-Tag: v2.13.0-rc1~249 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=b15c4010a54a79e955d82b46826d14c882276669;p=lttng-ust.git Move public tracepoint definition headers to 'lttng/tp' Separate the tracepoint definition headers for tracef and tracelog from the rest of the public API headers. Change-Id: I8e38e2c8c0a3c2d6f7ab172c3fdbc2d6e5ad8d9d Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/include/Makefile.am b/include/Makefile.am index 80b32785..0020ca10 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -26,9 +26,9 @@ nobase_include_HEADERS = \ lttng/ust-bug.h \ lttng/ust-error.h \ lttng/tracef.h \ - lttng/lttng-ust-tracef.h \ + lttng/tp/lttng-ust-tracef.h \ lttng/tracelog.h \ - lttng/lttng-ust-tracelog.h \ + lttng/tp/lttng-ust-tracelog.h \ lttng/ust-clock.h \ lttng/ust-getcpu.h \ lttng/ust-libc-wrapper.h \ diff --git a/include/lttng/lttng-ust-tracef.h b/include/lttng/lttng-ust-tracef.h deleted file mode 100644 index 785f2132..00000000 --- a/include/lttng/lttng-ust-tracef.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - * SPDX-License-Identifier: MIT - * - * Copyright (C) 2011-2014 Mathieu Desnoyers - */ - -#include -#include - -TRACEPOINT_EVENT(lttng_ust_tracef, event, - TP_ARGS(const char *, msg, unsigned int, len, void *, ip), - TP_FIELDS( - ctf_sequence_text(char, msg, msg, unsigned int, len) - ) -) -TRACEPOINT_LOGLEVEL(lttng_ust_tracef, event, TRACE_DEBUG) diff --git a/include/lttng/lttng-ust-tracelog.h b/include/lttng/lttng-ust-tracelog.h deleted file mode 100644 index abc66a0c..00000000 --- a/include/lttng/lttng-ust-tracelog.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * SPDX-License-Identifier: MIT - * - * Copyright (C) 2011-2015 Mathieu Desnoyers - */ - -#include -#include - -TRACEPOINT_EVENT_CLASS(lttng_ust_tracelog, tlclass, - TP_ARGS(const char *, file, int, line, const char *, func, - const char *, msg, unsigned int, len, void *, ip), - TP_FIELDS( - ctf_integer(int, line, line) - ctf_string(file, file) - ctf_string(func, func) - ctf_sequence_text(char, msg, msg, unsigned int, len) - ) -) - -#define TP_TRACELOG_TEMPLATE(_level_enum) \ - TRACEPOINT_EVENT_INSTANCE(lttng_ust_tracelog, tlclass, _level_enum, \ - TP_ARGS(const char *, file, int, line, const char *, func, \ - const char *, msg, unsigned int, len, void *, ip) \ - ) \ - TRACEPOINT_LOGLEVEL(lttng_ust_tracelog, _level_enum, _level_enum) - -TP_TRACELOG_TEMPLATE(TRACE_EMERG) -TP_TRACELOG_TEMPLATE(TRACE_ALERT) -TP_TRACELOG_TEMPLATE(TRACE_CRIT) -TP_TRACELOG_TEMPLATE(TRACE_ERR) -TP_TRACELOG_TEMPLATE(TRACE_WARNING) -TP_TRACELOG_TEMPLATE(TRACE_NOTICE) -TP_TRACELOG_TEMPLATE(TRACE_INFO) -TP_TRACELOG_TEMPLATE(TRACE_DEBUG_SYSTEM) -TP_TRACELOG_TEMPLATE(TRACE_DEBUG_PROGRAM) -TP_TRACELOG_TEMPLATE(TRACE_DEBUG_PROCESS) -TP_TRACELOG_TEMPLATE(TRACE_DEBUG_MODULE) -TP_TRACELOG_TEMPLATE(TRACE_DEBUG_UNIT) -TP_TRACELOG_TEMPLATE(TRACE_DEBUG_FUNCTION) -TP_TRACELOG_TEMPLATE(TRACE_DEBUG_LINE) -TP_TRACELOG_TEMPLATE(TRACE_DEBUG) diff --git a/include/lttng/tp/lttng-ust-tracef.h b/include/lttng/tp/lttng-ust-tracef.h new file mode 100644 index 00000000..785f2132 --- /dev/null +++ b/include/lttng/tp/lttng-ust-tracef.h @@ -0,0 +1,16 @@ +/* + * SPDX-License-Identifier: MIT + * + * Copyright (C) 2011-2014 Mathieu Desnoyers + */ + +#include +#include + +TRACEPOINT_EVENT(lttng_ust_tracef, event, + TP_ARGS(const char *, msg, unsigned int, len, void *, ip), + TP_FIELDS( + ctf_sequence_text(char, msg, msg, unsigned int, len) + ) +) +TRACEPOINT_LOGLEVEL(lttng_ust_tracef, event, TRACE_DEBUG) diff --git a/include/lttng/tp/lttng-ust-tracelog.h b/include/lttng/tp/lttng-ust-tracelog.h new file mode 100644 index 00000000..abc66a0c --- /dev/null +++ b/include/lttng/tp/lttng-ust-tracelog.h @@ -0,0 +1,42 @@ +/* + * SPDX-License-Identifier: MIT + * + * Copyright (C) 2011-2015 Mathieu Desnoyers + */ + +#include +#include + +TRACEPOINT_EVENT_CLASS(lttng_ust_tracelog, tlclass, + TP_ARGS(const char *, file, int, line, const char *, func, + const char *, msg, unsigned int, len, void *, ip), + TP_FIELDS( + ctf_integer(int, line, line) + ctf_string(file, file) + ctf_string(func, func) + ctf_sequence_text(char, msg, msg, unsigned int, len) + ) +) + +#define TP_TRACELOG_TEMPLATE(_level_enum) \ + TRACEPOINT_EVENT_INSTANCE(lttng_ust_tracelog, tlclass, _level_enum, \ + TP_ARGS(const char *, file, int, line, const char *, func, \ + const char *, msg, unsigned int, len, void *, ip) \ + ) \ + TRACEPOINT_LOGLEVEL(lttng_ust_tracelog, _level_enum, _level_enum) + +TP_TRACELOG_TEMPLATE(TRACE_EMERG) +TP_TRACELOG_TEMPLATE(TRACE_ALERT) +TP_TRACELOG_TEMPLATE(TRACE_CRIT) +TP_TRACELOG_TEMPLATE(TRACE_ERR) +TP_TRACELOG_TEMPLATE(TRACE_WARNING) +TP_TRACELOG_TEMPLATE(TRACE_NOTICE) +TP_TRACELOG_TEMPLATE(TRACE_INFO) +TP_TRACELOG_TEMPLATE(TRACE_DEBUG_SYSTEM) +TP_TRACELOG_TEMPLATE(TRACE_DEBUG_PROGRAM) +TP_TRACELOG_TEMPLATE(TRACE_DEBUG_PROCESS) +TP_TRACELOG_TEMPLATE(TRACE_DEBUG_MODULE) +TP_TRACELOG_TEMPLATE(TRACE_DEBUG_UNIT) +TP_TRACELOG_TEMPLATE(TRACE_DEBUG_FUNCTION) +TP_TRACELOG_TEMPLATE(TRACE_DEBUG_LINE) +TP_TRACELOG_TEMPLATE(TRACE_DEBUG) diff --git a/include/lttng/tracef.h b/include/lttng/tracef.h index fff912d0..df4b4645 100644 --- a/include/lttng/tracef.h +++ b/include/lttng/tracef.h @@ -7,7 +7,7 @@ #ifndef _LTTNG_UST_TRACEF_H #define _LTTNG_UST_TRACEF_H -#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/lttng/tracelog.h b/include/lttng/tracelog.h index 743b6824..4dfb9d36 100644 --- a/include/lttng/tracelog.h +++ b/include/lttng/tracelog.h @@ -7,7 +7,7 @@ #ifndef _LTTNG_UST_TRACELOG_H #define _LTTNG_UST_TRACELOG_H -#include +#include #ifdef __cplusplus extern "C" { diff --git a/liblttng-ust/lttng-ust-tracef-provider.h b/liblttng-ust/lttng-ust-tracef-provider.h index 8a00e4dc..6f27fed4 100644 --- a/liblttng-ust/lttng-ust-tracef-provider.h +++ b/liblttng-ust/lttng-ust-tracef-provider.h @@ -10,13 +10,13 @@ #if !defined(_TRACEPOINT_LTTNG_UST_TRACEF_PROVIDER_H) || defined(TRACEPOINT_HEADER_MULTI_READ) #define _TRACEPOINT_LTTNG_UST_TRACEF_PROVIDER_H -#include +#include #endif /* _TRACEPOINT_LTTNG_UST_TRACEF_PROVIDER_H */ #define TP_IP_PARAM ip /* IP context received as parameter */ #undef TRACEPOINT_INCLUDE -#define TRACEPOINT_INCLUDE "./lttng-ust-tracef.h" +#define TRACEPOINT_INCLUDE "./tp/lttng-ust-tracef.h" /* This part must be outside ifdef protection */ #include diff --git a/liblttng-ust/lttng-ust-tracelog-provider.h b/liblttng-ust/lttng-ust-tracelog-provider.h index 7623bf28..25989dfc 100644 --- a/liblttng-ust/lttng-ust-tracelog-provider.h +++ b/liblttng-ust/lttng-ust-tracelog-provider.h @@ -10,13 +10,13 @@ #if !defined(_TRACEPOINT_LTTNG_UST_TRACELOG_PROVIDER_H) || defined(TRACEPOINT_HEADER_MULTI_READ) #define _TRACEPOINT_LTTNG_UST_TRACELOG_PROVIDER_H -#include +#include #endif /* _TRACEPOINT_LTTNG_UST_TRACEF_PROVIDER_H */ #define TP_IP_PARAM ip /* IP context received as parameter */ #undef TRACEPOINT_INCLUDE -#define TRACEPOINT_INCLUDE "./lttng-ust-tracelog.h" +#define TRACEPOINT_INCLUDE "./tp/lttng-ust-tracelog.h" /* This part must be outside ifdef protection */ #include