projects
/
platform
/
upstream
/
dotnet
/
runtime.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f4bfd05
)
Fix one source of perf regression in GCHeap::Alloc. This impacts the System.Collectio...
author
Peter Sollich
<petersol@microsoft.com>
Mon, 24 Jan 2022 08:24:38 +0000
(09:24 +0100)
committer
GitHub
<noreply@github.com>
Mon, 24 Jan 2022 08:24:38 +0000
(09:24 +0100)
These benchmarks manage to make GCHeap::Alloc into a hotspot, so the call to IsHeapPointer() at the end matters for performance.
src/coreclr/gc/gc.cpp
patch
|
blob
|
history
diff --git
a/src/coreclr/gc/gc.cpp
b/src/coreclr/gc/gc.cpp
index
e270bcd
..
9ab892a
100644
(file)
--- a/
src/coreclr/gc/gc.cpp
+++ b/
src/coreclr/gc/gc.cpp
@@
-44081,12
+44081,8
@@
GCHeap::Alloc(gc_alloc_context* context, size_t size, uint32_t flags REQD_ALIGN_
}
CHECK_ALLOC_AND_POSSIBLY_REGISTER_FOR_FINALIZATION(newAlloc, size, flags & GC_ALLOC_FINALIZE);
-
#ifdef USE_REGIONS
- if (!IsHeapPointer (newAlloc))
- {
- GCToOSInterface::DebugBreak();
- }
+ assert (IsHeapPointer (newAlloc));
#endif //USE_REGIONS
return newAlloc;