#include <urcu/tls-compat.h>
#include <urcu/arch.h>
#include <lttng/align.h>
+#include <helper.h>
#define TRACEPOINT_DEFINE
#define TRACEPOINT_CREATE_PROBES
retval = cur_alloc.malloc(size);
if (URCU_TLS(malloc_nesting) == 1) {
tracepoint(lttng_ust_libc, malloc,
- size, retval, __builtin_return_address(0));
+ size, retval, LTTNG_UST_CALLER_IP());
}
URCU_TLS(malloc_nesting)--;
return retval;
if (URCU_TLS(malloc_nesting) == 1) {
tracepoint(lttng_ust_libc, free,
- ptr, __builtin_return_address(0));
+ ptr, LTTNG_UST_CALLER_IP());
}
if (cur_alloc.free == NULL) {
retval = cur_alloc.calloc(nmemb, size);
if (URCU_TLS(malloc_nesting) == 1) {
tracepoint(lttng_ust_libc, calloc,
- nmemb, size, retval, __builtin_return_address(0));
+ nmemb, size, retval, LTTNG_UST_CALLER_IP());
}
URCU_TLS(malloc_nesting)--;
return retval;
end:
if (URCU_TLS(malloc_nesting) == 1) {
tracepoint(lttng_ust_libc, realloc,
- ptr, size, retval, __builtin_return_address(0));
+ ptr, size, retval, LTTNG_UST_CALLER_IP());
}
URCU_TLS(malloc_nesting)--;
return retval;
if (URCU_TLS(malloc_nesting) == 1) {
tracepoint(lttng_ust_libc, memalign,
alignment, size, retval,
- __builtin_return_address(0));
+ LTTNG_UST_CALLER_IP());
}
URCU_TLS(malloc_nesting)--;
return retval;
if (URCU_TLS(malloc_nesting) == 1) {
tracepoint(lttng_ust_libc, posix_memalign,
*memptr, alignment, size,
- retval, __builtin_return_address(0));
+ retval, LTTNG_UST_CALLER_IP());
}
URCU_TLS(malloc_nesting)--;
return retval;