<div dir="ltr">+David Li and Vedant Kumar who are active in this area</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 25, 2017 at 2:06 AM, Roger Pau Monné via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Adding who I think are the maintainers of the profile related llvm<br>
bits, sorry should have done that earlier.<br>
<div class="HOEnZb"><div class="h5"><br>
On Wed, Oct 25, 2017 at 08:26:18AM +0100, Roger Pau Monné via llvm-dev wrote:<br>
> Hello,<br>
><br>
> I've been working on implementing some basic functionality in order to<br>
> use the llvm profiling functionality inside of a kernel (the Xen<br>
> hypervisor). The only functionality I'm interested in is being able to<br>
> reset the counters, get the size of the data, and dump the data into a<br>
> memory buffer.<br>
><br>
> I have to admit I haven't been able to find a lot of documentation<br>
> about how this data is stored inside of the different sections, but<br>
> with the code in compiler_rt/libs/profile I've been able to craft<br>
> something that seems to do something sensible.<br>
><br>
> I have however a couple of questions:<br>
><br>
>  - The "Values" field in __llvm_profile_data always seems to be NULL.<br>
>    Is this expected? What/why could cause this?<br>
><br>
>  - The fields in the NumValueSites array inside of __llvm_profile_data<br>
>    also seem to always be 0.<br>
><br>
>  - Since what I'm coding is a decoupled replacement for the profiling<br>
>    runtime inside of compiler_rt, is there anyway that at compile or<br>
>    run time I can fetch the version of the profiling data?<br>
>    I'm mostly worried that at some point llvm will bump the version<br>
>    and change the layout, and then I will have to update my runtime<br>
>    accordingly, but without llvm reporting the version used by the<br>
>    compiler it's going to be very hard to keep backwards<br>
>    compatibility or to detect version bumps.<br>
><br>
> Thanks, Roger.<br>
> ______________________________<wbr>_________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><span style="font-family:Times;font-size:medium"><table cellspacing="0" cellpadding="0"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small"><td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Teresa Johnson |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tejohnson@google.com" target="_blank">tejohnson@google.com</a> |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"> 408-460-2413</td></tr></tbody></table></span></div>
</div>