path: root/src/vm/eventpipeblock.cpp
diff options
authorSangwook Kim <>2020-02-18 15:48:15 +0900
committer이형주/Common Platform Lab(SR)/Staff Engineer/삼성전자 <>2020-03-23 09:43:33 +0900
commita11d29b4d38663421fb5d6914cb1a7b2e6bc92f8 (patch)
treea67596a70bdaef1ee9ed5f385f4ba9da9fcca84a /src/vm/eventpipeblock.cpp
parent96426f220e8965eea7b402f0635e054b68ed40b6 (diff)
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')
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);
+ for (int i = 0; i < stackSize / sizeof(UINT_PTR); i++)
+ {
+ ((UINT_PTR*)m_pWritePointer)[i] &= INT_MAX;
+ }
m_pWritePointer += stackSize;