mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-12-02 14:57:32 -06:00
Add profile support for dex2oat. (#6382)
dex2oat supports profile-guided compilation. In addition to taking dex code as an input, it can take a profile as another input, to guide the compilation. The profile determines which methods need to be compiled, how calls can be inlined, and so on. Because Compiler Explorer doesn't support multiple input files, the profile is added as a comment block in the Java/Kotlin source code. A post-processor extracts the profile from the comment block into a separate file, in order to input it to dex2oat.
This commit is contained in:
@@ -5,3 +5,12 @@ class Square {
|
||||
}
|
||||
}
|
||||
|
||||
// Set `enabled` to `true` to enable profile-guided compilation for dex2oat.
|
||||
// For the profile format, see
|
||||
// https://developer.android.com/topic/performance/baselineprofiles/manually-create-measure#define-rules-manually
|
||||
// (For advanced use only!)
|
||||
/* ---------- begin profile (enabled=false) ----------
|
||||
HSPLSquare;-><init>()V
|
||||
HSPLSquare;->square(I)I
|
||||
LSquare;
|
||||
---------- end profile ---------- */
|
||||
|
||||
Reference in New Issue
Block a user