<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 17, 2015 at 5:34 PM, Justin Bogner <span dir="ltr"><<a href="mailto:mail@justinbogner.com" target="_blank" class="cremed">mail@justinbogner.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 2015 Jun 17, at 13:53, Diego Novillo <<a href="mailto:dnovillo@google.com" class="cremed">dnovillo@google.com</a>> wrote:<br></span><div><div class="h5"><br>
>   • -fprofile-generate=path-prefix would cause the instrumented<br>
>     binary to write the profile <path-prefix>/default.profraw. If<br>
>     <path-prefix> does not exist, it is created by the runtime.<br>
>   • -fprofile-use=path-prefix would cause the compiler to read<br>
>     from <path-prefix>/default.profile.<br>
<br>
</div></div>The path-prefix versions are a bit of an odd fit for the instrprof<br>
stuff - I'd prefer if they dealt with the path to the file. I can see<br>
how that might be difficult to do and still be compatible though.<br>
<br>
Maybe we could make the -fprofile-use= version accept a file or<br>
directory, and if a directory is specified then look for the default?<br></blockquote><div><br></div><div>Sure. Sounds reasonable.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The other thing that would be nice would be if -fprofile-use=path could<br>
autodetect which kind of profile the path is - that is, It'd be nice to<br>
accept both instrprof and sample profiles with this option.</blockquote><div><br></div><div>Sure.  But this may have a wrinkle. The problem here is that GCC already has a different option for sample profiles (-fauto-profile). Someone using the same flags for both compilers (or migrating off of GCC) might find this problematic. Although, I can't really think a scenario where this would happen.<br></div><div><br></div><div>In a sense, anything that is a superset of GCC's current behaviour should be fine. So, I suppose this is OK.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> I'd limit<br>
this to the path-to-a-file case though, I think it's too magical when<br>
pointing at a directory.<br></blockquote><div><br></div><div>Agreed.</div><div><br></div><div><br></div><div>Diego.</div></div></div></div>