1. A computer-implemented method for reporting a synchronization event in a runtime system of a computer system, the method comprising: monitoring, in the runtime system of the computer system, a synchronization primitive that guards a shared data structure by allowing a single thread at a time to execute a critical section of code that requires use of the shared data structure; detecting a synchronization operation performed on the synchronization primitive by a particular thread in the runtime system that requested use of the synchronization primitive that guards the shared data structure; incrementing an enumerator for the synchronization primitive based on a release of the synchronization primitive that is in the inflated state while refraining from incrementing the enumerator for the release of the synchronization primitive in the deflated state, the inflated state occurring based on having at least two other threads awaiting use of the synchronization primitive, the deflated state occurring based on at most one thread using the synchronization primitive and having less than two other threads awaiting use of the synchronization primitive; and reporting, by a processor of the computer system, a synchronization event that includes data relating to the synchronization operation performed on the synchronization primitive that guards the shared data structure, the data being reported including a value of the enumerator for the synchronization primitive at a time the synchronization operation occurred.