cleanup trace_register_hook()