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

Issue 1985293002: Promises: Make debug calls only when debugging (Closed)

Created:
4 years, 7 months ago by gsathya
Modified:
4 years, 7 months ago
Reviewers:
Dan Ehrenberg, adamk
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

Promises: Make debug calls only when debugging Previously, certain calls to DebugPushPromise and DebugPopPromise happened always, without any check to see if we were in a debugging environment. This patch adds a conditional check before making these debug calls to make sure they aren't called when not needed. Before the patch, running --prof over the bluebird benchmarks, brings up these unprotected debug calls -- ticks cpp total name 16 6.7% 2.0% v8::internal::Runtime_DebugPushPromise(int, v8::internal::Object**, v8::internal::Isolate*) 7 2.9% 0.9% v8::internal::Runtime_DebugPopPromise(int, v8::internal::Object**, v8::internal::Isolate*) This patch removes the above calls and provides a 4% improvement (with a 2% variance over 10 runs) in the bluebird benchmark. Committed: https://crrev.com/9eb320ad10a3040d6604e751551095f6681a45b3 Cr-Commit-Position: refs/heads/master@{#36451}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Use local var #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -5 lines) Patch
M src/js/promise.js View 1 2 chunks +6 lines, -5 lines 0 comments Download

Messages

Total messages: 30 (15 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1985293002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1985293002/1
4 years, 7 months ago (2016-05-17 23:30:01 UTC) #2
gsathya
4 years, 7 months ago (2016-05-17 23:30:48 UTC) #5
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-18 00:13:16 UTC) #7
Dan Ehrenberg
More details about the performance analysis would be good for the commit message, but this ...
4 years, 7 months ago (2016-05-18 00:34:46 UTC) #10
gsathya
PTAL https://codereview.chromium.org/1985293002/diff/1/src/js/promise.js File src/js/promise.js (right): https://codereview.chromium.org/1985293002/diff/1/src/js/promise.js#newcode88 src/js/promise.js:88: if (DEBUG_IS_ACTIVE) %DebugPushPromise(promise, Promise); On 2016/05/18 00:34:46, Dan ...
4 years, 7 months ago (2016-05-18 00:50:06 UTC) #13
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1985293002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1985293002/20001
4 years, 7 months ago (2016-05-18 01:07:44 UTC) #15
Dan Ehrenberg
lgtm Sounds great. It'd be nice to have one last edit of the commit message ...
4 years, 7 months ago (2016-05-18 01:08:57 UTC) #16
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-18 01:38:50 UTC) #20
gsathya
On 2016/05/18 01:08:57, Dan Ehrenberg wrote: > lgtm > > Sounds great. It'd be nice ...
4 years, 7 months ago (2016-05-18 19:52:30 UTC) #21
adamk
lgtm
4 years, 7 months ago (2016-05-23 19:00:41 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1985293002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1985293002/20001
4 years, 7 months ago (2016-05-23 19:39:26 UTC) #24
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 7 months ago (2016-05-23 20:11:41 UTC) #26
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/9eb320ad10a3040d6604e751551095f6681a45b3 Cr-Commit-Position: refs/heads/master@{#36451}
4 years, 7 months ago (2016-05-23 20:13:18 UTC) #28
Yang
On 2016/05/23 20:13:18, commit-bot: I haz the power wrote: > Patchset 2 (id:??) landed as ...
4 years, 7 months ago (2016-05-25 15:56:38 UTC) #29
Yang
4 years, 7 months ago (2016-05-25 16:18:58 UTC) #30
Message was sent while issue was closed.
On 2016/05/25 15:56:38, Yang wrote:
> On 2016/05/23 20:13:18, commit-bot: I haz the power wrote:
> > Patchset 2 (id:??) landed as
> > https://crrev.com/9eb320ad10a3040d6604e751551095f6681a45b3
> > Cr-Commit-Position: refs/heads/master@{#36451}
> 
> I'm surprised this does not break any tests, specifically
> cctest/PromiseRejectCallback. In order for the reject callback to work, we
need
> to push and pop promises regardless of whether debugging is enabled, because
> that feature is unrelated to the debugger.

Never mind. I forgot myself that the implementation of that reject callback no
longer relies on the pushed stack of promises, which is now only used for
debugging.

Powered by Google App Engine
This is Rietveld 408576698