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

Unified Diff: src/profiler/profiler-listener.cc

Issue 2239773003: [deoptimizer] use correct code/bytecode to compute source position. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: add dcheck Created 4 years, 4 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/deoptimizer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/profiler/profiler-listener.cc
diff --git a/src/profiler/profiler-listener.cc b/src/profiler/profiler-listener.cc
index 1612a539a3bf9debaf7b71971dec467435c2b1f5..7ce874e6c1ef82dcdd927252095ba9856ba3f561 100644
--- a/src/profiler/profiler-listener.cc
+++ b/src/profiler/profiler-listener.cc
@@ -283,7 +283,15 @@ void ProfilerListener::RecordDeoptInlinedFrames(CodeEntry* entry,
it.Next(); // Skip height
SharedFunctionInfo* shared = SharedFunctionInfo::cast(
deopt_input_data->LiteralArray()->get(shared_info_id));
- int source_position = Deoptimizer::ComputeSourcePosition(shared, ast_id);
+ int source_position;
+ if (opcode == Translation::INTERPRETED_FRAME) {
+ source_position =
+ Deoptimizer::ComputeSourcePositionFromBytecodeArray(shared, ast_id);
+ } else {
+ DCHECK(opcode == Translation::JS_FRAME);
+ source_position =
+ Deoptimizer::ComputeSourcePositionFromBaselineCode(shared, ast_id);
+ }
int script_id = v8::UnboundScript::kNoScriptId;
if (shared->script()->IsScript()) {
Script* script = Script::cast(shared->script());
« no previous file with comments | « src/deoptimizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698