Purify and Insight have some overlapping functionality, and some important
differences. Puify works by instrumenting the object code, whereas Insight
uses a preprocessor to inject calls to Insight functions into the source,
which is then compiled by the standard compiler. In my experience, Purify
is a valuable high quality product that is easy to use, whereas Insight
appears immature and more cumbersome to use because of the necessity
to recompile everything. However Insight does provide some useful
checking that Purify lacks, such as shared memory checking and prototype
matching. It also includes the Invision algorithm analysis tool, which
is quite outside Purify's scope.
Insight consists of several parts, chiefly the Insight preprocessor, the Invision
program for graphically displaying profiled arrays, and support libraries.
It does extensive lint style checks, using its library of prototypes.
The "iiwhich" command can be used to see the prototypes.
At run time, it does checks on memory, pointers and several other things,
producing a report somewhat like Purify or Sentinel. It can also
produce a bug summary and leak report.
A major problem in using Insight is that because it works at the source level,
you will get many bogus warnings about wild pointers and the like, because
of data that have been created by one's library routines that have not been
compiled with Insight. You can eliminate the warning with a "suppress"
command in the ".insight" file, but in the process you will hide potential
real errors in your own code. Even when you use Insight processed libraries,
there are still quite a few bogus warnings. Some of my applications crash
in Insight code, though they run fine without Insight. This is version 1.0,
and I have already submitted several bug reports - an updated version should be
available via ftp soon.
I could not use the standard UPS de* on Insight processed files -
so I fixed UPS by skipping the N_SOL symbols of name ".startup." that are
generated by Insight.
The Invision program is a fancy graphical tool - a "virtual VCR" - that
can playback information from a previously created data-track file.
The idea is that you specify an array to be profiled in the ".insight" file,
then run your program once to make the data-track file. Invision can
then be invoked to display accesses and values to the array while
simultaneously tracking the source code. The intent is too get a visual
image of algorithms, in order to improve their efficiency. Apparently
only arrays can be profiled - other data structures are not supported,
though you could copy relevant data to an array I suppose.