summaryrefslogtreecommitdiffstats
path: root/runtime/gc/heap-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/gc/heap-inl.h')
-rw-r--r--runtime/gc/heap-inl.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/runtime/gc/heap-inl.h b/runtime/gc/heap-inl.h
index 3e56205..fbf36e8 100644
--- a/runtime/gc/heap-inl.h
+++ b/runtime/gc/heap-inl.h
@@ -371,11 +371,8 @@ inline mirror::Object* Heap::TryToAllocate(Thread* self, AllocatorType allocator
}
inline Heap::AllocationTimer::AllocationTimer(Heap* heap, mirror::Object** allocated_obj_ptr)
- : heap_(heap), allocated_obj_ptr_(allocated_obj_ptr) {
- if (kMeasureAllocationTime) {
- allocation_start_time_ = NanoTime() / kTimeAdjust;
- }
-}
+ : heap_(heap), allocated_obj_ptr_(allocated_obj_ptr),
+ allocation_start_time_(kMeasureAllocationTime ? NanoTime() / kTimeAdjust : 0u) { }
inline Heap::AllocationTimer::~AllocationTimer() {
if (kMeasureAllocationTime) {
@@ -419,7 +416,7 @@ inline bool Heap::IsOutOfMemoryOnAllocation(AllocatorType allocator_type, size_t
inline void Heap::CheckConcurrentGC(Thread* self, size_t new_num_bytes_allocated,
mirror::Object** obj) {
if (UNLIKELY(new_num_bytes_allocated >= concurrent_start_bytes_)) {
- RequestConcurrentGCAndSaveObject(self, obj);
+ RequestConcurrentGCAndSaveObject(self, false, obj);
}
}