Add a trace_watchdog external function.