trace: add some tcg tracing support