HP DCPI tool



Site information

» Send us your comments


» Download DCPI
» Installing DCPI

Product information

» Frequently asked questions
» Documentation
» Publications
customer times newsletter link



dcpicc - Compile C source files to produce instruction to source mapping

dcpicc-tokenize - Tokenize a C source file


dcpicc [-map_dir map-directory] [-tok_dir token-directory] [-compiler C compiler] [C compiler arguments]

dcpicc-tokenize map-file


dcpicc is intended to be used as a C compiler to produce object code that would help dcpisource in identifying which source token each instruction corresponds to.

dcpicc tokenizes each C source file named on the command line and compiles the tokenized source files with a real C compiler. dcpicc-tokenize, which dcpicc invokes, reads the input C source file from standard input and writes the tokenized source file to standard output, leaving the mapping (as described below) in map-file. A tokenized source file has one source token per line, so that line numbers in the object file's symbol table identify individual tokens rather than source lines. dcpicc stores in a map file the mapping from line numbers recorded in the object file (which identify lines in the tokenized source file) to tokens in the original source file. This mapping is used by dcpisource.

Other files named on the command line are not changed. All arguments not recognized by dcpicc are passed to the C compiler.

dcpicc must be allowed to write the directory containing the original source files.


-map_dir map-directory
If set, dcpicc puts the map file for foo.c, named foo.cmap, in the specified directory. Otherwise, the map file is in the same directory as foo.c.

-tok_dir token-directory
If set, dcpicc keeps the tokenized source file for foo.c, named foo.tok.c, in the specified directory. Otherwise, the tokenized source file is discarded after compilation.

-compiler C-compiler
If set, dcpicc invokes the specified C compiler. Otherwise, dcpicc invokes the C compiler named by the environment variable CC, or cc if CC is not defined.


dcpicc should be used only for programs that have been fully debugged and are being studied only for performance improvement. Since each source token is put on a different line, the line numbers seen by the real C compiler and the debugger are not those in the original source file. Therefore, compiler messages would become very hard to interpret, and debugger commands for stopping at specified source lines would be difficult to use.


Typically, dcpicc is used like a C compiler.

  dcpicc -map_dir map_directory foo.c bar.c


dcpi(1), dcpi2bb(1), dcpi2pix(1), dcpi2ps(1), dcpicalc(1), dcpicat(1), dcpicoverage(1), dcpictl(1), dcpid(1), dcpidiff(1), dcpidis(1), dcpiepoch(1), dcpiflow(1), dcpiflush(1), dcpikdiff(1), dcpilabel(1), dcpildlatency(1), dcpilist(1), dcpiprof(1), dcpiprofileme(1), dcpiquit(1), dcpiscan(1), dcpisource(1), dcpistats(1), dcpisumxct(1), dcpitar(1), dcpitopcounts(1), dcpitopstalls(1), dcpiuninstall(1), dcpiupcalls(1), dcpivarg(1), dcpivcat(1), dcpiversion(1), dcpivlst(1), dcpivprofiler(1), dcpiwhatcg(1), dcpix(1), dcpiformat(4), dcpiexclusions(4)

For more information, see the DCPI project home page http://h30097.www3.hp.com/dcpi.


Copyright 1996-2004, Hewlett-Packard Company. All rights reserved.