summaryrefslogtreecommitdiff
path: root/src/vm/eventpipeblock.cpp
diff options
context:
space:
mode:
authorSangwook Kim <swift.kim@samsung.com>2020-02-18 15:48:15 +0900
committer이형주/Common Platform Lab(SR)/Staff Engineer/삼성전자 <leee.lee@samsung.com>2020-03-23 09:43:33 +0900
commita11d29b4d38663421fb5d6914cb1a7b2e6bc92f8 (patch)
treea67596a70bdaef1ee9ed5f385f4ba9da9fcca84a /src/vm/eventpipeblock.cpp
parent96426f220e8965eea7b402f0635e054b68ed40b6 (diff)
downloadcoreclr-accepted/tizen/unified/20200323.172942.tar.gz
coreclr-accepted/tizen/unified/20200323.172942.tar.bz2
coreclr-accepted/tizen/unified/20200323.172942.zip
Many diagnostic tools are unaware of 32-bit applications which have large address spaces (> 2GB). Such tools include the TraceEvent library (required by PerfView and dotnet-trace), and Visual Studio. They assume the address range 0x80000000 through 0xFFFFFFFF as the system space and thus often fail to read symbols from event traces generated by CoreCLR. This workaround is to support such scenarios by simply discarding MSBs of 32-bit instruction pointer values in the trace output. Only a minimal set of values required for symbol resolution are affected by this change. Beware that you will have to manually restore the original values when you inspect them in lldb or etc.
Diffstat (limited to 'src/vm/eventpipeblock.cpp')
-rw-r--r--src/vm/eventpipeblock.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vm/eventpipeblock.cpp b/src/vm/eventpipeblock.cpp
index fb9d6c721e..d510ec8adf 100644
--- a/src/vm/eventpipeblock.cpp
+++ b/src/vm/eventpipeblock.cpp
@@ -457,6 +457,12 @@ bool EventPipeStackBlock::WriteStack(DWORD stackId, StackContents* pStack)
if (stackSize > 0)
{
memcpy(m_pWritePointer, pStack->GetPointer(), stackSize);
+#ifdef FEATURE_LARGEADDRESS_SUPPORT
+ for (int i = 0; i < stackSize / sizeof(UINT_PTR); i++)
+ {
+ ((UINT_PTR*)m_pWritePointer)[i] &= INT_MAX;
+ }
+#endif // FEATURE_LARGEADDRESS_SUPPORT
m_pWritePointer += stackSize;
}