refactor trace_recorder_abort and trace_invoke to support blacklist