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

Issue 1270493002: Fix the failure when enabling v8 profiler or vtune profiler in chromium. (Closed)

Created:
5 years, 4 months ago by chunyang.dai
Modified:
5 years, 4 months ago
Reviewers:
ulan
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Fix the failure when enabling v8 profiler or vtune profiler in chromium. When enabling the v8 profiler (Using the following command parameters: --js-flags=--prof) or vtune profiling in chromium. it will break. This failure is introduced by this CL: https://codereview.chromium.org/1218863002. The reason is that V8 will enable the JITted code logging if --prof is set for V8. And under this condition, the function Logger::LogCodeObjects() will be invoked and it will trigger a mark-compact GC when deserializing the snapshot. This GC will use MemoryReducer to post a delay task by invoking V8Platform::CallDelayedOnForegroundThread() function. But at this point V8 isolation is still under initialization and the PerIsolationData of this isolation has not been created. (isolation_holder.cc:39~40 line). This leads to V8Platform::CallDelayedOnForegroundThread() failure because of segment fault. According to my understanding, I proposed the following fix. If the heap deserialization has not be completed, it does not post the delay task for next GC. BUG=v8:4352 Committed: https://crrev.com/8ae236c0c4bcc7218f2f2dcf909c1410b9ce065e Cr-Commit-Position: refs/heads/master@{#29937}

Patch Set 1 #

Total comments: 1

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -1 line) Patch
M src/heap/heap.cc View 1 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 9 (2 generated)
chunyang.dai
PTAL.
5 years, 4 months ago (2015-07-30 10:14:41 UTC) #2
ulan
Thanks! https://codereview.chromium.org/1270493002/diff/1/src/heap/heap.cc File src/heap/heap.cc (right): https://codereview.chromium.org/1270493002/diff/1/src/heap/heap.cc#newcode969 src/heap/heap.cc:969: memory_reducer_.NotifyMarkCompact(event); Please guard just this line with "if ...
5 years, 4 months ago (2015-07-30 10:34:09 UTC) #3
chunyang.dai
updated. thanks.
5 years, 4 months ago (2015-07-30 13:43:18 UTC) #4
ulan
lgtm
5 years, 4 months ago (2015-07-30 13:48:57 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1270493002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1270493002/20001
5 years, 4 months ago (2015-07-30 13:58:19 UTC) #7
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 4 months ago (2015-07-30 14:30:13 UTC) #8
commit-bot: I haz the power
5 years, 4 months ago (2015-07-30 14:30:54 UTC) #9
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/8ae236c0c4bcc7218f2f2dcf909c1410b9ce065e
Cr-Commit-Position: refs/heads/master@{#29937}

Powered by Google App Engine
This is Rietveld 408576698