<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 20, 2016 at 1:15 PM, Filipe Cabecinhas <span dir="ltr"><<a href="mailto:filcab@gmail.com" target="_blank">filcab@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wed, Apr 20, 2016 at 6:44 AM, Derek Bruening via llvm-dev<br>
<<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br>
> We will divide the program execution into regular intervals and record a<br>
> snapshot of the working set at each interval boundary. An adaptive strategy<br>
> can keep the number of snapshots bounded across varying total execution time<br>
> by combining adjacent snapshots via logical or. When a snapshot is<br>
> recorded, the shadow memory is cleared so that the next snapshot starts with<br>
> a blank slate. If we use a 64 byte to 1 byte shadow mapping, we can use the<br>
> upper bits to store up to 8 consecutive snapshots in the shadow memory<br>
> itself by shifting rather than clearing the shadow memory on a snapshot.<br>
</span>I forgot to add my previous questions:<br>
<br>
About the working set tool:<br>
How are you thinking about doing the snapshots? How do you plan to<br>
sync the several threads?<br>
Spawning an external process/"thread" (kind of like LSan), or internally?<br></blockquote><div><br></div><div>I do not think synchronized operation is important here.</div><div>The tool should be able to tolerate certain level of racy updates.</div><div>We could either use the spawning thread or a simple time interrupt without sideline thread.</div><div>Sampling without sideline thread has the advantage of providing some sample call stack.</div><div>Sideline thread avoids app thread pausing for the scanning.</div><div>We may implement both.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I know I'm getting to low(ish)-level details, but if you've already<br>
thought about this (possibly about several ways to do this), I'd like<br>
to know more about what avenues you're planning on exploring.<br>
<br>
I'm ok with a "we haven't thought that far ahead about this tool yet" :-)<br>
<br>
Thank you,<br>
<br>
Filipe<br>
<span class=""><br>
> Recording the snapshot will use optimizations to avoid storing for the<br>
> entire address space: only mapped regions will be saved.<br>
><br>
> The report from the tool to the user at the end of execution would<br>
> essentially be a histogram with time on the x axis and the cache lines<br>
> touched on the y axis. The units of time could be selected by the user: cpu<br>
> time, wall clock time, memory access count, etc. The unit determines the<br>
> method of snapshot sampling, whether performance counters for the memory<br>
> access count (or instrumentation to increment a global counter) or an<br>
> itimer. We can record callstacks with each snapshot as well to help give an<br>
> indication of what the program is doing at that point in time, to help the<br>
> user understand the program phases.<br>
><br>
> We expect the time overhead of the tool to be well under the 5x<br>
> EfficiencySanitizer ceiling; presumably it should be under 3x.<br>
><br>
><br>
</span><span class="">> _______________________________________________<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/mailman/listinfo/llvm-dev</a><br>
><br>
<br>
</span><span class="">--<br>
You received this message because you are subscribed to the Google Groups "efficiency-sanitizer" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:efficiency-sanitizer%2Bunsubscribe@google.com">efficiency-sanitizer+unsubscribe@google.com</a>.<br>
To post to this group, send email to <a href="mailto:efficiency-sanitizer@google.com">efficiency-sanitizer@google.com</a>.<br>
</span>To view this discussion on the web visit <a href="https://groups.google.com/a/google.com/d/msgid/efficiency-sanitizer/CAEDE853L4qXUw7YwwYWYLkyRRc6caT%3DgiW8%2BFS8%3D6fg6sT5ufg%40mail.gmail.com" rel="noreferrer" target="_blank">https://groups.google.com/a/google.com/d/msgid/efficiency-sanitizer/CAEDE853L4qXUw7YwwYWYLkyRRc6caT%3DgiW8%2BFS8%3D6fg6sT5ufg%40mail.gmail.com</a>.<br>
</blockquote></div><br></div></div>