diff options
author | Bryce McKinlay <bryce@waitaki.otago.ac.nz> | 2001-05-21 08:35:14 +0000 |
---|---|---|
committer | Bryce McKinlay <bryce@gcc.gnu.org> | 2001-05-21 09:35:14 +0100 |
commit | 9110a741e35c54e46c00662ddc420575376c5947 (patch) | |
tree | 67e9db3b367c46dfbcccda8278d06da72494187d /boehm-gc/include | |
parent | a6951ca5dee8ed05749cdc697767910aebaedcc0 (diff) | |
download | gcc-9110a741e35c54e46c00662ddc420575376c5947.zip gcc-9110a741e35c54e46c00662ddc420575376c5947.tar.gz gcc-9110a741e35c54e46c00662ddc420575376c5947.tar.bz2 |
Imported version version 6.0alpha7.
* README, README.Mac, README.OS2, README.QUICK, README.alpha,
README.amiga, README.debugging, README.dj, README.hp, README.linux,
README.rs6000, README.sgi, README.solaris2, README.uts,
README.win32, SCoptions.amiga, backptr.h, barrett_diagram,
dbg_mlc.h, gc.h, gc.man, gc_alloc.h, gc_cpp.h, gc_hdrs.h, gc_mark.h,
gc_priv.h, gc_private.h, gc_typed.h, gcconfig.h,
hpux_irix_threads.c, makefile.depend, nursery.c,
solaris_threads.h, test.c, test_cpp.cc, weakpointer.h, cord/README,
cord/SCOPTIONS.amiga, cord/SMakefile.amiga, cord/cord.h,
cord/ec.h, cord/gc.h, cord/private/cord_pos.h, include/backptr.h,
include/gc_copy_descr.h, include/gc_nursery.h: Remove obsolete/moved
files.
From-SVN: r42379
Diffstat (limited to 'boehm-gc/include')
-rw-r--r-- | boehm-gc/include/backptr.h | 63 | ||||
-rw-r--r-- | boehm-gc/include/gc_copy_descr.h | 26 | ||||
-rw-r--r-- | boehm-gc/include/gc_nursery.h | 90 | ||||
-rw-r--r-- | boehm-gc/include/private/gc_pmark.h | 10 |
4 files changed, 7 insertions, 182 deletions
diff --git a/boehm-gc/include/backptr.h b/boehm-gc/include/backptr.h deleted file mode 100644 index f5b7c5a..0000000 --- a/boehm-gc/include/backptr.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * This is a simple API to implement pointer back tracing, i.e. - * to answer questions such as "who is pointing to this" or - * "why is this object being retained by the collector" - * - * This API assumes that we have an ANSI C compiler. - * - * Most of these calls yield useful information on only after - * a garbage collection. Usually the client will first force - * a full collection and then gather information, preferably - * before much intervening allocation. - * - * The implementation of the interface is only about 99.9999% - * correct. It is intended to be good enough for profiling, - * but is not intended to be used with production code. - * - * Results are likely to be much more useful if all allocation is - * accomplished through the debugging allocators. - * - * The implementation idea is due to A. Demers. - */ - -/* Store information about the object referencing dest in *base_p */ -/* and *offset_p. */ -/* If multiple objects or roots point to dest, the one reported */ -/* will be the last on used by the garbage collector to trace the */ -/* object. */ -/* source is root ==> *base_p = address, *offset_p = 0 */ -/* source is heap object ==> *base_p != 0, *offset_p = offset */ -/* Returns 1 on success, 0 if source couldn't be determined. */ -/* Dest can be any address within a heap object. */ -typedef enum { GC_UNREFERENCED, /* No reference info available. */ - GC_NO_SPACE, /* Dest not allocated with debug alloc */ - GC_REFD_FROM_ROOT, /* Referenced directly by root *base_p */ - GC_REFD_FROM_REG, /* Referenced from a register, i.e. */ - /* a root without an address. */ - GC_REFD_FROM_HEAP, /* Referenced from another heap obj. */ - GC_FINALIZER_REFD /* Finalizable and hence accessible. */ -} GC_ref_kind; - -GC_ref_kind GC_get_back_ptr_info(void *dest, void **base_p, size_t *offset_p); - -/* Generate a random heap address. */ -/* The resulting address is in the heap, but */ -/* not necessarily inside a valid object. */ -void * GC_generate_random_heap_address(void); - -/* Generate a random address inside a valid marked heap object. */ -void * GC_generate_random_valid_address(void); - -/* Force a garbage collection and generate a backtrace from a */ -/* random heap address. */ -/* This uses the GC logging mechanism (GC_printf) to produce */ -/* output. It can often be called from a debugger. The */ -/* source in dbg_mlc.c also serves as a sample client. */ -void GC_generate_random_backtrace(void); - -/* Print a backtrace from a specific address. Used by the */ -/* above. The client should call GC_gcollect() immediately */ -/* before invocation. */ -void GC_print_backtrace(void *); - - diff --git a/boehm-gc/include/gc_copy_descr.h b/boehm-gc/include/gc_copy_descr.h deleted file mode 100644 index 212c99e..0000000 --- a/boehm-gc/include/gc_copy_descr.h +++ /dev/null @@ -1,26 +0,0 @@ - -/* - * Copyright (c) 1999 by Silicon Graphics. All rights reserved. - * - * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED - * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. - * - * Permission is hereby granted to use or copy this program - * for any purpose, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - */ -/* Descriptor for allocation request. May be redefined by client. */ -typedef struct { - GC_word bitmap; /* Bitmap describing pointer locations. */ - /* High order bit correspond to 0th */ - /* word. 2 lsbs must be 0. */ - size_t length; /* In bytes, must be multiple of word */ - /* size. Must be >0, <= 512 */ -} * GC_copy_descriptor; - -/* The collector accesses descriptors only through these two macros. */ -#define GC_SIZE_FROM_DESCRIPTOR(d) ((d) -> length) -#define GC_BIT_MAP_FROM_DESCRIPTOR(d) ((d) -> bitmap) - diff --git a/boehm-gc/include/gc_nursery.h b/boehm-gc/include/gc_nursery.h deleted file mode 100644 index d109ff0..0000000 --- a/boehm-gc/include/gc_nursery.h +++ /dev/null @@ -1,90 +0,0 @@ - -/* - * Copyright (c) 1999 by Silicon Graphics. All rights reserved. - * - * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED - * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. - * - * Permission is hereby granted to use or copy this program - * for any purpose, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - */ - -/* - * THIS IMPLEMENTATION FOR THIS INTERFACE IS INCOMPLETE. - * NONE OF THIS HAS BEEN TESTED. DO NOT USE. - * - * Comments on the interface are appreciated, especially from - * potential users of the interface. - * - * This is a Bartlett style copying collector for young objects. - * We assume for now that all objects allocated through this - * mechanism have pointers only in the first BITMAP_BITS words. - * (On a 32-bit machine, BITMAP_BITS is 30.) - * Objects allocated in this manner should be rarely referenced - * by objects not allocated either through this interface, or through - * the typed allocation interface. - * If this interface is used, we assume that type information provided - * through either this or the typed allocation interface is valid - * in a stronger sense: - * - * 1) No pointers are stored in fields not marked as such. - * (Otherwise it is only necessary that objects referenced by - * fields marked as nonpointers are also reachable via another - * path.) - * 2) Values stored in pointer fields are either not addresses in - * the heap, or they really are pointers. In the latter case, it - * is acceptable to move the object they refer to, and to update - * the pointer. - * - * GC_free may not be invoked on objects allocated with GC_copying_malloc. - * - * No extra space is added to the end of objects allocated through this - * interface. If the client needs to maintain pointers past the - * end, the size should be explicitly padded. - * - * We assume that calls to this will usually be compiler generated. - * Hence the interface is allowed to be a bit ugly in return for speed. - */ - -#include "gc_copy_descr.h" - -/* GC_copy_descr.h must define */ -/* GC_SIZE_FROM_DESCRIPTOR(descr) and */ -/* GC_BIT_MAP_FROM_DESCRIPTOR(descr). */ -/* It may either be the GC supplied version of the header file, or a */ -/* client specific one that derives the information from a client- */ -/* specific type descriptor. */ - -typedef GC_PTR GC_copy_alloc_state; - /* Current allocator state. */ - /* Multiple allocation states */ - /* may be used for concurrent */ - /* allocation, or to enhance */ - /* locality. */ - /* Should be treated as opaque. */ - -/* Allocate a memory block of size given in the descriptor, and with */ -/* pointer layout given by the descriptor. The resulting block may not */ -/* be cleared, and should immediately be initialized by the client. */ -/* (A concurrent GC may see an uninitialized pointer field. If it */ -/* points outside the nursery, that's fine. If it points inside, it */ -/* may retain an object, and be relocated. But that's also fine, since */ -/* the new value will be immediately overwritten. */ -/* This variant acquires the allocation lock, and uses a default */ -/* global allocation state. */ -GC_PTR GC_copying_malloc(GC_copy_descriptor); - -/* A variant of the above that does no locking on the fast path, */ -/* and passes an explicit pointer to an allocation state. */ -/* The allocation state is updated. */ -/* There will eventually need to be a macro or inline function version */ -/* of this. */ -GC_PTR GC_copying_malloc2(GC_copy_descriptor, GC_copy_alloc_state *); - -/* Initialize an allocation state so that it can be used for */ -/* allocation. This implicitly reserves a small section of the */ -/* nursery for use with this allocator. */ -void GC_init_copy_alloc_state(GC_copy_alloc_state *); diff --git a/boehm-gc/include/private/gc_pmark.h b/boehm-gc/include/private/gc_pmark.h index 1592b6f..0eec533 100644 --- a/boehm-gc/include/private/gc_pmark.h +++ b/boehm-gc/include/private/gc_pmark.h @@ -132,9 +132,14 @@ extern mse * GC_mark_stack; */ #endif /* PARALLEL_MARK */ -ptr_t GC_find_start(); +# ifdef PRINT_BLACK_LIST + ptr_t GC_find_start(ptr_t current, hdr *hhdr, word source); +# else + ptr_t GC_find_start(ptr_t current, hdr *hhdr); +# define source 0 +# endif -mse * GC_signal_mark_stack_overflow(); +mse *GC_signal_mark_stack_overflow(mse *msp); # ifdef GATHERSTATS # define ADD_TO_ATOMIC(sz) GC_atomic_in_use += (sz) @@ -245,7 +250,6 @@ exit_label2: ; \ # define SET_MARK_BIT_EXIT_IF_SET(hhdr,displ,exit_label) \ { \ register word * mark_word_addr = hhdr -> hb_marks + divWORDSZ(displ); \ - register word mark_word = *mark_word_addr; \ \ OR_WORD_EXIT_IF_SET(mark_word_addr, (word)1 << modWORDSZ(displ), \ exit_label); \ |