summaryrefslogtreecommitdiff
path: root/src/vm/virtualcallstub.cpp
diff options
context:
space:
mode:
authorSteve MacLean <sdmaclea.qdt@qualcommdatacenter.com>2017-07-25 15:57:24 (GMT)
committerJan Vorlicek <janvorli@microsoft.com>2017-07-25 15:57:24 (GMT)
commitfd37c5a3a4c3d9fe0932bbca7f04477b8cdf3287 (patch)
tree815f941dbf2d62ce8983e92b7a9bcdb5afe7fa9e /src/vm/virtualcallstub.cpp
parent5d105ade29742e13d036c7ba269bb6634790b6e3 (diff)
downloadcoreclr-fd37c5a3a4c3d9fe0932bbca7f04477b8cdf3287.zip
coreclr-fd37c5a3a4c3d9fe0932bbca7f04477b8cdf3287.tar.gz
coreclr-fd37c5a3a4c3d9fe0932bbca7f04477b8cdf3287.tar.bz2
PerfMap instrument stubs (#12437)
* PerfMap instrument stubs * Perfmap fix segfault
Diffstat (limited to 'src/vm/virtualcallstub.cpp')
-rw-r--r--src/vm/virtualcallstub.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/vm/virtualcallstub.cpp b/src/vm/virtualcallstub.cpp
index c230f25..2e94a16 100644
--- a/src/vm/virtualcallstub.cpp
+++ b/src/vm/virtualcallstub.cpp
@@ -20,6 +20,10 @@
#include "compile.h"
#endif
+#ifdef FEATURE_PERFMAP
+#include "perfmap.h"
+#endif
+
#ifndef DACCESS_COMPILE
//@TODO: make these conditional on whether logs are being produced
@@ -2694,6 +2698,10 @@ DispatchHolder *VirtualCallStubManager::GenerateDispatchStub(PCODE ad
LOG((LF_STUBS, LL_INFO10000, "GenerateDispatchStub for token" FMT_ADDR "and pMT" FMT_ADDR "at" FMT_ADDR "\n",
DBG_ADDR(dispatchToken), DBG_ADDR(pMTExpected), DBG_ADDR(holder->stub())));
+#ifdef FEATURE_PERFMAP
+ PerfMap::LogStubs(__FUNCTION__, "GenerateDispatchStub", (PCODE)holder->stub(), holder->stub()->size());
+#endif
+
RETURN (holder);
}
@@ -2736,6 +2744,10 @@ DispatchHolder *VirtualCallStubManager::GenerateDispatchStubLong(PCODE
LOG((LF_STUBS, LL_INFO10000, "GenerateDispatchStub for token" FMT_ADDR "and pMT" FMT_ADDR "at" FMT_ADDR "\n",
DBG_ADDR(dispatchToken), DBG_ADDR(pMTExpected), DBG_ADDR(holder->stub())));
+#ifdef FEATURE_PERFMAP
+ PerfMap::LogStubs(__FUNCTION__, "GenerateDispatchStub", (PCODE)holder->stub(), holder->stub()->size());
+#endif
+
RETURN (holder);
}
#endif
@@ -2822,6 +2834,10 @@ ResolveHolder *VirtualCallStubManager::GenerateResolveStub(PCODE addr
LOG((LF_STUBS, LL_INFO10000, "GenerateResolveStub for token" FMT_ADDR "at" FMT_ADDR "\n",
DBG_ADDR(dispatchToken), DBG_ADDR(holder->stub())));
+#ifdef FEATURE_PERFMAP
+ PerfMap::LogStubs(__FUNCTION__, "GenerateResolveStub", (PCODE)holder->stub(), holder->stub()->size());
+#endif
+
RETURN (holder);
}
@@ -2852,6 +2868,10 @@ LookupHolder *VirtualCallStubManager::GenerateLookupStub(PCODE addrOfResolver, s
LOG((LF_STUBS, LL_INFO10000, "GenerateLookupStub for token" FMT_ADDR "at" FMT_ADDR "\n",
DBG_ADDR(dispatchToken), DBG_ADDR(holder->stub())));
+#ifdef FEATURE_PERFMAP
+ PerfMap::LogStubs(__FUNCTION__, "GenerateLookupStub", (PCODE)holder->stub(), holder->stub()->size());
+#endif
+
RETURN (holder);
}