Performance profiling and smart garbage collection.
alloc-countReturn the number of heap objects allocated.
Returns: INTEGER — Total heap allocations since last reset
eval-countReturn the number of eval invocations.
Returns: INTEGER — Total eval calls since last reset
tco-countReturn the number of tail-call optimizations performed.
Returns: INTEGER — Total tail-call optimizations since last reset
assoc-calls-countReturn the number of association list lookup operations.
Returns: INTEGER — Total alist lookup calls
assoc-steps-countReturn the total steps walked during alist lookups.
Returns: INTEGER — Total alist walk steps
sym-find-calls-countReturn the number of symbol lookup operations.
Returns: INTEGER — Total symbol-find calls
sym-find-steps-countReturn the total steps walked during symbol lookups.
Returns: INTEGER — Total symbol-find steps
gc-runs-countReturn the number of garbage collection runs.
Returns: INTEGER — Total GC mark/sweep cycles
bst-hits-countReturn the number of successful BST (binary search tree) lookups.
Returns: INTEGER — BST cache hits
bst-misses-countReturn the number of BST lookups that fell through to alist walk.
Returns: INTEGER — BST cache misses
profile-resetReset all performance counters to zero.
heap-collect-forceForce a full GC mark/sweep cycle, returning the number of objects freed.
Returns: INTEGER — Number of objects freed
heap-collectSmart GC: only collect when allocations since last run exceed surviving objects.
Returns: INTEGER — Number of objects freed, or 0 if skipped
profile-evals-maxReturn the largest eval count an object can hold.
Returns: INTEGER — The value an eval count stops at
profile-evalsReturn how many times evaluation reached an object.
Returns: INTEGER — Times evaluation reached obj, at most (profile-evals-max)
profile-treeSum the eval counts through a body or a form.
Returns: LIST — (evals nodes saturated): the counts summed, the pairs visited, and #t when a count was at its maximum
profile-fnReturn a function’s calls and the evaluation its body did, as a profiling engine counted them.
An operative’s calls are counted on its first form, so one whose body starts with a name or a constant reads 0 calls.
Returns: LIST — (calls evals nodes saturated), or nil when f has no body
profile-rowsReturn the calls and evaluation of every function on the heap, by the file and line its body starts on.
Returns: LIST — One (file line calls evals nodes saturated) row for each function body evaluation reached, in no order
profile-clear!Set the eval count of every object on the heap to zero, so that what is counted next belongs to what runs next.
Returns: NIL — nil
profile-reportPrint the n functions whose bodies evaluation reached most, most first.
A + after a row’s evals says a count in that body was at its maximum, so the sum is a lower bound.
Returns: ANY — nil
profile-snapshotReturn the profile counters and heap count as they stand, for profile-dump.
Returns: LIST — The heap count, then each profile counter
profile-dumpDump the profile counters and heap count to stderr, as they stand or as snap recorded them.