| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 function CodeKind(color, kinds) { | 97 function CodeKind(color, kinds) { |
| 98 this.color = color; | 98 this.color = color; |
| 99 this.in_execution = []; | 99 this.in_execution = []; |
| 100 this.stack_frames = []; | 100 this.stack_frames = []; |
| 101 for (var i = 0; i < kStackFrames; i++) this.stack_frames.push([]); | 101 for (var i = 0; i < kStackFrames; i++) this.stack_frames.push([]); |
| 102 this.kinds = kinds; | 102 this.kinds = kinds; |
| 103 } | 103 } |
| 104 | 104 |
| 105 | 105 |
| 106 var CodeKinds = { | 106 var CodeKinds = { |
| 107 'external ': new CodeKind("#3399FF", [-3]), | 107 'external ': new CodeKind("#3399FF", [-2]), |
| 108 'reg.exp. ': new CodeKind("#0000FF", [-2]), | |
| 109 'runtime ': new CodeKind("#000000", [-1]), | 108 'runtime ': new CodeKind("#000000", [-1]), |
| 110 'full code': new CodeKind("#DD0000", [0]), | 109 'full code': new CodeKind("#DD0000", [0]), |
| 111 'opt code ': new CodeKind("#00EE00", [1]), | 110 'opt code ': new CodeKind("#00EE00", [1]), |
| 112 'code stub': new CodeKind("#FF00FF", [2]), | 111 'code stub': new CodeKind("#FF00FF", [2]), |
| 113 'built-in ': new CodeKind("#AA00AA", [3]), | 112 'built-in ': new CodeKind("#AA00AA", [3]), |
| 114 'inl.cache': new CodeKind("#4444AA", [4, 5, 6, 7, 8, 9, 10, 11, 12, 13]), | 113 'inl.cache': new CodeKind("#4444AA", [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]), |
| 114 'reg.exp. ': new CodeKind("#0000FF", [15]), |
| 115 } | 115 } |
| 116 | 116 |
| 117 | 117 |
| 118 var xrange_start; | 118 var xrange_start; |
| 119 var xrange_end; | 119 var xrange_end; |
| 120 var obj_index = 0; | 120 var obj_index = 0; |
| 121 var execution_pauses = []; | 121 var execution_pauses = []; |
| 122 var code_map = new CodeMap(); | 122 var code_map = new CodeMap(); |
| 123 | 123 |
| 124 var xrange_start_override = undefined; | 124 var xrange_start_override = undefined; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 } | 190 } |
| 191 | 191 |
| 192 | 192 |
| 193 function ProcessCodeDeleteEvent(address) { | 193 function ProcessCodeDeleteEvent(address) { |
| 194 code_map.deleteCode(address); | 194 code_map.deleteCode(address); |
| 195 } | 195 } |
| 196 | 196 |
| 197 | 197 |
| 198 function ProcessSharedLibrary(name, start, end) { | 198 function ProcessSharedLibrary(name, start, end) { |
| 199 var code_entry = new CodeMap.CodeEntry(end - start, name); | 199 var code_entry = new CodeMap.CodeEntry(end - start, name); |
| 200 code_entry.kind = -3; // External code kind. | 200 code_entry.kind = -2; // External code kind. |
| 201 for (var i = 0; i < kV8BinarySuffixes.length; i++) { | 201 for (var i = 0; i < kV8BinarySuffixes.length; i++) { |
| 202 var suffix = kV8BinarySuffixes[i]; | 202 var suffix = kV8BinarySuffixes[i]; |
| 203 if (name.indexOf(suffix, name.length - suffix.length) >= 0) { | 203 if (name.indexOf(suffix, name.length - suffix.length) >= 0) { |
| 204 code_entry.kind = -1; // V8 runtime code kind. | 204 code_entry.kind = -1; // V8 runtime code kind. |
| 205 break; | 205 break; |
| 206 } | 206 } |
| 207 } | 207 } |
| 208 code_map.addLibrary(start, code_entry); | 208 code_map.addLibrary(start, code_entry); |
| 209 } | 209 } |
| 210 | 210 |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 print(pause.end + " " + pause.duration()); | 501 print(pause.end + " " + pause.duration()); |
| 502 } | 502 } |
| 503 print("e"); | 503 print("e"); |
| 504 } | 504 } |
| 505 | 505 |
| 506 | 506 |
| 507 ParseArguments(arguments); | 507 ParseArguments(arguments); |
| 508 CollectData(); | 508 CollectData(); |
| 509 FindPlotRange(); | 509 FindPlotRange(); |
| 510 GnuplotOutput(); | 510 GnuplotOutput(); |
| OLD | NEW |