diff options
author | Kshama Pawar <kspawa@microsoft.com> | 2016-05-14 20:05:50 -0700 |
---|---|---|
committer | Kshama Pawar <kspawa@microsoft.com> | 2016-05-14 20:05:50 -0700 |
commit | b21cf4925c069594c0c5054570ef4c630d44a7c4 (patch) | |
tree | 317a7f63f70134b24807b4d5a27b39fb6e60d5a8 /src | |
parent | 2e30f2e2cbea5b9a97e1ecc55009706606d5d13b (diff) | |
download | coreclr-b21cf4925c069594c0c5054570ef4c630d44a7c4.tar.gz coreclr-b21cf4925c069594c0c5054570ef4c630d44a7c4.tar.bz2 coreclr-b21cf4925c069594c0c5054570ef4c630d44a7c4.zip |
Replace ldiv with normal division for PAL
Diffstat (limited to 'src')
-rw-r--r-- | src/vm/eventtrace.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/vm/eventtrace.cpp b/src/vm/eventtrace.cpp index 3353e66fcd..2708829650 100644 --- a/src/vm/eventtrace.cpp +++ b/src/vm/eventtrace.cpp @@ -5013,7 +5013,6 @@ VOID ETW::InfoLog::RuntimeInformation(INT32 type) VOID ETW::CodeSymbolLog::EmitCodeSymbols(Module* pModule) { -#if !defined(FEATURE_PAL) //UNIXTODO: Enable EmitCodeSymbols CONTRACTL { NOTHROW; GC_NOTRIGGER; @@ -5043,14 +5042,15 @@ VOID ETW::CodeSymbolLog::EmitCodeSymbols(Module* pModule) // estmate. static const DWORD maxDataSize = 63000; - ldiv_t qr = ldiv(length, maxDataSize); - + DWORD quot = length / maxDataSize; + // We do not allow pdbs of size greater than 2GB for now, // so totalChunks should fit in 16 bits. - if (qr.quot < UINT16_MAX) + if (quot < UINT16_MAX) { // If there are trailing bits in the last chunk, then increment totalChunks by 1 - UINT16 totalChunks = (UINT16)(qr.quot + ((qr.rem != 0) ? 1 : 0)); + DWORD rem = length % maxDataSize; + UINT16 totalChunks = (UINT16)(quot + ((rem != 0) ? 1 : 0)); NewArrayHolder<BYTE> chunk(new BYTE[maxDataSize]); DWORD offset = 0; for (UINT16 chunkNum = 0; offset < length; chunkNum++) @@ -5071,7 +5071,6 @@ VOID ETW::CodeSymbolLog::EmitCodeSymbols(Module* pModule) } } } EX_CATCH{} EX_END_CATCH(SwallowAllExceptions); -#endif// !defined(FEATURE_PAL) } /* Returns the length of an in-memory symbol stream |