-
Notifications
You must be signed in to change notification settings - Fork 260
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
[FR] ndk-build support for order file generation #1913
Comments
How is the NDK generating order files? At Meta, we introduced a lightweight IR PRO instrumentation mode specifically for mobile and an order file generation mode algorithm aimed at minimizing page faults: https://reviews.llvm.org/D147812. That might be interesting for the NDK as well. |
Yeah, we are using the
The scripts (except for merging order files) and the documentation, and developer guide (with example use cases) have been upstreamed to ndk repository. See:
This is interesting, i'm seeing this for the first time but it seems to be doing something similar to what we have for merging order files. It seems the time complexity of this implementation might be affecting build times? I haven't looked in detail but we have something that converges very fast. We have a script that implements a linear time algorithm to merge the order files. Maybe our implementation has a few more things that could be helpful in implementing in llvm-profdata, I'll update more once everything is upstreamed. |
IIRC |
just finished reading: https://discourse.llvm.org/t/rfc-temporal-profiling-extension-for-irpgo/68068. Is there a plan to deprecate the If we have a way to merge multiple profraw files (with orderfile data), everything on our end should still keep working (with whatever replaces the |
I would like to deprecate Temporal Profiling can merge traces from multiple profraw files, but you might need to set I would be interested to know if Temporal Profiling works out for your use case. Let me know if you have any questions. |
It makes sense to support both order file collection modes. The advantage with using |
Update: https://android-developers.googleblog.com/2023/11/orderfiles-in-android.html has the details of our implementation along with links to scripts and documentation. |
Description
Order files (much like PGO) need to be handled in steps of build instrumented -> run -> rebuild. Order files have some annoying requirements like not using
-O0
and other flag juggling as well. We could add aLOCAL_ORDERFILE
andNDK_GENERATE_ORDER_FILES
(the second being a command line option) to make that workflow a bit more obvious.The text was updated successfully, but these errors were encountered: