2

Can anyone suggest a good tool to profile a program compiled with SunCC compiler. Also please suggest a good equivalent of valgrind for the same.

CodeRain
  • 6,334
  • 4
  • 28
  • 33
  • Keep It Simple: http://stackoverflow.com/questions/375913/what-can-i-use-to-profile-c-code-in-linux/378024#378024 – Mike Dunlavey Jul 28 '10 at 19:08
  • For money, check out Zoom: http://www.rotateright.com/ – Mike Dunlavey Jul 28 '10 at 19:14
  • Hear, hear... Their SunCC compiler is a turd. It regularly crashes because it uses up all swap space. I still don't know how much space is needed to compile a program with SunCC. Also see [How much swap space does Solaris 11.3 need to run a compiler?](https://unix.stackexchange.com/q/458256/56041) – jww Jul 25 '18 at 15:42

3 Answers3

4

DTrace is the best tool for profiling [in] the universe.

DTrace is a comprehensive dynamic tracing framework for the Solaris™ Operating Environment. DTrace provides a powerful infrastructure to permit administrators, developers, and service personnel to concisely answer arbitrary questions about the behavior of the operating system and user programs.

It's not marketing, it really allows just that.

The Solaris Dynamic Tracing Guide describes how to use DTrace to observe, debug, and tune system behavior. The DTrace guide also includes a complete reference for bundled DTrace observability tools and the D programming language.

DTrace is also available in Mac OS X, (there's a nice GUI for it, Instruments), and a FreeBSD port that has only kernel mode providers is also available.

alanc
  • 4,102
  • 21
  • 24
1

The Sun Studio compilers include Performance Analyzer for profiling and Memory Runtime Checking features in the dbx debugger.

See also the answers to Locate bad memory access on Solaris.

Community
  • 1
  • 1
alanc
  • 4,102
  • 21
  • 24
0

On SPARC hardware, you may want consider IBM Rational Quantify for performance profiling.

On the cheap, you can get away with pstack sampling, prstat -vL, and instrumenting your application with gethrtime().

evolvah
  • 625
  • 4
  • 15