• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: -finstrument-functions and program startup
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -finstrument-functions and program startup


  • Subject: Re: -finstrument-functions and program startup
  • From: Shawn Erickson <email@hidden>
  • Date: Thu, 29 Jan 2009 08:55:42 -0800

On Thu, Jan 29, 2009 at 6:09 AM, Karan, Cem (Civ, ARL/CISD)
<email@hidden> wrote:
> Greg Parker wrote on Wednesday, January 28, 2009 4:22 PM
>
>> On Jan 28, 2009, at 10:33 AM, Karan, Cem (Civ, ARL/CISD) wrote:
>> > First off, I know this question is going to the wrong list,
>> but I have
>> > NO idea which list would be best.  If anyone wants to jump
>> in and tell
>> > me a better list, I'll gladly move there.
>> >
>> > Background:
>> > I have an application that is working very, very hard to drive me
>> > insane.  It is multithreaded, lazy, and has my broken attempt at
>> > trampoline code.  Now, it crashes once in a while, but I'm not sure
>> > what the trail of broken bits are that causes the crash.  If only I
>> > had a way of instrumenting every single entry and exit of each
>> > function, I could log it all… which is exactly what -finstrument-
>> > functions does.
>>
>> You'll likely get better results from dtrace than
>> -finstrument- functions. DTrace can be programmed to act on
>> function entry or exit for all functions in a specified file.
>> (DTrace experts: this is your cue to chime in.)
>
> I thought DTrace was primarily statistical in nature, right?

DTrace is probe based. If a probe exists and is enabled it will fire
and allow you to collect information.

For example try the following in terminal...

sudo dtrace -n 'syscall:::entry'

With that said you need a provider that provides the probe points that
you need. Apple has implemented many providers in 10.5. For example
you can probe many aspects of message dispatch in the objective-c
runtime or syscalls without any need to instrument your code. In
terminal run "sudo dtrace -l" to see a list of providers in the
system.

I don't believe an Apple provider exist (or can exist) for general
probing of C++ or C function entry and exit. You will have to
instrument C++ methods and C function (aka make your own provider) to
be able to use DTrace for what I think you are attempting to do.

-Shawn
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: -finstrument-functions and program startup
      • From: Benjamin Stiglitz <email@hidden>
    • RE: -finstrument-functions and program startup
      • From: "Karan, Cem (Civ, ARL/CISD)" <email@hidden>
References: 
 >-finstrument-functions and program startup (From: "Karan, Cem (Civ, ARL/CISD)" <email@hidden>)
 >Re: -finstrument-functions and program startup (From: Greg Parker <email@hidden>)
 >RE: -finstrument-functions and program startup (From: "Karan, Cem (Civ, ARL/CISD)" <email@hidden>)

  • Prev by Date: Re: NSView behaves different on 10.4 vs 10.5?
  • Next by Date: Re: change NSBorderlessWindowMask on NSTitledWindowMask when app is launch. how?
  • Previous by thread: RE: -finstrument-functions and program startup
  • Next by thread: RE: -finstrument-functions and program startup
  • Index(es):
    • Date
    • Thread