Fix perf jitdump integration.
authorvegorov@chromium.org <vegorov@chromium.org>
Tue, 9 Sep 2014 17:35:51 +0000 (17:35 +0000)
committervegorov@chromium.org <vegorov@chromium.org>
Tue, 9 Sep 2014 17:35:51 +0000 (17:35 +0000)
When emitting JIT_CODE_LOAD for Crankshafted code exclude Safepoint Table from the size of the code.

This cleans up perf annotate output - because otherwise it confusingly tries to disassemble safepoint table.

R=jarin@chromium.org
BUG=

Review URL: https://codereview.chromium.org/556453008

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23814 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/perf-jit.cc

index 5e7fd4c..3f30e38 100644 (file)
@@ -83,7 +83,8 @@ void PerfJitLogger::LogRecordedBuffer(Code* code, SharedFunctionInfo*,
 
   const char* code_name = name;
   uint8_t* code_pointer = reinterpret_cast<uint8_t*>(code->instruction_start());
-  uint32_t code_size = code->instruction_size();
+  uint32_t code_size = code->is_crankshafted() ? code->safepoint_table_offset()
+                                               : code->instruction_size();
 
   static const char string_terminator[] = "\0";