Performance: define _LGPL_SOURCE in LGPL c files
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 16 Jul 2016 16:18:32 +0000 (12:18 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 21 Aug 2016 20:18:56 +0000 (16:18 -0400)
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 <mathieu.desnoyers@efficios.com>
29 files changed:
liblttng-ust/lttng-clock.c
liblttng-ust/lttng-context-cpu-id.c
liblttng-ust/lttng-context-ip.c
liblttng-ust/lttng-context-perf-counters.c
liblttng-ust/lttng-context-procname.c
liblttng-ust/lttng-context-provider.c
liblttng-ust/lttng-context-pthread-id.c
liblttng-ust/lttng-context-vpid.c
liblttng-ust/lttng-context-vtid.c
liblttng-ust/lttng-context.c
liblttng-ust/lttng-events.c
liblttng-ust/lttng-filter-interpreter.c
liblttng-ust/lttng-filter-specialize.c
liblttng-ust/lttng-filter.c
liblttng-ust/lttng-getcpu.c
liblttng-ust/lttng-probes.c
liblttng-ust/lttng-ring-buffer-client-discard-rt.c
liblttng-ust/lttng-ring-buffer-client-discard.c
liblttng-ust/lttng-ring-buffer-client-overwrite-rt.c
liblttng-ust/lttng-ring-buffer-client-overwrite.c
liblttng-ust/lttng-ring-buffer-metadata-client.c
liblttng-ust/lttng-ust-abi.c
liblttng-ust/lttng-ust-dynamic-type.c
liblttng-ust/lttng-ust-elf.c
liblttng-ust/ust-core.c
libringbuffer/ring_buffer_backend.c
libringbuffer/ring_buffer_frontend.c
libringbuffer/shm.c
libringbuffer/smp.c

index 4299bcdec15767aca11f8ca2bfd5713cd6d8773d..b24ff37ca5496651d5b9ee1c8004581b8b807309 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #define _GNU_SOURCE
+#define _LGPL_SOURCE
 #include <error.h>
 #include <dlfcn.h>
 #include <stdlib.h>
index 840cafe7064d221aac7068e96fb3bb57252817e8..7cbf3cea46a1a39857c12a1e4c3278d15e38bd69 100644 (file)
@@ -27,6 +27,7 @@
  */
 
 #define _GNU_SOURCE
+#define _LGPL_SOURCE
 #include <sys/types.h>
 #include <unistd.h>
 #include <lttng/ust-events.h>
index 84c7349981fe6936d9c9cc29fa374fcdb725735e..fb9229543194d91b6df66a36e447fa4bb59fb314 100644 (file)
@@ -20,6 +20,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#define _LGPL_SOURCE
 #include <sys/types.h>
 #include <unistd.h>
 #include <lttng/ust-events.h>
index 7e87be94cfa5a5f7c19d63fe449b8c3ae70d5a76..a15417ccde010435103ad5e0ef8621902fc6121b 100644 (file)
@@ -20,6 +20,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#define _LGPL_SOURCE
 #include <sys/types.h>
 #include <unistd.h>
 #include <string.h>
index 13461a6878fded8e47bf10c902b054940d4c4c16..b6e69501d81c08bc79c5f82d9ff5b85d1d22230a 100644 (file)
@@ -20,6 +20,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#define _LGPL_SOURCE
 #include <lttng/ust-events.h>
 #include <lttng/ust-tracer.h>
 #include <lttng/ringbuffer-config.h>
index 6c067e2fecae06548a3d4495ef9477b2495a6a5b..c580891a1ac93471f544fce2ddb66c31ffa622b2 100644 (file)
@@ -20,6 +20,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#define _LGPL_SOURCE
 #include <sys/types.h>
 #include <unistd.h>
 #include <lttng/ust-context-provider.h>
index c2c211574f2b6b21bd04d2b238aa523a70bf1022..552100decb4481c564ac912d98d0fead0292de2f 100644 (file)
@@ -20,6 +20,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#define _LGPL_SOURCE
 #include <pthread.h>
 #include <lttng/ust-events.h>
 #include <lttng/ust-tracer.h>
index 7d8091be0351052e3db95602dd839bd7a5d95406..5e5ed145d944adf08be61755eaa32faefe3e52b4 100644 (file)
@@ -20,6 +20,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#define _LGPL_SOURCE
 #include <sys/types.h>
 #include <unistd.h>
 #include <lttng/ust-events.h>
index d1c73d8d6cf3ee0666522824e46f4a6265244e2e..f28e470a38c91be3e88c7b1d1fcd42c591d73c67 100644 (file)
@@ -20,6 +20,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#define _LGPL_SOURCE
 #include <sys/types.h>
 #include <unistd.h>
 #include <lttng/ust-events.h>
index 33a4cdd1d41477e54fad06fc13c22d1b4e543b2f..eeaaae4321219af741b83261e59d624ffda233eb 100644 (file)
@@ -20,7 +20,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-
+#define _LGPL_SOURCE
 #include <lttng/ust-events.h>
 #include <lttng/ust-tracer.h>
 #include <lttng/ust-context-provider.h>
index 64f70f92bd9701ff15936d9fb6ec84176d389187..4c0e10910b29f40232b55b446626ef82c31c2bdd 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 #define _GNU_SOURCE
+#define _LGPL_SOURCE
 #include <stdio.h>
 #include <urcu/list.h>
 #include <urcu/hlist.h>
index 3eee8e00a90564e0d100a292853dcca742ec61b3..1ba06f8e862b1e07c65fe794031dcc6aa430644e 100644 (file)
@@ -20,6 +20,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#define _LGPL_SOURCE
 #include <urcu-pointer.h>
 #include "lttng-filter.h"
 
index dddb448e43b192bdfd5b9cdbb26c480be17409c5..d115585d8c9a1cc85b482a72bf981e5cad031ffa 100644 (file)
@@ -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)
index ee94a4ccc2498d4c1272935e67dda7e1eadbe979..911f8e7848aa4c3d6a907cdf56715e5213a78084 100644 (file)
@@ -20,6 +20,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#define _LGPL_SOURCE
 #include <urcu/rculist.h>
 #include "lttng-filter.h"
 
