Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
| 8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
| 9 #include "src/debug.h" | 9 #include "src/debug.h" |
| 10 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 139 } | 139 } |
| 140 } | 140 } |
| 141 | 141 |
| 142 // Comments. | 142 // Comments. |
| 143 for (int i = 0; i < comments.length(); i++) { | 143 for (int i = 0; i < comments.length(); i++) { |
| 144 out.AddFormatted(" %s", comments[i]); | 144 out.AddFormatted(" %s", comments[i]); |
| 145 DumpBuffer(os, &out); | 145 DumpBuffer(os, &out); |
| 146 } | 146 } |
| 147 | 147 |
| 148 // Instruction address and instruction offset. | 148 // Instruction address and instruction offset. |
| 149 out.AddFormatted("%p %4d ", prev_pc, prev_pc - begin); | 149 out.AddFormatted("%p %4X ", prev_pc, prev_pc - begin); |
|
Jarin
2015/06/03 15:06:16
Why did you change this?
I am worried that tools
Mircea Trofin
2015/06/04 03:38:39
"perf" (the tool) outputs offsets as hex, so this
Jarin
2015/06/08 13:32:49
Maybe use this only locally, or change the formatt
| |
| 150 | 150 |
| 151 // Instruction. | 151 // Instruction. |
| 152 out.AddFormatted("%s", decode_buffer.start()); | 152 out.AddFormatted("%s", decode_buffer.start()); |
| 153 | 153 |
| 154 // Print all the reloc info for this instruction which are not comments. | 154 // Print all the reloc info for this instruction which are not comments. |
| 155 for (int i = 0; i < pcs.length(); i++) { | 155 for (int i = 0; i < pcs.length(); i++) { |
| 156 // Put together the reloc info | 156 // Put together the reloc info |
| 157 RelocInfo relocinfo(pcs[i], rmodes[i], datas[i], converter.code()); | 157 RelocInfo relocinfo(pcs[i], rmodes[i], datas[i], converter.code()); |
| 158 | 158 |
| 159 // Indent the printing of the reloc info. | 159 // Indent the printing of the reloc info. |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 289 #else // ENABLE_DISASSEMBLER | 289 #else // ENABLE_DISASSEMBLER |
| 290 | 290 |
| 291 int Disassembler::Decode(Isolate* isolate, std::ostream* os, byte* begin, | 291 int Disassembler::Decode(Isolate* isolate, std::ostream* os, byte* begin, |
| 292 byte* end, Code* code) { | 292 byte* end, Code* code) { |
| 293 return 0; | 293 return 0; |
| 294 } | 294 } |
| 295 | 295 |
| 296 #endif // ENABLE_DISASSEMBLER | 296 #endif // ENABLE_DISASSEMBLER |
| 297 | 297 |
| 298 } } // namespace v8::internal | 298 } } // namespace v8::internal |
| OLD | NEW |