Skip to content

Commit

Permalink
timer: add debug log when scheduled
Browse files Browse the repository at this point in the history
  • Loading branch information
ywc689 committed Sep 6, 2019
1 parent 189d10a commit 33602b8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,14 @@ static int __dpvs_timer_sched(struct timer_scheduler *sched,

assert(timer && delay && handler);

/* just for debug */
if (unlikely((uint64_t)handler > 0x7ffffffffULL))
RTE_LOG(WARNING, DTIMER, "[%02d]: timer %p new handler possibly invalid: %p -> %p\n",
rte_lcore_id(), timer, timer->handler, handler);
if (unlikely(timer->handler && timer->handler != handler))
RTE_LOG(WARNING, DTIMER, "[%02d]: timer %p handler possibly changed maliciously: %p ->%p\n",
rte_lcore_id(), timer, timer->handler, handler);

if (timer_pending(timer))
RTE_LOG(WARNING, DTIMER, "schedule a pending timer ?\n");

Expand Down

0 comments on commit 33602b8

Please sign in to comment.