kdebug_chudhook: need finer grained kdebug
kdebug_chudhook: need finer grained kdebug
- Subject: kdebug_chudhook: need finer grained kdebug
- From: Robert Kueffner <email@hidden>
- Date: Wed, 29 Nov 2006 10:36:42 +0100
Hi,
the kdebug trace facility provides kernel event logs via
typedef struct {
uint64_t timestamp;
unsigned int arg1;
unsigned int arg2;
unsigned int arg3;
unsigned int arg4;
unsigned int arg5; /* will hold current thread */
unsigned int debugid;
} kd_buf;
Logs sampled over some time interval are retrieved by existing commands
(sc_usage, latency etc) and a program described in Singh's OSX
internals, Fig 6-39. The value of the debugid-field denotes the
invocated function, corresponding names given in
/usr/share/misc/trace.codes
MY PROBLEM
1) I need to extract the particular parameters and returned values, say
in the case of MACH calls.
2) I need to perform actions immediately after starting/before
finishing an operation, instead of just processing logs
I found that (mig generated) messages requesting (as well as replying
to) the operations are also traced. arg1 & arg3 give the message
address in memory and its size. At the time logs are retrieved the
contents of these messages is most likely lost, though, so parameters
etc are not available.
SOLUTION?
A solution could be to register a kdebug_chudhook() callback to
retrieve the logs including the messages during their transmission. As
far as I understood, CHUD itself does not seem to export this.
(although chudMaxKDebugTraceSampleLimitCallback() sounds related, an
undocumented funtion from chudKDebugTrace.h)
Does anybody know how to register a kdebug_chudhook() callback?
(I am aware this would be a kernel context callback that must not be
messed up)
Is there a more straightforward solution?
Any help is greatly appreciated!
Thanks,
Robert
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden