Tracking high-water mark in an IODataQueue (DTrace probe in KEXT?)
Tracking high-water mark in an IODataQueue (DTrace probe in KEXT?)
- Subject: Tracking high-water mark in an IODataQueue (DTrace probe in KEXT?)
- From: Aaron Burghardt <email@hidden>
- Date: Thu, 25 Mar 2010 09:34:39 -0400
Hi,
We have a kext that uses an IODataQueue to send messages to a user-space agent, and we occasionally overrun the queue. To get an empirical idea of how large our queue needs to be, I created a dtrace instrument to track the current number of entries. My instrument keeps a global count which it increments when IODataQueue::enqueue is entered and which it decrements when a custom probe in our agent is fired. This approach was somewhat effective, but the base value appears to drift over time, so I think I am missing some probe points or events. Therefore, I would prefer to determine the number of entries directly from the queue rather than inferring it in the probe. I can think of two approaches:
1. Create a custom probe in the kext. This appears to be officially unsupported, so no amount of cajoling will get any assistance?
2. Implement a function for the agent to call into the kext so that I can at least get an accurate reading when the custom probe in the agent fires. I would miss enqueue events, so as the queue approached capacity, I may miss the point that it actually hits capacity. If the agent is stalled or slow to dequeue messages, the probe's last reading would be out-dated, but at least I would have an accurate reading when it did read it.
Any other suggestions unrelated to dtrace? (although, I do prefer a dtrace solution).
Thanks,
Aaron
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden