Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Shark process exit catching no longer working



Hello,

I can't get shark 4.5.0 anymore to read/cache the symbols from command line applications if they exit before shark finishes sampling (this worked fine in older versions). It doesn't seem to detect process exits anymore from such programs, and does not respect the -T parameter anymore. E.g.

***
$ cat tt.c
int main() {
  long long int i;

  for (i = 0; i < 100000000; i++) ;

  return 0;
}

$ gcc -gstabs -o tt tt.c
$ shark -i -T 1s ./tt

shark 4.5.0
* Option+Esc to start/stop a trace session
* Ctrl+c to quit (any pending session will saved)

* Batch mode
* Watching task exits

Sampling Config: Time Profile
Timed Samples & Counters
-Sampling begins immediately.
-A sample is taken every 1ms.
-Sampling ends automatically after 30s.


Quitting... Sampling... ^CProcessing samples...


CHUDData - Analyzing samples... 0.0%.. 1.0%.. 2.0%.. 3.0%.. 4.0%.. 5.0%.. 6.9%.. 7.9%.. 9.9%.. 11.9%.. 14.9%.. 17.9%.. 21.8%.. 23.8%.. 26.8%.. 28.8%.. 29.8%.. 30.8%.. 31.7%.. 32.7%.. 34.7%.. 35.7%.. 36.7%.. 37.7%.. 39.7%.. 41.7%.. 44.6%.. 47.6%.. 48.6%.. 52.6%.. 56.6%.. 59.5%.. 62.5%.. 64.5%.. 66.5%.. 70.4%.. 74.4%.. 75.4%.. 79.4%.. 81.4%.. 83.3%.. 87.3%.. 88.3%.. 93.3%.. 97.2%.. 99.2%.. Created session file: '/afs/elis.ugent.be/usr/jmaebe/private/nobackup/ fpc/test/session_001.mshark'
Quitting...
***


When I open the resulting session, all entries for the tt process show a hexadecimal address followed by [unreadable] (and when double clicking on them, I get a message stating "Unable to read process memory. Either you have insufficient privileges or the process exited and could not be cached."). Furthermore, the sampling does not stop automatically after 1 second.

If I increase the upper loop bound in the program by a factor of 10 and immediately press ctrl-c after shark starts sampling, it does read the symbol and debug information ok.

This is on a G5 with Mac OS X 10.4.11, and Xcode 2.5 installed. Using dwarf instead of stabs, with or without dsymutil, does not change anything.
Is this a known problem?



Jonas _______________________________________________ Do not post admin requests to the list. They will be ignored. PerfOptimization-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/perfoptimization-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.