kdebug_chudhook: need finer grained kdebug
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com 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; Any help is greatly appreciated! Thanks, Robert _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... 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? This email sent to site_archiver@lists.apple.com
participants (1)
-
Robert Kueffner