1 USING: assocs help.markup help.syntax vm words ;
4 ARTICLE: "tools.gc-decode" "GC maps decoder"
5 "A vocab that disassembles words gc maps. It's useful to have when debugging garbage collection issues." ;
8 { $values { "word" word } { "gc-info" gc-info } }
9 { $description "Gets the gc-info struct for a word." } ;
12 { $values { "word" word } { "assoc" assoc } }
13 { $description "Main word of the vocab. Decodes the gc maps for a word into an assoc with the following format:"
15 "Each key is the return addess of a gc callsite (delta relative to the start of the code block)."
17 "Each value is a two-tuple where:"
19 "The first element is a five-tuple containing the scrub patterns for the datastack, retainstack, then the check patterns for them and gc roots."
20 "The second element is a sequence of derived roots for the callsite."
27 "USING: effects prettyprint ;"
28 "\\ <effect> decode-gc-maps ."
29 "{ { 151 { { ?{ } ?{ t t t } ?{ } ?{ } ?{ f t t t t } } { } } } }"
33 ABOUT: "tools.gc-decode"