summaryrefslogtreecommitdiffstats
path: root/include/jemalloc
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2016-04-05 23:25:44 (GMT)
committerJason Evans <jasone@canonware.com>2016-05-13 16:56:18 (GMT)
commit9a8add1510456464bc496320990ec234798bd381 (patch)
treef5c9c5d990982e55a84c192687c8ce50234bad1e /include/jemalloc
parenta397045323d743a787c7efff17c0619dcf25f0b4 (diff)
downloadjemalloc-9a8add1510456464bc496320990ec234798bd381.zip
jemalloc-9a8add1510456464bc496320990ec234798bd381.tar.gz
jemalloc-9a8add1510456464bc496320990ec234798bd381.tar.bz2
Remove Valgrind support.
Diffstat (limited to 'include/jemalloc')
-rw-r--r--include/jemalloc/internal/jemalloc_internal.h.in13
-rw-r--r--include/jemalloc/internal/jemalloc_internal_defs.h.in3
-rw-r--r--include/jemalloc/internal/private_symbols.txt5
-rw-r--r--include/jemalloc/internal/quarantine.h3
-rw-r--r--include/jemalloc/internal/valgrind.h114
5 files changed, 0 insertions, 138 deletions
diff --git a/include/jemalloc/internal/jemalloc_internal.h.in b/include/jemalloc/internal/jemalloc_internal.h.in
index 51bf897..4c845e3 100644
--- a/include/jemalloc/internal/jemalloc_internal.h.in
+++ b/include/jemalloc/internal/jemalloc_internal.h.in
@@ -113,13 +113,6 @@ static const bool config_utrace =
false
#endif
;
-static const bool config_valgrind =
-#ifdef JEMALLOC_VALGRIND
- true
-#else
- false
-#endif
- ;
static const bool config_xmalloc =
#ifdef JEMALLOC_XMALLOC
true
@@ -361,7 +354,6 @@ typedef unsigned szind_t;
#endif
#include "jemalloc/internal/nstime.h"
-#include "jemalloc/internal/valgrind.h"
#include "jemalloc/internal/util.h"
#include "jemalloc/internal/atomic.h"
#include "jemalloc/internal/prng.h"
@@ -393,7 +385,6 @@ typedef unsigned szind_t;
#define JEMALLOC_H_STRUCTS
#include "jemalloc/internal/nstime.h"
-#include "jemalloc/internal/valgrind.h"
#include "jemalloc/internal/util.h"
#include "jemalloc/internal/atomic.h"
#include "jemalloc/internal/prng.h"
@@ -441,8 +432,6 @@ extern bool opt_xmalloc;
extern bool opt_zero;
extern unsigned opt_narenas;
-extern bool in_valgrind;
-
/* Number of CPUs. */
extern unsigned ncpus;
@@ -489,7 +478,6 @@ void jemalloc_postfork_parent(void);
void jemalloc_postfork_child(void);
#include "jemalloc/internal/nstime.h"
-#include "jemalloc/internal/valgrind.h"
#include "jemalloc/internal/util.h"
#include "jemalloc/internal/atomic.h"
#include "jemalloc/internal/prng.h"
@@ -521,7 +509,6 @@ void jemalloc_postfork_child(void);
#define JEMALLOC_H_INLINES
#include "jemalloc/internal/nstime.h"
-#include "jemalloc/internal/valgrind.h"
#include "jemalloc/internal/util.h"
#include "jemalloc/internal/atomic.h"
#include "jemalloc/internal/prng.h"
diff --git a/include/jemalloc/internal/jemalloc_internal_defs.h.in b/include/jemalloc/internal/jemalloc_internal_defs.h.in
index 7de0cf7..c9aa5fd 100644
--- a/include/jemalloc/internal/jemalloc_internal_defs.h.in
+++ b/include/jemalloc/internal/jemalloc_internal_defs.h.in
@@ -148,9 +148,6 @@
/* Support utrace(2)-based tracing. */
#undef JEMALLOC_UTRACE
-/* Support Valgrind. */
-#undef JEMALLOC_VALGRIND
-
/* Support optional abort() on OOM. */
#undef JEMALLOC_XMALLOC
diff --git a/include/jemalloc/internal/private_symbols.txt b/include/jemalloc/internal/private_symbols.txt
index f2b6a55..15b8cee 100644
--- a/include/jemalloc/internal/private_symbols.txt
+++ b/include/jemalloc/internal/private_symbols.txt
@@ -296,7 +296,6 @@ iallocztm
iarena_cleanup
idalloc
idalloctm
-in_valgrind
index2size
index2size_compute
index2size_lookup
@@ -591,10 +590,6 @@ tsdn_fetch
tsdn_null
tsdn_tsd
u2rz
-valgrind_freelike_block
-valgrind_make_mem_defined
-valgrind_make_mem_noaccess
-valgrind_make_mem_undefined
witness_assert_lockless
witness_assert_not_owner
witness_assert_owner
diff --git a/include/jemalloc/internal/quarantine.h b/include/jemalloc/internal/quarantine.h
index ae60739..1ab4345 100644
--- a/include/jemalloc/internal/quarantine.h
+++ b/include/jemalloc/internal/quarantine.h
@@ -4,9 +4,6 @@
typedef struct quarantine_obj_s quarantine_obj_t;
typedef struct quarantine_s quarantine_t;
-/* Default per thread quarantine size if valgrind is enabled. */
-#define JEMALLOC_VALGRIND_QUARANTINE_DEFAULT (ZU(1) << 24)
-
#endif /* JEMALLOC_H_TYPES */
/******************************************************************************/
#ifdef JEMALLOC_H_STRUCTS
diff --git a/include/jemalloc/internal/valgrind.h b/include/jemalloc/internal/valgrind.h
deleted file mode 100644
index 1a86808..0000000
--- a/include/jemalloc/internal/valgrind.h
+++ /dev/null
@@ -1,114 +0,0 @@
-/******************************************************************************/
-#ifdef JEMALLOC_H_TYPES
-
-#ifdef JEMALLOC_VALGRIND
-#include <valgrind/valgrind.h>
-
-/*
- * The size that is reported to Valgrind must be consistent through a chain of
- * malloc..realloc..realloc calls. Request size isn't recorded anywhere in
- * jemalloc, so it is critical that all callers of these macros provide usize
- * rather than request size. As a result, buffer overflow detection is
- * technically weakened for the standard API, though it is generally accepted
- * practice to consider any extra bytes reported by malloc_usable_size() as
- * usable space.
- */
-#define JEMALLOC_VALGRIND_MAKE_MEM_NOACCESS(ptr, usize) do { \
- if (unlikely(in_valgrind)) \
- valgrind_make_mem_noaccess(ptr, usize); \
-} while (0)
-#define JEMALLOC_VALGRIND_MAKE_MEM_UNDEFINED(ptr, usize) do { \
- if (unlikely(in_valgrind)) \
- valgrind_make_mem_undefined(ptr, usize); \
-} while (0)
-#define JEMALLOC_VALGRIND_MAKE_MEM_DEFINED(ptr, usize) do { \
- if (unlikely(in_valgrind)) \
- valgrind_make_mem_defined(ptr, usize); \
-} while (0)
-/*
- * The VALGRIND_MALLOCLIKE_BLOCK() and VALGRIND_RESIZEINPLACE_BLOCK() macro
- * calls must be embedded in macros rather than in functions so that when
- * Valgrind reports errors, there are no extra stack frames in the backtraces.
- */
-#define JEMALLOC_VALGRIND_MALLOC(cond, tsdn, ptr, usize, zero) do { \
- if (unlikely(in_valgrind && cond)) { \
- VALGRIND_MALLOCLIKE_BLOCK(ptr, usize, p2rz(tsdn, ptr), \
- zero); \
- } \
-} while (0)
-#define JEMALLOC_VALGRIND_REALLOC(maybe_moved, tsdn, ptr, usize, \
- ptr_maybe_null, old_ptr, old_usize, old_rzsize, old_ptr_maybe_null, \
- zero) do { \
- if (unlikely(in_valgrind)) { \
- size_t rzsize = p2rz(tsdn, ptr); \
- \
- if (!maybe_moved || ptr == old_ptr) { \
- VALGRIND_RESIZEINPLACE_BLOCK(ptr, old_usize, \
- usize, rzsize); \
- if (zero && old_usize < usize) { \
- valgrind_make_mem_defined( \
- (void *)((uintptr_t)ptr + \
- old_usize), usize - old_usize); \
- } \
- } else { \
- if (!old_ptr_maybe_null || old_ptr != NULL) { \
- valgrind_freelike_block(old_ptr, \
- old_rzsize); \
- } \
- if (!ptr_maybe_null || ptr != NULL) { \
- size_t copy_size = (old_usize < usize) \
- ? old_usize : usize; \
- size_t tail_size = usize - copy_size; \
- VALGRIND_MALLOCLIKE_BLOCK(ptr, usize, \
- rzsize, false); \
- if (copy_size > 0) { \
- valgrind_make_mem_defined(ptr, \
- copy_size); \
- } \
- if (zero && tail_size > 0) { \
- valgrind_make_mem_defined( \
- (void *)((uintptr_t)ptr + \
- copy_size), tail_size); \
- } \
- } \
- } \
- } \
-} while (0)
-#define JEMALLOC_VALGRIND_FREE(ptr, rzsize) do { \
- if (unlikely(in_valgrind)) \
- valgrind_freelike_block(ptr, rzsize); \
-} while (0)
-#else
-#define RUNNING_ON_VALGRIND ((unsigned)0)
-#define JEMALLOC_VALGRIND_MAKE_MEM_NOACCESS(ptr, usize) do {} while (0)
-#define JEMALLOC_VALGRIND_MAKE_MEM_UNDEFINED(ptr, usize) do {} while (0)
-#define JEMALLOC_VALGRIND_MAKE_MEM_DEFINED(ptr, usize) do {} while (0)
-#define JEMALLOC_VALGRIND_MALLOC(cond, tsdn, ptr, usize, zero) do {} while (0)
-#define JEMALLOC_VALGRIND_REALLOC(maybe_moved, tsdn, ptr, usize, \
- ptr_maybe_null, old_ptr, old_usize, old_rzsize, old_ptr_maybe_null, \
- zero) do {} while (0)
-#define JEMALLOC_VALGRIND_FREE(ptr, rzsize) do {} while (0)
-#endif
-
-#endif /* JEMALLOC_H_TYPES */
-/******************************************************************************/
-#ifdef JEMALLOC_H_STRUCTS
-
-#endif /* JEMALLOC_H_STRUCTS */
-/******************************************************************************/
-#ifdef JEMALLOC_H_EXTERNS
-
-#ifdef JEMALLOC_VALGRIND
-void valgrind_make_mem_noaccess(void *ptr, size_t usize);
-void valgrind_make_mem_undefined(void *ptr, size_t usize);
-void valgrind_make_mem_defined(void *ptr, size_t usize);
-void valgrind_freelike_block(void *ptr, size_t usize);
-#endif
-
-#endif /* JEMALLOC_H_EXTERNS */
-/******************************************************************************/
-#ifdef JEMALLOC_H_INLINES
-
-#endif /* JEMALLOC_H_INLINES */
-/******************************************************************************/
-