Index: src/compiler.cc |
diff --git a/src/compiler.cc b/src/compiler.cc |
index 35c581f6b09b2bdb09fc3edb499e15ced5005e43..8f732240ee310f5ee908e2b61e782faef452ff6b 100644 |
--- a/src/compiler.cc |
+++ b/src/compiler.cc |
@@ -116,7 +116,8 @@ void CompilationInfo::Initialize(Isolate* isolate, |
opt_count_ = has_shared_info() ? shared_info()->opt_count() : 0; |
no_frame_ranges_ = isolate->cpu_profiler()->is_profiling() |
? new List<OffsetRange>(2) : NULL; |
- if (FLAG_hydrogen_track_positions) { |
+ if (FLAG_hydrogen_track_positions || |
+ isolate_->cpu_profiler()->is_profiling()) { |
inlined_function_infos_ = new std::vector<InlinedFunctionInfo>(); |
track_positions_ = true; |
} else { |
@@ -303,7 +304,6 @@ int CompilationInfo::TraceInlinedFunction(Handle<SharedFunctionInfo> shared, |
os << AsReversiblyEscapedUC16(c); |
} |
} |
- |
os << "\n--- END ---\n"; |
} |
} |
@@ -322,6 +322,14 @@ int CompilationInfo::TraceInlinedFunction(Handle<SharedFunctionInfo> shared, |
} |
+void CompilationInfo::LogDeoptCallPosition(int pc_offset, int inlining_id) { |
+ if (!track_positions_ || IsStub()) return; |
+ DCHECK_LT(static_cast<size_t>(inlining_id), inlined_function_infos_->size()); |
+ inlined_function_infos_->at(inlining_id) |
+ .deopt_pc_offsets.push_back(pc_offset); |
+} |
+ |
+ |
class HOptimizedGraphBuilderWithPositions: public HOptimizedGraphBuilder { |
public: |
explicit HOptimizedGraphBuilderWithPositions(CompilationInfo* info) |