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

tools: single, cross-platform tick processor #2868

Closed
wants to merge 1 commit into from
Closed

tools: single, cross-platform tick processor #2868

wants to merge 1 commit into from

Conversation

matthewloring
Copy link

Currently there are three separate tick processor scripts for
mac, windows, and linux. These have been replaced with a single
node.js script to improve maintainability and remove the need
to preserve parallel logic in these separate places.

/cc @ofrobots @bnoordhuis @Fishrock123 @joaocgreis @Trott

@brendanashworth brendanashworth added the tools Issues and PRs related to the tools directory. label Sep 14, 2015
@Fishrock123
Copy link
Contributor

@matthewloring is this change also being upstreamed into the v8 tick processor so that future changes can be ported easily?

I guess it can't since this depends on core modules.

@matthewloring
Copy link
Author

Yea, unfortunately v8 doesn't want node specific scripts in their codebase (https://codereview.chromium.org/1179173009/). This change should be forward compatible for the most part since it copies in the logic from the JS scripts in v8. This script would only need updating when v8 processing scripts are added or removed and changes of this nature should be alerted through test/parallel/test-tick-processor

@@ -0,0 +1,67 @@
// Copyright 2012 the V8 project authors. All rights reserved.
Copy link
Member

Choose a reason for hiding this comment

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

Does the copyright make sense here? This is all original code, right?

Copy link
Author

Choose a reason for hiding this comment

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

I originally wasn't sure since I transliterated this from the bash script which was V8's. This is original code though. I've removed the copyright.

@bnoordhuis
Copy link
Member

path.join(toolsPath, 'SourceMap.js'),
path.join(toolsPath, 'tickprocessor-driver.js')];

var tempScript = path.join(__dirname, 'tick-processor-input-script-$$');
Copy link
Contributor

Choose a reason for hiding this comment

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

Unlike in shell, the $$ doesn't get expanded to be the process-id. I think you'll have to manually concatenate process.pid.

Copy link
Author

Choose a reason for hiding this comment

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

Fixed.

@ofrobots
Copy link
Contributor

The previous CI failed to launch due to curl: (7) Failed to connect to api.github.com port 443. Launched a new one here: https://ci.nodejs.org/job/node-test-pull-request/311/

@bnoordhuis
Copy link
Member

One more try, it looks like the CI was going through a spot of trouble: https://ci.nodejs.org/job/node-test-pull-request/313/

path.join(toolsPath, 'tickprocessor-driver.js')];

var tempScript = path.join(__dirname, 'tick-processor-tmp-' + process.pid);
var cat = cp.spawn('cat', scriptFiles);
Copy link
Contributor

Choose a reason for hiding this comment

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

Will cat be available in all the environments?

Copy link
Contributor

Choose a reason for hiding this comment

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

Not on windows, it's type there. And why use cat, why not use node to read the files and pipe them to tempScript?

Copy link
Author

Choose a reason for hiding this comment

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

Good catch! I've rewritten this but am not sure if my solution is idiomatic. @thefourtheye @sam-github Does this solution seem appropriate?

@matthewloring
Copy link
Author

@bnoordhuis Do these CI build failures seem to be caused by my PR specifically or are these general?

@bnoordhuis
Copy link
Member

It's possible I forgot to tell the CI to rebase. Let's give it one more spin: https://ci.nodejs.org/job/node-test-pull-request/325/

@bnoordhuis
Copy link
Member

Sigh, Jenkins was just restarted. New run: https://ci.nodejs.org/job/node-test-pull-request/330/

Currently there are three separate tick processor scripts for
mac, windows, and linux. These have been replaced with a single
node.js script to improve maintainability and remove the need
to preserve parallel logic in these separate places.
@matthewloring
Copy link
Author

Some of the Ubuntu machines are hanging but the CI looks clean otherwise.

@ofrobots
Copy link
Contributor

Something jenkins, something something. New CI: https://ci.nodejs.org/job/node-test-pull-request/337/

@matthewloring
Copy link
Author

The armv7-wheezy failure is unrelated. Otherwise that run looks good!

bnoordhuis pushed a commit that referenced this pull request Sep 18, 2015
Currently there are three separate tick processor scripts for
mac, windows, and linux. These have been replaced with a single
node.js script to improve maintainability and remove the need
to preserve parallel logic in these separate places.

PR-URL: #2868
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
@bnoordhuis
Copy link
Member

Thanks Matt, landed in e0c3d2a.

@thefourtheye You didn't formally LGTM it but I put you down as a reviewer anyway.

@bnoordhuis bnoordhuis closed this Sep 18, 2015
@thefourtheye
Copy link
Contributor

@bnoordhuis Oops, sorry. Code looks okay to me, though I didn't get a chance to test it.

@Fishrock123
Copy link
Contributor

What semver- is this?

This removes the old scripts entirely but really doesn't seem semver-major? Is it?

@matthewloring
Copy link
Author

The profiler tools don't constitute part of the public API so I would guess semver-minor but I'm still just understanding semantic versioning.

@Fishrock123
Copy link
Contributor

Perhaps we should make those other files just call the new one for 4.x?

@ChALkeR
Copy link
Member

ChALkeR commented Sep 20, 2015

@Fishrock123 Files changed in this PR aren't even packaged. Doesn't look like it deserves even a semver-minor to me.

rvagg pushed a commit that referenced this pull request Sep 22, 2015
Currently there are three separate tick processor scripts for
mac, windows, and linux. These have been replaced with a single
node.js script to improve maintainability and remove the need
to preserve parallel logic in these separate places.

PR-URL: #2868
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
@rvagg rvagg mentioned this pull request Sep 22, 2015
@matthewloring matthewloring deleted the node-tick-processor branch February 25, 2016 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants