Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
tickprocessor: pass proper arguments to /bin/sh#8480
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
indutny commented Sep 10, 2016 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
indutny commented Sep 10, 2016
cc @nodejs/v8 |
indutny commented Sep 10, 2016
Should be backported everywhere cc @thealphanerd |
indutny commented Sep 10, 2016
One more patch is needed to make this thing work properly on all systems, but I have to file it to V8 team first. Will link it here in a bit. |
indutny commented Sep 10, 2016
Ah, actually this patch should be for node only... |
indutny commented Sep 10, 2016
I'll push it to this branch too in a moment. |
`/bin/sh -c` trick wasn't working for several reasons: * `/bin/sh -c "..."` expects the first argument after `"..."` to be a `$0`, not a `$1`. Previously `-n` wasn't passed to `nm` because of this, and many symbols were ordered improperly * `c++filt` was applied not only to the names of the functions but to their `nm` prefixes like `t` and `a` (`t xxx` turns into `unsigned char xxx`). Instead of applying `c++filt` wide and using `sh -c`, execute `nm` as requested by `deps/v8/tools/tickprocessor.js` and apply `c++filt` to all matching entries manually. Included test demonstrates where previous approach failed: all builtins were merged into `v8::internal::Builtins::~Builtins`, because they were prefixed by `t` in `nm` output.
b3b244a to 97bd7cdCompareindutny commented Sep 10, 2016
Force-pushed proper fix, PTAL |
indutny commented Sep 10, 2016
indutny commented Sep 10, 2016
CI is green with unrelated |
Trott commented Sep 10, 2016
Is there any chance at all that this fixes the flakiness on nearly all platforms of the existing test-tick-processor test? (See #4427.) I know nearly nothing about the V8 tick processor, so I'm asking from a point of near-complete ignorance. |
indutny commented Sep 10, 2016
@Trott unlikely, this affects only macs. |
indutny commented Sep 12, 2016
@bnoordhuis ping ;) |
indutny commented Sep 12, 2016
ping @nodejs/v8 too |
matthewloring commented Sep 12, 2016
LGTM |
indutny commented Sep 13, 2016
Thank you, landing. |
indutny commented Sep 13, 2016
Landed in 15d72c8. |
`/bin/sh -c` trick wasn't working for several reasons: * `/bin/sh -c "..."` expects the first argument after `"..."` to be a `$0`, not a `$1`. Previously `-n` wasn't passed to `nm` because of this, and many symbols were ordered improperly * `c++filt` was applied not only to the names of the functions but to their `nm` prefixes like `t` and `a` (`t xxx` turns into `unsigned char xxx`). Instead of applying `c++filt` wide and using `sh -c`, execute `nm` as requested by `deps/v8/tools/tickprocessor.js` and apply `c++filt` to all matching entries manually. Included test demonstrates where previous approach failed: all builtins were merged into `v8::internal::Builtins::~Builtins`, because they were prefixed by `t` in `nm` output. PR-URL: #8480 Reviewed-By: Matthew Loring <[email protected]>
| functionmacCppfiltNm(out){ | ||
| // Re-grouped copy-paste from `tickprocessor.js` | ||
| constFUNC_RE=/^([0-9a-fA-F]{8,16}[iItT])(.*)$/gm; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a comment, just a note: this matches any hex digit string >= 8 && <= 16 characters long, not just strings of size 8 or 16. Ditto below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a copy-paste from V8, but I agree with you. It doesn't matter that much in the end, though.
bnoordhuis commented Sep 13, 2016
Belated LGTM. |
`/bin/sh -c` trick wasn't working for several reasons: * `/bin/sh -c "..."` expects the first argument after `"..."` to be a `$0`, not a `$1`. Previously `-n` wasn't passed to `nm` because of this, and many symbols were ordered improperly * `c++filt` was applied not only to the names of the functions but to their `nm` prefixes like `t` and `a` (`t xxx` turns into `unsigned char xxx`). Instead of applying `c++filt` wide and using `sh -c`, execute `nm` as requested by `deps/v8/tools/tickprocessor.js` and apply `c++filt` to all matching entries manually. Included test demonstrates where previous approach failed: all builtins were merged into `v8::internal::Builtins::~Builtins`, because they were prefixed by `t` in `nm` output. PR-URL: #8480 Reviewed-By: Matthew Loring <[email protected]>
MylesBorins commented Oct 11, 2016
@indutny this lands cleanly on If I replace all instances of Thoughts? |
targos commented Oct 11, 2016
I think the regex should be changed: Builtin_DateNow => Runtime_DateCurrentTime |
`/bin/sh -c` trick wasn't working for several reasons: * `/bin/sh -c "..."` expects the first argument after `"..."` to be a `$0`, not a `$1`. Previously `-n` wasn't passed to `nm` because of this, and many symbols were ordered improperly * `c++filt` was applied not only to the names of the functions but to their `nm` prefixes like `t` and `a` (`t xxx` turns into `unsigned char xxx`). Instead of applying `c++filt` wide and using `sh -c`, execute `nm` as requested by `deps/v8/tools/tickprocessor.js` and apply `c++filt` to all matching entries manually. Included test demonstrates where previous approach failed: all builtins were merged into `v8::internal::Builtins::~Builtins`, because they were prefixed by `t` in `nm` output. PR-URL: #8480 Reviewed-By: Matthew Loring <[email protected]>
MylesBorins commented Nov 22, 2016 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
landed in v4.x as 54c38eb changing the regex and let -> var got the tests passing. |
`/bin/sh -c` trick wasn't working for several reasons: * `/bin/sh -c "..."` expects the first argument after `"..."` to be a `$0`, not a `$1`. Previously `-n` wasn't passed to `nm` because of this, and many symbols were ordered improperly * `c++filt` was applied not only to the names of the functions but to their `nm` prefixes like `t` and `a` (`t xxx` turns into `unsigned char xxx`). Instead of applying `c++filt` wide and using `sh -c`, execute `nm` as requested by `deps/v8/tools/tickprocessor.js` and apply `c++filt` to all matching entries manually. Included test demonstrates where previous approach failed: all builtins were merged into `v8::internal::Builtins::~Builtins`, because they were prefixed by `t` in `nm` output. PR-URL: #8480 Reviewed-By: Matthew Loring <[email protected]>
Checklist
make -j4 test(UNIX), orvcbuild test nosign(Windows) passesAffected core subsystem(s)
tickprocessor
Description of change
/bin/sh -ctrick wasn't working for several reasons:/bin/sh -c "..."expects the first argument after"..."to be a$0, not a$1. Previously-nwasn't passed tonmbecause ofthis, and many symbols were ordered improperly
c++filtwas applied not only to the names of the functions but totheir
nmprefixes liketanda(t xxxturns intounsigned char xxx).Instead of applying
c++filtwide and usingsh -c, executenmasrequested by
deps/v8/tools/tickprocessor.jsand applyc++filtto allmatching entries manually.
Included test demonstrates where previous approach failed: all builtins
were merged into
v8::internal::Builtins::~Builtins, because they wereprefixed by
tinnmoutput.R= @bnoordhuis