Add --profile mode to the art script

--profile will run dalvikmvm twice. The first run records the profile by
replacing the compiler filter with interpret-only and enabling profile
saving. The second run will pass the recorded profile to dex2oat using
'-Xcompiler-option --profile-file=...'.

Test: ./out/host/linux-x86/bin/art --profile --64 -Ximage:$PWD/out/host/linux-x86/framework/core.art -Xusejit:true -Xcompiler-option --compiler-filter=speed -Xcompiler-option --compiler-backend=Optimizing -verbose:oat -Djava.library.path=$PWD/out/x86_64/host/linux-x86/lib64 -cp $PWD/generated/benchmarks.dex benchmarks.ExoPlayerBench.java.ExoPlayerBench

Bug: 36032648
Change-Id: I2dbcae43dd2972273511df9e01ebcbdfb1d84372
1 file changed