6c556002d8
scratch_used_large_ was uninitialized leading to the observed hang. DynamicScratchHandler would wait for a large scratch release despite no large scratch having yet been allocated. Fixes . The patch also removes a potential race between AddScratchNotifier and ReleaseQueueScratch. The race condition does not exist today since both scratch alloc and release run on the same thread. The changes will prevent this potential race from manifesting if the async event handler is ever updated to use multiple threads. Also enhances scratch occupancy reduction reporting. Reporting now prints the initial request size as well as the allocated size and the effect on occupancy this has. Occupancy is computed in terms of the requesting dispatch grid size so may be >100%. Change-Id: I0fc5ee01467ff4c29bdd25d545177c97862c3bd9