<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 21, 2017, at 8:29 AM, Sean Eveson <<a href="mailto:eveson.sean@gmail.com" class="">eveson.sean@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><p class="MsoNormal"><span style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial" class="">Hi Vedant,</span><span class=""></span></p><p class="MsoNormal"><br class=""></p><p class="MsoNormal">> <span style="font-size:9.5pt;font-family:Arial,sans-serif;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial" class="">This sounds fine to me. I don't think we need
to preserve the old single-file behavior. We can add a release note about the
new behavior.</span><span class=""></span></p><p class="MsoNormal">Great!<br class=""></p><p class="MsoNormal"><br class=""></p><p class="MsoNormal">I’d like to change the index.html page to only include
coverage data for the filtered functions and do the same for all the ‘source
view’ pages.<span class=""></span></p><div class=""><span class=""> </span><br class="webkit-block-placeholder"></div><p class="MsoNormal">For the index.html page I plan to do the filtering in
`CoverageReport::prepareFileReports`, which will be quite simple.<span class=""></span></p><div class=""><span class=""> </span><br class="webkit-block-placeholder"></div><p class="MsoNormal">Filtering the lines in the source files will be more
complicated, as I will need to find which function a LineSegment comes from. I
think I can do that by getting the function coverage for each filtered function
from the same file, and then checking if the line segment can be found in any
of those. I was wondering if you can think of a better way of mapping from
lines to functions or if you might have something else in mind?</p></div></div></blockquote><div>I'm not sure it's necessary to map lines to functions. One alternative is to create a SourceCoverageView for each filtered function, maintaining a map from filenames to coverage views. When you're done creating all the views, you can walk over the map, emitting all the views for each file. Wdyt?</div><div><br class=""></div><div>vedant</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><p class="MsoNormal"><span class=""></span></p><div class=""><span class=""> </span><br class="webkit-block-placeholder"></div><div class="">











<br class="webkit-block-placeholder"></div><p class="MsoNormal">Thanks for your help,<span class=""></span></p><div class=""><span class=""></span><br class="webkit-block-placeholder"></div><div class="gmail_extra"><br clear="all" class=""><div class=""><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><span style="font-family: 'Segoe UI', 'Segoe UI Web Regular', 'Segoe UI Symbol', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18.85px;" class="">Sean Eveson</span><br style="font-family: 'Segoe UI', 'Segoe UI Web Regular', 'Segoe UI Symbol', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18.85px;" class=""><span style="font-family: 'Segoe UI', 'Segoe UI Web Regular', 'Segoe UI Symbol', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18.85px;" class="">SN Systems - Sony Interactive Entertainment</span><br class=""></div></div></div></div></div>
<br class=""><div class="gmail_quote">On Wed, Sep 20, 2017 at 6:23 PM, Vedant Kumar <span dir="ltr" class=""><<a href="mailto:vsk@apple.com" target="_blank" class="">vsk@apple.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><br class=""><div class=""><span class=""><blockquote type="cite" class=""><div class="">On Sep 20, 2017, at 7:08 AM, Sean Eveson via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="m_-4854140844903962386Apple-interchange-newline"><div class=""><div dir="ltr" class=""><p class="MsoNormal"><span class="">Hi All,</span><br class=""></p><div class=""><span class=""> </span><br class="m_-4854140844903962386webkit-block-placeholder"></div><p class="MsoNormal"><span class="">Normally when produc</span>ing<span class=""> HTML with llvm-cov you get an index.html file and a
directory structure </span>containing<span class=""> .html files
corresponding to source files.<span class=""></span></span></p><div class=""><span class=""> </span><br class="m_-4854140844903962386webkit-block-placeholder"></div><p class="MsoNormal">Currently w<span class="">hen </span>using any of
the -name*= command line options with -format=html, <span class="">the
output is a single file (functions.html) containing the coverage for those
specific functions.<span class=""></span></span></p><div class=""><span class=""> </span><br class="m_-4854140844903962386webkit-block-placeholder"></div><p class="MsoNormal"><span class="">Having a single file is not as
useful as the full </span><span class="">directory structure </span><span class="">when you have a large number of functions in your
filter (using -name-regex or -name-whitelist). </span>Could we<span class=""> put the single file HTML output behind an option and
produce the full structure by default</span><span style="color:red" class=""> </span>when
using the -name* options<span class="">.</span></p></div></div></blockquote></span><div class="">This sounds fine to me. I don't think we need to preserve the old single-file behavior. We can add a release note about the new behavior.</div><div class=""><br class=""></div><div class="">vedant</div><blockquote type="cite" class=""><div class=""><span class=""><div dir="ltr" class=""><div class=""><span class=""><span class=""></span></span><br class="webkit-block-placeholder"></div><div class=""><span class=""> </span><br class="m_-4854140844903962386webkit-block-placeholder"></div><p class="MsoNormal"><span class="">What do people think?<span class=""></span></span></p><div class=""><span class=""> </span><br class="m_-4854140844903962386webkit-block-placeholder"></div><p class="MsoNormal"><span class="">Thanks,<span class=""></span></span></p><p class="MsoNormal"><span class=""><br class=""></span></p><div class=""><div class="m_-4854140844903962386gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><span style="font-family:'Segoe UI','Segoe UI Web Regular','Segoe UI Symbol','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:13px;line-height:18.85px" class="">Sean Eveson</span><br style="font-family:'Segoe UI','Segoe UI Web Regular','Segoe UI Symbol','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:13px;line-height:18.85px" class=""><span style="font-family:'Segoe UI','Segoe UI Web Regular','Segoe UI Symbol','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:13px;line-height:18.85px" class="">SN Systems - Sony Interactive Entertainment</span><br class=""></div></div></div></div></div>
</div></span>
______________________________<wbr class="">_________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="">llvm-dev@lists.llvm.org</a><br class=""><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank" class="">http://lists.llvm.org/cgi-bin/<wbr class="">mailman/listinfo/llvm-dev</a><br class=""></div></blockquote></div><br class=""></div></blockquote></div><br class=""></div></div>
</div></blockquote></div><br class=""></body></html>