-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release profile used instead of bench profile in benchmark #69
Comments
Thanks for the report! Hmm, that is unfortunate, I didn't want to inspect the arguments after Would you like to try to implement this and send a PR? If not, I'll add it to my TODO list. |
What is the reasoning for passing the The use case I had in mind would be to have a custom profile for the PGO step with full debug=true, LTO=off and then a final release step with debug=strip,LTO=true. |
Well, in retrospect, it might not have been such a great idea :) I indeed wanted to avoid the very common situation where people forget to pass
From my experience, to achieve the best results, you should PGO instrument the already LTO-optimized code, and then PGO optimize again LTO-optimized code. But use-cases might vary, of course. I wonder why you need debug=true for the PGO step though? 🤔 |
Ouais that sounds simpler indeed.
I will keep that in mind about LTO. As for the debug=true, from my understanding bolt throws a linker error if you strip the debug annotations, and ideally I don't want debug info in my release. Worst case I could strip the debug info manually via strip(1) after the fact. |
I remember some issues with BOLT and stripping, but at least on rustc it seems to work fine now, IIRC. If you don't want debuginfo in the final binary, then you shouldn't set |
By the way, is there a reason why you cannot use |
On rustc
As of v0.2.9 this doesn't seem to be a supported command. There is a |
Uhh, sorry, I suggested something that I clearly hallucinated (I promise that I'm not an AI 😆). I guess I could add that command, for me I considered running PGO/BOLT on benches to not be the ideal thing, so I didn't pay it that much attention. I'm not sure what to do about the |
Yeah that's not an easy situation. The only thing i could think off would be to either add a non-default feature to disable that behavior or some kind of config file, cargo editions style. However, this makes it fairly unlikely that an entirely new user would use said feature, and makes the tool more complicated to use. |
Since the
--release
flag is automatically added to commands, usingcargo pgo bolt build -- --benches
results in therelease
profile incorrectly being used instead of thebench
profile.The text was updated successfully, but these errors were encountered: