Commit 6e983258 authored by adamk's avatar adamk Committed by Commit bot

Reland of Add crash instrumentation for crbug.com/621147 (patchset #1 id:1 of...

Reland of Add crash instrumentation for crbug.com/621147 (patchset #1 id:1 of https://codereview.chromium.org/2118493002/ )

Reason for revert:
By request from ishell, plan is to leave this in master for awhile longer

Original issue's description:
> Revert of Add crash instrumentation for crbug.com/621147 (patchset #5 id:80001 of https://codereview.chromium.org/2100313002/ )
>
> Reason for revert:
> Instrumentation not needed on master branch
>
> Original issue's description:
> > Add crash instrumentation for crbug.com/621147
> >
> > BUG=chromium:621147
> > LOG=N
> > R=ishell@chromium.org,cbruni@chromium.org
> >
> > Committed: https://crrev.com/5ff508a82299f20a0d9828cf73072a4f4772fab8
> > Cr-Commit-Position: refs/heads/master@{#37328}
>
> TBR=verwaest@chromium.org,cbruni@chromium.org,ishell@chromium.org,mlippautz@chromium.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=chromium:621147, chromium:624764
>
> Committed: https://crrev.com/b324850900e531ccee03f1712333f13dfcf15427
> Cr-Commit-Position: refs/heads/master@{#37456}

TBR=verwaest@chromium.org,cbruni@chromium.org,ishell@chromium.org,mlippautz@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:621147, chromium:624764

Review-Url: https://codereview.chromium.org/2114743002
Cr-Commit-Position: refs/heads/master@{#37458}
parent c88cc5b1
......@@ -2535,6 +2535,27 @@ MaybeHandle<Object> BinaryOpIC::Transition(
Handle<Object> right) {
BinaryOpICState state(isolate(), extra_ic_state());
#ifdef V8_TARGET_ARCH_X64
// Crash instrumentation for crbug.com/621147.
uintptr_t left_raw = reinterpret_cast<uintptr_t>(*left);
uintptr_t hole_raw =
reinterpret_cast<uintptr_t>(isolate()->heap()->the_hole_value());
if ((hole_raw & ((1ull << 32) - 1)) == (left_raw & ((1ull << 32) - 1))) {
Code* c = GetCode();
Code::Kind kind = c->kind();
int instruction_size = c->instruction_size() + 2 * sizeof(Address);
byte* instructions = static_cast<byte*>(alloca(instruction_size));
Address* start = reinterpret_cast<Address*>(instructions);
start[0] = fp();
start[1] = pc();
for (int i = 2 * sizeof(Address); i < instruction_size; i++) {
instructions[i] = c->instruction_start()[i];
}
isolate()->PushStackTraceAndDie(0xBAAAAAAD, instructions, fp(),
static_cast<unsigned int>(kind));
}
#endif // V8_TARGET_ARCH_X64
// Compute the actual result using the builtin for the binary operation.
Handle<Object> result;
switch (state.op()) {
......
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