jitzygote: JIT native methods on first use.
Compile JNI stub on first use to avoid the expensive generic stub.
Test: profile calendar
Bug: 119800099
Change-Id: Iaef9d0d528ff34c1636237cdcce6e8639c47c8ed
diff --git a/runtime/jit/jit_code_cache.cc b/runtime/jit/jit_code_cache.cc
index c22f4e3..fee5bec 100644
--- a/runtime/jit/jit_code_cache.cc
+++ b/runtime/jit/jit_code_cache.cc
@@ -2062,8 +2062,9 @@
}
}
if (collection_in_progress_) {
- CHECK(!IsInZygoteExecSpace(data->GetCode()));
- GetLiveBitmap()->AtomicTestAndSet(FromCodeToAllocation(data->GetCode()));
+ if (!IsInZygoteExecSpace(data->GetCode())) {
+ GetLiveBitmap()->AtomicTestAndSet(FromCodeToAllocation(data->GetCode()));
+ }
}
}
return new_compilation;