hp2ps1
Convert a heap profile to a postscript graph
Usage
hp2ps [flags]
[file]
[.hp]
Overview
The program hp2ps converts a heap profile stored in file into a POSTSCRIPT graph, sending the result to file.ps. By convention, files to be processed by hp2ps have a .hp extension. However, for compatibility with older versions of hp2ps, this extension can be omitted. If file is omitted entirely, then the program behaves as a filter.
Options
The flags are:
-
-d -
In order to make graphs more readable,
hp2pssorts the shaded bands for each identifier. The default sort ordering is for the bands with the largest area to be stacked on top of the smaller ones. The-doption causes rougher bands (those representing series of values with the largest standard deviations) to be stacked on top of smoother ones.
-
-b -
Normally,
hp2psputs the title of the graph in a small box at the top of the page. However, if the JOB string is too long to fit in a small box (more than 35 characters), thenhp2pswill choose to use a big box instead. The-boption forceshp2psto use a big box.
-
-e float[in|mm|pt] -
Generate encapsulated POSTSCRIPT suitable for inclusion in LaTeX documents. Usually, the POSTSCRIPT graph is drawn in landscape mode in an area 9 inches wide by 6 inches high, and
hp2psarranges for this area to be approximately centered on a sheet of a4 paper. This format is convenient of studying the graph in detail, but it is unsuitable for inclusion in LaTeX documents. The-eoption causes the graph to be drawn in portrait mode, with float specifying the width in inches, millimetres or points (the default). The resulting POSTSCRIPT file conforms to the Encapsulated Post Script (EPS) convention, and it can be included in a LaTeX document using Rokicki's dvi-to-POSTSCRIPT converterdvips.hp2psrequires the width to exceed 2 inches.
-
-g -
Create output suitable for the
gsPOSTSCRIPT previewer (or similar). In this case the graph is printed in portrait mode without scaling. The output is unsuitable for a laser printer.
-
-p -
Use previous parameters. By default, the POSTSCRIPT graph is automatically scaled both horizontally and vertically so that it fills the page. However, when preparing a series of graphs for use in a presentation, it is often useful to draw a new graph using the same scale, shading and ordering as a previous one. The
-pflag causes the graph to be drawn using the parameters determined by a previous run ofhp2pson file.
-
-s -
Use a small box for the title.
-
-y -
Draw the graph in the traditional York style, ignoring marks.
-
-c -
Use colours in the rendering of the graphs.
-
-? -
Print out usage information.
Input format
The format of a heap profile is best described by example:
JOB "a.out -p"DATE "Fri Apr 17 11:43:45 1992"SAMPLE_UNIT "seconds"VALUE_UNIT "bytes"BEGIN_SAMPLE 0.00SYSTEM 24END_SAMPLE 0.00BEGIN_SAMPLE 1.00elim 180insert 24intersect 12disin 60main 12reduce 20SYSTEM 12END_SAMPLE 1.00MARK 1.50MARK 1.75MARK 1.80BEGIN_SAMPLE 2.00elim 192insert 24intersect 12disin 84main 12SYSTEM 24END_SAMPLE 2.00BEGIN_SAMPLE 2.82END_SAMPLE 2.82
Notes
POSTSCRIPT is a registered trademark of Adobe Systems Incorporated.
Releases
7 releases since Debian 7 (Wheezy); the text changed 3 times.
-c since Debian 9 (Stretch).