utrace support with label based signature.
This commit is contained in:
parent
92e189be8b
commit
520b75fa2d
19
configure.ac
19
configure.ac
@ -1405,10 +1405,25 @@ JE_COMPILABLE([utrace(2)], [
|
||||
utrace((void *)0, 0);
|
||||
], [je_cv_utrace])
|
||||
if test "x${je_cv_utrace}" = "xno" ; then
|
||||
JE_COMPILABLE([utrace(2) with label], [
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/ktrace.h>
|
||||
], [
|
||||
utrace((void *)0, (void *)0, 0);
|
||||
], [je_cv_utrace_label])
|
||||
if test "x${je_cv_utrace_label}" = "xno"; then
|
||||
enable_utrace="0"
|
||||
fi
|
||||
if test "x$enable_utrace" = "x1" ; then
|
||||
fi
|
||||
if test "x$enable_utrace" = "x1" ; then
|
||||
AC_DEFINE([JEMALLOC_UTRACE_LABEL], [ ])
|
||||
fi
|
||||
else
|
||||
if test "x$enable_utrace" = "x1" ; then
|
||||
AC_DEFINE([JEMALLOC_UTRACE], [ ])
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([enable_utrace])
|
||||
|
||||
|
@ -173,6 +173,9 @@
|
||||
/* Support utrace(2)-based tracing. */
|
||||
#undef JEMALLOC_UTRACE
|
||||
|
||||
/* Support utrace(2)-based tracing (label based signature). */
|
||||
#undef JEMALLOC_UTRACE_LABEL
|
||||
|
||||
/* Support optional abort() on OOM. */
|
||||
#undef JEMALLOC_XMALLOC
|
||||
|
||||
|
@ -4,8 +4,14 @@
|
||||
#include "jemalloc_internal_defs.h"
|
||||
#include "jemalloc/internal/jemalloc_internal_decls.h"
|
||||
|
||||
#ifdef JEMALLOC_UTRACE
|
||||
#if defined(JEMALLOC_UTRACE) || defined(JEMALLOC_UTRACE_LABEL)
|
||||
#include <sys/ktrace.h>
|
||||
# if defined(JEMALLOC_UTRACE)
|
||||
# define UTRACE_CALL(p, l) utrace(p, l)
|
||||
# else
|
||||
# define UTRACE_CALL(p, l) utrace("jemalloc_process", p, l)
|
||||
# define JEMALLOC_UTRACE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define JEMALLOC_NO_DEMANGLE
|
||||
|
@ -250,7 +250,7 @@ typedef struct {
|
||||
ut.p = (a); \
|
||||
ut.s = (b); \
|
||||
ut.r = (c); \
|
||||
utrace(&ut, sizeof(ut)); \
|
||||
UTRACE_CALL(&ut, sizeof(ut)); \
|
||||
errno = utrace_serrno; \
|
||||
} \
|
||||
} while (0)
|
||||
|
Loading…
Reference in New Issue
Block a user