Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib,tools: fix perm deopts #13384

Merged
merged 4 commits into from
Jun 5, 2017
Merged

lib,tools: fix perm deopts #13384

merged 4 commits into from
Jun 5, 2017

Conversation

mscdex
Copy link
Contributor

@mscdex mscdex commented Jun 2, 2017

CI: https://ci.nodejs.org/job/node-test-pull-request/8429/

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)
  • lib / src
  • tools

@nodejs-github-bot nodejs-github-bot added events Issues and PRs related to the events subsystem / EventEmitter. net Issues and PRs related to the net subsystem. test Issues and PRs related to the tests. tools Issues and PRs related to the tools directory. labels Jun 2, 2017
@mscdex mscdex added events Issues and PRs related to the events subsystem / EventEmitter. net Issues and PRs related to the net subsystem. test Issues and PRs related to the tests. tools Issues and PRs related to the tools directory. process Issues and PRs related to the process subsystem. and removed events Issues and PRs related to the events subsystem / EventEmitter. net Issues and PRs related to the net subsystem. test Issues and PRs related to the tests. tools Issues and PRs related to the tools directory. labels Jun 2, 2017
@mscdex mscdex force-pushed the lib-fix-perm-deopts branch 3 times, most recently from 336d5c2 to a67671f Compare June 2, 2017 07:00
return this.listener.call(this.target, arguments[0], arguments[1],
arguments[2]);
default:
const args = new Array(arguments.length);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can arrayClone() be reused here or does it have a negative performance impact?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, because you cannot pass arguments without penalty except in only one or two cases. apply() is supposed to be one of those cases (which is what was used here before) but for some reason it can still cause a deopt (noticed this in some net benchmarks and tests).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does (...args) work (for everything) any better?
Ref: #12183

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rest parameters are still slower than fast path cases like those used above. I think rest params in general are getting faster, but still not quite where they need to be to replace fast paths.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@refack
Copy link
Contributor

refack commented Jun 3, 2017

Do you think it's prudent to mark these anti-DRY code points for reevaluation after TF&I? Something simple like // fix for deopt.

@mscdex
Copy link
Contributor Author

mscdex commented Jun 3, 2017

IMHO adding such comments is not worth it when we're going to have to look at a large part of core after V8 5.9/6.0 anyway.

This fixes a regression from 53c88fa so that special arguments
can once again be passed to the node executable when running tests.

PR-URL: nodejs#13384
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
PR-URL: nodejs#13384
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
PR-URL: nodejs#13384
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
PR-URL: nodejs#13384
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
@mscdex mscdex merged commit d081548 into nodejs:master Jun 5, 2017
@mscdex mscdex deleted the lib-fix-perm-deopts branch June 5, 2017 21:05
jasnell pushed a commit that referenced this pull request Jun 7, 2017
This fixes a regression from 53c88fa so that special arguments
can once again be passed to the node executable when running tests.

PR-URL: #13384
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
jasnell pushed a commit that referenced this pull request Jun 7, 2017
PR-URL: #13384
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
jasnell pushed a commit that referenced this pull request Jun 7, 2017
PR-URL: #13384
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
jasnell pushed a commit that referenced this pull request Jun 7, 2017
PR-URL: #13384
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
@gibfahn gibfahn mentioned this pull request Jun 15, 2017
3 tasks
@MylesBorins
Copy link
Contributor

Is this applicable to v6.x?

@MylesBorins
Copy link
Contributor

ping @mscdex

@MylesBorins MylesBorins added the baking-for-lts PRs that need to wait before landing in a LTS release. label Aug 14, 2017
@mscdex
Copy link
Contributor Author

mscdex commented Aug 14, 2017

Possibly, but I won't have time to backport anytime soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
events Issues and PRs related to the events subsystem / EventEmitter. net Issues and PRs related to the net subsystem. process Issues and PRs related to the process subsystem. test Issues and PRs related to the tests. tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants