02.10.2012 Views

The GAUSS Profiler

The GAUSS Profiler

The GAUSS Profiler

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1 Using the <strong>GAUSS</strong> <strong>Profiler</strong><br />

<strong>The</strong> <strong>GAUSS</strong> TM<br />

<strong>Profiler</strong><br />

<strong>The</strong>re are two steps to using the <strong>GAUSS</strong> <strong>Profiler</strong>: collection and analysis.<br />

1.1 Collection<br />

To collect profiling information, you must run your <strong>GAUSS</strong> program in tcollect, an executable shipped<br />

with <strong>GAUSS</strong> 8.0 that is identical to tgauss except that it generates a file containing profiling information<br />

each time it is run:<br />

tcollect -b myfile.e<br />

<strong>The</strong> output displayed by tcollect includes the name of the output file containing the profiling information.<br />

tcollect output files have with a gaussprof prefix and a .gco extension.<br />

1.2 Analysis<br />

To analyze the information stored in the tcollect output file, you must run the gaussprof executable,<br />

which is also shipped with <strong>GAUSS</strong> 8.0, on that file. gaussprof produces an organized report, displaying<br />

the time usage by procedure and by line.<br />

Assuming that running myfile.e in tcollect produced an output file called gaussprof 001.gco, you could<br />

analyze the results in that file as follows:<br />

gaussprof gaussprof_001.gco<br />

<strong>The</strong> syntax for gaussprof is:<br />

gaussprof [flags] profile data file ...<br />

where [flags] may be any of the following:<br />

-p profile procedure calls<br />

-l profile line numbers<br />

-h suppress headers<br />

-sp order procedure call sort order where order contains one or more of the folllowing:<br />

e exclusive time<br />

t total time<br />

c number of times called<br />

1


p procedure name<br />

a ascending order<br />

d descending order (default)<br />

Columns are sorted all ascending or all descending.<br />

-sl order line number sort order where order contains one or more of the folllowing:<br />

t time spent on line<br />

c number of times line was executed<br />

f file name<br />

l line number<br />

a ascending order<br />

d descending order (default)<br />

<strong>The</strong> default, with no flags, is: -pl -sp dep -sl dtf.<br />

Columns are sorted all ascending or all descending.<br />

2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!