<< "JIT data cache size=" << PrettySize(code_cache_->DataCacheSize()) << "\n"
<< "JIT current capacity=" << PrettySize(code_cache_->GetCurrentCapacity()) << "\n"
<< "JIT number of compiled code=" << code_cache_->NumberOfCompiledCode() << "\n"
- << "JIT total number of compilations=" << code_cache_->NumberOfCompilations() << "\n";
+ << "JIT total number of compilations=" << code_cache_->NumberOfCompilations() << "\n"
+ << "JIT total number of osr compilations=" << code_cache_->NumberOfOsrCompilations() << "\n";
cumulative_timings_.Dump(os);
}
garbage_collect_code_(garbage_collect_code),
used_memory_for_data_(0),
used_memory_for_code_(0),
- number_of_compilations_(0) {
+ number_of_compilations_(0),
+ number_of_osr_compilations_(0) {
DCHECK_GE(max_capacity, initial_code_capacity + initial_data_capacity);
code_mspace_ = create_mspace_with_base(code_map_->Begin(), code_end_, false /*locked*/);
MutexLock mu(self, lock_);
method_code_map_.Put(code_ptr, method);
if (osr) {
+ number_of_osr_compilations_++;
osr_code_map_.Put(method, code_ptr);
} else {
Runtime::Current()->GetInstrumentation()->UpdateMethodsCode(
return number_of_compilations_;
}
+size_t JitCodeCache::NumberOfOsrCompilations() {
+ MutexLock mu(Thread::Current(), lock_);
+ return number_of_osr_compilations_;
+}
+
size_t JitCodeCache::CodeCacheSize() {
MutexLock mu(Thread::Current(), lock_);
return CodeCacheSizeLocked();
// Number of compilations done throughout the lifetime of the JIT.
size_t NumberOfCompilations() REQUIRES(!lock_);
+ size_t NumberOfOsrCompilations() REQUIRES(!lock_);
bool NotifyCompilationOf(ArtMethod* method, Thread* self, bool osr)
SHARED_REQUIRES(Locks::mutator_lock_)
// Number of compilations done throughout the lifetime of the JIT.
size_t number_of_compilations_ GUARDED_BY(lock_);
+ size_t number_of_osr_compilations_ GUARDED_BY(lock_);
DISALLOW_IMPLICIT_CONSTRUCTORS(JitCodeCache);
};