From e7815dde1e3847841b260e700704da8f7b4f7a30 Mon Sep 17 00:00:00 2001 From: Brian Sullivan Date: Wed, 1 May 2019 10:45:39 -0700 Subject: In the PAL GetProcessTimes implement lpCreationTime using the current time returned by gettimeofday This allows IBC profile data to record a meaningful time of when the training scenario was run. Made EPOCH_DIFF a defined constant Change calcTime to be an unsigned 64-bit integer Change constants to units of 100NS instead of NS to avoid division and integer overflows. Use the defined constants SECS_TO_100NS and USECS_TO_100NS when performing time calculations Don't add a space after the Assembly arg when argc is zero --- src/vm/ceeload.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/vm') diff --git a/src/vm/ceeload.cpp b/src/vm/ceeload.cpp index e1f2b2bfec..eb1dcb9eb3 100644 --- a/src/vm/ceeload.cpp +++ b/src/vm/ceeload.cpp @@ -11654,7 +11654,7 @@ static bool GetBasename(LPCWSTR _src, __out_ecount(dstlen) __out_z LPWSTR _dst, static LPCWSTR s_pCommandLine = NULL; -// Rerieve the full command line for the current process. +// Retrieve the full command line for the current process. LPCWSTR GetManagedCommandLine() { LIMITED_METHOD_CONTRACT; @@ -11725,7 +11725,7 @@ void SaveManagedCommandLine(LPCWSTR pwzAssemblyPath, int argc, LPCWSTR *argv) LPWSTR pCursor = pNewCommandLine; Append_Next_Item(&pCursor, &remainingLen, osCommandLine, true); - Append_Next_Item(&pCursor, &remainingLen, pwzAssemblyPath, true); + Append_Next_Item(&pCursor, &remainingLen, pwzAssemblyPath, (argc > 0)); for (int i = 0; i < argc; i++) { @@ -11768,7 +11768,7 @@ static void ProfileDataAllocateScenarioInfo(ProfileEmitter * pEmitter, LPCSTR sc // Get the managed command line. LPCWSTR pCmdLine = GetManagedCommandLine(); - // If this process started as a service we won't havre a managed command line + // If this process started as a service we won't have a managed command line if (pCmdLine == nullptr) { // Use the result from GetCommandLineW() instead -- cgit v1.2.3