RESOLVED WONTFIX247363
--enableDollarVM = true use In MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=247363
Summary --enableDollarVM = true use In MiniBrowser
wjllz
Reported 2022-11-02 06:43:56 PDT
Hey, I use xcode to build all webkit project, and I run MiniBrowser.app, I know when I run javascriptcore singlely, I could use additional function like |describe|, |$vm.breakpoint(true)|, when I run MiniBrowser.app, is there a way to still could use it? Like : <script> let arr = [1.1, 2.2, 3.3]; console.log(describe(arr); $vm.breakpoint(true); </script> And when I run javascriptcore singlely, I could use |--enableDollarVM=true| to enable some useful function, when I use MiniBrowser.app , is there still a way to use "|--enableDollarVM=true|" flag? And How? Thank u. I think If I could use this, I could dump the DFG IR when I use minibrowser.app....
Attachments
Mark Lam
Comment 1 2022-11-02 14:10:19 PDT
1. $vm is disabled on release builds by default. Are you using a debug build? 2. $vm is only meant to be used by VM developers for debugging and testing purposes. 3. You don't need $vm to dump DFG IR. There are options to dump them. See OptionsList.h. What platform are you running on?
wjllz
Comment 2 2022-11-02 18:28:02 PDT
(In reply to Mark Lam from comment #1) > 1. $vm is disabled on release builds by default. Are you using a debug > build? > 2. $vm is only meant to be used by VM developers for debugging and testing > purposes. > 3. You don't need $vm to dump DFG IR. There are options to dump them. See > OptionsList.h. > > What platform are you running on? I run it in macos, and I build it in debug version. I know how to dumpIR when I use javascrptcore, when I finish building, I have a executable named "jsc", then I could use : >. ./jsc test.js --DumpGraphAtEachPhase=true But I don't know how to use |DumpGraphAtEachPhase| when I use MiniBrowser.app(not jsc ), like: >. ./MiniBrowser test.html --DumpGraphAtEachPhase=true Thx
wjllz
Comment 3 2022-11-02 18:28:26 PDT
(In reply to Mark Lam from comment #1) > 1. $vm is disabled on release builds by default. Are you using a debug > build? > 2. $vm is only meant to be used by VM developers for debugging and testing > purposes. > 3. You don't need $vm to dump DFG IR. There are options to dump them. See > OptionsList.h. > > What platform are you running on? I run it in macos, and I build it in debug version. I know how to dumpIR when I use javascrptcore, when I finish building, I have a executable named "jsc", then I could use : >. ./jsc test.js --DumpGraphAtEachPhase=true But I don't know how to use |DumpGraphAtEachPhase| when I use MiniBrowser.app(not jsc ), like: >. ./MiniBrowser test.html --DumpGraphAtEachPhase=true Thx
Mark Lam
Comment 4 2022-11-02 18:59:26 PDT
Ok, if you're using these options for development or debugging, that's fine. To enable any JSC options, just run mini browser with environment variables set in your shell like this: __XPC_JSC_useDollarVM=1 __XPC_JSC_dumpGraphAtEachPhase=1 The __XPC_ prefix is needed if you're using WebKit2 processes. For more help, you can ask in the #jsc or #dev channels at webkit.slack.com. As for this bug, you're welcome to contribute a patch to enhance MiniBrowser to support taking options and routing them to JSC if you like. Otherwise, we won't be adding these options to MiniBrowser. There is no reason to add it.
wjllz
Comment 5 2022-11-02 20:09:08 PDT
(In reply to Mark Lam from comment #4) > Ok, if you're using these options for development or debugging, that's fine. > To enable any JSC options, just run mini browser with environment variables > set in your shell like this: > > __XPC_JSC_useDollarVM=1 __XPC_JSC_dumpGraphAtEachPhase=1 > > The __XPC_ prefix is needed if you're using WebKit2 processes. > > For more help, you can ask in the #jsc or #dev channels at webkit.slack.com. > > As for this bug, you're welcome to contribute a patch to enhance MiniBrowser > to support taking options and routing them to JSC if you like. Otherwise, > we won't be adding these options to MiniBrowser. There is no reason to add > it. got it! thank u!
Note You need to log in before you can comment on or make changes to this bug.