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

Unified Diff: src/arm/lithium-codegen-arm.cc

Issue 21042003: Patch to enhance the source code line information for profiler. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 years, 5 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
Index: src/arm/lithium-codegen-arm.cc
===================================================================
--- src/arm/lithium-codegen-arm.cc (revision 15993)
+++ src/arm/lithium-codegen-arm.cc (working copy)
@@ -256,6 +256,7 @@
bool LCodeGen::GenerateBody() {
ASSERT(is_generating());
bool emit_instructions = true;
+ int old_position = RelocInfo::kNoPosition;
for (current_instruction_ = 0;
!is_aborted() && current_instruction_ < instructions_->length();
current_instruction_++) {
@@ -274,6 +275,12 @@
instr->Mnemonic());
}
+ int pos = instr->position();
+ if (pos >= 0 && pos != old_position) {
+ RecordPosition(pos);
+ old_position = pos;
+ }
+
instr->CompileToNative(this);
}
EnsureSpaceForLazyDeopt();
@@ -287,6 +294,10 @@
if (deferred_.length() > 0) {
for (int i = 0; !is_aborted() && i < deferred_.length(); i++) {
LDeferredCode* code = deferred_[i];
+
+ int pos = instructions_->at(code->instruction_index())->position();
+ if (pos >=0) RecordPosition(pos);
danno 2013/08/02 10:53:16 Since code is ouput linearly, I think it makes sen
+
Comment(";;; <@%d,#%d> "
"-------------------- Deferred %s --------------------",
code->instruction_index(),

Powered by Google App Engine
This is Rietveld 408576698