summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2015-12-17 11:40:51 +0000
committer android-build-merger <android-build-merger@google.com> 2015-12-17 11:40:51 +0000
commit88e3342e07d607c07d886eebf195e2d0359067ed (patch)
tree786529ef3b0c939a40ecd63e19162096af364318
parente667c7622e20b9644c4b2e46e35ba147428ed62c (diff)
parentbdd12e0e047245163ddfd7df66c9430ec85624a4 (diff)
Merge "Add some dumping when SIGQUIT for the JIT."
am: bdd12e0e04 * commit 'bdd12e0e047245163ddfd7df66c9430ec85624a4': Add some dumping when SIGQUIT for the JIT.
-rw-r--r--runtime/jit/jit.cc8
-rw-r--r--runtime/jit/jit.h4
-rw-r--r--runtime/jit/jit_code_cache.h5
-rw-r--r--runtime/runtime.cc5
4 files changed, 18 insertions, 4 deletions
diff --git a/runtime/jit/jit.cc b/runtime/jit/jit.cc
index a653440b5f..4b39c03e0c 100644
--- a/runtime/jit/jit.cc
+++ b/runtime/jit/jit.cc
@@ -52,10 +52,10 @@ JitOptions* JitOptions::CreateFromRuntimeArguments(const RuntimeArgumentMap& opt
}
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 630eba34af..e80a376349 100644
--- a/runtime/jit/jit.h
+++ b/runtime/jit/jit.h
@@ -74,6 +74,10 @@ class Jit {
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 4e829168bc..93ccb7401d 100644
--- a/runtime/jit/jit_code_cache.h
+++ b/runtime/jit/jit_code_cache.h
@@ -153,6 +153,11 @@ class JitCodeCache {
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 93ca347b49..02747d0d4d 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -1300,6 +1300,11 @@ void Runtime::DumpForSigQuit(std::ostream& os) {
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";