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

Unified Diff: src/interpreter/bytecode-array-builder.cc

Issue 1737043002: [Interpreter] Log source positions for bytecode arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_cpu_profiler
Patch Set: TickLinesBaseline now works with more source positions Created 4 years, 10 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/ia32/assembler-ia32.h ('k') | src/interpreter/source-position-table.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-array-builder.cc
diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc
index 31319739d01bfe03f19bc1c6a1b10f0b9c2b4e30..9505b149ed22b7b00da8138f764ae7b5f42c8532 100644
--- a/src/interpreter/bytecode-array-builder.cc
+++ b/src/interpreter/bytecode-array-builder.cc
@@ -91,6 +91,8 @@ BytecodeArrayBuilder::BytecodeArrayBuilder(Isolate* isolate, Zone* zone,
return_position_ =
literal ? std::max(literal->start_position(), literal->end_position() - 1)
: RelocInfo::kNoPosition;
+ LOG_CODE_EVENT(isolate_, CodeStartLinePosInfoRecordEvent(
+ source_position_table_builder()));
}
BytecodeArrayBuilder::~BytecodeArrayBuilder() { DCHECK_EQ(0, unbound_jumps_); }
@@ -130,13 +132,18 @@ Handle<BytecodeArray> BytecodeArrayBuilder::ToBytecodeArray() {
Handle<FixedArray> handler_table = handler_table_builder()->ToHandlerTable();
Handle<ByteArray> source_position_table =
source_position_table_builder()->ToSourcePositionTable();
- Handle<BytecodeArray> output = isolate_->factory()->NewBytecodeArray(
+ Handle<BytecodeArray> bytecode_array = isolate_->factory()->NewBytecodeArray(
bytecode_size, &bytecodes_.front(), frame_size, parameter_count(),
constant_pool);
- output->set_handler_table(*handler_table);
- output->set_source_position_table(*source_position_table);
+ bytecode_array->set_handler_table(*handler_table);
+ bytecode_array->set_source_position_table(*source_position_table);
+
+ void* line_info = source_position_table_builder()->DetachJITHandlerData();
+ LOG_CODE_EVENT(isolate_, CodeEndLinePosInfoRecordEvent(
+ AbstractCode::cast(*bytecode_array), line_info));
+
bytecode_generated_ = true;
- return output;
+ return bytecode_array;
}
« no previous file with comments | « src/ia32/assembler-ia32.h ('k') | src/interpreter/source-position-table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698