开发者

how do you build DTrace on Mac OS X?

I'm trying to build the dtrace target in the Xcode project using the advice here:

http://osx86.b开发者_如何学Coeaja.info/2009/10/building-xnu-kernel-on-snow-leopard/

But I get: libproc.m:24:49: error: CoreSymbolication/CoreSymbolication.h: No such file or directory

I realize CoreSymbolication is a private framework, but Apple must make this header available somewhere in order for me to build dtrace, right? Can someone point me to the necessary files to build dtrace?


As you probably figured out, Apple only has to release parts of the kernel which are taken from other open-source projects, and that doesn't include the userland libraries that they build on top of the kernel. CoreSymbolication/CoreSymbolication.h sounds a lot like a userspace header for Obj-C though, so you can probably build the kernel DTrace utilities without it. (Although I could very well be wrong.)

I would guess it's being used for symbol identification in the userland dtrace(1m) command. If only there was a tool that could help us figure this out... :-D

# dtrace -n 'pid$target:CoreSymbolication::entry {}' -c 'dtrace -ln syscall::write:entry'
dtrace: description 'pid$target:CoreSymbolication::entry ' matched 246 probes
   ID   PROVIDER            MODULE                          FUNCTION NAME
  147    syscall                                               write entry
dtrace: pid 88089 has exited
CPU     ID                    FUNCTION:NAME
  2   6538 CSSymbolOwnerGetRegionWithName:entry 
  2   5014 CSSymbolOwnerForeachRegionWithName:entry 
  2   5078      CSRegionForeachSymbol:entry 
  2   6495 CSSymbolicatorGetSymbolOwnerWithUUIDAtTime:entry 
  2   6493 CSSymbolicatorForeachSymbolOwnerWithUUIDAtTime:entry 
  2   6494 CSSymbolicatorForeachSymbolOwnerWithCFUUIDBytesAtTime:entry 
  2   5048  CSSymbolOwnerGetDataFlags:entry 
  2   6538 CSSymbolOwnerGetRegionWithName:entry 
  2   5014 CSSymbolOwnerForeachRegionWithName:entry 
  2   5078      CSRegionForeachSymbol:entry 
  2   5092         CSSymbolIsExternal:entry 
  2   5092         CSSymbolIsExternal:entry
  ...

It looks like the library is in use by the dtrace command, anyway.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