Called by
annotate and
annotate-top to wrap
expressions with
with-continuation-mark. The first argument
is the source expression, the second argument is the expression to
be wrapped, and the last is the phase level of the expression.
Determines if the test coverage annotation is inserted into the code.
This parameter controls how compilation happens—
it does not affect the
dynamic behavior of the already compiled code. If the parameter is set,
code generated by
test-covered are inserted into the code (and
initialize-test-coverage-point is called during compilation).
If not, no calls to
test-covered code are inserted.
If the result is #f, this program point is not instrumented. If
the result is syntax, it is inserted into the code, and if it is a
thunk, the thunk is inserted into the code in an application (using the
thunk directly, as a 3D value). In either case, the syntax or the thunk
should register that the relevant point was covered.
Note: using a thunk tends to be slow. Current uses in the Racket code
will create a mutable pair in initialize-test-coverage-point,
and test-covered returns syntax that will set its mcar. (This
makes the resulting overhead about 3 times smaller.)
During compilation of the program, this function is called with each
sub-expression of the program. The argument is the syntax of this program
point, which is usually used as a key to identify this program point.
Only used for profiling paths.
Determines if profiling information is currently collected (affects
the behavior of compiling the code—does not affect running code).
If this always returns #f, the other profiling functions are
never called.
Called as the program is compiled for each profiling point that
might be encountered during the program’s execution. The first
argument is a key identifying this code. The second argument is the
inferred name at this point and the final argument is the syntax of
this expression.
Called when some profiled code is about to be executed. If the
result is a number, it is expected to be the current number of
milliseconds.
key is unique to this fragment of code—
it is
the same key passed to
initialize-profile-point for this code
fragment.
This function is called when some profiled code is finished executing.
Note that register-profile-start and
register-profile-done can be called in a nested manner; in
this case, the result of register-profile-start should be
#f.