Don't pass empty profile to OatWriter

Doing so causes dexlayout to run and unnecessarily increases dex2oat
time. This change passes null if the profile is empty to fix this.

Bug: 77719042
Test: test-art-host

Change-Id: Id663d2cbf32dae57f0b562a1f5263293869727d7
2 files changed