rcu: add additional debug logs
authorHonnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Wed, 22 Apr 2020 03:30:06 +0000 (22:30 -0500)
committerDavid Marchand <david.marchand@redhat.com>
Wed, 22 Apr 2020 18:46:00 +0000 (20:46 +0200)
Added additional debug logs. These helped in debugging RCU defer APIs.

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
lib/librte_rcu/rte_rcu_qsbr.h

index ca8c0ef..fd4eb52 100644 (file)
@@ -718,8 +718,15 @@ rte_rcu_qsbr_check(struct rte_rcu_qsbr *v, uint64_t t, bool wait)
        RTE_ASSERT(v != NULL);
 
        /* Check if all the readers have already acknowledged this token */
-       if (likely(t <= v->acked_token))
+       if (likely(t <= v->acked_token)) {
+               __RTE_RCU_DP_LOG(DEBUG,
+                       "%s: check: token = %"PRIu64", wait = %d",
+                       __func__, t, wait);
+               __RTE_RCU_DP_LOG(DEBUG,
+                       "%s: status: least acked token = %"PRIu64"",
+                       __func__, v->acked_token);
                return 1;
+       }
 
        if (likely(v->num_threads == v->max_threads))
                return __rte_rcu_qsbr_check_all(v, t, wait);