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

Side by Side Diff: src/log.cc

Issue 2451853002: Uniform and precise source positions for inlining (Closed)
Patch Set: addressed comments Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/log.h" 5 #include "src/log.h"
6 6
7 #include <cstdarg> 7 #include <cstdarg>
8 #include <memory> 8 #include <memory>
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 } 1141 }
1142 1142
1143 void Logger::CodeLinePosInfoRecordEvent(AbstractCode* code, 1143 void Logger::CodeLinePosInfoRecordEvent(AbstractCode* code,
1144 ByteArray* source_position_table) { 1144 ByteArray* source_position_table) {
1145 if (jit_logger_) { 1145 if (jit_logger_) {
1146 void* jit_handler_data = jit_logger_->StartCodePosInfoEvent(); 1146 void* jit_handler_data = jit_logger_->StartCodePosInfoEvent();
1147 for (SourcePositionTableIterator iter(source_position_table); !iter.done(); 1147 for (SourcePositionTableIterator iter(source_position_table); !iter.done();
1148 iter.Advance()) { 1148 iter.Advance()) {
1149 if (iter.is_statement()) { 1149 if (iter.is_statement()) {
1150 jit_logger_->AddCodeLinePosInfoEvent( 1150 jit_logger_->AddCodeLinePosInfoEvent(
1151 jit_handler_data, iter.code_offset(), iter.source_position(), 1151 jit_handler_data, iter.code_offset(),
1152 iter.source_position().ScriptOffset(),
1152 JitCodeEvent::STATEMENT_POSITION); 1153 JitCodeEvent::STATEMENT_POSITION);
1153 } 1154 }
1154 jit_logger_->AddCodeLinePosInfoEvent(jit_handler_data, iter.code_offset(), 1155 jit_logger_->AddCodeLinePosInfoEvent(
1155 iter.source_position(), 1156 jit_handler_data, iter.code_offset(),
1156 JitCodeEvent::POSITION); 1157 iter.source_position().ScriptOffset(), JitCodeEvent::POSITION);
1157 } 1158 }
1158 jit_logger_->EndCodePosInfoEvent(code, jit_handler_data); 1159 jit_logger_->EndCodePosInfoEvent(code, jit_handler_data);
1159 } 1160 }
1160 } 1161 }
1161 1162
1162 void Logger::CodeNameEvent(Address addr, int pos, const char* code_name) { 1163 void Logger::CodeNameEvent(Address addr, int pos, const char* code_name) {
1163 if (code_name == NULL) return; // Not a code object. 1164 if (code_name == NULL) return; // Not a code object.
1164 Log::MessageBuilder msg(log_); 1165 Log::MessageBuilder msg(log_);
1165 msg.Append("%s,%d,", 1166 msg.Append("%s,%d,",
1166 kLogEventsNames[CodeEventListener::SNAPSHOT_CODE_NAME_EVENT], pos); 1167 kLogEventsNames[CodeEventListener::SNAPSHOT_CODE_NAME_EVENT], pos);
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
1777 1778
1778 if (profiler_listener_.get() != nullptr) { 1779 if (profiler_listener_.get() != nullptr) {
1779 removeCodeEventListener(profiler_listener_.get()); 1780 removeCodeEventListener(profiler_listener_.get());
1780 } 1781 }
1781 1782
1782 return log_->Close(); 1783 return log_->Close();
1783 } 1784 }
1784 1785
1785 } // namespace internal 1786 } // namespace internal
1786 } // namespace v8 1787 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698