Permalink
Browse files

add a queue-enqueue probe

  • Loading branch information...
1 parent be7a0d4 commit b915ed9cef6c0e3bb6216711d7120118d15c7424 @postwait postwait committed Oct 25, 2012
Showing with 9 additions and 0 deletions.
  1. +2 −0 fq_dtrace.d
  2. +7 −0 fqd_queue.c
View
@@ -54,6 +54,8 @@ provider fq {
(fq_queue_t *q, fq_msg_t *m);
probe queue__block(fq_dtrace_queue_t *q, fq_dtrace_msg_t *m) :
(fq_queue_t *q, fq_msg_t *m);
+ probe queue__enqueue(fq_dtrace_queue_t *q, fq_dtrace_msg_t *m) :
+ (fq_queue_t *q, fq_msg_t *m);
probe config__rotate(int);
probe message__receive(fq_dtrace_remote_client_t *c,
fq_dtrace_remote_data_client_t *d,
View
@@ -86,6 +86,13 @@ fqd_queue_enqueue(fqd_queue *q, fq_msg *m, int *dropped) {
}
}
ck_pr_inc_32(&q->backlog);
+ if(FQ_QUEUE_ENQUEUE_ENABLED()) {
+ fq_dtrace_msg_t dm;
+ fq_dtrace_queue_t dq;
+ DTRACE_PACK_MSG(&dm, m);
+ DTRACE_PACK_QUEUE(&dq, q);
+ FQ_QUEUE_ENQUEUE(&dq, &dm);
+ }
q->impl->enqueue(q->impl_data, m);
}
fq_msg *

0 comments on commit b915ed9

Please sign in to comment.