dcpix - Instrument a program to get basic block and edge counts.
dcpix myprog [-conservative]
Dcpix is similar to pixie except that it measures executions of both basic blocks and edges between them.
Dcpix is used in conjunction with stall analysis tools (dcpicalc(1), dcpitopstalls(1), dcpiwhatcg(1)). Normally, these tools must estimate execution counts of basic blocks and edges. These estimates are sometimes inaccurate.
For deterministic programs, one can measure the execution counts using dcpix and supply the results to stall analysis tools. The program must be deterministic because it must be run twice: once under dcpix to measure execution counts, and once under dcpid(1) to gather sample data.
By default, dcpix instruments only a set of blocks and edges that is sufficient for computing counts for all blocks and edges by exploiting flow constraints. However, this is inaccurate for programs that call longjmp (or similar routines). With the -conservative flag, dcpix adds instrumentation to every block.
dcpix myprog % creates myprog.dcpix and myprog.tab myprog.dcpix % creates myprog.xct dcpicalc -tab myprog.tab -xct sum.xct -db db myprocedure myprogTo analyze the performance of multiple runs of myprog, one can do either:dcpicalc -tab myprog.tab -xct myprog1.xct \ -xct myprog2.xct ... -xct myprogN.xct \ -db db myprocedure myprogor:dcpisumxct myprog1.xct myprog2.xct ... -xct myprogN.xct -o sum.xct dcpicalc -tab myprog.tab -xct sum.xct -db db myprocedure myprogUsing dcpisumxct(1) is more efficient when running dcpicalc multiple times, e.g., on several procedures in the same program.
Dcpix is an atom tool that instruments all edges exiting a branching block plus the entry block(s) of each procedure. These measured counts are more than enough to calculate counts for every block using "flow in = flow out" constraints, unless your program executes an infinite loop.
If the environment variable DCPIX_ADDPID is set, the instrumented program (e.g., myprog.dcpix) will append its pid to the names of .xct files. Thus, running the instrumented program multiple times shouldn't cause one run to overwrite the .xct file from a previous run.
Dcpix has no locking, so it is inaccurate for multi-threaded code. Also, it does not support programs that call fork().
Some single-threaded programs have nondeterministic implementations, e.g., implementations that uses ld_l/st_c. Thus, the count for some blocks may differ when you run myprog under dcpid and myprog.dcpix to generate the counts files.
The stall analysis tools currently introduce round-off errors into the measured counts because it represents them as multiples of the sampling periord.
dcpi(1), dcpiflow(1), dcpiprof(1), dcpilist(1), dcpidis(1), dcpiscan(1), dcpiepoch(1), dcpiflush(1), dcpicalc(1), dcpilabel(1), dcpi2ps(1), dcpicat(1), dcpiquit(1), dcpidiff(1), dcpitopstalls(1), dcpiwhatcg(1), dcpictl(1), dcpisource(1), dcpicc(1), dcpiversion(1), dcpiuninstall(1), dcpi2pix(1), dcpikdiff(1), dcpisumxct(1), dcpistats(1), dcpid(1), dcpiformat(4), dcpiloader(5)
For more information, see the DIGITAL Continuous Profiling Infrastructure project home page (http://www.research.digital.com/SRC/dcpi/ from outside DIGITAL).
Mark Vandevoorde, Jeff DeanThis page was generated automatically by mtex software.