Ideally, we would like to serialize Hierarchical Acquisition violations in a way that allows us to investigate and reproduce the violation. To that end, we want to know the Latch name and the ordering of violations. I propose the following opt-in section in serverStatus:
The top level "latchAnalysis" allows us to expand this segment with future statistics. The separation of "onAcquire" and "onRelease" into separate monotonically increasing counters will allow us to consider them as a pair to determine the period in which a potential deadlock happened as well as the total violations. This scheme deliberately leaves out the client name.