Commit d19445ef authored by Peter Marshall's avatar Peter Marshall Committed by Commit Bot

[cpu-profiler] Remove incorrect dchecks from the CPU profiler

There are still some cases where entry->instruction_start() is 0,
meaning that computing pc_offset makes no sense. We don't care about
those cases really; the dcheck in CodeMap::FindEntry will find the
interesting cases.

Bug: v8:7983, v8:8002
Change-Id: I7369f32da15e858f1c7af88f88cede60751b7eea
Reviewed-on: https://chromium-review.googlesource.com/1156398
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54814}
parent f15652b4
......@@ -726,7 +726,7 @@ void ProfileGenerator::RecordTickSample(const TickSample& sample) {
if (pc_entry) {
int pc_offset =
static_cast<int>(attributed_pc - pc_entry->instruction_start());
DCHECK_GE(pc_offset, 0);
// TODO(petermarshall): pc_offset can still be negative in some cases.
src_line = pc_entry->GetSourceLine(pc_offset);
if (src_line == v8::CpuProfileNode::kNoLineNumberInfo) {
src_line = pc_entry->line_number();
......@@ -758,7 +758,7 @@ void ProfileGenerator::RecordTickSample(const TickSample& sample) {
// Find out if the entry has an inlining stack associated.
int pc_offset =
static_cast<int>(stack_pos - entry->instruction_start());
DCHECK_GE(pc_offset, 0);
// TODO(petermarshall): pc_offset can still be negative in some cases.
const std::vector<std::unique_ptr<CodeEntry>>* inline_stack =
entry->GetInlineStack(pc_offset);
if (inline_stack) {
......
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