Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 16 additions & 12 deletions compiler-rt/lib/scudo/standalone/primary64.h
Original file line number Diff line number Diff line change
Expand Up @@ -1141,18 +1141,18 @@ template <typename Config> class SizeClassAllocator64 {
BytesInFreeList - Region->ReleaseInfo.BytesInFreeListAtLastCheckpoint;
}
const uptr TotalChunks = Region->MemMapInfo.AllocatedUser / BlockSize;
Str->append(
"%s %02zu (%6zu): mapped: %6zuK popped: %7zu pushed: %7zu "
"inuse: %6zu total: %6zu releases: %6zu last "
"releases attempted: %6zuK latest pushed bytes: %6zuK region: 0x%zx "
"(0x%zx)\n",
Region->Exhausted ? "E" : " ", ClassId, getSizeByClassId(ClassId),
Region->MemMapInfo.MappedUser >> 10, Region->FreeListInfo.PoppedBlocks,
Region->FreeListInfo.PushedBlocks, InUseBlocks, TotalChunks,
Region->ReleaseInfo.NumReleasesAttempted,
Region->ReleaseInfo.LastReleasedBytes >> 10,
RegionPushedBytesDelta >> 10, Region->RegionBeg,
getRegionBaseByClassId(ClassId));
Str->append("%s %02zu (%6zu): mapped: %6zuK popped: %7zu pushed: %7zu "
"inuse: %6zu total: %6zu releases attempted: %6zu last "
"released: %6zuK latest pushed bytes: %6zuK region: 0x%zx "
"(0x%zx)\n",
Region->Exhausted ? "E" : " ", ClassId,
getSizeByClassId(ClassId), Region->MemMapInfo.MappedUser >> 10,
Region->FreeListInfo.PoppedBlocks,
Region->FreeListInfo.PushedBlocks, InUseBlocks, TotalChunks,
Region->ReleaseInfo.NumReleasesAttempted,
Region->ReleaseInfo.LastReleasedBytes >> 10,
RegionPushedBytesDelta >> 10, Region->RegionBeg,
getRegionBaseByClassId(ClassId));
}

void getRegionFragmentationInfo(RegionInfo *Region, uptr ClassId,
Expand Down Expand Up @@ -1297,6 +1297,10 @@ template <typename Config> class SizeClassAllocator64 {
return 0;
}

// The following steps contribute to the majority time spent in page
// releasing thus we increment the counter here.
++Region->ReleaseInfo.NumReleasesAttempted;

// Note that we have extracted the `GroupsToRelease` from region freelist.
// It's safe to let pushBlocks()/popBlocks() access the remaining region
// freelist. In the steps 3 and 4, we will temporarily release the FLLock
Expand Down
Loading