summaryrefslogtreecommitdiff
path: root/src/gc
diff options
context:
space:
mode:
authorSteve MacLean <sdmaclea.qdt@qualcommdatacenter.com>2017-08-02 06:48:14 -0400
committerJan Vorlicek <janvorli@microsoft.com>2017-08-02 12:48:14 +0200
commitbdf219c364e15cae908f9c87446ff4ae26a9fe1e (patch)
tree8bb8b6687dcf4cfb9fd7c4a105db3d1c9b97a820 /src/gc
parent11c911e6f49fdc95fc52bec8d930df7e5c50daa9 (diff)
downloadcoreclr-bdf219c364e15cae908f9c87446ff4ae26a9fe1e.tar.gz
coreclr-bdf219c364e15cae908f9c87446ff4ae26a9fe1e.tar.bz2
coreclr-bdf219c364e15cae908f9c87446ff4ae26a9fe1e.zip
[Arm64] GetLargestOnDieCacheSize (#13071)
Look for cache info in /sys/.../cache/index*/size If that fails estimate cache size based on processor count
Diffstat (limited to 'src/gc')
-rw-r--r--src/gc/gc.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/gc/gc.cpp b/src/gc/gc.cpp
index 5afc024090..24624d65c6 100644
--- a/src/gc/gc.cpp
+++ b/src/gc/gc.cpp
@@ -35480,7 +35480,7 @@ size_t GCHeap::GetValidGen0MaxSize(size_t seg_size)
// performance data seems to indicate halving the size results
// in optimal perf. Ask for adjusted gen0 size.
gen0size = max(GCToOSInterface::GetLargestOnDieCacheSize(FALSE)/GCToOSInterface::GetLogicalCpuCount(),(256*1024));
-#if (defined(_TARGET_AMD64_))
+
// if gen0 size is too large given the available memory, reduce it.
// Get true cache size, as we don't want to reduce below this.
size_t trueSize = max(GCToOSInterface::GetLargestOnDieCacheSize(TRUE)/GCToOSInterface::GetLogicalCpuCount(),(256*1024));
@@ -35500,8 +35500,6 @@ size_t GCHeap::GetValidGen0MaxSize(size_t seg_size)
break;
}
}
-#endif //_TARGET_AMD64_
-
#else //SERVER_GC
gen0size = max((4*GCToOSInterface::GetLargestOnDieCacheSize(TRUE)/5),(256*1024));
#endif //SERVER_GC