use cpp for tracing