Adding EventFlag to the trace shim.