• 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: dtrace, profile and ustack
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dtrace, profile and ustack


  • Subject: Re: dtrace, profile and ustack
  • From: Wade Tregaskis <email@hidden>
  • Date: Mon, 24 Aug 2009 19:36:04 -0700

dtrace: script 'high.d' matched 2 probes
dtrace: allowing destructive actions
dtrace: error on enabled probe ID 1 (ID 36: profile:::profile-997): invalid address (0xbffff7c8) in action #2
dtrace: error on enabled probe ID 1 (ID 36: profile:::profile-997): invalid address (0xbfffca28) in action #2
dtrace: error on enabled probe ID 1 (ID 36: profile:::profile-997): invalid address (0xbfffcb58) in action #2

Any suggestions on how to avoid the non-paged memory errors above?

I'd recommend using Instruments and/or Shark for such profiles. The DTrace profile
probe cannot give you this information at this time, as ustack() is not effective from
the environment where profile probes get triggered. If I remember correctly
that's due to not being able to take page faults in that environment.

In fairness, Shark can't do anything special either if it encounters a page fault while walking the stack - it just records a truncated stack, which probably won't be much use as a consequence.  Instruments in Leopard can force the page in, I believe, since it does its callstack recording from user space.  But it has higher overhead (partly) as a result, so I'd recommend Shark.  [[ That I work on Shark only ensures my completely objectivity. ;) ]]

That said, it's exceedingly rare to encounter such a scenario; you'd have to be paging brutally and have extremely long and stagnant stacks; most stacks [of active threads] fit well within a page and are touched very frequently, keeping them effectively pinned in physical memory.  Though I don't know any details about the error dtrace is emitting, I would suspect it's not that the frames are paged out but that the addresses are actually invalid - such as you'd see if you have certain kinds of aggressive optimisations turned on (-fomit-frame-pointers, for example), hand-written assembly functions, etc.  You actually tend to find these sorts of things in web browsers; I know Safari uses a lot of tricks that confuse profilers.

Though I realise this is the darwin dev list, so if you truly are using 'Darwin' in the conventional sense, then of course Shark and Instruments won't be available for you.

Wade
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: dtrace, profile and ustack
      • From: Joel Reymont <email@hidden>
References: 
 >dtrace, profile and ustack (From: Joel Reymont <email@hidden>)
 >Re: dtrace, profile and ustack (From: Eric Gouriou <email@hidden>)

  • Prev by Date: Re: dtrace, profile and ustack
  • Next by Date: Re: dtrace, profile and ustack
  • Previous by thread: Re: dtrace, profile and ustack
  • Next by thread: Re: dtrace, profile and ustack
  • Index(es):
    • Date
    • Thread