I am getting the following error while running the collect command
$ collect -c on sample bit (warning): Cannot operate on /home/user1/ANALYSIS/SAMPLE_PROGRAM/sample. Ple ase recompile it on a machine with Solaris10 update 5 or higher (or OpenSolaris version snv_52 or higher). If using an older OS, try -xbinopt=prepare (SPARC onl y).
The sample program was build with following g++ flags
g++ -c -Wall -g3 -m64 -pthread -O2 -DSOLARIS -DSS_64BIT_SERVER
The sample program is simple
contains only the following code
while (true)
{
sleep (10);
}
I was just trying to see whether c++ code compiled code can be used with collect command. As we have a huge g++ compiled binary which we would not like to compile again with Solaris Studio C++ compilers
I don't think so. Studio option -xbinopt=prepare
includes special code to binaries to use performance counters. I haven't been using it for years... as far as I remeber -xbinopt=prepare
makes binary to write perfomance data to files in CWD (or dir specified by other parameter) and late you can use those data with -xbinopt=use
.
Rules are compile 1st with prepare, then run to collect data, later recompile with collected performance data to get better optimized code. Similar to JIT compiler, but in compile time.