|
|
1.1 ! root 1: .TH LCOMP 1 ! 2: .SH NAME ! 3: lcomp, lprint \(mi line-by-line profiler ! 4: .SH SYNOPSIS ! 5: .B lcomp ! 6: [ option ... ] file ... ! 7: .PP ! 8: .B lprint ! 9: [ option ] [ file ... ] ! 10: .SH DESCRIPTION ! 11: .I Lcomp ! 12: is used in place of ! 13: .I cc (1) ! 14: or ! 15: .I f77 (1) ! 16: to insert instruction-counting code into programs. ! 17: It recognizes options whose initial letters are taken from the string ! 18: .LR CwpDUIRdlNnz , ! 19: and accepts files whose names end in ! 20: .LR .c , ! 21: .LR .f , ! 22: .LR .s , ! 23: or ! 24: .LR .o . ! 25: From each source file it derives a ! 26: .L .o ! 27: file and a ! 28: .L .sL ! 29: file which ! 30: .I lprint ! 31: uses to correlate source lines with basic blocks. ! 32: .PP ! 33: Option ! 34: .B -C ! 35: declares that ! 36: .L .c ! 37: files (and ! 38: .L .o ! 39: files, if no source files are named) ! 40: are C++ files. ! 41: If the ! 42: .B -c ! 43: option is not present ! 44: .I lcomp ! 45: creates ! 46: .FR a.out . ! 47: Each time ! 48: .F a.out ! 49: is run statistics are added ! 50: to a profiling file ! 51: .FR prof.out . ! 52: .PP ! 53: .I Lprint ! 54: produces on the standard output a listing (in the style of ! 55: .IR pr (1)) ! 56: of the programs compiled by ! 57: .I lcomp. ! 58: Without arguments or files, ! 59: each line of the listing is preceded by the number of times it was executed, ! 60: as determined from the data in ! 61: .FR prof.out . ! 62: .I Lprint ! 63: interprets the following options. ! 64: .TP ! 65: .B -a ! 66: Detailed listing of every machine instruction and how often it was executed. ! 67: .TP ! 68: .B -b ! 69: How often each basic block was executed. ! 70: .TP ! 71: .B -c ! 72: Compress the ! 73: .F prof.out ! 74: file, which otherwise grows with every execution of ! 75: .LR a.out . ! 76: .TP ! 77: .B -f ! 78: Print summary information by function: instruction executions, number of ! 79: invocations, source instructions, and number of instructions never executed. ! 80: .TP ! 81: .B -i ! 82: Before each line of source print the number of machine instructions executed. ! 83: .TP ! 84: .B -p ! 85: Before each line of source print the number of times the first basic block ! 86: in that line was executed. ! 87: .TP ! 88: .B -s ! 89: Summarize the counts by source file: instruction exectuions, source ! 90: instructions, instructions never executed, basic block executions, total ! 91: number of source basic blocks, and how many were never executed. ! 92: .PP ! 93: If any file names are given, the arguments ! 94: .L abip ! 95: apply only to them. ! 96: If no options are given, ! 97: .L -p ! 98: is assumed. ! 99: Any combination of options is allowed. ! 100: .SH FILES ! 101: .TF /usr/lib/nexit.o ! 102: .TP ! 103: .F prof.out ! 104: counts ! 105: .TP ! 106: .F *.sL ! 107: for correlating with source ! 108: .TP ! 109: .F /usr/lib/bb ! 110: for finding basic blocks and inserting counting code ! 111: .TP ! 112: .F /usr/lib/nexit.o ! 113: for printing counts when ! 114: .L a.out ! 115: exits ! 116: .SH "SEE ALSO" ! 117: cc(1), f77(1) ! 118: .SH BUGS ! 119: A line in the source file may be in zero, one, or more basic ! 120: blocks; ! 121: the count given in the listing corresponds to some particular ! 122: choice of the basic block to associate with the line. ! 123: .br ! 124: Processing the output of ! 125: .IR yacc (1) ! 126: without removing ! 127: .L #line ! 128: directives will produce unsatisfactory results. ! 129: .br ! 130: Option ! 131: .B -C ! 132: masks an option of ! 133: .IR cc (1).
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.