Note to self: the trace hook never appears to be called, so this is likely broken.