Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

prof(1)

as(1)

cc(1)

pixie(1)

profil(2)

prof2(1)  —  Commands

Digital

NAME

prof2 − analyze profile data

SYNOPSIS

prof [ options ] mainobject

DESCRIPTION

prof2 analyzes one or more data files generated by the compiler’s execution-profiling system and produces a listing. 

The compiler system provides two kinds of profiling:

1.  pc-sampling interrupts the program periodically, recording the value of the program counter. 

2.  basic-block counting divides the program into blocks delimited by labels, jump instructions, and branch instructions. It counts the number of times each block executes. This provides more detailed (line by line) information than pc-sampling. 

Using pc-sampling

See prof(1). 

Using basic-block counting

To use basic-block counting, compile your program without the option −p.  Use pixie(1) to translate your program into a profiling version and generate a file, whose name ends in ".Addrs", containing block addresses. Then run the profiling version, which (assuming the program terminates normally via exit(2) or _exit(2)) will generate one or more files, whose name(s) end(s) in ".Counts", containing block counts. Then use prof2 with the −pixie option to analyze the bbaddrs and bbcounts files. Notice that you must tell prof2 the name of your original program, not the name of the profiling version. 

For example:

cc -c myprog.c
cc -o myprog myprog.o
pixie -o myprog.pixie myprog(generates "myprog.Addrs")
./myprog.pixie(generates "myprog.Counts")
prof2 -pixie myprog

Options to prof2

−quit n
Truncates the −procedures and −heavy listings after the first entry that represents less than n percent of the total. 

−a object
Includes object’s basic block counts in profiler output. Used with pixified dynamic shared objects such as libc.so.

−w Turns off warning messages. 

−v Turns on verbose messages. 

RELATED INFORMATION

prof(1), as(1), cc(1), pixie(1)
profil(2)

RESTRICTIONS

prof2 does not yet take into account interactions among floating-point instructions.  prof2 should find pixified shared libraries automatically. 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026