[in progress] Instrumentation && more sync primitives && trace

Done.