OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 } | 280 } |
281 if (rmode == RelocInfo::CODE_TARGET_WITH_ID) { | 281 if (rmode == RelocInfo::CODE_TARGET_WITH_ID) { |
282 out.AddFormatted(" (id = %d)", static_cast<int>(relocinfo.data())); | 282 out.AddFormatted(" (id = %d)", static_cast<int>(relocinfo.data())); |
283 } | 283 } |
284 } else if (rmode == RelocInfo::RUNTIME_ENTRY && | 284 } else if (rmode == RelocInfo::RUNTIME_ENTRY && |
285 Isolate::Current()->deoptimizer_data() != NULL) { | 285 Isolate::Current()->deoptimizer_data() != NULL) { |
286 // A runtime entry reloinfo might be a deoptimization bailout. | 286 // A runtime entry reloinfo might be a deoptimization bailout. |
287 Address addr = relocinfo.target_address(); | 287 Address addr = relocinfo.target_address(); |
288 int id = Deoptimizer::GetDeoptimizationId(addr, Deoptimizer::EAGER); | 288 int id = Deoptimizer::GetDeoptimizationId(addr, Deoptimizer::EAGER); |
289 if (id == Deoptimizer::kNotDeoptimizationEntry) { | 289 if (id == Deoptimizer::kNotDeoptimizationEntry) { |
290 out.AddFormatted(" ;; %s", RelocInfo::RelocModeName(rmode)); | 290 id = Deoptimizer::GetDeoptimizationId(addr, Deoptimizer::LAZY); |
| 291 if (id == Deoptimizer::kNotDeoptimizationEntry) { |
| 292 out.AddFormatted(" ;; %s", RelocInfo::RelocModeName(rmode)); |
| 293 } else { |
| 294 out.AddFormatted(" ;; lazy deoptimization bailout %d", id); |
| 295 } |
291 } else { | 296 } else { |
292 out.AddFormatted(" ;; deoptimization bailout %d", id); | 297 out.AddFormatted(" ;; deoptimization bailout %d", id); |
293 } | 298 } |
294 } else { | 299 } else { |
295 out.AddFormatted(" ;; %s", RelocInfo::RelocModeName(rmode)); | 300 out.AddFormatted(" ;; %s", RelocInfo::RelocModeName(rmode)); |
296 } | 301 } |
297 } | 302 } |
298 DumpBuffer(f, &out); | 303 DumpBuffer(f, &out); |
299 } | 304 } |
300 | 305 |
(...skipping 14 matching lines...) Expand all Loading... |
315 | 320 |
316 | 321 |
317 int Disassembler::Decode(FILE* f, byte* begin, byte* end) { | 322 int Disassembler::Decode(FILE* f, byte* begin, byte* end) { |
318 V8NameConverter defaultConverter(NULL); | 323 V8NameConverter defaultConverter(NULL); |
319 return DecodeIt(f, defaultConverter, begin, end); | 324 return DecodeIt(f, defaultConverter, begin, end); |
320 } | 325 } |
321 | 326 |
322 | 327 |
323 // Called by Code::CodePrint. | 328 // Called by Code::CodePrint. |
324 void Disassembler::Decode(FILE* f, Code* code) { | 329 void Disassembler::Decode(FILE* f, Code* code) { |
325 int decode_size = (code->kind() == Code::OPTIMIZED_FUNCTION) | 330 int decode_size = (code->kind() == Code::OPTIMIZED_FUNCTION || |
| 331 code->kind() == Code::COMPILED_STUB) |
326 ? static_cast<int>(code->safepoint_table_offset()) | 332 ? static_cast<int>(code->safepoint_table_offset()) |
327 : code->instruction_size(); | 333 : code->instruction_size(); |
328 // If there might be a stack check table, stop before reaching it. | 334 // If there might be a stack check table, stop before reaching it. |
329 if (code->kind() == Code::FUNCTION) { | 335 if (code->kind() == Code::FUNCTION) { |
330 decode_size = | 336 decode_size = |
331 Min(decode_size, static_cast<int>(code->stack_check_table_offset())); | 337 Min(decode_size, static_cast<int>(code->stack_check_table_offset())); |
332 } | 338 } |
333 | 339 |
334 byte* begin = code->instruction_start(); | 340 byte* begin = code->instruction_start(); |
335 byte* end = begin + decode_size; | 341 byte* end = begin + decode_size; |
336 V8NameConverter v8NameConverter(code); | 342 V8NameConverter v8NameConverter(code); |
337 DecodeIt(f, v8NameConverter, begin, end); | 343 DecodeIt(f, v8NameConverter, begin, end); |
338 } | 344 } |
339 | 345 |
340 #else // ENABLE_DISASSEMBLER | 346 #else // ENABLE_DISASSEMBLER |
341 | 347 |
342 void Disassembler::Dump(FILE* f, byte* begin, byte* end) {} | 348 void Disassembler::Dump(FILE* f, byte* begin, byte* end) {} |
343 int Disassembler::Decode(FILE* f, byte* begin, byte* end) { return 0; } | 349 int Disassembler::Decode(FILE* f, byte* begin, byte* end) { return 0; } |
344 void Disassembler::Decode(FILE* f, Code* code) {} | 350 void Disassembler::Decode(FILE* f, Code* code) {} |
345 | 351 |
346 #endif // ENABLE_DISASSEMBLER | 352 #endif // ENABLE_DISASSEMBLER |
347 | 353 |
348 } } // namespace v8::internal | 354 } } // namespace v8::internal |
OLD | NEW |