Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Unified Diff: src/factory.cc

Issue 1993653003: Initial support for emitting unwinding information in perf jitdump. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm64/assembler-arm64.cc ('k') | src/globals.h » ('j') | src/globals.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index 3c5f4161fd00f8c162a8c0c21903cceeb8e9260f..0807bd1f2fa2fc4534e84f56431171dcac89e118 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -1427,7 +1427,11 @@ Handle<Code> Factory::NewCode(const CodeDesc& desc,
Handle<ByteArray> reloc_info = NewByteArray(desc.reloc_size, TENURED);
// Compute size.
- int body_size = RoundUp(desc.instr_size, kObjectAlignment);
+ int unpadded_body_size = desc.unwinding_info_size > 0
rmcilroy 2016/06/21 13:47:43 nit - just body_size (the RoundUp at the end isn't
rmcilroy 2016/06/21 13:47:43 Create a local variable for has_unwinding_info and
Stefano Sanfilippo 2016/06/23 15:23:43 Done.
Stefano Sanfilippo 2016/06/23 15:23:43 Done.
+ ? RoundUp(desc.instr_size, kInt64Size) +
+ desc.unwinding_info_size + kInt64Size
rmcilroy 2016/06/21 13:47:43 Do this addition in an if block (setting body_size
Stefano Sanfilippo 2016/06/23 15:23:43 Done.
+ : desc.instr_size;
+ int body_size = RoundUp(unpadded_body_size, kObjectAlignment);
int obj_size = Code::SizeFor(body_size);
Handle<Code> code = NewCodeRaw(obj_size, immovable);
@@ -1444,6 +1448,7 @@ Handle<Code> Factory::NewCode(const CodeDesc& desc,
code->set_instruction_size(desc.instr_size);
code->set_relocation_info(*reloc_info);
code->set_flags(flags);
+ code->set_has_unwinding_info(desc.unwinding_info_size > 0);
code->set_raw_kind_specific_flags1(0);
code->set_raw_kind_specific_flags2(0);
code->set_is_crankshafted(crankshafted);
« no previous file with comments | « src/arm64/assembler-arm64.cc ('k') | src/globals.h » ('j') | src/globals.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698