New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 909957 link

Starred by 0 users

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Enable sampling profiler for v8

Project Member Reported by sadrul@chromium.org, Nov 29

Issue description

The sampling profiler was turned on for the compositor thread and the main thread in  issue 788808 . However, it works only for native code, and is unable to handle v8 callstacks. This bug tracks the work needed to allow the sampling profiler to get the callstacks for v8 code.
 
Components: Internals>Metrics
Status: Started (was: Untriaged)
Cc: petermarshall@chromium.org
Actual initial v8 implementation link: https://chromium.googlesource.com/v8/v8.git/+/f4bb38c32124933cabaf78bc5d40e5e205107d7a
(apologies for providing the wrong link earlier)

Also, the linked design doc was written by petermarshall@.


The "minimum viable product" work required to start using this in Chrome is:

Productionize the proof of concept use of the v8 unwinder, and implement for Mac. https://chromium-review.googlesource.com/c/chromium/src/+/1355945

Sanity check the sp and fp registers against the stack extents within the v8 implementation.
I'm working on a CL to bounds check the sp and fp against the provided stack - I'll send it your way soon
Project Member

Comment 5 by bugdroid1@chromium.org, Dec 4

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/54ded121cea1c12eef90fabf3ac14f83b7e9c15a

commit 54ded121cea1c12eef90fabf3ac14f83b7e9c15a
Author: Peter Marshall <petermarshall@chromium.org>
Date: Tue Dec 04 15:04:51 2018

[unwinder] Add bounds checking to the unwinder API

It's possible that we encounter incorrect SP or FP values while
unwinding the stack. One reason is that third-party code like virus
protection may change the stack. If we encounter values for SP or FP
that don't make sense, we should bail out of unwinding and return false.

Bug: v8:8116, chromium:909957
Change-Id: I630fef3f619382c7035be50b86072be349ed185c
Reviewed-on: https://chromium-review.googlesource.com/c/1358514
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58018}
[modify] https://crrev.com/54ded121cea1c12eef90fabf3ac14f83b7e9c15a/include/v8.h
[modify] https://crrev.com/54ded121cea1c12eef90fabf3ac14f83b7e9c15a/src/unwinder.cc
[modify] https://crrev.com/54ded121cea1c12eef90fabf3ac14f83b7e9c15a/test/cctest/test-unwinder.cc

Project Member

Comment 6 by bugdroid1@chromium.org, Dec 4

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/54ded121cea1c12eef90fabf3ac14f83b7e9c15a

commit 54ded121cea1c12eef90fabf3ac14f83b7e9c15a
Author: Peter Marshall <petermarshall@chromium.org>
Date: Tue Dec 04 15:04:51 2018

[unwinder] Add bounds checking to the unwinder API

It's possible that we encounter incorrect SP or FP values while
unwinding the stack. One reason is that third-party code like virus
protection may change the stack. If we encounter values for SP or FP
that don't make sense, we should bail out of unwinding and return false.

Bug: v8:8116, chromium:909957
Change-Id: I630fef3f619382c7035be50b86072be349ed185c
Reviewed-on: https://chromium-review.googlesource.com/c/1358514
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58018}
[modify] https://crrev.com/54ded121cea1c12eef90fabf3ac14f83b7e9c15a/include/v8.h
[modify] https://crrev.com/54ded121cea1c12eef90fabf3ac14f83b7e9c15a/src/unwinder.cc
[modify] https://crrev.com/54ded121cea1c12eef90fabf3ac14f83b7e9c15a/test/cctest/test-unwinder.cc

Sign in to add a comment