<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>Hi </div>
<div>Not sure if this is a clang or llvm related question so I’m sending to both mailing lists.</div>
<div>Anyways, I have few questions regarding size and execution time of instrumented code:</div>
<div>
<div>We are trying to run code coverage on memory limited hardware and investigating both (generating gcov output using —coverage and the llvm’s own way using -fprofile-instr-generate -fcoverage-mapping clang flags) In my questions I refer to the two methods
as llgcov-way and llcovprof-way respectively. </div>
</div>
<div><br>
</div>
<div>Q1- How come size of instrumented code in llgcov-way turns bigger than llcovprof-way? I would imagine the other way because mapping information would go to *.gcno files.</div>
<div><br>
</div>
<div>Q2- The instrumented executable size of both llgcov-way and llcovprof-way (with and without optimization) is bloated 2x to 10x or in some cases 50x depending on the program. Here is output of size command for the variations on a simple test program that
I wrote:</div>
<div>
<div> text data bss dec hex filename</div>
<div> 5625 700 1696 8021 1f55 simpletest.-O0-g.llcovprof.</div>
<div> 12838 776 1808 15422 3c3e simpletest.-O0-g.llgcov.</div>
<div> 1481 492 1616 3589 e05 simpletest.-O0.none</div>
<div> 5337 700 1696 7733 1e35 simpletest.-O1-g.llcovprof.</div>
<div> 12246 776 1792 14814 39de simpletest.-O1-g.llgcov.</div>
<div> 1345 492 1616 3453 d7d simpletest.-O1.none</div>
<div>I was wondering if there is any suggestion for reducing the size either through more optimization or by compromising some feature.</div>
</div>
<div><br>
</div>
<div>Q3- in llcovprof-way since the runtime profile data is collected in a single file, the file system will serialize multi threaded writes, hence increasing the execution time. Is there a way to avoid this?</div>
<div><br>
</div>
<div>Thanks</div>
<div>Ali</div>
</body>
</html>