Disassemble the compiled body of closure and print it.
It may not be very useful unless you’re tracking a compiler bug,
or trying to tune the program to its limit.

If you’re reading the disassembler output, keep in mind that
the compiled code vector may have some dead code; they are produced
by the jump optimization, but the compiler doesn’t bother to eliminate
them.

Function: debug-labelobj

This returns a string that is quasi-unique to an object obj.
“Quasi-unique” means the label is unique to the obj—
the same (eq?) objs returns the same string, and
if two objs return different string they aren’t eq? to each other—
until next GC occurs.

This is mostly for printing out anonymous objects that doesn’t
have any other good way to distinguish each other.
Note that uniqueness isn’t guaranteed
across GCs, you shouldn’t use the returned value as the key to identify
the objects.

6.26.2 Profiler API

These are the functions to control Gauche’s built-in profiler.
See Using profiler for the explanation of the profiler.

Note that the profiler isn’t guaranteed to work correctly yet in
multi-threaded program, since the interaction between setitimer
and threads are platform-dependent.

Function: profiler-start

Starts the sampling profiler. If the profiler is already started,
nothing is done.

Function: profiler-stop

Stop the sampling profiler, and save the sampled data into
the internal structure. If there are already saved sampled data,
the newly obtained data is added to it.
If the profiler isn’t running, nothing is done.

Function: profiler-reset

Stop the profiler if it is running. Then discard the
saved sampled data.

Function: profiler-show:key sort-by max-rows

Show the saved sampled data.

The keyword argument sort-by may be one of the symbols
time, count, or time-per-call, to specify
how the result should be sorted. The default is time.

The keyword argument max-rows specifies the max number of
rows to be shown. If it is #f, all the data is shown.

Function: with-profilerthunk

A convenience procedure.
Call thunk with the sampling profiler running,
and show the result to the current output port afterwards.
Returns value(s) thunk yields.
The profiler is reset after the result is shown.

You can’t nest this construct; the innermost with-profiler
will reset the profiler, invalidates any outer with-profiler.