From: Ivan Maidanski Date: Fri, 28 Oct 2016 21:23:02 +0000 (+0300) Subject: Export GC_dump_finalization/regions() X-Git-Tag: v8.0.0~1057 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c8286c0010b139687bc54797d297bf09fc241506;p=platform%2Fupstream%2Flibgc.git Export GC_dump_finalization/regions() Note: these 2 functions are not used by GC itself. * allchblk.c [!NO_DEBUGGING] (GC_dump_regions): Turn into a public definition (add GC_API+GC_CALL). * finalize.c [!NO_DEBUGGING] (GC_dump_finalization): Likewise. * include/gc.h (GC_dump_regions, GC_dump_finalization): New public API prototype. --- diff --git a/allchblk.c b/allchblk.c index 2c1061e..90331dc 100644 --- a/allchblk.c +++ b/allchblk.c @@ -167,7 +167,7 @@ static int free_list_index_of(hdr *wanted) return -1; } -void GC_dump_regions(void) +GC_API void GC_CALL GC_dump_regions(void) { unsigned i; diff --git a/finalize.c b/finalize.c index dc03d22..9f03f81 100644 --- a/finalize.c +++ b/finalize.c @@ -807,7 +807,7 @@ GC_API void GC_CALL GC_register_finalizer_unreachable(void * obj, } } - void GC_dump_finalization(void) + GC_API void GC_CALL GC_dump_finalization(void) { struct finalizable_object * curr_fo; size_t fo_size = log_fo_table_size == -1 ? 0 : diff --git a/include/gc.h b/include/gc.h index 2041f62..7846314 100644 --- a/include/gc.h +++ b/include/gc.h @@ -1518,6 +1518,15 @@ GC_API void * GC_CALL GC_is_valid_displacement(void * /* p */); /* Defined only if the library has been compiled without NO_DEBUGGING. */ GC_API void GC_CALL GC_dump(void); +/* Dump information about each block of every GC memory section. */ +/* Defined only if the library has been compiled without NO_DEBUGGING. */ +GC_API void GC_CALL GC_dump_regions(void); + +/* Dump information about every registered disappearing link and */ +/* finalizable object. */ +/* Defined only if the library has been compiled without NO_DEBUGGING. */ +GC_API void GC_CALL GC_dump_finalization(void); + /* Safer, but slow, pointer addition. Probably useful mainly with */ /* a preprocessor. Useful only for heap pointers. */ /* Only the macros without trailing digits are meant to be used */