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

Issue 1341413002: [profiler] Make no frame region detection code more robust [x86/x64] (Closed)

Created:
5 years, 3 months ago by alph
Modified:
5 years, 3 months ago
Reviewers:
Benedikt Meurer, yurys
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[profiler] Make no frame region detection code more robust Upon collection of the stack trace if the current PC falls into the frame building code, the top frame might be in a non-consistent state. That leads to some of the frames could be missing from the stack trace. The patch makes it check instructions under current PC and if they look like the frame setup/destroy code, it skips the entire sample. Support for x86/x64 BUG=chromium:529931 LOG=N Committed: https://crrev.com/12c7bc9a226859c3200609495689592a675a21af Cr-Commit-Position: refs/heads/master@{#30777}

Patch Set 1 #

Total comments: 2

Patch Set 2 : added a check for page boundary #

Total comments: 2

Patch Set 3 : Fix crashes on simulators #

Unified diffs Side-by-side diffs Delta from patch set Stats (+82 lines, -3 lines) Patch
M src/sampler.cc View 1 2 4 chunks +82 lines, -3 lines 0 comments Download

Messages

Total messages: 24 (7 generated)
alph
5 years, 3 months ago (2015-09-15 22:20:32 UTC) #2
Benedikt Meurer
lgtm
5 years, 3 months ago (2015-09-16 03:41:45 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1341413002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1341413002/1
5 years, 3 months ago (2015-09-16 04:42:27 UTC) #5
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux_arm_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_arm_rel/builds/8077)
5 years, 3 months ago (2015-09-16 05:04:52 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1341413002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1341413002/1
5 years, 3 months ago (2015-09-16 05:10:21 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux_dbg on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_dbg/builds/8683)
5 years, 3 months ago (2015-09-16 05:42:07 UTC) #11
yurys
https://codereview.chromium.org/1341413002/diff/1/src/sampler.cc File src/sampler.cc (right): https://codereview.chromium.org/1341413002/diff/1/src/sampler.cc#newcode212 src/sampler.cc:212: if (!memcmp(pc - *offset, pattern->bytes, pattern->bytes_count)) what about the ...
5 years, 3 months ago (2015-09-16 14:42:01 UTC) #12
alph
https://codereview.chromium.org/1341413002/diff/1/src/sampler.cc File src/sampler.cc (right): https://codereview.chromium.org/1341413002/diff/1/src/sampler.cc#newcode212 src/sampler.cc:212: if (!memcmp(pc - *offset, pattern->bytes, pattern->bytes_count)) On 2015/09/16 14:42:01, ...
5 years, 3 months ago (2015-09-16 17:28:51 UTC) #13
yurys
lgtm
5 years, 3 months ago (2015-09-16 20:30:59 UTC) #14
alph
On 2015/09/16 17:28:51, alph wrote: > https://codereview.chromium.org/1341413002/diff/1/src/sampler.cc > File src/sampler.cc (right): > > https://codereview.chromium.org/1341413002/diff/1/src/sampler.cc#newcode212 > ...
5 years, 3 months ago (2015-09-16 20:56:38 UTC) #15
alph
ptal
5 years, 3 months ago (2015-09-16 22:29:52 UTC) #16
yurys
lgtm https://codereview.chromium.org/1341413002/diff/20001/src/sampler.cc File src/sampler.cc (right): https://codereview.chromium.org/1341413002/diff/20001/src/sampler.cc#newcode178 src/sampler.cc:178: const uint32_t kPageSize = 4096; Would be nice ...
5 years, 3 months ago (2015-09-16 22:39:43 UTC) #17
alph
https://codereview.chromium.org/1341413002/diff/20001/src/sampler.cc File src/sampler.cc (right): https://codereview.chromium.org/1341413002/diff/20001/src/sampler.cc#newcode178 src/sampler.cc:178: const uint32_t kPageSize = 4096; On 2015/09/16 22:39:43, yurys ...
5 years, 3 months ago (2015-09-16 23:06:33 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1341413002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1341413002/20001
5 years, 3 months ago (2015-09-16 23:06:55 UTC) #21
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 3 months ago (2015-09-17 00:12:14 UTC) #22
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/12c7bc9a226859c3200609495689592a675a21af Cr-Commit-Position: refs/heads/master@{#30777}
5 years, 3 months ago (2015-09-17 00:12:31 UTC) #23
alph
5 years, 3 months ago (2015-09-17 07:13:41 UTC) #24
SimulatorHelper seems to provide a bogus value of PC sometimes.
In most cases FP is set to zero, which means the simulator is updating
registers, e.g. like in this sample:

sim regs.sp:0x319afbc regs.fp:0x0 regs.pc:0xfffffffe

and we gracefully bail out in HandleProfilerSignal. But sometimes both SP and FP
are valid, but PC is still having that bogus value, e.g.:

sim regs.sp:0x319aea8 regs.fp:0x319aecc regs.pc:0xfffffffe

causing a crash.

Powered by Google App Engine
This is Rietveld 408576698