Lines Matching refs:self

130 void* RosAlloc::AllocPages(Thread* self, size_t num_pages, uint8_t page_map_type) {  in AllocPages()  argument
131 lock_.AssertHeld(self); in AllocPages()
310 size_t RosAlloc::FreePages(Thread* self, void* ptr, bool already_zero) { in FreePages() argument
311 lock_.AssertHeld(self); in FreePages()
462 void* RosAlloc::AllocLargeObject(Thread* self, size_t size, size_t* bytes_allocated, in AllocLargeObject() argument
470 MutexLock mu(self, lock_); in AllocLargeObject()
471 r = AllocPages(self, num_pages, kPageMapLargeObject); in AllocLargeObject()
499 size_t RosAlloc::FreeInternal(Thread* self, void* ptr) { in FreeInternal() argument
505 MutexLock mu(self, lock_); in FreeInternal()
514 return FreePages(self, ptr, false); in FreeInternal()
540 return FreeFromRun(self, ptr, run); in FreeInternal()
543 size_t RosAlloc::Free(Thread* self, void* ptr) { in Free() argument
544 ReaderMutexLock rmu(self, bulk_free_lock_); in Free()
545 return FreeInternal(self, ptr); in Free()
548 RosAlloc::Run* RosAlloc::AllocRun(Thread* self, size_t idx) { in AllocRun() argument
551 MutexLock mu(self, lock_); in AllocRun()
552 new_run = reinterpret_cast<Run*>(AllocPages(self, numOfPages[idx], kPageMapRun)); in AllocRun()
582 RosAlloc::Run* RosAlloc::RefillRun(Thread* self, size_t idx) { in RefillRun() argument
595 return AllocRun(self, idx); in RefillRun()
598 inline void* RosAlloc::AllocFromCurrentRunUnlocked(Thread* self, size_t idx) { in AllocFromCurrentRunUnlocked() argument
615 current_run = RefillRun(self, idx); in AllocFromCurrentRunUnlocked()
634 void* RosAlloc::AllocFromRunThreadUnsafe(Thread* self, size_t size, size_t* bytes_allocated, in AllocFromRunThreadUnsafe() argument
643 Locks::mutator_lock_->AssertExclusiveHeld(self); in AllocFromRunThreadUnsafe()
644 void* slot_addr = AllocFromCurrentRunUnlocked(self, idx); in AllocFromRunThreadUnsafe()
654 void* RosAlloc::AllocFromRun(Thread* self, size_t size, size_t* bytes_allocated, in AllocFromRun() argument
665 Run* thread_local_run = reinterpret_cast<Run*>(self->GetRosAllocRun(idx)); in AllocFromRun()
669 MutexLock mu(self, *size_bracket_locks_[idx]); in AllocFromRun()
682 MutexLock mu(self, *size_bracket_locks_[idx]); in AllocFromRun()
707 thread_local_run = RefillRun(self, idx); in AllocFromRun()
709 self->SetRosAllocRun(idx, dedicated_full_run_); in AllocFromRun()
715 self->SetRosAllocRun(idx, thread_local_run); in AllocFromRun()
741 MutexLock mu(self, *size_bracket_locks_[idx]); in AllocFromRun()
742 slot_addr = AllocFromCurrentRunUnlocked(self, idx); in AllocFromRun()
759 size_t RosAlloc::FreeFromRun(Thread* self, void* ptr, Run* run) { in FreeFromRun() argument
766 MutexLock brackets_mu(self, *size_bracket_locks_[idx]); in FreeFromRun()
806 MutexLock lock_mu(self, lock_); in FreeFromRun()
807 FreePages(self, run, true); in FreeFromRun()
1006 size_t RosAlloc::BulkFree(Thread* self, void** ptrs, size_t num_ptrs) { in BulkFree() argument
1011 freed_bytes += FreeInternal(self, ptrs[i]); in BulkFree()
1016 WriterMutexLock wmu(self, bulk_free_lock_); in BulkFree()
1050 MutexLock mu(self, lock_); in BulkFree()
1051 freed_bytes += FreePages(self, ptr, false); in BulkFree()
1058 MutexLock mu(self, lock_); in BulkFree()
1077 freed_bytes += FreePages(self, ptr, false); in BulkFree()
1107 MutexLock brackets_mu(self, *size_bracket_locks_[idx]); in BulkFree()
1167 MutexLock lock_mu(self, lock_); in BulkFree()
1168 FreePages(self, run, true); in BulkFree()
1509 Thread* self = Thread::Current(); in RevokeThreadLocalRuns() local
1512 MutexLock mu(self, *size_bracket_locks_[idx]); in RevokeThreadLocalRuns()
1537 RevokeRun(self, idx, thread_local_run); in RevokeThreadLocalRuns()
1543 void RosAlloc::RevokeRun(Thread* self, size_t idx, Run* run) { in RevokeRun() argument
1544 size_bracket_locks_[idx]->AssertHeld(self); in RevokeRun()
1558 MutexLock mu(self, lock_); in RevokeRun()
1559 FreePages(self, run, true); in RevokeRun()
1573 Thread* self = Thread::Current(); in RevokeThreadUnsafeCurrentRuns() local
1575 MutexLock mu(self, *size_bracket_locks_[idx]); in RevokeThreadUnsafeCurrentRuns()
1577 RevokeRun(self, idx, current_runs_[idx]); in RevokeThreadUnsafeCurrentRuns()
1599 Thread* self = Thread::Current(); in AssertThreadLocalRunsAreRevoked() local
1601 ReaderMutexLock wmu(self, bulk_free_lock_); in AssertThreadLocalRunsAreRevoked()
1603 MutexLock mu(self, *size_bracket_locks_[idx]); in AssertThreadLocalRunsAreRevoked()
1612 Thread* self = Thread::Current(); in AssertAllThreadLocalRunsAreRevoked() local
1613 MutexLock shutdown_mu(self, *Locks::runtime_shutdown_lock_); in AssertAllThreadLocalRunsAreRevoked()
1614 MutexLock thread_list_mu(self, *Locks::thread_list_lock_); in AssertAllThreadLocalRunsAreRevoked()
1620 MutexLock brackets_mu(self, *size_bracket_locks_[idx]); in AssertAllThreadLocalRunsAreRevoked()
1742 Thread* self = Thread::Current(); in Verify() local
1743 CHECK(Locks::mutator_lock_->IsExclusiveHeld(self)) in Verify()
1745 MutexLock thread_list_mu(self, *Locks::thread_list_lock_); in Verify()
1746 ReaderMutexLock wmu(self, bulk_free_lock_); in Verify()
1749 MutexLock lock_mu(self, lock_); in Verify()
1846 MutexLock brackets_mu(self, *size_bracket_locks_[i]); in Verify()
1855 MutexLock brackets_mu(self, *size_bracket_locks_[i]); in Verify()
1866 run->Verify(self, this, is_running_on_memory_tool_); in Verify()
1870 void RosAlloc::Run::Verify(Thread* self, RosAlloc* rosalloc, bool running_on_memory_tool) { in Verify() argument
1890 MutexLock mu(self, *rosalloc->size_bracket_locks_[i]); in Verify()
1910 MutexLock mu(self, *rosalloc->size_bracket_locks_[i]); in Verify()
1926 MutexLock mu(self, rosalloc->lock_); in Verify()
1985 Thread* self = Thread::Current(); in ReleasePages() local
1999 MutexLock mu(self, lock_); in ReleasePages()
2073 Thread* self = Thread::Current(); in LogFragmentationAllocFailure() local
2075 WriterMutexLock wmu(self, bulk_free_lock_); in LogFragmentationAllocFailure()
2076 MutexLock mu(self, lock_); in LogFragmentationAllocFailure()
2105 Thread* self = Thread::Current(); in DumpStats() local
2106 CHECK(Locks::mutator_lock_->IsExclusiveHeld(self)) in DumpStats()
2116 ReaderMutexLock rmu(self, bulk_free_lock_); in DumpStats()
2117 MutexLock lock_mu(self, lock_); in DumpStats()