Path: csiph.com!goblin1!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!178.20.174.218.MISMATCH!feeder5.feed.usenet.farm!feed.usenet.farm!newsreader4.netcologne.de!news.netcologne.de!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.am4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!border1.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: Fernando Newsgroups: comp.compilers Subject: CFGGrind: Dynamic Control Flow Graph Reconstruction Date: Mon, 25 Nov 2019 09:14:20 -0800 (PST) Organization: Compilers Central Lines: 26 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <19-11-004@comp.compilers> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="60771"; mail-complaints-to="abuse@iecc.com" Keywords: tools Posted-Date: 26 Nov 2019 13:22:56 EST X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com X-Received-Bytes: 2363 X-Received-Body-CRC: 501389702 Xref: csiph.com comp.compilers:2381 Hi all, We would like to present CFGGrind, a dynamic control flow graph reconstructor that uses valgrind's infrastructure. The code is based on callgrind and it is available at https://github.com/rimsa/CFGgrind. CFGGrind reconstructs the CFG of the part of a program that has been executed. It's like a dynamic disassembler. CFGs are reconstructed per function. Our control flow graph representation uses phantom nodes to model branches not taken during the execution. We also have a special halt node to model flows that terminates program execution. We support successive refinements of the control flow graphs by using the outputs produced in a previous run into the next, and we can reconstruct the CFGs of programs that run in parallel. We were able to run our reconstructor in the complete SPEC CPU2017 suite and we compared with other valgrind tools, and with other CFG reconstructors. We are, on average, 11% faster than callgrind and 4.5% slower than nulgrind. Everything is free software. We hope this tool is of interest to the community. Let us know what you think, and if further details are required. Feedback is mostly appreciated, and if anyone wants to contribute to the project, we will be happy to take in patches. Regards, Fernando