Skip to content

Commit

Permalink
Make a copy of assembly path. (#93238)
Browse files Browse the repository at this point in the history
* Make a copy of assembly path.
  • Loading branch information
AaronRobinsonMSFT committed Oct 9, 2023
1 parent f20b2b5 commit 9b657a2
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/coreclr/vm/perfinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ void PerfInfo::LogImage(PEAssembly* pPEAssembly, CHAR* guid)
PRECONDITION(guid != nullptr);
} CONTRACTL_END;

SString value;
const SString& path = pPEAssembly->GetPath();
// Nothing to log if the assembly path isn't present.
SString path{ pPEAssembly->GetPath() };
if (path.IsEmpty())
{
return;
Expand All @@ -49,12 +49,11 @@ void PerfInfo::LogImage(PEAssembly* pPEAssembly, CHAR* guid)
}
}

SString value;
value.Printf("%s%c%s%c%p", path.GetUTF8(), sDelimiter, guid, sDelimiter, baseAddr);

SString command;
command.Printf("%s", "ImageLoad");
SString command{ SString::Literal, "ImageLoad" };
WriteLine(command, value);

}

// Writes a command line, with "type" being the type of command, with "value" as the command's corresponding instructions/values. This is to be used to log specific information, e.g. LogImage
Expand Down

0 comments on commit 9b657a2

Please sign in to comment.