comparison src/README.kkcc @ 1598:ac1be85b4a5f

[xemacs-hg @ 2003-07-31 13:32:24 by crestani] 2003-07-29 Marcus Crestani <crestani@informatik.uni-tuebingen.de> Markus Kaltenbach <makalten@informatik.uni-tuebingen.de> * README.kkcc: Aligned to the changes. * alloc.c: Implemented the kkcc_gc_stack. (kkcc_gc_stack_init): (kkcc_gc_stack_free): (kkcc_gc_stack_realloc): (kkcc_gc_stack_full): (kkcc_gc_stack_empty): (kkcc_gc_stack_push): (kkcc_gc_stack_pop): (kkcc_gc_stack_push_lisp_object): (mark_object_maybe_checking_free): Push objects on kkcc stack instead of marking. (mark_struct_contents): Push objects on kkcc stack instead of marking. (kkcc_marking): KKCC mark algorithm using the kkcc_gc_stack. (mark_object): Removed KKCC ifdefs. (garbage_collect_1): Push objects on kkcc stack instead of marking. * data.c: Added XD_FLAG_NO_KKCC to ephemeron_description and to weak_list_description. * data.c (finish_marking_weak_lists): Push objects on kkcc stack instead of marking. (continue_marking_ephemerons): Push objects on kkcc stack instead of marking. (finish_marking_ephemerons): Push objects on kkcc stack instead of marking. * elhash.c (finish_marking_weak_hash_tables): Push objects on kkcc stack instead of marking. * eval.c: Added XD_FLAG_NO_KKCC to subr_description. * lisp.h: Added prototype for kkcc_gc_stack_push_lisp_object. * profile.c (mark_profiling_info_maphash): Push keys on kkcc stack instead of marking.
author crestani
date Thu, 31 Jul 2003 13:32:26 +0000
parents e22b0213b713
children 3889ef128488
comparison
equal deleted inserted replaced
1597:4b6ee17c5f37 1598:ac1be85b4a5f
1 2002-07-17 Marcus Crestani <crestani@informatik.uni-tuebingen.de> 1 2002-07-17 Marcus Crestani <crestani@informatik.uni-tuebingen.de>
2 Markus Kaltenbach <makalten@informatik.uni-tuebingen.de> 2 Markus Kaltenbach <makalten@informatik.uni-tuebingen.de>
3 Mike Sperber <mike@xemacs.org> 3 Mike Sperber <mike@xemacs.org>
4
5 updated 2003-07-29
4 6
5 New KKCC-GC mark algorithm: 7 New KKCC-GC mark algorithm:
6 configure flag : --use-kkcc 8 configure flag : --use-kkcc
7 9
8 For better understanding, first a few words about the mark algorithm 10 For better understanding, first a few words about the mark algorithm
9 up to now: 11 up to now:
10 Every Lisp_Object has its own mark method, which calls mark_object 12 Every Lisp_Object has its own mark method, which calls mark_object
11 with the stuff to be marked. 13 with the stuff to be marked.
12 Also, many Lisp_Objects have pdump descriptions, which are used by 14 Also, many Lisp_Objects have pdump descriptions memory_descriptions,
13 the portable dumper. The dumper gets all the information it needs 15 which are used by the portable dumper. The dumper gets all the
14 about the Lisp_Object from the descriptions. 16 information it needs about the Lisp_Object from the descriptions.
15 17
16 Also the garbage collector can use the information in the pdump 18 Also the garbage collector can use the information in the pdump
17 descriptions, so we can get rid of the mark methods. 19 descriptions, so we can get rid of the mark methods.
18 That is what we have been doing. 20 That is what we have been doing.
19 21
26 definition (DEFINE_LRECORD_IMPLEMENTATION). 28 definition (DEFINE_LRECORD_IMPLEMENTATION).
27 If it is set to 1, the dumper processes the descriptions and dumps 29 If it is set to 1, the dumper processes the descriptions and dumps
28 the Object, if it is set to 0, the dumper does not care about it. 30 the Object, if it is set to 0, the dumper does not care about it.
29 31
30 32
33 KKCC MARKING
34 ------------
35 All Lisp_Objects have memory_descriptions now, so we could get
36 rid of the mark_object calls.
37 The KKCC algorithm manages its own stack. Instead of calling
38 mark_object, all the alive Lisp_Objects are pushed on the
39 kkcc_gc_stack. Then these elements on the stack are processed
40 according to their descriptions.
41
42
31 TODO 43 TODO
32 ---- 44 ----
33 After all Lisp_Objects have pdump descriptions (THEY DO NOW!!), 45 - For weakness use weak datatypes instead of XD_FLAG_NO_KKCC.
34 (mark_with_description) can get rid of the mark_object calls. 46 XD_FLAG_NO_KKCC occurs in:
47 * elhash.c: htentry
48 * extents.c: lispobject_gap_array, extent_list, extent_info
49 * marker.c: marker
50 Not everything has to be rewritten. See Ben's comment in lrecord.h.
51 - Clean up special case marking (weak_hash_tables, weak_lists,
52 ephemerons).
53 - Stack optimization (have one stack during runtime instead of
54 malloc/free it for every garbage collect)
35 55
36
37 There are a few Lisp_Objects, where there occured differences and 56 There are a few Lisp_Objects, where there occured differences and
38 inexactness between the mark-method and the pdump description. All 57 inexactness between the mark-method and the pdump description. All
39 these Lisp_Objects get dumped (except image instances), so their 58 these Lisp_Objects get dumped (except image instances), so their
40 descriptions have been written, before we started our work: 59 descriptions have been written, before we started our work:
41
42 * alloc.c: lcrecord_list
43 description:
44 mark: performs extra gc_checking_assert() for various checks.
45
46 * alloc.c: cons
47 description: car and cdr
48 mark: cdr is marked, only if its != Qnil
49
50 * alloc.c: string 60 * alloc.c: string
51 description: ??? 61 description: size_, data_, and plist is described
52 mark: ??? 62 mark: only plist is marked, but flush_cached_extent_info is called.
53 63 flush_cached_extent_info ->
54 * buffer.c: buffer 64 free_soe ->
55 description: XD_LISP_OBJECT indirect_children 65 free_extent_list ->
56 mark: indirect_children not marked if Qnull_pointer 66 free_gap_array ->
57 67 gap_array_delete_all_markers ->
58 * eval.c: subr 68 Add gap_array to the gap_array_marker_freelist
59 description: XD_DOC_STRING doc
60 mark: empty, nothing is marked
61
62 * file-coding.c: coding_system
63 description: ???
64 mark: ???
65 69
66 * glyphs.c: image_instance 70 * glyphs.c: image_instance
67 description: 71 description: device is not set to nil
68 mark: mark method sets device to nil if dead 72 mark: mark method sets device to nil if dead
73 See comment above the description.