From: Mathieu Desnoyers Date: Thu, 15 Aug 2013 18:11:16 +0000 (-0400) Subject: Tracepoint probes don't need extern C X-Git-Tag: v2.3.0-rc3~48 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=02a1d793bcda3e75467878a46ef38dbb6e4ecaca;p=lttng-tools.git Tracepoint probes don't need extern C tracepoint.h has the proper extern C guards, so every liblttng-ust API called from the probe has the proper linkage. The rest of the symbols are only meaningful within the probe, so we don't care if they are mangled or not. This fixes all UST applications in tests/ Fixes #597 Signed-off-by: Mathieu Desnoyers --- diff --git a/tests/regression/tools/filtering/tp.h b/tests/regression/tools/filtering/tp.h index 15f81e5c0..dde56afbb 100644 --- a/tests/regression/tools/filtering/tp.h +++ b/tests/regression/tools/filtering/tp.h @@ -4,10 +4,6 @@ #if !defined(_TRACEPOINT_TP_H) || defined(TRACEPOINT_HEADER_MULTI_READ) #define _TRACEPOINT_TP_H -#ifdef __cplusplus -extern "C" { -#endif - /* * Copyright (C) 2011 Mathieu Desnoyers * @@ -51,7 +47,3 @@ TRACEPOINT_EVENT(tp, tptest, /* This part must be outside ifdef protection */ #include - -#ifdef __cplusplus -} -#endif diff --git a/tests/regression/ust/exit-fast/ust_tests_exitfast.h b/tests/regression/ust/exit-fast/ust_tests_exitfast.h index 71d81f793..874dfc5a6 100644 --- a/tests/regression/ust/exit-fast/ust_tests_exitfast.h +++ b/tests/regression/ust/exit-fast/ust_tests_exitfast.h @@ -24,10 +24,6 @@ #undef TRACEPOINT_PROVIDER #define TRACEPOINT_PROVIDER ust_tests_exitfast -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - #if !defined(_TRACEPOINT_UST_TESTS_EXITFAST_H) || defined(TRACEPOINT_HEADER_MULTI_READ) #define _TRACEPOINT_UST_TESTS_EXITFAST_H @@ -46,7 +42,3 @@ TRACEPOINT_LOGLEVEL(ust_tests_exitfast, message, TRACE_INFO) #define TRACEPOINT_INCLUDE "./ust_tests_exitfast.h" #include - -#ifdef __cplusplus -} -#endif /* __cplusplus */ diff --git a/tests/regression/ust/high-throughput/tp.h b/tests/regression/ust/high-throughput/tp.h index 12286b4db..b43cb4e0a 100644 --- a/tests/regression/ust/high-throughput/tp.h +++ b/tests/regression/ust/high-throughput/tp.h @@ -4,10 +4,6 @@ #if !defined(_TRACEPOINT_TP_H) || defined(TRACEPOINT_HEADER_MULTI_READ) #define _TRACEPOINT_TP_H -#ifdef __cplusplus -extern "C" { -#endif - /* * Copyright (C) 2011 Mathieu Desnoyers * @@ -55,7 +51,3 @@ TRACEPOINT_EVENT(tp, tptest_sighandler, /* This part must be outside ifdef protection */ #include - -#ifdef __cplusplus -} -#endif diff --git a/tests/regression/ust/linking/ust_tests_demo.h b/tests/regression/ust/linking/ust_tests_demo.h index d2492b875..e88c0e592 100644 --- a/tests/regression/ust/linking/ust_tests_demo.h +++ b/tests/regression/ust/linking/ust_tests_demo.h @@ -4,10 +4,6 @@ #if !defined(_TRACEPOINT_UST_TESTS_DEMO_H) || defined(TRACEPOINT_HEADER_MULTI_READ) #define _TRACEPOINT_UST_TESTS_DEMO_H -#ifdef __cplusplus -extern "C" { -#endif - /* * Copyright (C) 2011 Mathieu Desnoyers * @@ -55,7 +51,3 @@ TRACEPOINT_LOGLEVEL(ust_tests_demo, done, TRACE_CRIT) /* This part must be outside ifdef protection */ #include - -#ifdef __cplusplus -} -#endif diff --git a/tests/regression/ust/linking/ust_tests_demo2.h b/tests/regression/ust/linking/ust_tests_demo2.h index 25d42ad18..eec0349e3 100644 --- a/tests/regression/ust/linking/ust_tests_demo2.h +++ b/tests/regression/ust/linking/ust_tests_demo2.h @@ -4,10 +4,6 @@ #if !defined(_TRACEPOINT_UST_TESTS_DEMO2_H) || defined(TRACEPOINT_HEADER_MULTI_READ) #define _TRACEPOINT_UST_TESTS_DEMO2_H -#ifdef __cplusplus -extern "C" { -#endif - /* * Copyright (C) 2011 Mathieu Desnoyers * @@ -62,7 +58,3 @@ TRACEPOINT_LOGLEVEL(ust_tests_demo2, loop, TRACE_WARNING) /* This part must be outside ifdef protection */ #include - -#ifdef __cplusplus -} -#endif diff --git a/tests/regression/ust/linking/ust_tests_demo3.h b/tests/regression/ust/linking/ust_tests_demo3.h index c7b63dd8b..232d577aa 100644 --- a/tests/regression/ust/linking/ust_tests_demo3.h +++ b/tests/regression/ust/linking/ust_tests_demo3.h @@ -4,10 +4,6 @@ #if !defined(_TRACEPOINT_UST_TESTS_DEMO3_H) || defined(TRACEPOINT_HEADER_MULTI_READ) #define _TRACEPOINT_UST_TESTS_DEMO3_H -#ifdef __cplusplus -extern "C" { -#endif - /* * Copyright (C) 2011 Mathieu Desnoyers * @@ -47,7 +43,3 @@ TRACEPOINT_LOGLEVEL(ust_tests_demo3, done, TRACE_WARNING) /* This part must be outside ifdef protection */ #include - -#ifdef __cplusplus -} -#endif diff --git a/tests/regression/ust/low-throughput/tp.h b/tests/regression/ust/low-throughput/tp.h index b45a3dd87..f6c8634bf 100644 --- a/tests/regression/ust/low-throughput/tp.h +++ b/tests/regression/ust/low-throughput/tp.h @@ -4,10 +4,6 @@ #if !defined(_TRACEPOINT_TP_H) || defined(TRACEPOINT_HEADER_MULTI_READ) #define _TRACEPOINT_TP_H -#ifdef __cplusplus -extern "C" { -#endif - /* * Copyright (C) 2011 Mathieu Desnoyers * @@ -39,7 +35,3 @@ TRACEPOINT_EVENT(tp, slow, /* This part must be outside ifdef protection */ #include - -#ifdef __cplusplus -} -#endif diff --git a/tests/regression/ust/multi-session/ust_gen_nevents.h b/tests/regression/ust/multi-session/ust_gen_nevents.h index 58e4c17e3..7a1c72870 100644 --- a/tests/regression/ust/multi-session/ust_gen_nevents.h +++ b/tests/regression/ust/multi-session/ust_gen_nevents.h @@ -4,10 +4,6 @@ #if !defined(_TRACEPOINT_UST_GEN_NEVENTS_H) || defined(TRACEPOINT_HEADER_MULTI_READ) #define _TRACEPOINT_UST_GEN_NEVENTS_H -#ifdef __cplusplus -extern "C" { -#endif - /* * Copyright (C) 2011 Mathieu Desnoyers * @@ -62,7 +58,3 @@ TRACEPOINT_EVENT(ust_gen_nevents, tptest3, /* This part must be outside ifdef protection */ #include - -#ifdef __cplusplus -} -#endif diff --git a/tests/regression/ust/overlap/demo/ust_tests_demo.h b/tests/regression/ust/overlap/demo/ust_tests_demo.h index 3e024b44e..c213e3e4b 100644 --- a/tests/regression/ust/overlap/demo/ust_tests_demo.h +++ b/tests/regression/ust/overlap/demo/ust_tests_demo.h @@ -4,10 +4,6 @@ #if !defined(_TRACEPOINT_UST_TESTS_DEMO_H) || defined(TRACEPOINT_HEADER_MULTI_READ) #define _TRACEPOINT_UST_TESTS_DEMO_H -#ifdef __cplusplus -extern "C" { -#endif - /* * Copyright (C) 2011 Mathieu Desnoyers * @@ -57,7 +53,3 @@ TRACEPOINT_MODEL_EMF_URI(ust_tests_demo, done, /* This part must be outside ifdef protection */ #include - -#ifdef __cplusplus -} -#endif diff --git a/tests/regression/ust/overlap/demo/ust_tests_demo2.h b/tests/regression/ust/overlap/demo/ust_tests_demo2.h index cf4424b61..262f651c3 100644 --- a/tests/regression/ust/overlap/demo/ust_tests_demo2.h +++ b/tests/regression/ust/overlap/demo/ust_tests_demo2.h @@ -4,10 +4,6 @@ #if !defined(_TRACEPOINT_UST_TESTS_DEMO2_H) || defined(TRACEPOINT_HEADER_MULTI_READ) #define _TRACEPOINT_UST_TESTS_DEMO2_H -#ifdef __cplusplus -extern "C" { -#endif - /* * Copyright (C) 2011 Mathieu Desnoyers * @@ -54,7 +50,3 @@ TRACEPOINT_LOGLEVEL(ust_tests_demo2, loop, TRACE_WARNING) /* This part must be outside ifdef protection */ #include - -#ifdef __cplusplus -} -#endif diff --git a/tests/regression/ust/overlap/demo/ust_tests_demo3.h b/tests/regression/ust/overlap/demo/ust_tests_demo3.h index e58ee86f7..46a19ce90 100644 --- a/tests/regression/ust/overlap/demo/ust_tests_demo3.h +++ b/tests/regression/ust/overlap/demo/ust_tests_demo3.h @@ -4,10 +4,6 @@ #if !defined(_TRACEPOINT_UST_TESTS_DEMO3_H) || defined(TRACEPOINT_HEADER_MULTI_READ) #define _TRACEPOINT_UST_TESTS_DEMO3_H -#ifdef __cplusplus -extern "C" { -#endif - /* * Copyright (C) 2011 Mathieu Desnoyers * @@ -39,7 +35,3 @@ TRACEPOINT_LOGLEVEL(ust_tests_demo3, done, TRACE_WARNING) /* This part must be outside ifdef protection */ #include - -#ifdef __cplusplus -} -#endif diff --git a/tests/utils/testapp/gen-ust-events/tp.h b/tests/utils/testapp/gen-ust-events/tp.h index 6ffbc32ab..ab6469d89 100644 --- a/tests/utils/testapp/gen-ust-events/tp.h +++ b/tests/utils/testapp/gen-ust-events/tp.h @@ -4,10 +4,6 @@ #if !defined(_TRACEPOINT_TP_H) || defined(TRACEPOINT_HEADER_MULTI_READ) #define _TRACEPOINT_TP_H -#ifdef __cplusplus -extern "C" { -#endif - /* * Copyright (C) 2011 Mathieu Desnoyers * @@ -50,7 +46,3 @@ TRACEPOINT_EVENT(tp, tptest, /* This part must be outside ifdef protection */ #include - -#ifdef __cplusplus -} -#endif diff --git a/tests/utils/testapp/gen-ust-nevents/tp.h b/tests/utils/testapp/gen-ust-nevents/tp.h index 739a9fdc3..085ed6b9d 100644 --- a/tests/utils/testapp/gen-ust-nevents/tp.h +++ b/tests/utils/testapp/gen-ust-nevents/tp.h @@ -4,10 +4,6 @@ #if !defined(_TRACEPOINT_TP_H) || defined(TRACEPOINT_HEADER_MULTI_READ) #define _TRACEPOINT_TP_H -#ifdef __cplusplus -extern "C" { -#endif - /* * Copyright (C) 2011 Mathieu Desnoyers * @@ -126,7 +122,3 @@ TRACEPOINT_EVENT(tp, tptest5, /* This part must be outside ifdef protection */ #include - -#ifdef __cplusplus -} -#endif