[scheduling] Locking and debug output for schedulers.
[engine] Add comment to perf output race hack.