Commit 12208099 authored by Tobias Tebbi's avatar Tobias Tebbi Committed by Commit Bot

[profiler] allow non-existing source position of inlined call

Turbofan does not always maintain source positions. Since the profiler
is best-effort only, this is ok and we should not assert it.
Source positions for stack traces are computed with an independent
mechanism: the stack walker. It's impossible to use the stack walker
here since it assumes that the frames actually exist.

Bug: chromium:787959
Change-Id: I43c3c4e6de0a9b5f76b05c53af238cb1df6ea1c5
Reviewed-on: https://chromium-review.googlesource.com/822930Reviewed-by: 's avatarAlexei Filippov <alph@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50053}
parent 4623b822
......@@ -252,7 +252,7 @@ void ProfilerListener::RecordDeoptInlinedFrames(CodeEntry* entry,
DCHECK(last_position.IsKnown());
std::vector<CpuProfileDeoptFrame> inlined_frames;
for (SourcePositionInfo& pos_info : last_position.InliningStack(code)) {
DCHECK_NE(pos_info.position.ScriptOffset(), kNoSourcePosition);
if (pos_info.position.ScriptOffset() == kNoSourcePosition) continue;
if (!pos_info.function->script()->IsScript()) continue;
int script_id = Script::cast(pos_info.function->script())->id();
size_t offset = static_cast<size_t>(pos_info.position.ScriptOffset());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment