Adapt ENGINE_REF_COUNT_DEBUG to the new generic trace API