Skip to content

Commit 330bbc1

Browse files
committed
When replacing strings during rejit in the profiler rejit test, include the method name in the replacement string so it is easier to tell what is going on
1 parent 7a14c76 commit 330bbc1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/tests/profiler/native/rejitprofiler/rejitprofiler.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,8 @@ HRESULT STDMETHODCALLTYPE ReJITProfiler::GetReJITParameters(ModuleID moduleId, m
320320
{
321321
SHUTDOWNGUARD();
322322

323-
INFO(L"Starting to build IL for method " << GetFunctionIDName(GetFunctionIDFromToken(moduleId, methodId, false)));
323+
String functionName = GetFunctionIDName(GetFunctionIDFromToken(moduleId, methodId, false));
324+
INFO(L"Starting to build IL for method " << functionName);
324325
COMPtrHolder<IUnknown> pUnk;
325326
HRESULT hr = _profInfo10->GetModuleMetaData(moduleId, ofWrite, IID_IMetaDataEmit2, &pUnk);
326327
if (FAILED(hr))
@@ -340,7 +341,8 @@ HRESULT STDMETHODCALLTYPE ReJITProfiler::GetReJITParameters(ModuleID moduleId, m
340341
}
341342

342343

343-
const WCHAR *wszNewUserDefinedString = WCHAR("Hello from profiler rejit!");
344+
WCHAR wszNewUserDefinedString[4096] = { 0 };
345+
swprintf_s(wszNewUserDefinedString, L"Hello from profiler rejit method '%lS'!", functionName.ToWString().c_str());
344346
mdString tokmdsUserDefined = mdTokenNil;
345347
hr = pTargetEmit->DefineUserString(wszNewUserDefinedString,
346348
(ULONG)wcslen(wszNewUserDefinedString),

0 commit comments

Comments
 (0)