X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Flib%2Flttng-ust-libc-wrapper%2Flttng-ust-malloc.c;h=479040d2097df9e8e064992174cecd7bd94e9694;hb=742ac92a271c97c49bd79444594c0e8dfe099f9e;hp=19c603408cc85ca7e01db81d9fbeefcc7f21c385;hpb=c28c4a88a1cad73bbeeae2e33546e7b77d1608a1;p=lttng-ust.git diff --git a/src/lib/lttng-ust-libc-wrapper/lttng-ust-malloc.c b/src/lib/lttng-ust-libc-wrapper/lttng-ust-malloc.c index 19c60340..479040d2 100644 --- a/src/lib/lttng-ust-libc-wrapper/lttng-ust-malloc.c +++ b/src/lib/lttng-ust-libc-wrapper/lttng-ust-malloc.c @@ -30,6 +30,9 @@ #include "common/macros.h" #include "common/align.h" +#define LTTNG_UST_TRACEPOINT_HIDDEN_DEFINITION +#define LTTNG_UST_TRACEPOINT_PROVIDER_HIDDEN_DEFINITION + #define LTTNG_UST_TRACEPOINT_DEFINE #define LTTNG_UST_TRACEPOINT_CREATE_PROBES #define LTTNG_UST_TP_IP_PARAM ip @@ -352,7 +355,7 @@ void *realloc(void *ptr, size_t size) memcpy(retval, ptr, *old_size); } /* - * Mimick that a NULL pointer has been received, so + * Mimic that a NULL pointer has been received, so * memory allocation analysis based on the trace don't * get confused by the address from the static * allocator. @@ -423,9 +426,9 @@ int posix_memalign(void **memptr, size_t alignment, size_t size) } static -void lttng_ust_fixup_malloc_nesting_tls(void) +void lttng_ust_malloc_nesting_alloc_tls(void) { - asm volatile ("" : : "m" (URCU_TLS(malloc_nesting))); + __asm__ __volatile__ ("" : : "m" (URCU_TLS(malloc_nesting))); } void lttng_ust_libc_wrapper_malloc_ctor(void) @@ -434,7 +437,7 @@ void lttng_ust_libc_wrapper_malloc_ctor(void) if (cur_alloc.calloc) { return; } - lttng_ust_fixup_malloc_nesting_tls(); + lttng_ust_malloc_nesting_alloc_tls(); /* * Ensure the allocator is in place before the process becomes * multithreaded.