Skip to content

Commit 75f06c9

Browse files
Optimization: Make the methodArguments and argsToLoad arguments to WriteBeginMethod constant
1 parent f9b0cf0 commit 75f06c9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tracer/src/Datadog.Trace.ClrProfiler.Native/calltarget_tokens.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -873,8 +873,8 @@ HRESULT CallTargetTokens::ModifyLocalSigAndInitialize(void* rewriterWrapperPtr,
873873

874874
HRESULT CallTargetTokens::WriteBeginMethod(void* rewriterWrapperPtr, mdTypeRef integrationTypeRef,
875875
const TypeInfo* currentType,
876-
std::vector<FunctionMethodArgument>& methodArguments,
877-
std::vector<USHORT>& argsToLoad, ILInstr** instruction)
876+
const std::vector<FunctionMethodArgument>& methodArguments,
877+
const std::vector<USHORT>& argsToLoad, ILInstr** instruction)
878878
{
879879
auto hr = EnsureBaseCalltargetTokens();
880880
if (FAILED(hr))

tracer/src/Datadog.Trace.ClrProfiler.Native/calltarget_tokens.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class CallTargetTokens
8686
mdToken* callTargetReturnToken, ILInstr** firstInstruction);
8787

8888
HRESULT WriteBeginMethod(void* rewriterWrapperPtr, mdTypeRef integrationTypeRef, const TypeInfo* currentType,
89-
std::vector<FunctionMethodArgument>& methodArguments, std::vector<USHORT>& argsToLoad,
89+
const std::vector<FunctionMethodArgument>& methodArguments, const std::vector<USHORT>& argsToLoad,
9090
ILInstr** instruction);
9191

9292
HRESULT WriteEndVoidReturnMemberRef(void* rewriterWrapperPtr, mdTypeRef integrationTypeRef,

0 commit comments

Comments
 (0)