From: Mathieu Desnoyers Date: Sat, 16 Jul 2016 16:18:32 +0000 (-0400) Subject: Performance: define _LGPL_SOURCE in LGPL c files X-Git-Tag: v2.9.0-rc1~22 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=3fbec7dc3645facd9e809cf161ba3435a377ce56;p=lttng-ust.git Performance: define _LGPL_SOURCE in LGPL c files Brings a performance gain of 55 ns/event on the ARM32 Cubietruck by adding _LGPL_SOURCE to ring buffer clients. Signed-off-by: Mathieu Desnoyers --- diff --git a/liblttng-ust/lttng-clock.c b/liblttng-ust/lttng-clock.c index 4299bcde..b24ff37c 100644 --- a/liblttng-ust/lttng-clock.c +++ b/liblttng-ust/lttng-clock.c @@ -17,6 +17,7 @@ */ #define _GNU_SOURCE +#define _LGPL_SOURCE #include #include #include diff --git a/liblttng-ust/lttng-context-cpu-id.c b/liblttng-ust/lttng-context-cpu-id.c index 840cafe7..7cbf3cea 100644 --- a/liblttng-ust/lttng-context-cpu-id.c +++ b/liblttng-ust/lttng-context-cpu-id.c @@ -27,6 +27,7 @@ */ #define _GNU_SOURCE +#define _LGPL_SOURCE #include #include #include diff --git a/liblttng-ust/lttng-context-ip.c b/liblttng-ust/lttng-context-ip.c index 84c73499..fb922954 100644 --- a/liblttng-ust/lttng-context-ip.c +++ b/liblttng-ust/lttng-context-ip.c @@ -20,6 +20,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#define _LGPL_SOURCE #include #include #include diff --git a/liblttng-ust/lttng-context-perf-counters.c b/liblttng-ust/lttng-context-perf-counters.c index 7e87be94..a15417cc 100644 --- a/liblttng-ust/lttng-context-perf-counters.c +++ b/liblttng-ust/lttng-context-perf-counters.c @@ -20,6 +20,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#define _LGPL_SOURCE #include #include #include diff --git a/liblttng-ust/lttng-context-procname.c b/liblttng-ust/lttng-context-procname.c index 13461a68..b6e69501 100644 --- a/liblttng-ust/lttng-context-procname.c +++ b/liblttng-ust/lttng-context-procname.c @@ -20,6 +20,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#define _LGPL_SOURCE #include #include #include diff --git a/liblttng-ust/lttng-context-provider.c b/liblttng-ust/lttng-context-provider.c index 6c067e2f..c580891a 100644 --- a/liblttng-ust/lttng-context-provider.c +++ b/liblttng-ust/lttng-context-provider.c @@ -20,6 +20,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#define _LGPL_SOURCE #include #include #include diff --git a/liblttng-ust/lttng-context-pthread-id.c b/liblttng-ust/lttng-context-pthread-id.c index c2c21157..552100de 100644 --- a/liblttng-ust/lttng-context-pthread-id.c +++ b/liblttng-ust/lttng-context-pthread-id.c @@ -20,6 +20,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#define _LGPL_SOURCE #include #include #include diff --git a/liblttng-ust/lttng-context-vpid.c b/liblttng-ust/lttng-context-vpid.c index 7d8091be..5e5ed145 100644 --- a/liblttng-ust/lttng-context-vpid.c +++ b/liblttng-ust/lttng-context-vpid.c @@ -20,6 +20,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#define _LGPL_SOURCE #include #include #include diff --git a/liblttng-ust/lttng-context-vtid.c b/liblttng-ust/lttng-context-vtid.c index d1c73d8d..f28e470a 100644 --- a/liblttng-ust/lttng-context-vtid.c +++ b/liblttng-ust/lttng-context-vtid.c @@ -20,6 +20,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#define _LGPL_SOURCE #include #include #include diff --git a/liblttng-ust/lttng-context.c b/liblttng-ust/lttng-context.c index 33a4cdd1..eeaaae43 100644 --- a/liblttng-ust/lttng-context.c +++ b/liblttng-ust/lttng-context.c @@ -20,7 +20,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ - +#define _LGPL_SOURCE #include #include #include diff --git a/liblttng-ust/lttng-events.c b/liblttng-ust/lttng-events.c index 64f70f92..4c0e1091 100644 --- a/liblttng-ust/lttng-events.c +++ b/liblttng-ust/lttng-events.c @@ -21,6 +21,7 @@ */ #define _GNU_SOURCE +#define _LGPL_SOURCE #include #include #include diff --git a/liblttng-ust/lttng-filter-interpreter.c b/liblttng-ust/lttng-filter-interpreter.c index 3eee8e00..1ba06f8e 100644 --- a/liblttng-ust/lttng-filter-interpreter.c +++ b/liblttng-ust/lttng-filter-interpreter.c @@ -20,6 +20,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#define _LGPL_SOURCE #include #include "lttng-filter.h" diff --git a/liblttng-ust/lttng-filter-specialize.c b/liblttng-ust/lttng-filter-specialize.c index dddb448e..d115585d 100644 --- a/liblttng-ust/lttng-filter-specialize.c +++ b/liblttng-ust/lttng-filter-specialize.c @@ -20,6 +20,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#define _LGPL_SOURCE #include "lttng-filter.h" int lttng_filter_specialize_bytecode(struct bytecode_runtime *bytecode) diff --git a/liblttng-ust/lttng-filter.c b/liblttng-ust/lttng-filter.c index ee94a4cc..911f8e78 100644 --- a/liblttng-ust/lttng-filter.c +++ b/liblttng-ust/lttng-filter.c @@ -20,6 +20,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#define _LGPL_SOURCE #include #include "lttng-filter.h" diff --git a/liblttng-ust/lttng-getcpu.c b/liblttng-ust/lttng-getcpu.c index 751affac..7b608ef9 100644 --- a/liblttng-ust/lttng-getcpu.c +++ b/liblttng-ust/lttng-getcpu.c @@ -17,6 +17,7 @@ */ #define _GNU_SOURCE +#define _LGPL_SOURCE #include #include #include diff --git a/liblttng-ust/lttng-probes.c b/liblttng-ust/lttng-probes.c index bba5cd34..5e2d2966 100644 --- a/liblttng-ust/lttng-probes.c +++ b/liblttng-ust/lttng-probes.c @@ -20,6 +20,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#define _LGPL_SOURCE #include #include #include diff --git a/liblttng-ust/lttng-ring-buffer-client-discard-rt.c b/liblttng-ust/lttng-ring-buffer-client-discard-rt.c index 301328f9..d57d5492 100644 --- a/liblttng-ust/lttng-ring-buffer-client-discard-rt.c +++ b/liblttng-ust/lttng-ring-buffer-client-discard-rt.c @@ -21,6 +21,7 @@ */ #define _GNU_SOURCE +#define _LGPL_SOURCE #include "lttng-tracer.h" #define RING_BUFFER_MODE_TEMPLATE RING_BUFFER_DISCARD diff --git a/liblttng-ust/lttng-ring-buffer-client-discard.c b/liblttng-ust/lttng-ring-buffer-client-discard.c index 2e469b7a..a5fcc807 100644 --- a/liblttng-ust/lttng-ring-buffer-client-discard.c +++ b/liblttng-ust/lttng-ring-buffer-client-discard.c @@ -21,6 +21,7 @@ */ #define _GNU_SOURCE +#define _LGPL_SOURCE #include "lttng-tracer.h" #define RING_BUFFER_MODE_TEMPLATE RING_BUFFER_DISCARD diff --git a/liblttng-ust/lttng-ring-buffer-client-overwrite-rt.c b/liblttng-ust/lttng-ring-buffer-client-overwrite-rt.c index b4c5fe57..1b4fff1b 100644 --- a/liblttng-ust/lttng-ring-buffer-client-overwrite-rt.c +++ b/liblttng-ust/lttng-ring-buffer-client-overwrite-rt.c @@ -21,6 +21,7 @@ */ #define _GNU_SOURCE +#define _LGPL_SOURCE #include "lttng-tracer.h" #define RING_BUFFER_MODE_TEMPLATE RING_BUFFER_OVERWRITE diff --git a/liblttng-ust/lttng-ring-buffer-client-overwrite.c b/liblttng-ust/lttng-ring-buffer-client-overwrite.c index e9cbc89d..5564e8e5 100644 --- a/liblttng-ust/lttng-ring-buffer-client-overwrite.c +++ b/liblttng-ust/lttng-ring-buffer-client-overwrite.c @@ -21,6 +21,7 @@ */ #define _GNU_SOURCE +#define _LGPL_SOURCE #include "lttng-tracer.h" #define RING_BUFFER_MODE_TEMPLATE RING_BUFFER_OVERWRITE diff --git a/liblttng-ust/lttng-ring-buffer-metadata-client.c b/liblttng-ust/lttng-ring-buffer-metadata-client.c index 126c0488..f14294a9 100644 --- a/liblttng-ust/lttng-ring-buffer-metadata-client.c +++ b/liblttng-ust/lttng-ring-buffer-metadata-client.c @@ -21,6 +21,7 @@ */ #define _GNU_SOURCE +#define _LGPL_SOURCE #include "lttng-tracer.h" #define RING_BUFFER_MODE_TEMPLATE RING_BUFFER_DISCARD diff --git a/liblttng-ust/lttng-ust-abi.c b/liblttng-ust/lttng-ust-abi.c index 9e4e5cd5..ac59d15a 100644 --- a/liblttng-ust/lttng-ust-abi.c +++ b/liblttng-ust/lttng-ust-abi.c @@ -37,6 +37,7 @@ * - Takes instrumentation source specific arguments. */ +#define _LGPL_SOURCE #include #include #include diff --git a/liblttng-ust/lttng-ust-dynamic-type.c b/liblttng-ust/lttng-ust-dynamic-type.c index 488cf815..d569e307 100644 --- a/liblttng-ust/lttng-ust-dynamic-type.c +++ b/liblttng-ust/lttng-ust-dynamic-type.c @@ -21,6 +21,7 @@ */ #define _GNU_SOURCE +#define _LGPL_SOURCE #include #include #include diff --git a/liblttng-ust/lttng-ust-elf.c b/liblttng-ust/lttng-ust-elf.c index e5b8a08f..663699b7 100644 --- a/liblttng-ust/lttng-ust-elf.c +++ b/liblttng-ust/lttng-ust-elf.c @@ -17,6 +17,7 @@ */ #define _GNU_SOURCE +#define _LGPL_SOURCE #include #include #include diff --git a/liblttng-ust/ust-core.c b/liblttng-ust/ust-core.c index 6574f93b..5355f5c1 100644 --- a/liblttng-ust/ust-core.c +++ b/liblttng-ust/ust-core.c @@ -18,6 +18,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#define _LGPL_SOURCE #include #include #include diff --git a/libringbuffer/ring_buffer_backend.c b/libringbuffer/ring_buffer_backend.c index 961f118a..3dca8627 100644 --- a/libringbuffer/ring_buffer_backend.c +++ b/libringbuffer/ring_buffer_backend.c @@ -19,6 +19,7 @@ */ #define _GNU_SOURCE +#define _LGPL_SOURCE #include #include #include diff --git a/libringbuffer/ring_buffer_frontend.c b/libringbuffer/ring_buffer_frontend.c index bda0e1f4..14ae8eb3 100644 --- a/libringbuffer/ring_buffer_frontend.c +++ b/libringbuffer/ring_buffer_frontend.c @@ -52,6 +52,7 @@ */ #define _GNU_SOURCE +#define _LGPL_SOURCE #include #include #include diff --git a/libringbuffer/shm.c b/libringbuffer/shm.c index 53b2b6ec..86e84b3f 100644 --- a/libringbuffer/shm.c +++ b/libringbuffer/shm.c @@ -18,6 +18,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#define _LGPL_SOURCE #include "shm.h" #include #include diff --git a/libringbuffer/smp.c b/libringbuffer/smp.c index ffc7a52a..9e7114be 100644 --- a/libringbuffer/smp.c +++ b/libringbuffer/smp.c @@ -19,6 +19,7 @@ */ #define _GNU_SOURCE +#define _LGPL_SOURCE #include #include #include "smp.h"