From ed3479983db246f3126c12c441659ef6b8ed027e Mon Sep 17 00:00:00 2001 From: Hans Boehm Date: Sat, 28 Aug 2004 00:45:56 +0000 Subject: configure.ac: Handle --enable-gc-debug. * configure.ac: Handle --enable-gc-debug. * configure: Regenerate. * include/config.h.in (LIBGCJ_GC_DEBUG): Add. * boehm.cc: Include gc_mark.h, javaxfc.h, but no GC private files. Rearrange include file order. (GC_DEBUG): Set if LIBGCJ_GC_DEBUG is set. (GC_finalize_all, GC_debug_generic_malloc): Don't declare. (disable_gc_mutex): Delete along with all references. (_Jv_MarkObj, _Jv_MarkArray): Use public types, adjust for debug header size. (_Jv_AllocObj, _Jv_allocPtrFreeObj): Define out of line for debug case. (_Jv_AllocArray): Declare min_heap_addr only if needed. (gcj_describe_type_fn): New. (_Jv_InitGC): Use GC_new_free_list, GC_new_proc, and GC_new_kind. Register gcj_describe_type_fn. * include/boehm-gc.h: (_Jv_AllocObj, _Jv_allocPtrFreeObj): Don't define, but declare, for debug case. * java/lang/natObject.cc: (GC_DEBUG): Define if LIBGCJ_GC_DEBUG is set. From-SVN: r86686 --- libjava/include/boehm-gc.h | 12 ++++++++++++ libjava/include/config.h.in | 3 +++ 2 files changed, 15 insertions(+) (limited to 'libjava/include') diff --git a/libjava/include/boehm-gc.h b/libjava/include/boehm-gc.h index 4e0065f..fa2623b 100644 --- a/libjava/include/boehm-gc.h +++ b/libjava/include/boehm-gc.h @@ -35,6 +35,8 @@ extern "C" void * GC_local_gcj_malloc(size_t, void *); extern "C" void * GC_local_malloc_atomic(size_t); #endif +#ifndef LIBGCJ_GC_DEBUG + inline void * _Jv_AllocObj (jsize size, jclass klass) { @@ -67,6 +69,16 @@ _Jv_AllocPtrFreeObj (jsize size, jclass klass) return obj; } +#else /* LIBGCJ_GC_DEBUG */ + +void * +_Jv_AllocObj (jsize size, jclass klass); + +void * +_Jv_AllocPtrFreeObj (jsize size, jclass klass); + +#endif /* LIBGCJ_GC_DEBUG */ + // _Jv_AllocBytes (jsize size) should go here, too. But clients don't // usually include this header. diff --git a/libjava/include/config.h.in b/libjava/include/config.h.in index bb52dbc..0429517 100644 --- a/libjava/include/config.h.in +++ b/libjava/include/config.h.in @@ -366,6 +366,9 @@ /* Indicate that linker is not able to 8-byte align static data */ #undef JV_LINKER_CANNOT_8BYTE_ALIGN_STATICS +/* Define if we want to use debug calls into the garbage collector. */ +#undef LIBGCJ_GC_DEBUG + /* Define if using POSIX threads on Linux. */ #undef LINUX_THREADS -- cgit v1.1