RESOLVED FIXED 176722
Make jsc dump the command line if JSC_dumpOption environment variable is set with a non-zero value.
https://bugs.webkit.org/show_bug.cgi?id=176722
Summary Make jsc dump the command line if JSC_dumpOption environment variable is set ...
Mark Lam
Reported 2017-09-11 12:46:30 PDT
Currently, specifying the JSC_dumpOption=<non zero value> environment variable will cause JSC options to be dumped via dataLog. This is useful for debugging what options are used for any specific test run. This patch adds the dumping of the command line as well so that it's easier to determine the command line that test scripts invoked jsc with for any given test run (without needing to decode the layers of test scripts).
Attachments
proposed patch. (1.34 KB, patch)
2017-09-11 12:48 PDT, Mark Lam
jfbastien: review+
proposed patch. (1.90 KB, patch)
2017-09-11 13:53 PDT, Mark Lam
no flags
Mark Lam
Comment 1 2017-09-11 12:48:55 PDT
Created attachment 320457 [details] proposed patch.
JF Bastien
Comment 2 2017-09-11 12:51:53 PDT
Comment on attachment 320457 [details] proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=320457&action=review > Source/JavaScriptCore/jsc.cpp:3846 > + if (dumpOptionsOption && strcmp(dumpOptionsOption, "0")) { OptionsOptionOptionsOptionsOptionOptions Code seems to usually do: !strcasecmp(string, "none") || !strcasecmp(string, "no") || !strcasecmp(string, "false") || !strcmp(string, "0") ?
Saam Barati
Comment 3 2017-09-11 12:56:43 PDT
Comment on attachment 320457 [details] proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=320457&action=review >> Source/JavaScriptCore/jsc.cpp:3846 >> + if (dumpOptionsOption && strcmp(dumpOptionsOption, "0")) { > > OptionsOptionOptionsOptionsOptionOptions > > Code seems to usually do: > !strcasecmp(string, "none") || !strcasecmp(string, "no") || !strcasecmp(string, "false") || !strcmp(string, "0") > > ? let's use strncmp Also, Options seems to allow for "false" and "False"
Saam Barati
Comment 4 2017-09-11 12:58:14 PDT
Comment on attachment 320457 [details] proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=320457&action=review >>> Source/JavaScriptCore/jsc.cpp:3846 >>> + if (dumpOptionsOption && strcmp(dumpOptionsOption, "0")) { >> >> OptionsOptionOptionsOptionsOptionOptions >> >> Code seems to usually do: >> !strcasecmp(string, "none") || !strcasecmp(string, "no") || !strcasecmp(string, "false") || !strcmp(string, "0") >> >> ? > > let's use strncmp > Also, Options seems to allow for "false" and "False" I think you should do this after Options::initialize so you can just write code like: if (Options::dumpOptions()) ....
Mark Lam
Comment 5 2017-09-11 13:48:41 PDT
Comment on attachment 320457 [details] proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=320457&action=review >>>> Source/JavaScriptCore/jsc.cpp:3846 >>>> + if (dumpOptionsOption && strcmp(dumpOptionsOption, "0")) { >>> >>> OptionsOptionOptionsOptionsOptionOptions >>> >>> Code seems to usually do: >>> !strcasecmp(string, "none") || !strcasecmp(string, "no") || !strcasecmp(string, "false") || !strcmp(string, "0") >>> >>> ? >> >> let's use strncmp >> Also, Options seems to allow for "false" and "False" > > I think you should do this after Options::initialize so you can just write code like: > if (Options::dumpOptions()) .... I'll change to checking Options::dumpOptions() in CommandLine instead. BTW, JSC_dumpOptions can only be set to an integer 0 to 3. "false", "False", "none", etc are all invalid options.
Mark Lam
Comment 6 2017-09-11 13:53:23 PDT
Created attachment 320469 [details] proposed patch.
Mark Lam
Comment 7 2017-09-11 13:55:33 PDT
Comment on attachment 320469 [details] proposed patch. Thanks for the review.
WebKit Commit Bot
Comment 8 2017-09-11 14:24:51 PDT
Comment on attachment 320469 [details] proposed patch. Clearing flags on attachment: 320469 Committed r221878: <http://trac.webkit.org/changeset/221878>
WebKit Commit Bot
Comment 9 2017-09-11 14:24:53 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 10 2017-09-27 12:33:27 PDT
Note You need to log in before you can comment on or make changes to this bug.