]> gitweb.factorcode.org Git - factor.git/blob - extra/tools/gc-decode/gc-decode-docs.factor
tools.image-analyzer.*: support for callstack reading
[factor.git] / extra / tools / gc-decode / gc-decode-docs.factor
1 USING: assocs help.markup help.syntax vm words ;
2 IN: tools.gc-decode
3
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." ;
6
7 HELP: word>gc-info
8 { $values { "word" word } { "gc-info" gc-info } }
9 { $description "Gets the gc-info struct for a word." } ;
10
11 HELP: decode-gc-maps
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:"
14   { $list
15     "Each key is the return addess of a gc callsite (delta relative to the start of the code block)."
16     {
17         "Each value is a two-tuple where:"
18         { $list
19           "The first element is a three-tuple containing the scrub patterns for the datastack, retainstack and gc roots."
20           "The second element is a sequence of derived roots for the callsite."
21         }
22     }
23   }
24 }
25 { $examples
26   { $unchecked-example
27     "USING: effects prettyprint ;"
28     "\\ <effect> decode-gc-maps ."
29     "{ { 151 { { ?{ } ?{ t t t } ?{ } ?{ } ?{ f t t t t } } { } } } }"
30   }
31 } ;
32
33 ABOUT: "tools.gc-decode"