Re: dtrace return hook missing for some iokit funcs?
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com There are three ways this function can fail: (1) the new fails (you are out of kernel memory) -- Terry _______________________________________________ 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... On Apr 21, 2010, at 2:08 PM, Andrew Gallatin wrote: I'm trying to figure out why createMappingInTas is failing, so I wrote a simple dtrace script using self->follow=1 and dumping the args. But I can't neatly terminate it, because there is a dtrace fbt hook for _ZN18IOMemoryDescriptor19createMappingInTaskEP4taskymyy:entry but not _ZN18IOMemoryDescriptor19createMappingInTaskEP4taskymyy:return in 10.6.3 Eg: % sudo dtrace -l | grep MemoryDescriptor19createMappingInTask 3361 fbt mach_kernel _ZN18IOMemoryDescriptor19createMappingInTaskEP4taskymyy [IOMemoryDescriptor::createMappingInTask] entry % Is this intentional? Or just some optimization issue? It's an optimization issue; the code results in a tail call to makeMapping(), and it misses the return (basically, because there isn't one). If you failed to get a memory mapping via new IOMemoryMap, it also does this. (2) the mapping->init() fails; generally because the parameters are out of range (3) the makeMapping() fails; generally because the task you were trying to map it into is no more If you compile a DEBUG kernel, you will get an IOLog telling you more or less exactly what's going on. You can also dtrace the tail-called function return value for the functions involved, which would also get you the result code. This email sent to site_archiver@lists.apple.com
participants (1)
-
Terry Lambert