Re: shark and kernel/driver profiling
Re: shark and kernel/driver profiling
- Subject: Re: shark and kernel/driver profiling
- From: Andrew Gallatin <email@hidden>
- Date: Mon, 26 Feb 2007 16:15:37 -0500 (EST)
Garth Cummings writes:
> Hi Drew,
>
> On Feb 23, 2007, at 2:22 PM, Andrew Gallatin wrote:
>
> >
> > Garth Cummings writes:
> >> I wonder if the copy of the driver in the same directory as the .sym
> >> file has its symbols stripped. Was it built using the debug or the
> >> release Xcode configuration?
> >
> > Neither.. I build it from the command line, using a Makefile. It has
> > been a while since I extracted xcode's idea of debug or release
> > cflags.
> > The optimization/debugging flags I use are -O2 -g2.
>
> I'd be more interested in your use of the strip command. That's what
> will remove symbols from the KEXT binary.
That's easy. I don't strip it at all. All I do is link
and then lipo the ppc and i386 binaries together.
> >
> > Gdb can easily print source addresses from this .sym file.
>
> Based on the Shark docs it looks like the symbols have to be in the
> KEXT binary. You can confirm this by running nm on the binary.
There are symbols:
% nm myri10ge.kext/Contents/MacOS/myri10ge | grep ' T' | wc -l
73
BTW, what happened to "file" on darwin/macosx? Didn't it used to say
"stripped" or "not stripped" like it does on BSD, Linux and Solaris,
and in the examples section of the file(1) man page? Or does that
(stripped, !stripped) detection only work on ELF and a.out binaries,
and not Mach-o?
> >
> > Oh well, maybe I'll just wait for dtrace in leopard before I
> > profile anything.
>
> Naw, this should work. I tried getting a time profile of everything
> using the 10.4.8 Kernel Debug Kit. Shark definitely was able to find
> symbols in IOUSBFamily, but I didn't have time to see if those
> symbols were only available from the KDK. I'll take another stab at
> this on Monday.
Thanks. I know that I used shark in the distant past with a different
project using (10.3, ppc), and I don't remember having many problems
getting symols, other than remembering to point the search paths at my
kext.
Drew
_______________________________________________
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