Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Au <andrewau@microsoft.com>2021-06-09 00:32:14 +0300
committerGitHub <noreply@github.com>2021-06-09 00:32:14 +0300
commite42c8965072aaed9ec3d2fa8d41cf2b0393d05f4 (patch)
treeb136d8b97c93fa482503d4585754de7b223804dd /src/coreclr/tools
parent54f78b8a2169e2d988c6aee34a6b9a9d744ed754 (diff)
Improve GC stress log instrumentation (#53547)
Diffstat (limited to 'src/coreclr/tools')
-rw-r--r--src/coreclr/tools/StressLogAnalyzer/StressLogPlugin/StressLogPlugin.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/coreclr/tools/StressLogAnalyzer/StressLogPlugin/StressLogPlugin.cpp b/src/coreclr/tools/StressLogAnalyzer/StressLogPlugin/StressLogPlugin.cpp
index 8b4efa8aa38..793ab64d710 100644
--- a/src/coreclr/tools/StressLogAnalyzer/StressLogPlugin/StressLogPlugin.cpp
+++ b/src/coreclr/tools/StressLogAnalyzer/StressLogPlugin/StressLogPlugin.cpp
@@ -139,6 +139,7 @@ d(IS_PLAN_PINNED_PLUG, ThreadStressLog::gcPlanPinnedPlugMsg())
d(IS_DESIRED_NEW_ALLOCATION, ThreadStressLog::gcDesiredNewAllocationMsg()) \
d(IS_MAKE_UNUSED_ARRAY, ThreadStressLog::gcMakeUnusedArrayMsg()) \
d(IS_START_BGC_THREAD, ThreadStressLog::gcStartBgcThread()) \
+d(IS_RELOCATE_REFERENCE, ThreadStressLog::gcRelocateReferenceMsg()) \
d(IS_UNINTERESTING, "")
enum InterestingStringId : unsigned char
@@ -469,6 +470,26 @@ bool FilterMessage(StressLog::StressLogHeader* hdr, ThreadStressLog* tsl, uint32
case IS_START_BGC_THREAD:
RememberThreadForHeap(tsl->threadId, (int64_t)args[0], GC_THREAD_BG);
break;
+ case IS_RELOCATE_REFERENCE:
+ if (s_valueFilterCount > 0)
+ {
+ size_t src = (size_t)args[0];
+ size_t dst_from = (size_t)args[1];
+ size_t dst_to = (size_t)args[2];
+ // print this message if the source or destination contain (part of) the range we're looking for
+ for (int i = 0; i < s_valueFilterCount; i++)
+ {
+ if ((s_valueFilter[i].end < src || src < s_valueFilter[i].start) &&
+ (s_valueFilter[i].end < dst_from || dst_from < s_valueFilter[i].start)) &&
+ (s_valueFilter[i].end < dst_to || dst_to < s_valueFilter[i].start))
+ {
+ // empty intersection with both the source and the destination
+ continue;
+ }
+ return true;
+ }
+ }
+ break;
}
return fLevelFilter || s_interestingStringFilter[isd];
}
@@ -521,7 +542,7 @@ static ThreadStressLogDesc s_threadStressLogDesc[MAX_THREADSTRESSLOGS];
static int s_threadStressLogCount;
static LONG s_wrappedWriteThreadCount;
-static const LONG MAX_MESSAGE_COUNT = 1024 * 1024 * 1024;
+static const LONG MAX_MESSAGE_COUNT = 64 * 1024 * 1024;
static StressThreadAndMsg* s_threadMsgBuf;
static volatile LONG s_msgCount = 0;
static volatile LONG s_totalMsgCount = 0;
@@ -956,6 +977,10 @@ bool ParseOptions(int argc, wchar_t* argv[])
return false;
}
}
+ else
+ {
+ return false;
+ }
i++;
}
return true;