diff options
author | Mikhail Kurinnoi <m.kurinnoi@samsung.net> | 2019-09-16 15:21:28 +0300 |
---|---|---|
committer | 이형주/Common Platform Lab(SR)/Staff Engineer/삼성전자 <leee.lee@samsung.com> | 2019-09-17 07:30:18 +0900 |
commit | bad4e0fc61fa08a8935480a18825c6fdcaa8221d (patch) | |
tree | c9c103c9e01db0df841304eba4b3ba40111d13a9 | |
parent | 4792ba184a1c792cfd3dafc4e6c133a8b53b05fa (diff) | |
download | heaptrack-bad4e0fc61fa08a8935480a18825c6fdcaa8221d.tar.gz heaptrack-bad4e0fc61fa08a8935480a18825c6fdcaa8221d.tar.bz2 heaptrack-bad4e0fc61fa08a8935480a18825c6fdcaa8221d.zip |
Remove unused code for i386.
Previously, i386 hooks was never used, since CORProfilerELT3SlowPathEnabled() check prevent hooks setup.
Note, even with proper for SetEnterLeaveFunctionHooks3() event mask, this code unused,
since GetTokenAndMetaDataFromFunction() return CORPROF_E_UNSUPPORTED_CALL_SEQUENCE error code
(we are limited in profiler API usage inside fast path).
-rw-r--r-- | profiler/profiler/src/profiler.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/profiler/profiler/src/profiler.cpp b/profiler/profiler/src/profiler.cpp index efc014d..452c84b 100644 --- a/profiler/profiler/src/profiler.cpp +++ b/profiler/profiler/src/profiler.cpp @@ -33,14 +33,6 @@ const CLSID CLSID_Profiler = { 0x4C0B, {0xB3, 0x54, 0x56, 0x63, 0x90, 0xB2, 0x15, 0xCA}}; -#ifdef __i386__ -#define ELT_PARAMETER -#define SetupHooks SetEnterLeaveFunctionHooks3 -#else // __i386__ -#define ELT_PARAMETER , COR_PRF_ELT_INFO eltInfo -#define SetupHooks SetEnterLeaveFunctionHooks3WithInfo -#endif // __i386__ - extern "C" { #ifdef __llvm__ __attribute__((used)) @@ -292,7 +284,7 @@ void encodeWChar(WCHAR *orig, char *encoded) { encoded[i] = 0; } -void STDMETHODCALLTYPE OnFunctionEnter(FunctionIDOrClientID functionID ELT_PARAMETER) { +void STDMETHODCALLTYPE OnFunctionEnter(FunctionIDOrClientID functionID, COR_PRF_ELT_INFO eltInfo) { ICorProfilerInfo3 *info; HRESULT hr = g_pICorProfilerInfoUnknown->QueryInterface(IID_ICorProfilerInfo3, (void **)&info); @@ -320,8 +312,7 @@ void STDMETHODCALLTYPE OnFunctionEnter(FunctionIDOrClientID functionID ELT_PARAM info->Release(); } -void STDMETHODCALLTYPE OnFunctionLeave(FunctionIDOrClientID functionID - ELT_PARAMETER) { +void STDMETHODCALLTYPE OnFunctionLeave(FunctionIDOrClientID functionID, COR_PRF_ELT_INFO eltInfo) { PopShadowStack(); } @@ -335,7 +326,10 @@ HRESULT STDMETHODCALLTYPE Profiler::Initialize(IUnknown *pICorProfilerInfoUnk) { COR_PRF_ENABLE_FUNCTION_RETVAL | COR_PRF_ENABLE_FRAME_INFO | COR_PRF_ENABLE_STACK_SNAPSHOT | COR_PRF_MONITOR_CLASS_LOADS | COR_PRF_ENABLE_OBJECT_ALLOCATED | COR_PRF_MONITOR_OBJECT_ALLOCATED | COR_PRF_MONITOR_GC); - info->SetupHooks(OnFunctionEnter, OnFunctionLeave, NULL); + // NOTE ProfileEnterNaked(), ProfileLeaveNaked() and ProfileTailcallNaked() not implemented in CoreCLR for i386 +#ifndef __i386__ + info->SetEnterLeaveFunctionHooks3WithInfo(OnFunctionEnter, OnFunctionLeave, NULL); +#endif // __i386__ info->Release(); info = NULL; } |