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

Issue 264933006: Fix edge case where profiler would miss the caller of the top frame (Closed)

Created:
6 years, 7 months ago by Cutch
Modified:
6 years, 7 months ago
Reviewers:
srdjan, siva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Fix edge case where profiler would miss the caller of the top frame. Some stubs (and intrinsics) do not push a frame onto the stack leaving the frame pointer in the caller. PC -> STUB FP -> DART3 <-+ DART2 <-| <- TOP FRAME RETURN ADDRESS. DART1 <-| ..... In this case, traversing the linked stack frames will not collect a PC inside DART3. The stack will incorrectly be: STUB, DART2, DART1. In Dart code, after pushing the FP onto the stack, an IP in the current function is pushed onto the stack as well. This stack slot is called the PC marker. We can use the PC marker to insert DART3 into the stack so that it will correctly be: STUB, DART3, DART2, DART1. Note the inserted PC may not accurately reflect the true return address from STUB. R=asiva@google.com, srdjan@google.com Committed: https://code.google.com/p/dart/source/detail?r=35762

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 9

Patch Set 5 : #

Total comments: 14

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : #

Patch Set 10 : #

Total comments: 4

Patch Set 11 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+217 lines, -35 lines) Patch
M runtime/vm/isolate.h View 1 2 3 4 5 3 chunks +3 lines, -1 line 0 comments Download
M runtime/vm/profiler.h View 1 2 3 4 5 6 7 8 9 4 chunks +71 lines, -8 lines 0 comments Download
M runtime/vm/profiler.cc View 1 2 3 4 5 6 7 8 9 10 7 chunks +110 lines, -1 line 0 comments Download
M runtime/vm/reusable_handles.h View 1 2 3 4 5 6 2 chunks +33 lines, -25 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Cutch
6 years, 7 months ago (2014-05-02 17:49:09 UTC) #1
srdjan
lgtm https://codereview.chromium.org/264933006/diff/60001/runtime/vm/profiler.cc File runtime/vm/profiler.cc (right): https://codereview.chromium.org/264933006/diff/60001/runtime/vm/profiler.cc#newcode913 runtime/vm/profiler.cc:913: class FixTopFrameVisitor : public SampleVisitor { Make SampleVisitor ...
6 years, 7 months ago (2014-05-02 18:20:29 UTC) #2
Cutch
https://codereview.chromium.org/264933006/diff/60001/runtime/vm/profiler.cc File runtime/vm/profiler.cc (right): https://codereview.chromium.org/264933006/diff/60001/runtime/vm/profiler.cc#newcode913 runtime/vm/profiler.cc:913: class FixTopFrameVisitor : public SampleVisitor { On 2014/05/02 18:20:29, ...
6 years, 7 months ago (2014-05-02 18:37:02 UTC) #3
siva
LGTM with some comments. https://codereview.chromium.org/264933006/diff/60002/runtime/vm/profiler.cc File runtime/vm/profiler.cc (right): https://codereview.chromium.org/264933006/diff/60002/runtime/vm/profiler.cc#newcode921 runtime/vm/profiler.cc:921: void VisitSample(Sample* sample) { const ...
6 years, 7 months ago (2014-05-02 20:43:36 UTC) #4
Cutch
PTAL, I ended up cleaning up some comments in reusable_handles.h and adding a reusable Code ...
6 years, 7 months ago (2014-05-05 15:06:26 UTC) #5
siva
lgtm https://codereview.chromium.org/264933006/diff/160001/runtime/vm/profiler.cc File runtime/vm/profiler.cc (right): https://codereview.chromium.org/264933006/diff/160001/runtime/vm/profiler.cc#newcode922 runtime/vm/profiler.cc:922: REUSABLE_CODE_HANDLESCOPE(isolate()); You could move this REUSABLE_CODE_HANDLESCOPE after the ...
6 years, 7 months ago (2014-05-05 19:54:39 UTC) #6
Cutch
https://codereview.chromium.org/264933006/diff/160001/runtime/vm/profiler.cc File runtime/vm/profiler.cc (right): https://codereview.chromium.org/264933006/diff/160001/runtime/vm/profiler.cc#newcode922 runtime/vm/profiler.cc:922: REUSABLE_CODE_HANDLESCOPE(isolate()); On 2014/05/05 19:54:39, siva wrote: > You could ...
6 years, 7 months ago (2014-05-05 20:02:09 UTC) #7
Cutch
6 years, 7 months ago (2014-05-05 20:04:21 UTC) #8
Message was sent while issue was closed.
Committed patchset #11 manually as r35762 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698