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.
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?