index 751affac3cc29b747571ce786e2548be2d36f553..7b608ef94aa43f247433969c87050058a9021419 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #define _GNU_SOURCE
+#define _LGPL_SOURCE
 #include <error.h>
 #include <dlfcn.h>
 #include <stdlib.h>
index bba5cd345238b25db0340c77c52ae991584a30a9..5e2d29662702b2013b05b2650cf539ba839a74a7 100644 (file)
@@ -20,6 +20,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#define _LGPL_SOURCE
 #include <string.h>
 #include <errno.h>
 #include <urcu/list.h>
index 301328f9ae9a57e3d726e6aa5c8a55defd64920f..d57d5492dc3a15df355a74041a9b4014d66f6f15 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 #define _GNU_SOURCE
+#define _LGPL_SOURCE
 #include "lttng-tracer.h"
 
 #define RING_BUFFER_MODE_TEMPLATE              RING_BUFFER_DISCARD
index 2e469b7a6b79f67e0486cd4d62236a16297a5ae9..a5fcc80749f7e9a8208c271d294af220d5a2c01c 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 #define _GNU_SOURCE
+#define _LGPL_SOURCE
 #include "lttng-tracer.h"
 
 #define RING_BUFFER_MODE_TEMPLATE              RING_BUFFER_DISCARD
index b4c5fe5757e16fb0b29c6b48f02731f81a09e8fa..1b4fff1bdacc7b00c51b3d22795948fdb0cc2b8c 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 #define _GNU_SOURCE
+#define _LGPL_SOURCE
 #include "lttng-tracer.h"
 
 #define RING_BUFFER_MODE_TEMPLATE              RING_BUFFER_OVERWRITE
index e9cbc89d90005d17ab9a58c41916b6548f4e98d9..5564e8e5f224d63d4341aea36d59e8a135b3a1d3 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 #define _GNU_SOURCE
+#define _LGPL_SOURCE
 #include "lttng-tracer.h"
 
 #define RING_BUFFER_MODE_TEMPLATE              RING_BUFFER_OVERWRITE
index 126c04883035c80b34b980db1ecbae16430c7f62..f14294a99336349332f7688826e6f32c076772cd 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 #define _GNU_SOURCE
+#define _LGPL_SOURCE
 #include "lttng-tracer.h"
 
 #define RING_BUFFER_MODE_TEMPLATE              RING_BUFFER_DISCARD
index 9e4e5cd56713eb77659b72aa074140c6c51bfa4b..ac59d15a44bd3ecab5e7906d148114ab8c7b8561 100644 (file)
@@ -37,6 +37,7 @@
  *     - Takes instrumentation source specific arguments.
  */
 
+#define _LGPL_SOURCE
 #include <lttng/ust-abi.h>
 #include <lttng/ust-error.h>
 #include <urcu/compiler.h>
index 488cf8156cba55587a4b391137ef57c90ec4abc0..d569e307f58d0066b8066d57c769763b880936ce 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 #define _GNU_SOURCE
+#define _LGPL_SOURCE
 #include <stdio.h>
 #include <stdint.h>
 #include <stddef.h>
index e5b8a08f44141d0fd26ea0c346b43bfcb571c620..663699b7ce91a5d9febf0d9903b64d042a580782 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #define _GNU_SOURCE
+#define _LGPL_SOURCE
 #include <helper.h>
 #include <string.h>
 #include <lttng/align.h>
index 6574f93b194150540456bdb9dfd86d5479381acc..5355f5c117ad62104c34ee1fd7cfe2d94f67f810 100644 (file)
@@ -18,6 +18,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#define _LGPL_SOURCE
 #include <stdlib.h>
 #include <lttng/ust-events.h>
 #include <usterr-signal-safe.h>
index 961f118a088f587ed60172d265d6c09c578b5106..3dca862712ef4116a315eb2754a2b417fdeea7a1 100644 (file)
@@ -19,6 +19,7 @@
  */
 
 #define _GNU_SOURCE
+#define _LGPL_SOURCE
 #include <unistd.h>
 #include <urcu/arch.h>
 #include <limits.h>
index bda0e1f497fecc786883726b6329ba51498240c9..14ae8eb334b5352c5d831f398a30ad5849acf7fe 100644 (file)
@@ -52,6 +52,7 @@
  */
 
 #define _GNU_SOURCE
+#define _LGPL_SOURCE
 #include <sys/types.h>
 #include <sys/mman.h>
 #include <sys/stat.h>
index 53b2b6ec3f1819ba69d2b328f83f224d1d0b220d..86e84b3f34a76bf28772602d50b99cb2c3d99f56 100644 (file)
@@ -18,6 +18,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#define _LGPL_SOURCE
 #include "shm.h"
 #include <unistd.h>
 #include <fcntl.h>
index ffc7a52a180a42af05270979e222b2558a6c288c..9e7114be8a40f3349b8a8942131f440ce0514311 100644 (file)
@@ -19,6 +19,7 @@
  */
 
 #define _GNU_SOURCE
+#define _LGPL_SOURCE
 #include <unistd.h>
 #include <pthread.h>
 #include "smp.h"
This page took 0.033488 seconds and 4 git commands to generate.