[heap] Remove the memory_allocated StatsCounter
We don't use StatsCounters anymore for heap work, and this particular counter causes issues for OffThreadSpace, as it can trigger a non-thread-safe counter callback. We could instead make this a thread-safe counter, but since it's unused we may as well just remove it entirely. Bug: chromium:1011762 Change-Id: I5af5ec5c408691ebfb762d87334ec4af54b1c0e7 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2126914 Commit-Queue: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#67340}
This commit is contained in:
parent
6eaa51934a
commit
cd31f11d08
@ -416,7 +416,6 @@ bool MemoryAllocator::CommitMemory(VirtualMemory* reservation) {
|
||||
return false;
|
||||
}
|
||||
UpdateAllocatedSpaceLimits(base, base + size);
|
||||
isolate_->counters()->memory_allocated()->Increment(static_cast<int>(size));
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -426,7 +425,6 @@ bool MemoryAllocator::UncommitMemory(VirtualMemory* reservation) {
|
||||
PageAllocator::kNoAccess)) {
|
||||
return false;
|
||||
}
|
||||
isolate_->counters()->memory_allocated()->Decrement(static_cast<int>(size));
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -981,11 +979,8 @@ MemoryChunk* MemoryAllocator::AllocateChunk(size_t reserve_area_size,
|
||||
area_end = area_start + commit_area_size;
|
||||
}
|
||||
|
||||
// Use chunk_size for statistics and callbacks because we assume that they
|
||||
// treat reserved but not-yet committed memory regions of chunks as allocated.
|
||||
isolate_->counters()->memory_allocated()->Increment(
|
||||
static_cast<int>(chunk_size));
|
||||
|
||||
// Use chunk_size for statistics because we assume that treat reserved but
|
||||
// not-yet committed memory regions of chunks as allocated.
|
||||
LOG(isolate_,
|
||||
NewEvent("MemoryChunk", reinterpret_cast<void*>(base), chunk_size));
|
||||
|
||||
@ -1166,8 +1161,6 @@ void MemoryAllocator::PartialFreeMemory(MemoryChunk* chunk, Address start_free,
|
||||
const size_t released_bytes = reservation->Release(start_free);
|
||||
DCHECK_GE(size_, released_bytes);
|
||||
size_ -= released_bytes;
|
||||
isolate_->counters()->memory_allocated()->Decrement(
|
||||
static_cast<int>(released_bytes));
|
||||
}
|
||||
|
||||
void MemoryAllocator::UnregisterMemory(MemoryChunk* chunk) {
|
||||
@ -1177,7 +1170,6 @@ void MemoryAllocator::UnregisterMemory(MemoryChunk* chunk) {
|
||||
reservation->IsReserved() ? reservation->size() : chunk->size();
|
||||
DCHECK_GE(size_, static_cast<size_t>(size));
|
||||
size_ -= size;
|
||||
isolate_->counters()->memory_allocated()->Decrement(static_cast<int>(size));
|
||||
if (chunk->executable() == EXECUTABLE) {
|
||||
DCHECK_GE(size_executable_, size);
|
||||
size_executable_ -= size;
|
||||
|
@ -237,8 +237,6 @@ namespace internal {
|
||||
#define STATS_COUNTER_LIST_1(SC) \
|
||||
/* Global Handle Count*/ \
|
||||
SC(global_handles, V8.GlobalHandles) \
|
||||
/* OS Memory allocated */ \
|
||||
SC(memory_allocated, V8.OsMemoryAllocated) \
|
||||
SC(maps_normalized, V8.MapsNormalized) \
|
||||
SC(maps_created, V8.MapsCreated) \
|
||||
SC(elements_transitions, V8.ObjectElementsTransitions) \
|
||||
|
Loading…
Reference in New Issue
Block a user