<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 1, 2017 at 7:14 AM, Jiri Danek <span dir="ltr"><<a href="mailto:jdanek@redhat.com" target="_blank">jdanek@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Fri, Sep 1, 2017 at 1:33 AM, Jaeheon Yi <span dir="ltr"><<a href="mailto:jaeheon@google.com" target="_blank">jaeheon@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">The interface files you see are for a prototype of Java Tsan that's internal to Google. It's for use by a JDK that we customized with extensive JVM patches, and enables running the Tsan engine on Java and native code simultaneously. <div><br></div><div>We presented this prototype recently at the JVM Language Summit. Here's the talk:<div><a href="https://www.youtube.com/watch?v=UykhZ36W04I" target="_blank">https://www.youtube.com/watch?<wbr>v=UykhZ36W04I</a><br></div><div><br></div><div>We are starting to explore how to upstream the JVM patches. It's going to be tricky: The patches are fairly invasive, the setup and expectations are different in terms of upstream vs. home-grown build system, and the whole thing will require healthy upstream buy-in. This will all take time, so no promises of a speedy release, unfortunately.</div></div></div></blockquote><div><br></div></span><div>I can imagine. Thanks for the info and the talk. I am not holding my breath.</div><span><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div>Since you seem to be ok with bytecode rewriting (we have reasons for not doing that), I would like to point you to FastTrack, a pure-Java implementation of the Happens-Before race detection algorithm.</div><div><a href="https://github.com/stephenfreund/RoadRunner" target="_blank">https://github.com/stephenfreu<wbr>nd/RoadRunner</a><br></div><div>(Disclosure) I worked with the tool and the authors in my grad student days. </div><div>I see it's been updated recently too, so feel free to give it a spin.</div></div></div></blockquote><div><br></div></span><div>Thanks! I did. It seems not to understand Thread Pools. JDK docs say "Memory consistency effects: Actions in a thread prior to submitting a Runnable object to an Executor happen-before its execution begins, perhaps in another thread.", but if I am reading the errors from RoadRunner properly, the tool does not see that. Other than that, it seems to work.</div></div></div></div></blockquote><div><br></div><div>Check out InstrumentationFilter. I recall we avoided instrumenting JDK classes (for $reasons; I don't remember), but maybe you can add just the Executor class you need. </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><span class="gmail-m_6117316940067188357HOEnZb"><font color="#888888"><div>-- <br></div><div class="gmail-m_6117316940067188357m_-2652185333590926752gmail_signature"><div dir="ltr"><div>Jiří Daněk</div></div></div>
</font></span></div></div>
</blockquote></div><br></div></div>