Add some dumping when SIGQUIT for the JIT.
Change-Id: Iad68bdc8a4ab53e810feb3bc8507b7f42e79b1f7
diff --git a/runtime/jit/jit.cc b/runtime/jit/jit.cc
index a653440..4b39c03 100644
--- a/runtime/jit/jit.cc
+++ b/runtime/jit/jit.cc
@@ -52,10 +52,10 @@
}
void Jit::DumpInfo(std::ostream& os) {
- os << "Code cache size=" << PrettySize(code_cache_->CodeCacheSize())
- << " data cache size=" << PrettySize(code_cache_->DataCacheSize())
- << " number of compiled code=" << code_cache_->NumberOfCompiledCode()
- << "\n";
+ os << "JIT code cache size=" << PrettySize(code_cache_->CodeCacheSize()) << "\n"
+ << "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";
cumulative_timings_.Dump(os);
}
diff --git a/runtime/jit/jit.h b/runtime/jit/jit.h
index 630eba3..e80a376 100644
--- a/runtime/jit/jit.h
+++ b/runtime/jit/jit.h
@@ -74,6 +74,10 @@
void SaveProfilingInfo(const std::string& filename);
+ void DumpForSigQuit(std::ostream& os) {
+ DumpInfo(os);
+ }
+
private:
Jit();
bool LoadCompiler(std::string* error_msg);
diff --git a/runtime/jit/jit_code_cache.h b/runtime/jit/jit_code_cache.h
index 4032c7b..205a3ed 100644
--- a/runtime/jit/jit_code_cache.h
+++ b/runtime/jit/jit_code_cache.h
@@ -154,6 +154,11 @@
uint64_t GetLastUpdateTimeNs() REQUIRES(!lock_);
+ size_t GetCurrentCapacity() REQUIRES(!lock_) {
+ MutexLock lock(Thread::Current(), lock_);
+ return current_capacity_;
+ }
+
private:
// Take ownership of maps.
JitCodeCache(MemMap* code_map,
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index 93ca347..02747d0 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -1300,6 +1300,11 @@
GetInternTable()->DumpForSigQuit(os);
GetJavaVM()->DumpForSigQuit(os);
GetHeap()->DumpForSigQuit(os);
+ if (GetJit() != nullptr) {
+ GetJit()->DumpForSigQuit(os);
+ } else {
+ os << "Running non JIT\n";
+ }
TrackedAllocators::Dump(os);
os << "\n";