ALLOC_ENGINE_Vx_ALLOC_FAIL_CLASSES message does not make sense
The ALLOC_ENGINE_V4_ALLOC_FAIL_CLASSES message (and soon ALLOC_ENGINE_V6_ALLOC_FAIL_CLASSES message and associated counters) is triggered by a failed allocation for a query which has at least one class. As all queries are members of the ALL classes this does not make sense. Same for the KNOWN and UNKNOWN classes which are commonly used as guards too.
Note that to print classes is not a bad idea, the issue is only the assumption classes are related to the allocation failure.