				Z P R O F
	        A   B A S I C   B L O C K   P R O F I L E R

Last Update Time-stamp: "97/07/31 23:45:30 zdu"


'zprof' is a basic block profiler for ANSI-C programs.  It produces a count
of the number of times each basic block is executed.  It's behavior is
similar to that produced by using 'gcc -a' and other similar "line-count"
profilers.

Part of the motivation for writing 'zprof' was to provide an advanced
tutorial on the use of 'zlex' and 'zyacc' and the interaction between them.

'zprof' comes with a man page in regular nroff format or in html format.

The home page for 'zprof' can be viewed at

	<http://opal.cs.binghamton.edu/~zdu/zprof>

The entire package can be downloaded from

	<ftp://watson2.cs.binghamton.edu/pub/zdu/zprof-0.1.tar.gz>

INSTALLATION:

The file INSTALL contains generic installation instructions.  Refer to that
file if the following instructions are insufficient.

If are lucky, all you will need to install the package is the following
sequence of commands:

cd to the directory this file is in.

./configure  #Figure out what features relevant to zprof your system has.
	     #Generate customized Makefiles and a config.h file.

make         #compile and link.  Executables reside within this directory.

make install #Install zprof and zcounts executable and zprof library and
             #documentation in "standard" places.

The libz library which is compiled is a personal library with a large number
of modules.  The distributed library does not contain all the modules in
libz, but only those modules required by zprof.

If you would like, you can run a couple of small tests by typing 'make
check'.  Unfortunately, since zprof uses the system C preprocessor, and the
output of C preprocessors often differ, one of the tests is likely to fail.
The 'make check' will print out the names of the files containing the
"erroneous" output (these are in the zprof subdirectory) with a .ERR
extension.  You can 'diff' these files with the "correct" ones (the ones
without the .ERR extension).  Hopefully, the diff's should only reveal
cosmetic differences, like blank lines inserted by the C preprocessor,
or a C preprocessor banner.

It is worth reiterating that this is a profiler for ANSI C.  It will *not*
work on non-Ansi C programs.

The places where the software is installed can be controlled by several
Makefile variables:

Make Variable	Default Value		Controls Installation Of
-------------------------------------------------------------------
prefix		/usr/local		base of all files installed
exec_prefix	$(prefix)		base of all executables installed
bindir		$(exec_prefix)/bin	zprof, zcounts
libdir		$(exec_prefix)/lib	libzprof.a
mandir		$(prefix)/man		man1/zprof.1
htmldir		$(prefix)/doc/html	zprof manual html files

If the above "standard" places is not acceptable, then if you would just
like to install at a different prefix, then specify the --prefix option when
you run configure.  For example, if you would like to install in your home
directory, configure as follows:

./configure --prefix="$HOME"

This will install the executable, library, manual and HTML in $HOME/bin,
$HOME/lib, $HOME/man and $HOME/doc/html respectively.

If you are not installing in the standard places (for example, you may not
have root access, or your site may use different conventions from those
assumed here), then one alternative is to compile zprof specifying some make
variable definitions on the make command line.  Assume I'd like the
executable to go in $HOME/bin, the library to go in $HOME/lib, the manual in
$HOME/man and the HTML in $HOME/html, I'd use the following command line:

make bindir=$HOME/bin libdir=$HOME/lib mandir=$HOME/man docdir=$HOME/html

Use the same definitions for make install

make bindir=$HOME/bin libdir=$HOME/lib mandir=$HOME/man docdir=$HOME/html \
     install

or you can simply copy the files over, and set appropriate permissions.

This package was developed on a Linux 2.0.18 Pentium.  Additionally it has
been compiled and tested using both gcc 2.7.* AND the native cc on the
following systems:

SunOS 4.1.3_U1 1 sun4m
SunOS 5.4 Sparc
SunOS 5.5 sun4d sparc SUNW,SPARCserver-1000
AIX 4 Power-PC
Ultrix 4.2 MIPS R3000


Feedback: Please email any feedback to zdu@acm.org.

