Commit cda20a47 authored by jing.bao's avatar jing.bao Committed by Commit Bot

Fix disassembler to get correct code size

Change-Id: I4a438a63261bca1dd616d209de9f1df830323373
Reviewed-on: https://chromium-review.googlesource.com/972847Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Jing Bao <jing.bao@intel.com>
Cr-Commit-Position: refs/heads/master@{#52127}
parent 941540a2
......@@ -14505,9 +14505,11 @@ void Code::Disassemble(const char* name, std::ostream& os, void* current_pc) {
int safepoint_offset =
has_safepoint_info() ? safepoint_table_offset() : size;
int constant_pool_offset = this->constant_pool_offset();
int handler_offset = handler_table_offset() ? handler_table_offset() : size;
// Stop before reaching any embedded tables
int code_size = Min(safepoint_offset, constant_pool_offset);
int code_size =
Min(handler_offset, Min(safepoint_offset, constant_pool_offset));
os << "Instructions (size = " << code_size << ")\n";
byte* begin = instruction_start();
byte* end = begin + code_size;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment