Profiling code for both main and decoding threads.