From:  Thierry Sans <thierry.sans@gmail.com>
Date:  04 May 2018 05:21:27 Hong Kong Time
Newsgroup:  news.mozilla.org/mozilla.dev.tech.js-engine.internals
Subject:  

Re: Generate CFG

NNTP-Posting-Host:  2607:fea8:a6a0:13d:d91a:c726:fe96:635f

You are right, I removed the IONFILTER part. Moreover, I had to add the option --ion-eager to get something in the output files. 

Finally, I have used the option --compileonly to compile but not run the code. 

My final command is:

$ IONFLAGS=logs,scripts,osi,bailouts ./js  --ion-offthread-compile=off --compileonly --ion-eager /shared/pure.js 2>&1

Thanks a lot for your help. 


On Thursday, May 3, 2018 at 4:10:44 PM UTC-4, Matthew Gaudet wrote:
> Hi, 
> 
> I just tried this locally, and I did see things get generated: My suspicion is that the IONFILTER is incorrect, leading to nothing passing. You can verify by just running without. 
> 
> Also, the docs may be out of date: I see ion.cfg and ion.json, but no cfg.json. 
> 
> 
> > On May 3, 2018, at 10:00 AM, thierry.sans@gmail.com wrote:
> > 
> > Hello,
> > 
> > Using SpiderMonkey, I am trying to generate the Control Flow Graph (CFG) as explained here: 
> > 
> > https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Hacking_Tips#Hacking_tips
> > 
> > I am using the command:
> > 
> > IONFILTER=pdfjs.js:16934 IONFLAGS=logs,scripts,osi,bailouts ./js  --ion-offthread-compile=off ./example.js 2>&1
> > 
> > However the files ion.json and cfg.json are not generated in /tmp/ as described in the documentation. 
> > 
> > Any idea what the problem is?
> > 
> > FYI, I have compiled SpiderMonkey 61 in debug mode (--enable-debug --disable-optimize)
> > 
> > Moreover, is there a way to run SpiderMonkey, generate the CFG graph but without executing the code? 
> > 
> > Thanks a lot. 
> > _______________________________________________
> > dev-tech-js-engine-internals mailing list
> > dev-tech-js-engine-internals@lists.mozilla.org
> > https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals