mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of https://github.com/triAGENS/ArangoDB into devel
This commit is contained in:
commit
2240cf3c86
11
CHANGELOG
11
CHANGELOG
|
@ -1,3 +1,14 @@
|
|||
v1.3 (XXXX-XX-XX)
|
||||
-----------------
|
||||
|
||||
* removed configure option `--enable-zone-debug`
|
||||
memory zone debugging is now automatically turned on when compiling with ArangoDB
|
||||
`--enable-maintainer-mode`
|
||||
|
||||
* removed configure option `--enable-arangob`
|
||||
arangob is now always included in the build
|
||||
|
||||
|
||||
v1.2.beta3 (XXXX-XX-XX)
|
||||
-----------------------
|
||||
|
||||
|
|
|
@ -256,6 +256,3 @@ to the error messages file, which is converted to js and C header files using
|
|||
Python. You will need Python 2 or 3 for this. Furthermore, this option enables
|
||||
additional test cases to be executed in a `make unittests` run. You also need to
|
||||
install the Boost test framework for this.
|
||||
|
||||
`--enable-arangob` tells the build system to also build the arangob benchmark
|
||||
tool. The binary will be built in the bin subdirectory.
|
||||
|
|
|
@ -21,20 +21,13 @@ DOXYGEN_TOC = \
|
|||
################################################################################
|
||||
|
||||
dist_man_MANS += \
|
||||
Documentation/man/man1/arangob.1 \
|
||||
Documentation/man/man1/arangoimp.1 \
|
||||
Documentation/man/man1/arangosh.1 \
|
||||
Documentation/man/man8/rcarangod.8 \
|
||||
Documentation/man/man8/arangod.8 \
|
||||
Documentation/man/man8/arango-dfdb.8
|
||||
|
||||
|
||||
if ENABLE_ARANGOB
|
||||
|
||||
dist_man_MANS += \
|
||||
Documentation/man/man1/arangob.1
|
||||
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
### @brief JavaScript files
|
||||
################################################################################
|
||||
|
|
|
@ -169,12 +169,9 @@ noinst_LIBRARIES = \
|
|||
################################################################################
|
||||
|
||||
bin_PROGRAMS = \
|
||||
bin/arangob \
|
||||
bin/arangosh \
|
||||
bin/arangoimp
|
||||
|
||||
if ENABLE_ARANGOB
|
||||
bin_PROGRAMS += bin/arangob
|
||||
endif
|
||||
bin/arangoimp
|
||||
|
||||
################################################################################
|
||||
### @brief /sbin programs
|
||||
|
|
|
@ -508,8 +508,6 @@ unittests-bitarray-index:
|
|||
|
||||
.PHONY: unittests-arangob
|
||||
|
||||
if ENABLE_ARANGOB
|
||||
|
||||
unittests-arangob:
|
||||
$(MAKE) start-server PID=$(PID) SERVER_START="--server.endpoint unix://$(VOCDIR)/arango.sock --server.disable-authentication true" PROTO=unix
|
||||
|
||||
|
@ -531,13 +529,6 @@ unittests-arangob:
|
|||
@rm -rf "$(VOCDIR)"
|
||||
@echo
|
||||
|
||||
else
|
||||
|
||||
unittests-arangob:
|
||||
@echo
|
||||
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
### @brief CPPCHECK
|
||||
################################################################################
|
||||
|
|
|
@ -49,7 +49,6 @@ bin_arangoimp_SOURCES = \
|
|||
################################################################################
|
||||
### @brief program "arangob"
|
||||
################################################################################
|
||||
if ENABLE_ARANGOB
|
||||
|
||||
bin_arangob_CPPFLAGS = \
|
||||
-I@top_srcdir@/arangosh \
|
||||
|
@ -66,8 +65,6 @@ bin_arangob_SOURCES = \
|
|||
arangosh/ArangoShell/ArangoClient.cpp \
|
||||
arangosh/Benchmark/arangob.cpp
|
||||
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
## --SECTION-- END-OF-FILE
|
||||
################################################################################
|
||||
|
|
13
configure.ac
13
configure.ac
|
@ -85,18 +85,6 @@ else
|
|||
fi
|
||||
|
||||
|
||||
dnl ----------------------------------------------------------------------------
|
||||
dnl ARANGOB
|
||||
dnl ----------------------------------------------------------------------------
|
||||
|
||||
AC_ARG_ENABLE([arangob],
|
||||
AS_HELP_STRING([--enable-arangob], [install arangob benchmark tool (default: yes)]),
|
||||
[tr_ARANGOB="${enableval:-yes}"],
|
||||
[tr_ARANGOB=yes])
|
||||
|
||||
AM_CONDITIONAL(ENABLE_ARANGOB, test "x$tr_ARANGOB" = xyes)
|
||||
|
||||
|
||||
dnl ============================================================================
|
||||
dnl --SECTION-- CONFIGURATION
|
||||
dnl ============================================================================
|
||||
|
@ -105,7 +93,6 @@ m4_include([m4/configure.basics])
|
|||
AC_PROG_RANLIB
|
||||
|
||||
m4_include([m4/configure.static])
|
||||
m4_include([m4/configure.memory])
|
||||
m4_include([m4/configure.logging])
|
||||
m4_include([m4/configure.largefile])
|
||||
m4_include([m4/configure.threads])
|
||||
|
|
|
@ -72,10 +72,10 @@
|
|||
#undef TRI_ENABLE_TIMING
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief memory zone debug
|
||||
/// @brief enable maintainer mode
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#undef TRI_ENABLE_ZONE_DEBUG
|
||||
#undef TRI_ENABLE_MAINTAINER_MODE
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief use MRUBY as alternative/addition to JavaScript
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
/// why so much memory is needed
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef TRI_ENABLE_ZONE_DEBUG
|
||||
#ifdef TRI_ENABLE_MAINTAINER_MODE
|
||||
#define MALLOC_WARNING_THRESHOLD (4 * 1024 * 1024)
|
||||
#endif
|
||||
|
||||
|
@ -57,7 +57,7 @@
|
|||
/// mode, and will not include it if in non debug mode
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef TRI_ENABLE_ZONE_DEBUG
|
||||
#ifdef TRI_ENABLE_MAINTAINER_MODE
|
||||
|
||||
#define ZONE_DEBUG_LOCATION "in %s:%d"
|
||||
#define ZONE_DEBUG_PARAMS ,file, line
|
||||
|
@ -129,7 +129,7 @@ TRI_memory_zone_t* TRI_CORE_MEM_ZONE = &TriCoreMemZone;
|
|||
/// @brief unknown memory zone
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef TRI_ENABLE_ZONE_DEBUG
|
||||
#ifndef TRI_ENABLE_MAINTAINER_MODE
|
||||
TRI_memory_zone_t* TRI_UNKNOWN_MEM_ZONE = &TriUnknownMemZone;
|
||||
#endif
|
||||
|
||||
|
@ -150,7 +150,7 @@ TRI_memory_zone_t* TRI_UNKNOWN_MEM_ZONE = &TriUnknownMemZone;
|
|||
/// @brief generates an error message
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef TRI_ENABLE_ZONE_DEBUG
|
||||
#ifdef TRI_ENABLE_MAINTAINER_MODE
|
||||
TRI_memory_zone_t* TRI_UnknownMemZoneZ (char const* file, int line) {
|
||||
/* printf("MEMORY ZONE: using unknown memory zone at (%s,%d)\n",
|
||||
file,
|
||||
|
@ -181,14 +181,14 @@ void* TRI_SystemAllocate (uint64_t n, bool set) {
|
|||
/// @brief basic memory management for allocate
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef TRI_ENABLE_ZONE_DEBUG
|
||||
#ifdef TRI_ENABLE_MAINTAINER_MODE
|
||||
void* TRI_AllocateZ (TRI_memory_zone_t* zone, uint64_t n, bool set, char const* file, int line) {
|
||||
#else
|
||||
void* TRI_Allocate (TRI_memory_zone_t* zone, uint64_t n, bool set) {
|
||||
#endif
|
||||
char* m;
|
||||
|
||||
#ifdef TRI_ENABLE_ZONE_DEBUG
|
||||
#ifdef TRI_ENABLE_MAINTAINER_MODE
|
||||
// warn in the case of very big malloc operations
|
||||
if (n >= MALLOC_WARNING_THRESHOLD) {
|
||||
LOG_WARNING("big malloc action: %llu bytes in %s:%d", (unsigned long long) n, file, line);
|
||||
|
@ -221,13 +221,13 @@ void* TRI_Allocate (TRI_memory_zone_t* zone, uint64_t n, bool set) {
|
|||
(int) zone->_zid
|
||||
ZONE_DEBUG_PARAMS);
|
||||
|
||||
#ifdef TRI_ENABLE_ZONE_DEBUG
|
||||
#ifdef TRI_ENABLE_MAINTAINER_MODE
|
||||
return TRI_AllocateZ(zone, n, set, file, line);
|
||||
#else
|
||||
return TRI_Allocate(zone, n, set);
|
||||
#endif
|
||||
}
|
||||
#ifdef TRI_ENABLE_ZONE_DEBUG
|
||||
#ifdef TRI_ENABLE_MAINTAINER_MODE
|
||||
else if (set) {
|
||||
memset(m, 0, (size_t) n + sizeof(uintptr_t));
|
||||
}
|
||||
|
@ -241,7 +241,7 @@ void* TRI_Allocate (TRI_memory_zone_t* zone, uint64_t n, bool set) {
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef TRI_ENABLE_ZONE_DEBUG
|
||||
#ifdef TRI_ENABLE_MAINTAINER_MODE
|
||||
* (uintptr_t*) m = zone->_zid;
|
||||
// zone->_zid is a uint32_t but we'll advance sizeof(uintptr_t) bytes for good alignment everywhere
|
||||
m += sizeof(uintptr_t);
|
||||
|
@ -254,7 +254,7 @@ void* TRI_Allocate (TRI_memory_zone_t* zone, uint64_t n, bool set) {
|
|||
/// @brief basic memory management for reallocate
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef TRI_ENABLE_ZONE_DEBUG
|
||||
#ifdef TRI_ENABLE_MAINTAINER_MODE
|
||||
void* TRI_ReallocateZ (TRI_memory_zone_t* zone, void* m, uint64_t n, char const* file, int line) {
|
||||
#else
|
||||
void* TRI_Reallocate (TRI_memory_zone_t* zone, void* m, uint64_t n) {
|
||||
|
@ -262,7 +262,7 @@ void* TRI_Reallocate (TRI_memory_zone_t* zone, void* m, uint64_t n) {
|
|||
char* p;
|
||||
|
||||
if (m == NULL) {
|
||||
#ifdef TRI_ENABLE_ZONE_DEBUG
|
||||
#ifdef TRI_ENABLE_MAINTAINER_MODE
|
||||
return TRI_AllocateZ(zone, n, false, file, line);
|
||||
#else
|
||||
return TRI_Allocate(zone, n, false);
|
||||
|
@ -271,7 +271,7 @@ void* TRI_Reallocate (TRI_memory_zone_t* zone, void* m, uint64_t n) {
|
|||
|
||||
p = (char*) m;
|
||||
|
||||
#ifdef TRI_ENABLE_ZONE_DEBUG
|
||||
#ifdef TRI_ENABLE_MAINTAINER_MODE
|
||||
p -= sizeof(uintptr_t);
|
||||
|
||||
if (* (uintptr_t*) p != zone->_zid) {
|
||||
|
@ -309,14 +309,14 @@ void* TRI_Reallocate (TRI_memory_zone_t* zone, void* m, uint64_t n) {
|
|||
(int) zone->_zid
|
||||
ZONE_DEBUG_PARAMS);
|
||||
|
||||
#ifdef TRI_ENABLE_ZONE_DEBUG
|
||||
#ifdef TRI_ENABLE_MAINTAINER_MODE
|
||||
return TRI_ReallocateZ(zone, m, n, file, line);
|
||||
#else
|
||||
return TRI_Reallocate(zone, m, n);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef TRI_ENABLE_ZONE_DEBUG
|
||||
#ifdef TRI_ENABLE_MAINTAINER_MODE
|
||||
// zone->_zid is a uint32_t but we'll advance sizeof(uintptr_t) bytes for good alignment everywhere
|
||||
p += sizeof(uintptr_t);
|
||||
#endif
|
||||
|
@ -328,13 +328,13 @@ void* TRI_Reallocate (TRI_memory_zone_t* zone, void* m, uint64_t n) {
|
|||
/// @brief basic memory management for deallocate
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef TRI_ENABLE_ZONE_DEBUG
|
||||
#ifdef TRI_ENABLE_MAINTAINER_MODE
|
||||
void TRI_FreeZ (TRI_memory_zone_t* zone, void* m, char const* file, int line) {
|
||||
#else
|
||||
void TRI_Free (TRI_memory_zone_t* zone, void* m) {
|
||||
#endif
|
||||
|
||||
#ifdef TRI_ENABLE_ZONE_DEBUG
|
||||
#ifdef TRI_ENABLE_MAINTAINER_MODE
|
||||
char* p;
|
||||
|
||||
p = (char*) m;
|
||||
|
@ -366,13 +366,13 @@ void TRI_Free (TRI_memory_zone_t* zone, void* m) {
|
|||
/// by malloc et al
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef TRI_ENABLE_ZONE_DEBUG
|
||||
#ifdef TRI_ENABLE_MAINTAINER_MODE
|
||||
void TRI_SystemFreeZ (void* p, char const* file, int line) {
|
||||
#else
|
||||
void TRI_SystemFree (void* p) {
|
||||
#endif
|
||||
|
||||
#ifdef TRI_ENABLE_ZONE_DEBUG
|
||||
#ifdef TRI_ENABLE_MAINTAINER_MODE
|
||||
if (p == NULL) {
|
||||
LOG_ERROR("freeing nil ptr in %s:%d", file, line);
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ extern TRI_memory_zone_t* TRI_CORE_MEM_ZONE;
|
|||
/// @brief unknown memory zone
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef TRI_ENABLE_ZONE_DEBUG
|
||||
#ifdef TRI_ENABLE_MAINTAINER_MODE
|
||||
#define TRI_UNKNOWN_MEM_ZONE TRI_UnknownMemZoneZ(__FILE__,__LINE__)
|
||||
TRI_memory_zone_t* TRI_UnknownMemZoneZ (char const* file, int line);
|
||||
#else
|
||||
|
@ -104,7 +104,7 @@ extern TRI_memory_zone_t* TRI_UNKNOWN_MEM_ZONE;
|
|||
/// @brief system memory allocation
|
||||
///
|
||||
/// This will not add the memory zone information even when compiled with
|
||||
/// --enable-zone-debug.
|
||||
/// --enable-maintainer-mode.
|
||||
/// Internally, this will call just malloc, and probably memset.
|
||||
/// Using this function instead of malloc/memset allows us to track all memory
|
||||
/// allocations easier.
|
||||
|
@ -116,7 +116,7 @@ void* TRI_SystemAllocate (uint64_t, bool);
|
|||
/// @brief basic memory management for allocate
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef TRI_ENABLE_ZONE_DEBUG
|
||||
#ifdef TRI_ENABLE_MAINTAINER_MODE
|
||||
#define TRI_Allocate(a,b,c) TRI_AllocateZ((a),(b),(c),__FILE__,__LINE__)
|
||||
void* TRI_AllocateZ (TRI_memory_zone_t*, uint64_t, bool, char const* file, int line);
|
||||
#else
|
||||
|
@ -127,7 +127,7 @@ void* TRI_Allocate (TRI_memory_zone_t*, uint64_t, bool);
|
|||
/// @brief basic memory management for reallocate
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef TRI_ENABLE_ZONE_DEBUG
|
||||
#ifdef TRI_ENABLE_MAINTAINER_MODE
|
||||
#define TRI_Reallocate(a,b,c) TRI_ReallocateZ((a),(b),(c),__FILE__,__LINE__)
|
||||
void* TRI_ReallocateZ (TRI_memory_zone_t*, void*, uint64_t, char const* file, int line);
|
||||
#else
|
||||
|
@ -138,7 +138,7 @@ void* TRI_Reallocate (TRI_memory_zone_t*, void*, uint64_t);
|
|||
/// @brief basic memory management for deallocate
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef TRI_ENABLE_ZONE_DEBUG
|
||||
#ifdef TRI_ENABLE_MAINTAINER_MODE
|
||||
#define TRI_Free(a,b) TRI_FreeZ((a),(b),__FILE__,__LINE__)
|
||||
void TRI_FreeZ (TRI_memory_zone_t*, void*, char const* file, int line);
|
||||
#else
|
||||
|
@ -151,10 +151,10 @@ void TRI_Free (TRI_memory_zone_t*, void*);
|
|||
/// this can be used to free memory that was not allocated by TRI_Allocate, but
|
||||
/// by system functions as malloc et al. This memory must not be passed to
|
||||
/// TRI_Free because TRI_Free might subtract the memory zone from the original
|
||||
/// pointer if compiled with --enable-zone-debug.
|
||||
/// pointer if compiled with --enable-maintainer-mode.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef TRI_ENABLE_ZONE_DEBUG
|
||||
#ifdef TRI_ENABLE_MAINTAINER_MODE
|
||||
#define TRI_SystemFree(a) TRI_SystemFreeZ((a),__FILE__,__LINE__)
|
||||
void TRI_SystemFreeZ (void*, char const* file, int line);
|
||||
#else
|
||||
|
|
|
@ -906,7 +906,7 @@ TRI_vector_string_t TRI_Split2String (char const* source, char const* delim) {
|
|||
/// @brief frees a string
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef TRI_ENABLE_ZONE_DEBUG
|
||||
#ifdef TRI_ENABLE_MAINTAINER_MODE
|
||||
|
||||
void TRI_FreeStringZ (TRI_memory_zone_t* zone, char* value, char const* file, int line) {
|
||||
TRI_FreeZ(zone, value, file, line);
|
||||
|
|
|
@ -216,7 +216,7 @@ TRI_vector_string_t TRI_Split2String (char const* source, char const* delim);
|
|||
/// @brief frees a string
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef TRI_ENABLE_ZONE_DEBUG
|
||||
#ifdef TRI_ENABLE_MAINTAINER_MODE
|
||||
#define TRI_FreeString(a,b) TRI_FreeStringZ((a),(b),__FILE__,__LINE__)
|
||||
void TRI_FreeStringZ (TRI_memory_zone_t*, char*, char const* file, int line);
|
||||
#else
|
||||
|
|
|
@ -246,7 +246,7 @@ int SchedulerLibev::availableBackends () {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void SchedulerLibev::switchAllocator () {
|
||||
#ifdef TRI_ENABLE_ZONE_DEBUG
|
||||
#ifdef TRI_ENABLE_MAINTAINER_MODE
|
||||
static bool switched = false;
|
||||
|
||||
if (! switched) {
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
dnl -*- mode: Autoconf; -*-
|
||||
|
||||
dnl -----------------------------------------------------------------------------------------
|
||||
dnl option for zone debug
|
||||
dnl -----------------------------------------------------------------------------------------
|
||||
|
||||
AC_ARG_ENABLE(zone-debug,
|
||||
AS_HELP_STRING([--enable-zone-debug], [enables memory zone debugging (default: no)]),
|
||||
tr_ZONE_DEBUG="${enableval:-yes}",
|
||||
tr_ZONE_DEBUG=no
|
||||
)
|
||||
|
||||
if test "x$tr_ZONE_DEBUG" = xyes; then
|
||||
AC_DEFINE_UNQUOTED(TRI_ENABLE_ZONE_DEBUG, 1, [true if memory zone debug is enabled])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(ENABLE_ZONE_DEBUG, test "x$tr_ZONE_DEBUG" = xyes)
|
||||
|
||||
dnl -----------------------------------------------------------------------------------------
|
||||
dnl informational output
|
||||
dnl -----------------------------------------------------------------------------------------
|
||||
|
||||
if test "x$tr_ZONE_DEBUG" = xyes; then
|
||||
BASIC_INFO="$BASIC_INFO|ZONE_DEBUG: enabled"
|
||||
else
|
||||
BASIC_INFO="$BASIC_INFO|ZONE_DEBUG: disabled"
|
||||
fi
|
Loading…
Reference in New Issue