diff options
| -rw-r--r-- | runtime/debugger.cc | 7 | ||||
| -rw-r--r-- | runtime/gc/heap.cc | 22 | ||||
| -rw-r--r-- | runtime/jit/jit_code_cache.h | 1 |
3 files changed, 3 insertions, 27 deletions
diff --git a/runtime/debugger.cc b/runtime/debugger.cc index 62c9d25574..e5d648bd19 100644 --- a/runtime/debugger.cc +++ b/runtime/debugger.cc @@ -4755,12 +4755,7 @@ void Dbg::DdmSendHeapSegments(bool native) { // Send a series of heap segment chunks. HeapChunkContext context(what == HPSG_WHAT_MERGED_OBJECTS, native); if (native) { -#if defined(__ANDROID__) && defined(USE_DLMALLOC) - dlmalloc_inspect_all(HeapChunkContext::HeapChunkNativeCallback, &context); - HeapChunkContext::HeapChunkNativeCallback(nullptr, nullptr, 0, &context); // Indicate end of a space. -#else - UNIMPLEMENTED(WARNING) << "Native heap inspection is only supported with dlmalloc"; -#endif + UNIMPLEMENTED(WARNING) << "Native heap inspection is not supported"; } else { gc::Heap* heap = Runtime::Current()->GetHeap(); for (const auto& space : heap->GetContinuousSpaces()) { diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc index da9a79e1a2..6d72f3142e 100644 --- a/runtime/gc/heap.cc +++ b/runtime/gc/heap.cc @@ -1352,28 +1352,10 @@ void Heap::TrimSpaces(Thread* self) { uint64_t gc_heap_end_ns = NanoTime(); // We never move things in the native heap, so we can finish the GC at this point. FinishGC(self, collector::kGcTypeNone); - size_t native_reclaimed = 0; -#ifdef __ANDROID__ - // Only trim the native heap if we don't care about pauses. - if (!CareAboutPauseTimes()) { -#if defined(USE_DLMALLOC) - // Trim the native heap. - dlmalloc_trim(0); - dlmalloc_inspect_all(DlmallocMadviseCallback, &native_reclaimed); -#elif defined(USE_JEMALLOC) - // Jemalloc does it's own internal trimming. -#else - UNIMPLEMENTED(WARNING) << "Add trimming support"; -#endif - } -#endif // __ANDROID__ - uint64_t end_ns = NanoTime(); VLOG(heap) << "Heap trim of managed (duration=" << PrettyDuration(gc_heap_end_ns - start_ns) - << ", advised=" << PrettySize(managed_reclaimed) << ") and native (duration=" - << PrettyDuration(end_ns - gc_heap_end_ns) << ", advised=" << PrettySize(native_reclaimed) - << ") heaps. Managed heap utilization of " << static_cast<int>(100 * managed_utilization) - << "%."; + << ", advised=" << PrettySize(managed_reclaimed) << ") heap. Managed heap utilization of " + << static_cast<int>(100 * managed_utilization) << "%."; ATRACE_END(); } diff --git a/runtime/jit/jit_code_cache.h b/runtime/jit/jit_code_cache.h index 4032c7b832..4e829168bc 100644 --- a/runtime/jit/jit_code_cache.h +++ b/runtime/jit/jit_code_cache.h @@ -23,7 +23,6 @@ #include "base/macros.h" #include "base/mutex.h" #include "gc/accounting/bitmap.h" -#include "gc/allocator/dlmalloc.h" #include "gc_root.h" #include "jni.h" #include "oat_file.h" |