<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Dec 11, 2016 at 12:10 PM, Rui Ueyama <span dir="ltr"><<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Sat, Dec 10, 2016 at 3:41 PM, Sean Silva <span dir="ltr"><<a href="mailto:chisophugis@gmail.com" target="_blank">chisophugis@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Sat, Dec 10, 2016 at 2:51 PM, Rafael Avila de Espindola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@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>Rui Ueyama <<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>> writes:<br>
><br>
> This means we produce different results with threads disabled?<br>
><br>
><br>
> Yes. But as long as you pass the same command line arguments, results are<br>
> the same.<br>
<br>
</span>That is still undesirable. Using --no-threads is convenient for<br>
debugging and it makes it harder if that produces a different result.<br>
<br></blockquote><div><br></div></span><div>This is basically a policy decision. Is `--threads`/`--no-threads` allowed to affect the output? Whatever we decide, we should document the decision because it has pretty profound consequences.</div></div></div></div></blockquote><div><br></div></span><div>We could define a policy per a flag, but that's probably too complicated. I'd propose the following simple policy.</div><div><br></div><div>"We guarantee LLD to produce the exact same result if the same input files and the same command line arguments are given in the same order."</div><div><br></div><div>It's easy to remember and should suffice from the users' perspective.</div></div></div></div></blockquote><div><br></div><div>That is the rule that I am in favor of, but Rafael seems to prefer that --threads/--no-threads should not affect the output. Hence we need to come to agreement and document the conclusion.</div><div><br></div><div>Also, the wording should be clear that the output *binary* is guaranteed the same. We are already nondeterministic w.r.t. the order of user diagnostics.</div><div><br></div><div>-- Sean Silva</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class=""><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>(although I think that our build ID already ends up different for threads/no-threads?)</div></div></div></div></blockquote><div><br></div></span><div>We always compute a tree hash, so the build-id is not affected by threads/no-threads.</div><span class=""><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>-- Sean Silva</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Cheers,<br>
Rafael<br>
</blockquote></div><br></div></div>
</blockquote></span></div><br></div></div>
</blockquote></div><br></div></div>