[Openmcl-devel] Cross-Referencing facility for OpenMCL

Gary Byers gb at clozure.com
Mon Dec 8 13:24:50 PST 2003

On Mon, 8 Dec 2003, Oliver Markovic wrote:

> Hi,
> Attached is a patch which adds cross-referencing abilities to OpenMCL.

Thanks.  I'll try to get this into the 0.14 CVS tree ASAP.

Note that there -is- a weaker built-in facility in OpenMCL:

(ccl::callers thing)

walks the heap, looking for compiled functions that reference THING as
a constant.  It's used to provide ILISP-CALLERS support in ILISP,
though I honestly don't know if that support even works (I can never
remember the keybinding, and it's generally easier to just type
(ccl::callers 'foo) in the listener.)

There are at least 4 problems with CCL::CALLERS that come to mind:

1) It's unexported/undocumented
2) Traversing the heap isn't too expensive if there are only a few MB
   of data in it; in a few years (when we're all running multiple-
   terabyte images on our G7s and complaining about the 56-bit
   ARRAY-TOTAL-SIZE-LIMIT) it might not look like such a good idea.
3) Traversing the heap isn't too expensive if no other threads are
   concurrently consing in it.  Otherwise, it's pretty expensive ...
4) The only question that it can really answer is "who references
   as a constant ?".

The good news is that CCL::CALLERS doesn't need to maintain a
database (compiled code in the image "is" the database), and doesn't
have to worry about that database retaining references to things
that'd otherwise be garbage.

According to my count, the bad associated with CCL:CALLERS seems
to outweigh the good; having the compiler maintain a database (as
your code does) seems like a better approach.

More information about the Openmcl-devel mailing list