|
|
1.1 ! root 1: .TH VI 1 ! 2: .SH NAME ! 3: vi, ki, xi \- instruction simulators ! 4: .SH SYNOPSIS ! 5: .B vi ! 6: [ ! 7: .I textfile ! 8: ] ! 9: .br ! 10: .B vi ! 11: .I pid ! 12: .br ! 13: .B ki ! 14: [ ! 15: .I textfile ! 16: ] ! 17: .br ! 18: .B ki ! 19: .I pid ! 20: .br ! 21: .B xi ! 22: [ ! 23: .I textfile ! 24: ] ! 25: .br ! 26: .B xi ! 27: .I pid ! 28: .SH DESCRIPTION ! 29: .I Vi ! 30: simulates the execution of a MIPS binary in ! 31: a Plan 9 environment. ! 32: It has two main uses: as ! 33: a debugger and as a statistics gatherer. ! 34: Programs running under ! 35: .I vi ! 36: execute about two hundred times ! 37: slower than normal\(embut faster than ! 38: single stepping under ! 39: .IR db . ! 40: .I Ki ! 41: and ! 42: .I xi ! 43: are similar to ! 44: .I vi ! 45: but interpret SPARC and ATT3210 binaries. ! 46: The following discussion refers to ! 47: .I vi ! 48: but applies to the others ! 49: as well. ! 50: .PP ! 51: .I Vi ! 52: will simulate the execution of a named ! 53: .IR textfile . ! 54: It will also make a copy of an existing process with process id ! 55: .I pid ! 56: and simulate its continuation. ! 57: .PP ! 58: As a debugger ! 59: .I vi ! 60: offers more complete information ! 61: than ! 62: .IR db (1). ! 63: Tracing can be performed at the level of instructions, ! 64: system calls, or function calls. ! 65: .I Vi ! 66: allows breakpoints to be triggered when specified addresses ! 67: in memory are accessed. ! 68: A report of instruction counts, ! 69: load delay fills and distribution is produced for ! 70: each run. ! 71: .I Vi ! 72: simulates the CPU's caches and MMU ! 73: to assist the optimization of compilers and programs. ! 74: .PP ! 75: The command interface mirrors the interface to ! 76: .IR db ; ! 77: see ! 78: .IR db (1) ! 79: for a detailed description. ! 80: Data formats and addressing are compatible with ! 81: .I db ! 82: except ! 83: for disassembly: ! 84: .I vi ! 85: offers only MIPS ! 86: .RB ( db ! 87: .BR -mmipsco ) ! 88: mnemonics for ! 89: machine instructions. ! 90: .I Ki ! 91: offers both Plan 9 and Sun SPARC formats. ! 92: .PP ! 93: Several extra commands allow ! 94: extended tracing and printing of statistics: ! 95: .TP ! 96: .BR $t [ 0ics ] ! 97: The ! 98: .I t ! 99: command controls tracing. Zero cancels all tracing ! 100: options. ! 101: .RS ! 102: .TP ! 103: .B i ! 104: Enable instruction tracing ! 105: .TP ! 106: .B c ! 107: Enable call tracing ! 108: .TP ! 109: .B s ! 110: Enable system call tracing ! 111: .RE ! 112: .TP ! 113: .BR $i [ itsp ] ! 114: The ! 115: .B i ! 116: command prints statistics accumulated by ! 117: all code run in this session. ! 118: .RS ! 119: .TP ! 120: .B i ! 121: Print instruction counts and frequency. ! 122: .TP ! 123: .B p ! 124: Print cycle profile. ! 125: .TP ! 126: .B t ! 127: .RI ( Vi ! 128: only) Print TLB and cache statistics. ! 129: .TP ! 130: .B s ! 131: Print memory reference, working set and size statistics. ! 132: .RE ! 133: .TP ! 134: .BR :b [ arwe ] ! 135: .I Vi ! 136: allows breakpoints to be set on any memory location. ! 137: These breakpoints monitor when a location is ! 138: accessed, read, written, or equals a certain value. ! 139: For equality the compared value is the ! 140: .I count ! 141: (see ! 142: .IR db (1)) ! 143: supplied to the command. ! 144: .SH SOURCE ! 145: .B /sys/src/cmd/vi ! 146: etc. ! 147: .SH "SEE ALSO" ! 148: .IR nm (1), ! 149: .IR db (1) ! 150: .SH BUGS ! 151: The code generated by ! 152: the compilers ! 153: is well supported, but some unusual instructions are unimplemented. ! 154: Some Plan 9 system calls such as ! 155: .I rfork ! 156: cause simulated traps. ! 157: The floating point simulation makes assumptions about the interpreting ! 158: machine's floating point support. The floating point conversions performed ! 159: by ! 160: .I vi ! 161: may cause a loss of precision.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.