From 4486164506a56200e66cf4cd750fde6b54ab5abd Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Sat, 10 Oct 2020 08:54:53 +0300 Subject: [PATCH] Fix various typos (#43073) * Fix various typos * `occurence`, `occurance` -> `occurrence` * `accross` -> `across` * `adddress`, `addresss` -> `address` * `alignement`, `aligment` -> `alignment` * Remove `c` from triple c. * Remove `s` from triple s. * In palsuite, `Successs` (with triple s) was in commented out `Trace()` message, removed all commented out `Trace()` calls from such files. * Fix invalid markdown in `unix-test-instructions.md`. * Revert event source change --- docs/design/coreclr/jit/first-class-structs.md | 2 +- docs/workflow/ci/coreclr-ci-health.md | 4 +- .../testing/coreclr/unix-test-instructions.md | 5 +- eng/pipelines/coreclr/ci.yml | 2 +- eng/pipelines/runtime.yml | 2 +- src/coreclr/src/binder/inc/assembly.hpp | 2 +- src/coreclr/src/debug/daccess/daccess.cpp | 2 +- src/coreclr/src/debug/daccess/dacdbiimpl.cpp | 2 +- src/coreclr/src/debug/daccess/dacdbiimpl.h | 2 +- src/coreclr/src/debug/daccess/fntableaccess.h | 2 +- .../src/debug/di/eventredirectionpipeline.h | 2 +- src/coreclr/src/debug/di/rspriv.h | 2 +- src/coreclr/src/debug/di/rsthread.cpp | 2 +- src/coreclr/src/debug/ee/debugger.cpp | 4 +- src/coreclr/src/debug/ee/debugger.h | 2 +- src/coreclr/src/debug/ee/i386/dbghelpers.S | 2 +- src/coreclr/src/debug/ee/i386/dbghelpers.asm | 2 +- src/coreclr/src/debug/ildbsymlib/symread.cpp | 2 +- src/coreclr/src/debug/inc/dbgtransportsession.h | 2 +- src/coreclr/src/gc/gc.cpp | 312 ++++++++++----------- src/coreclr/src/gc/gcpriv.h | 20 +- src/coreclr/src/inc/cordebuginfo.h | 2 +- src/coreclr/src/inc/daccess.h | 2 +- src/coreclr/src/inc/eventtracebase.h | 4 +- src/coreclr/src/inc/gcdecoder.cpp | 4 +- src/coreclr/src/inc/regex_base.h | 2 +- src/coreclr/src/inc/sstring.h | 2 +- src/coreclr/src/jit/codegeninterface.h | 2 +- src/coreclr/src/jit/compiler.cpp | 4 +- src/coreclr/src/jit/compiler.h | 4 +- src/coreclr/src/jit/lowerxarch.cpp | 2 +- src/coreclr/src/jit/lsra.cpp | 8 +- src/coreclr/src/jit/optcse.cpp | 2 +- src/coreclr/src/jit/simdashwintrinsic.cpp | 2 +- src/coreclr/src/md/enc/stgtiggerstorage.cpp | 2 +- src/coreclr/src/pal/inc/rt/safecrt.h | 2 +- src/coreclr/src/pal/src/locale/utf8.cpp | 2 +- .../src/pal/src/objmgr/shmobjectmanager.cpp | 2 +- src/coreclr/src/pal/src/safecrt/tsplitpath_s.inl | 2 +- .../palsuite/c_runtime/wcsrchr/test1/test1.cpp | 10 +- .../object_management/event/nonshared/event.cpp | 95 +++---- .../object_management/event/shared/event.cpp | 95 +++---- .../object_management/mutex/nonshared/mutex.cpp | 103 +++---- .../object_management/mutex/shared/mutex.cpp | 113 ++++---- .../semaphore/nonshared/semaphore.cpp | 12 - .../semaphore/shared/semaphore.cpp | 9 - .../pal/tests/palsuite/composite/wfmo/mutex.cpp | 96 +++---- .../Common/JitInterface/CorInfoTypes.VarInfo.cs | 4 +- src/coreclr/src/tools/r2rdump/R2RDiff.cs | 2 +- src/coreclr/src/utilcode/splitpath.cpp | 2 +- src/coreclr/src/utilcode/util.cpp | 2 +- src/coreclr/src/vm/arm/profiler.cpp | 2 +- src/coreclr/src/vm/class.cpp | 2 +- src/coreclr/src/vm/domainfile.cpp | 2 +- src/coreclr/src/vm/hash.h | 6 +- src/coreclr/src/vm/methodtable.cpp | 4 +- src/coreclr/src/vm/methodtable.h | 6 +- src/coreclr/src/vm/methodtablebuilder.cpp | 14 +- src/coreclr/src/vm/methodtablebuilder.h | 2 +- src/coreclr/src/vm/prestub.cpp | 4 +- src/coreclr/src/vm/profilinghelper.cpp | 2 +- src/coreclr/src/vm/stublink.h | 2 +- src/coreclr/src/zap/zapcode.h | 2 +- src/libraries/Native/Unix/System.Native/pal_time.h | 2 +- .../System.Console/src/System/IO/StdInReader.cs | 2 +- .../tests/ManualTests/ManualTests.cs | 4 +- .../System.Drawing.Common/tests/BitmapTests.cs | 2 +- .../System.Drawing.Common/tests/PenTests.cs | 4 +- .../mono/System.Drawing.Imaging/IconCodecTests.cs | 20 +- .../mono/System.Drawing.Imaging/JpegCodecTests.cs | 4 +- .../src/System/Management/ManagementScope.cs | 2 +- .../tests/FunctionalTests/IPEndPointTest.cs | 4 +- .../StressTests/SslStress/Utils/ErrorAggregator.cs | 6 +- .../src/System/SpanHelpers.cs | 2 +- .../src/System/Threading/Tasks/Task.cs | 2 +- .../src/System/TimeZoneInfo.Win32.cs | 2 +- .../tests/src/TestUtils/TestData.cs | 6 +- .../Marshal/SetComObjectDataTests.Windows.cs | 4 +- .../tests/RandomNumberGeneratorTests.cs | 4 +- .../tests/EncryptionPropertyCollectionTest.cs | 4 +- .../Text/RegularExpressions/RegexCompiler.cs | 2 +- src/mono/mono/metadata/custom-attrs.c | 34 +-- src/mono/mono/metadata/metadata.h | 24 +- src/mono/mono/tests/Makefile.am | 36 +-- ...cs => block_guard_restore_alignment_on_exit.cs} | 6 +- .../Regression/GitHub_17073/GitHub_17073_gen.csx | 2 +- .../CLR-x86-JIT/V2.0-Beta2/b425314/b425314.cs | 2 +- .../VS-ia64-JIT/V2.0-RTM/b460385/b460385.il | 4 +- .../Loader/binding/tracing/BinderEventListener.cs | 14 +- src/tests/tracing/eventpipe/common/IpcUtils.cs | 14 +- 90 files changed, 574 insertions(+), 656 deletions(-) rename src/mono/mono/tests/{block_guard_restore_aligment_on_exit.cs => block_guard_restore_alignment_on_exit.cs} (96%) diff --git a/docs/design/coreclr/jit/first-class-structs.md b/docs/design/coreclr/jit/first-class-structs.md index e24596b..91e8898 100644 --- a/docs/design/coreclr/jit/first-class-structs.md +++ b/docs/design/coreclr/jit/first-class-structs.md @@ -328,7 +328,7 @@ static foo getfoo() { return new foo(); } the struct may or may not be passed or returned directly. * Unfortunately, there is not currently a scenario or test case for this issue. -* [\#10879 Unix: Unnecessary struct copy while passsing struct of size <=16](https://github.com/dotnet/runtime/issues/10879) +* [\#10879 Unix: Unnecessary struct copy while passing struct of size <=16](https://github.com/dotnet/runtime/issues/10879) * [\#9839 [RyuJIT] Eliminate unecessary copies when passing structs](https://github.com/dotnet/runtime/issues/9839) * These require changing both the callsite and the callee to avoid copying the parameter onto the stack. diff --git a/docs/workflow/ci/coreclr-ci-health.md b/docs/workflow/ci/coreclr-ci-health.md index 8aa9c5b..935b6c9 100644 --- a/docs/workflow/ci/coreclr-ci-health.md +++ b/docs/workflow/ci/coreclr-ci-health.md @@ -1,6 +1,6 @@ # CI Health and Investigation -`dotnet/runtime` runs testing accross many different architectures and operating systems. The breadth of testing that happens lends itself to a complex system which is susceptible to different points of failure. +`dotnet/runtime` runs testing across many different architectures and operating systems. The breadth of testing that happens lends itself to a complex system which is susceptible to different points of failure. Note that this document focuses on coreclr testing in `dotnet/runtime`. @@ -103,7 +103,7 @@ In order to view the analytics of the pipeline navigate to [runtime-coreclr](htt **Pipeline Pass Rate** -This is tracking the pipeline pass rate generally over two weeks. This view is not very useful for [runtime-coreclr](https://dev.azure.com/dnceng/public/_build?definitionId=649) as the PR pipeline is expected to break during PR validation. Therefore, it is generally recommended to view [runtime-coreclr outerloop](https://dev.azure.com/dnceng/public/_build?definitionId=655) to get a better idea of what the overall success rate is for [runtime-coreclr](https://dev.azure.com/dnceng/public/_build?definitionId=228). Note that this is not exactly a fair comparison as we run signicantly more tests in [runtime-outerloop](https://dev.azure.com/dnceng/public/_build?definitionId=655) accross more platforms. It is however, a good proxy to see the overall CI health. +This is tracking the pipeline pass rate generally over two weeks. This view is not very useful for [runtime-coreclr](https://dev.azure.com/dnceng/public/_build?definitionId=649) as the PR pipeline is expected to break during PR validation. Therefore, it is generally recommended to view [runtime-coreclr outerloop](https://dev.azure.com/dnceng/public/_build?definitionId=655) to get a better idea of what the overall success rate is for [runtime-coreclr](https://dev.azure.com/dnceng/public/_build?definitionId=228). Note that this is not exactly a fair comparison as we run signicantly more tests in [runtime-outerloop](https://dev.azure.com/dnceng/public/_build?definitionId=655) across more platforms. It is however, a good proxy to see the overall CI health. Opening the [runtime-outerloop Pipeline Pass Rate](https://dev.azure.com/dnceng/public/_pipeline/analytics/stageawareoutcome?definitionId=655&contextType=build) there is a presentation of a line graph of the end to end success rate for the pipeline over time. diff --git a/docs/workflow/testing/coreclr/unix-test-instructions.md b/docs/workflow/testing/coreclr/unix-test-instructions.md index 0056150..aae608d 100644 --- a/docs/workflow/testing/coreclr/unix-test-instructions.md +++ b/docs/workflow/testing/coreclr/unix-test-instructions.md @@ -81,7 +81,8 @@ PAL tests Build CoreCLR with PAL tests on the Unix machine: -```sh ./build.sh clr.paltests +```sh +./build.sh clr.paltests ``` Run tests: @@ -100,4 +101,4 @@ artifacts/bin/coreclr/$(uname).x64.Debug/paltests/runpaltests.sh $(pwd)/artifact Test results will go into: `/tmp/PalTestOutput/default/pal_tests.xml` To disable tests in the CI edit -`src/coreclr/src/pal/tests/palsuite/issues.targets` \ No newline at end of file +`src/coreclr/src/pal/tests/palsuite/issues.targets` diff --git a/eng/pipelines/coreclr/ci.yml b/eng/pipelines/coreclr/ci.yml index 9059f11..2c0cba8 100644 --- a/eng/pipelines/coreclr/ci.yml +++ b/eng/pipelines/coreclr/ci.yml @@ -165,5 +165,5 @@ jobs: jobTemplate: /eng/pipelines/coreclr/templates/format-job.yml platforms: - Linux_x64 - # Isssue: https://github.com/dotnet/runtime/issues/40034 + # Issue: https://github.com/dotnet/runtime/issues/40034 #- Windows_NT_x64 diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index 3fc54c1..6767f31 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -228,7 +228,7 @@ jobs: jobTemplate: /eng/pipelines/coreclr/templates/format-job.yml platforms: - Linux_x64 - # Isssue: https://github.com/dotnet/runtime/issues/40034 + # Issue: https://github.com/dotnet/runtime/issues/40034 #- Windows_NT_x64 jobParameters: condition: >- diff --git a/src/coreclr/src/binder/inc/assembly.hpp b/src/coreclr/src/binder/inc/assembly.hpp index 9ad7d42..3f5fb87 100644 --- a/src/coreclr/src/binder/inc/assembly.hpp +++ b/src/coreclr/src/binder/inc/assembly.hpp @@ -116,7 +116,7 @@ namespace BINDER_SPACE #ifndef CROSSGEN_COMPILE protected: #endif - // Asssembly Flags + // Assembly Flags enum { FLAG_NONE = 0x00, diff --git a/src/coreclr/src/debug/daccess/daccess.cpp b/src/coreclr/src/debug/daccess/daccess.cpp index 713dabd..0344ddc 100644 --- a/src/coreclr/src/debug/daccess/daccess.cpp +++ b/src/coreclr/src/debug/daccess/daccess.cpp @@ -6639,7 +6639,7 @@ bool ClrDataAccess::GetILImageNameFromNgenImage( LPCWSTR ilExtension, if (wszFileExtension != 0) { LPWSTR wszNextFileExtension = wszFileExtension; - // Find last occurence + // Find last occurrence do { wszFileExtension = wszNextFileExtension; diff --git a/src/coreclr/src/debug/daccess/dacdbiimpl.cpp b/src/coreclr/src/debug/daccess/dacdbiimpl.cpp index 5732a33..51cb320 100644 --- a/src/coreclr/src/debug/daccess/dacdbiimpl.cpp +++ b/src/coreclr/src/debug/daccess/dacdbiimpl.cpp @@ -468,7 +468,7 @@ BOOL DacDbiInterfaceImpl::IsLeftSideInitialized() } -// Determines if a given adddress is a CLR stub. +// Determines if a given address is a CLR stub. BOOL DacDbiInterfaceImpl::IsTransitionStub(CORDB_ADDRESS address) { DD_ENTER_MAY_THROW; diff --git a/src/coreclr/src/debug/daccess/dacdbiimpl.h b/src/coreclr/src/debug/daccess/dacdbiimpl.h index 219b51d..e7a3dc9 100644 --- a/src/coreclr/src/debug/daccess/dacdbiimpl.h +++ b/src/coreclr/src/debug/daccess/dacdbiimpl.h @@ -733,7 +733,7 @@ public: void GetModuleForDomainFile(VMPTR_DomainFile vmDomainFile, OUT VMPTR_Module * pModule); - // Yields true if the adddress is a CLR stub. + // Yields true if the address is a CLR stub. BOOL IsTransitionStub(CORDB_ADDRESS address); // Get the "type" of address. diff --git a/src/coreclr/src/debug/daccess/fntableaccess.h b/src/coreclr/src/debug/daccess/fntableaccess.h index b9b73e6..9501e0b 100644 --- a/src/coreclr/src/debug/daccess/fntableaccess.h +++ b/src/coreclr/src/debug/daccess/fntableaccess.h @@ -106,7 +106,7 @@ struct FakeStub UINT32 m_signature; #else #ifdef HOST_64BIT - //README ALIGNEMENT: in retail mode UINT m_numCodeBytes does not align to 16byte for the code + //README ALIGNMENT: in retail mode UINT m_numCodeBytes does not align to 16byte for the code // after the Stub struct. This is to pad properly UINT m_pad_code_bytes; #endif // HOST_64BIT diff --git a/src/coreclr/src/debug/di/eventredirectionpipeline.h b/src/coreclr/src/debug/di/eventredirectionpipeline.h index f2b3c55..e219c18 100644 --- a/src/coreclr/src/debug/di/eventredirectionpipeline.h +++ b/src/coreclr/src/debug/di/eventredirectionpipeline.h @@ -117,7 +117,7 @@ protected: // Command parameters for create case. // Note that we must always physically call CreateProcess on the debuggee so that we get the proper out-parameters - // from create-processs (eg, target's handle, startup info, etc). So we always attach the auxillary debugger + // from create-process (eg, target's handle, startup info, etc). So we always attach the auxillary debugger // even in the create case. Use "-pr -pb" in Windbg to attach to a create-suspended process. // // Common Windbg options: diff --git a/src/coreclr/src/debug/di/rspriv.h b/src/coreclr/src/debug/di/rspriv.h index 4dc93eb..5cbba66 100644 --- a/src/coreclr/src/debug/di/rspriv.h +++ b/src/coreclr/src/debug/di/rspriv.h @@ -2533,7 +2533,7 @@ public: // Unique objects that represent the use of some // basic ELEMENT_TYPE's as type parameters. These - // are shared acrosss the entire process. We could + // are shared across the entire process. We could // go and try to find the classes corresponding to these // element types but it seems simpler just to keep // them as special cases. diff --git a/src/coreclr/src/debug/di/rsthread.cpp b/src/coreclr/src/debug/di/rsthread.cpp index 600cd48..da0f6b8 100644 --- a/src/coreclr/src/debug/di/rsthread.cpp +++ b/src/coreclr/src/debug/di/rsthread.cpp @@ -2254,7 +2254,7 @@ HRESULT CordbThread::HasUnhandledException() // ppStackWalk - out parameter; return the new stackwalker // // Return Value: -// Return S_OK on succcess. +// Return S_OK on success. // Return E_FAIL on error. // // Notes: diff --git a/src/coreclr/src/debug/ee/debugger.cpp b/src/coreclr/src/debug/ee/debugger.cpp index de49c11..1191287 100644 --- a/src/coreclr/src/debug/ee/debugger.cpp +++ b/src/coreclr/src/debug/ee/debugger.cpp @@ -1899,7 +1899,7 @@ void Debugger::CleanupTransportSocket(void) // Initialize Left-Side debugger object // // Return Value: -// S_OK on successs. May also throw. +// S_OK on success. May also throw. // // Assumptions: // This is called in the startup path. @@ -12896,7 +12896,7 @@ private: // EnCSequencePointHelper::EnCSequencePointHelper(DebuggerJitInfo *pJitInfo) : m_pJitInfo(pJitInfo), - m_pOffsetToHandlerInfo(NULL) + m_pOffsetToHandlerInfo(NULL) { CONTRACTL { diff --git a/src/coreclr/src/debug/ee/debugger.h b/src/coreclr/src/debug/ee/debugger.h index 6c11331..b149dcc 100644 --- a/src/coreclr/src/debug/ee/debugger.h +++ b/src/coreclr/src/debug/ee/debugger.h @@ -3361,7 +3361,7 @@ public: /* ------------------------------------------------------------------------ * * DebuggerEval class * - * Note that arguments get passsed in a block allocated when + * Note that arguments get passed in a block allocated when * the func-eval is set up. The setup phase passes the total count of arguments. * * In some situations type arguments must also be passed, e.g. diff --git a/src/coreclr/src/debug/ee/i386/dbghelpers.S b/src/coreclr/src/debug/ee/i386/dbghelpers.S index 16440fb..5e8a2e6 100644 --- a/src/coreclr/src/debug/ee/i386/dbghelpers.S +++ b/src/coreclr/src/debug/ee/i386/dbghelpers.S @@ -14,7 +14,7 @@ NESTED_ENTRY FuncEvalHijack, _TEXT, UnhandledExceptionHandlerUnix CHECK_STACK_ALIGNMENT call C_FUNC(FuncEvalHijackWorker) add esp, (4 + STK_ALIGN_PADDING) - jmp eax // return is the patch addresss to jmp to + jmp eax // return is the patch address to jmp to #undef STK_ALIGN_PADDING NESTED_END FuncEvalHijack, _TEXT diff --git a/src/coreclr/src/debug/ee/i386/dbghelpers.asm b/src/coreclr/src/debug/ee/i386/dbghelpers.asm index 7825dee..94a1bc9 100644 --- a/src/coreclr/src/debug/ee/i386/dbghelpers.asm +++ b/src/coreclr/src/debug/ee/i386/dbghelpers.asm @@ -28,7 +28,7 @@ _FuncEvalHijack@0 proc public push eax ; the ptr to the DebuggerEval call _FuncEvalHijackWorker@4 - jmp eax ; return is the patch addresss to jmp to + jmp eax ; return is the patch address to jmp to _FuncEvalHijack@0 endp diff --git a/src/coreclr/src/debug/ildbsymlib/symread.cpp b/src/coreclr/src/debug/ildbsymlib/symread.cpp index 61588f9..dc12d4f 100644 --- a/src/coreclr/src/debug/ildbsymlib/symread.cpp +++ b/src/coreclr/src/debug/ildbsymlib/symread.cpp @@ -1945,7 +1945,7 @@ SymMethod::GetRanges( { // Search through all the sequence points since line might have there - // IL spread accross multiple ranges (for loops for example) + // IL spread across multiple ranges (for loops for example) if (m_pData->m_pSequencePoints[point].Document() == DocumentEntry && line >= m_pData->m_pSequencePoints[point].StartLine() && line <= m_pData->m_pSequencePoints[point].EndLine()) diff --git a/src/coreclr/src/debug/inc/dbgtransportsession.h b/src/coreclr/src/debug/inc/dbgtransportsession.h index 6eb2020..f90f4db 100644 --- a/src/coreclr/src/debug/inc/dbgtransportsession.h +++ b/src/coreclr/src/debug/inc/dbgtransportsession.h @@ -793,7 +793,7 @@ private: // Upon receiving a reply message, signal the event on the message to wake up the thread waiting for // the reply message and close the handle to the event. - void SignalReplyEvent(Message * pMesssage); + void SignalReplyEvent(Message * pMessage); // Given a message ID, find the matching message in the send queue. If there is no match, return NULL. // If there is a match, remove the message from the send queue and return it. diff --git a/src/coreclr/src/gc/gc.cpp b/src/coreclr/src/gc/gc.cpp index 43bb552..a866d50 100644 --- a/src/coreclr/src/gc/gc.cpp +++ b/src/coreclr/src/gc/gc.cpp @@ -200,10 +200,10 @@ gc_oh_num gen_to_oh(int gen) { switch (gen) { - case soh_gen0: + case soh_gen0: return gc_oh_num::soh; case soh_gen1: - return gc_oh_num::soh; + return gc_oh_num::soh; case soh_gen2: return gc_oh_num::soh; case loh_generation: @@ -1216,7 +1216,7 @@ retry: void uoh_alloc_done_with_index (int index) { dprintf (3, ("uoh alloc: release lock on %Ix based on %d", (uint8_t *)alloc_objects[index], index)); - assert ((index >= 0) && (index < max_pending_allocs)); + assert ((index >= 0) && (index < max_pending_allocs)); alloc_objects[index] = (uint8_t*)0; } @@ -2026,7 +2026,7 @@ void stomp_write_barrier_initialize(uint8_t* ephemeral_low, uint8_t* ephemeral_h // Things we need to manually initialize: // gen0 min_size - based on cache // gen0/1 max_size - based on segment size -static static_data static_data_table[latency_level_last - latency_level_first + 1][total_generation_count] = +static static_data static_data_table[latency_level_last - latency_level_first + 1][total_generation_count] = { // latency_level_memory_footprint { @@ -3651,7 +3651,7 @@ void check_and_clear_in_free_list (uint8_t* o, size_t size) free_list_prev (o) = PREV_EMPTY; } } -// This is used when we need to clear the prev bit for a free object we made because we know +// This is used when we need to clear the prev bit for a free object we made because we know // it's not actually a free obj (it's just a temporary thing during allocation). void clear_prev_bit (uint8_t* o, size_t size) { @@ -4095,8 +4095,8 @@ struct initial_memory_details int current_block_large; int current_block_pinned; - enum - { + enum + { ALLATONCE = 1, EACH_GENERATION, EACH_BLOCK, @@ -4121,8 +4121,8 @@ struct initial_memory_details { switch (gen) { - case soh_gen0: - case soh_gen1: + case soh_gen0: + case soh_gen1: case soh_gen2: return initial_normal_heap[h_number].memory_base; case loh_generation: return initial_large_heap[h_number].memory_base; case poh_generation: return initial_pinned_heap[h_number].memory_base; @@ -4134,8 +4134,8 @@ struct initial_memory_details { switch (gen) { - case soh_gen0: - case soh_gen1: + case soh_gen0: + case soh_gen1: case soh_gen2: return block_size_normal; case loh_generation: return block_size_large; case poh_generation: return block_size_pinned; @@ -4157,7 +4157,7 @@ BOOL gc_heap::reserve_initial_memory (size_t normal_size, size_t large_size, siz assert (memory_details.initial_memory == 0); // soh + loh + poh segments * num_heaps - memory_details.initial_memory = new (nothrow) imemory_data[num_heaps * (total_generation_count - ephemeral_generation_count)]; + memory_details.initial_memory = new (nothrow) imemory_data[num_heaps * (total_generation_count - ephemeral_generation_count)]; if (memory_details.initial_memory == 0) { dprintf (2, ("failed to reserve %Id bytes for imemory_data", num_heaps * (total_generation_count - ephemeral_generation_count) * sizeof (imemory_data))); @@ -4291,7 +4291,7 @@ BOOL gc_heap::reserve_initial_memory (size_t normal_size, size_t large_size, siz } else { - // for each NUMA node, give out the memory to its heaps + // for each NUMA node, give out the memory to its heaps for (uint16_t numa_node = 0; numa_node < numa_node_count; numa_node++) { numa_reserved_block * block = &memory_details.numa_reserved_block_table[numa_node]; @@ -6036,7 +6036,7 @@ bool gc_heap::virtual_commit (void* address, size_t size, gc_oh_num oh, int h_nu { check_commit_cs.Enter(); committed_by_oh[oh] -= size; - + dprintf (1, ("commit failed, updating %Id to %Id", current_total_committed, (current_total_committed - size))); current_total_committed -= size; @@ -6260,9 +6260,9 @@ public: // We should think about whether it's really necessary to have to copy back the pre plug // info since it was already copied during compacting plugs. But if a plug doesn't move // by >= 3 ptr size (the size of gap_reloc_pair), it means we'd have to recover pre plug info. - size_t recover_plug_info() + size_t recover_plug_info() { - // We need to calculate the size for sweep case in order to correctly record the + // We need to calculate the size for sweep case in order to correctly record the // free_obj_space - sweep would've made these artifical gaps into free objects and // we would need to deduct the size because now we are writing into those free objects. size_t recovered_sweep_size = 0; @@ -6429,7 +6429,7 @@ void gc_heap::fix_uoh_allocation_area() #endif // _DEBUG generation_alloc_context (generation_of (i)); assert (acontext->alloc_ptr == 0); - assert (acontext->alloc_limit == 0); + assert (acontext->alloc_limit == 0); #if 0 dprintf (3, ("UOH alloc context: gen: %Ix, ptr: %Ix, limit %Ix", @@ -9844,7 +9844,7 @@ int gc_heap::object_gennum_plan (uint8_t* o) heap_segment* gc_heap::make_heap_segment (uint8_t* new_pages, size_t size, gc_oh_num oh, int h_number) { - assert(oh != gc_oh_num::none); + assert(oh != gc_oh_num::none); size_t initial_commit = SEGMENT_INITIAL_COMMIT; if (!virtual_commit (new_pages, initial_commit, oh, h_number)) @@ -10403,11 +10403,11 @@ void gc_heap::make_generation (int gen_num, heap_segment* seg, uint8_t* start) gen->allocation_segment = seg; gen->plan_allocation_start = 0; gen->free_list_space = 0; - gen->pinned_allocated = 0; - gen->free_list_allocated = 0; + gen->pinned_allocated = 0; + gen->free_list_allocated = 0; gen->end_seg_allocated = 0; - gen->condemned_allocated = 0; - gen->sweep_allocated = 0; + gen->condemned_allocated = 0; + gen->sweep_allocated = 0; gen->free_obj_space = 0; gen->allocation_size = 0; gen->pinned_allocation_sweep_size = 0; @@ -11717,7 +11717,7 @@ void gc_heap::thread_free_item_front (generation* gen, uint8_t* free_start, size if (gen->gen_num == max_generation) { - dprintf (2, ("AO h%d: gen2F+: %Ix(%Id)->%Id, FO: %Id", + dprintf (2, ("AO h%d: gen2F+: %Ix(%Id)->%Id, FO: %Id", heap_number, free_start, free_size, generation_free_list_space (gen), generation_free_obj_space (gen))); } @@ -11732,7 +11732,7 @@ void gc_heap::thread_item_front_added (generation* gen, uint8_t* free_start, siz if (gen->gen_num == max_generation) { - dprintf (2, ("AO [h%d] gen2FL+: %Ix(%Id)->%Id", + dprintf (2, ("AO [h%d] gen2FL+: %Ix(%Id)->%Id", heap_number, free_start, free_size, generation_free_list_space (gen))); } @@ -11748,7 +11748,7 @@ void gc_heap::make_free_obj (generation* gen, uint8_t* free_start, size_t free_s if (gen->gen_num == max_generation) { - dprintf (2, ("AO [h%d] gen2FO+: %Ix(%Id)->%Id", + dprintf (2, ("AO [h%d] gen2FO+: %Ix(%Id)->%Id", heap_number, free_start, free_size, generation_free_obj_space (gen))); } } @@ -11805,7 +11805,7 @@ void gc_heap::adjust_limit (uint8_t* start, size_t limit_size, generation* gen) uint8_t* old_loc = generation_last_free_list_allocated (gen); set_free_obj_in_compact_bit (old_loc); - dprintf (3333, ("[h%d] ac: %Ix->%Ix((%Id < %Id), Pset %Ix s->%Id", heap_number, + dprintf (3333, ("[h%d] ac: %Ix->%Ix((%Id < %Id), Pset %Ix s->%Id", heap_number, generation_allocation_context_start_region (gen), generation_allocation_pointer (gen), allocated_size, min_free_item_no_prev, filler_free_obj_size_location, filler_free_obj_size)); } @@ -11842,7 +11842,7 @@ void gc_heap::adjust_limit (uint8_t* start, size_t limit_size, generation* gen) make_free_obj (gen, hole, size); } } - else + else { dprintf (3, ("threading hole in front of free list")); thread_free_item_front (gen, hole, size); @@ -12061,10 +12061,10 @@ void allocator::unlink_item (unsigned int bn, uint8_t* item, uint8_t* prev_item, if (gen_number == max_generation) { dprintf (3, ("[g%2d, b%2d]UL: %Ix->%Ix->%Ix (h: %Ix, t: %Ix)", - gen_number, bn, free_list_prev (item), item, free_list_slot (item), + gen_number, bn, free_list_prev (item), item, free_list_slot (item), al->alloc_list_head(), al->alloc_list_tail())); - dprintf (3, ("[g%2d, b%2d]UL: exit, h->N: %Ix, h->P: %Ix, t->N: %Ix, t->P: %Ix", - gen_number, bn, + dprintf (3, ("[g%2d, b%2d]UL: exit, h->N: %Ix, h->P: %Ix, t->N: %Ix, t->P: %Ix", + gen_number, bn, (al->alloc_list_head() ? free_list_slot (al->alloc_list_head()) : 0), (al->alloc_list_head() ? free_list_prev (al->alloc_list_head()) : 0), (al->alloc_list_tail() ? free_list_slot (al->alloc_list_tail()) : 0), @@ -12077,7 +12077,7 @@ void allocator::unlink_item (unsigned int bn, uint8_t* item, uint8_t* prev_item, void allocator::unlink_item_no_undo (unsigned int bn, uint8_t* item, size_t size) { alloc_list* al = &alloc_list_of (bn); - + uint8_t* next_item = free_list_slot (item); uint8_t* prev_item = free_list_prev (item); @@ -12128,10 +12128,10 @@ void allocator::unlink_item_no_undo (unsigned int bn, uint8_t* item, size_t size if (gen_number == max_generation) { dprintf (3, ("[g%2d, b%2d]ULN: %Ix->%Ix->%Ix (h: %Ix, t: %Ix)", - gen_number, bn, free_list_prev (item), item, free_list_slot (item), + gen_number, bn, free_list_prev (item), item, free_list_slot (item), al->alloc_list_head(), al->alloc_list_tail())); - dprintf (3, ("[g%2d, b%2d]ULN: exit: h->N: %Ix, h->P: %Ix, t->N: %Ix, t->P: %Ix", - gen_number, bn, + dprintf (3, ("[g%2d, b%2d]ULN: exit: h->N: %Ix, h->P: %Ix, t->N: %Ix, t->P: %Ix", + gen_number, bn, (al->alloc_list_head() ? free_list_slot (al->alloc_list_head()) : 0), (al->alloc_list_head() ? free_list_prev (al->alloc_list_head()) : 0), (al->alloc_list_tail() ? free_list_slot (al->alloc_list_tail()) : 0), @@ -12148,7 +12148,7 @@ void allocator::unlink_item_no_undo (uint8_t* item, size_t size) void allocator::unlink_item_no_undo_added (unsigned int bn, uint8_t* item, uint8_t* previous_item) { alloc_list* al = &alloc_list_of (bn); - + uint8_t* next_item = free_list_slot (item); uint8_t* prev_item = free_list_prev (item); @@ -12178,10 +12178,10 @@ void allocator::unlink_item_no_undo_added (unsigned int bn, uint8_t* item, uint8 if (gen_number == max_generation) { dprintf (3333, ("[g%2d, b%2d]ULNA: %Ix->%Ix->%Ix (h: %Ix, t: %Ix)", - gen_number, bn, free_list_prev (item), item, free_list_slot (item), + gen_number, bn, free_list_prev (item), item, free_list_slot (item), al->added_alloc_list_head(), al->added_alloc_list_tail())); - dprintf (3333, ("[g%2d, b%2d]ULNA: exit: h->N: %Ix, h->P: %Ix, t->N: %Ix, t->P: %Ix", - gen_number, bn, + dprintf (3333, ("[g%2d, b%2d]ULNA: exit: h->N: %Ix, h->P: %Ix, t->N: %Ix, t->P: %Ix", + gen_number, bn, (al->added_alloc_list_head() ? free_list_slot (al->added_alloc_list_head()) : 0), (al->added_alloc_list_head() ? free_list_prev (al->added_alloc_list_head()) : 0), (al->added_alloc_list_tail() ? free_list_slot (al->added_alloc_list_tail()) : 0), @@ -12215,11 +12215,11 @@ int allocator::thread_item_front_added (uint8_t* item, size_t size) if (gen_number == max_generation) { dprintf (3333, ("[g%2d, b%2d]TFFA: exit: %Ix->%Ix->%Ix (h: %Ix, t: %Ix)", - gen_number, a_l_number, - free_list_prev (item), item, free_list_slot (item), + gen_number, a_l_number, + free_list_prev (item), item, free_list_slot (item), al->added_alloc_list_head(), al->added_alloc_list_tail())); - dprintf (3333, ("[g%2d, b%2d]TFFA: h->N: %Ix, h->P: %Ix, t->N: %Ix, t->P: %Ix", - gen_number, a_l_number, + dprintf (3333, ("[g%2d, b%2d]TFFA: h->N: %Ix, h->P: %Ix, t->N: %Ix, t->P: %Ix", + gen_number, a_l_number, (al->added_alloc_list_head() ? free_list_slot (al->added_alloc_list_head()) : 0), (al->added_alloc_list_head() ? free_list_prev (al->added_alloc_list_head()) : 0), (al->added_alloc_list_tail() ? free_list_slot (al->added_alloc_list_tail()) : 0), @@ -12276,12 +12276,12 @@ void allocator::thread_item (uint8_t* item, size_t size) #ifdef DOUBLY_LINKED_FL if (gen_number == max_generation) { - dprintf (3333, ("[g%2d, b%2d]TFE: %Ix->%Ix->%Ix (h: %Ix, t: %Ix)", - gen_number, a_l_number, - free_list_prev (item), item, free_list_slot (item), + dprintf (3333, ("[g%2d, b%2d]TFE: %Ix->%Ix->%Ix (h: %Ix, t: %Ix)", + gen_number, a_l_number, + free_list_prev (item), item, free_list_slot (item), al->alloc_list_head(), al->alloc_list_tail())); - dprintf (3333, ("[g%2d, b%2d]TFE: exit: h->N: %Ix, h->P: %Ix, t->N: %Ix, t->P: %Ix", - gen_number, a_l_number, + dprintf (3333, ("[g%2d, b%2d]TFE: exit: h->N: %Ix, h->P: %Ix, t->N: %Ix, t->P: %Ix", + gen_number, a_l_number, (al->alloc_list_head() ? free_list_slot (al->alloc_list_head()) : 0), (al->alloc_list_head() ? free_list_prev (al->alloc_list_head()) : 0), (al->alloc_list_tail() ? free_list_slot (al->alloc_list_tail()) : 0), @@ -12326,11 +12326,11 @@ void allocator::thread_item_front (uint8_t* item, size_t size) free_list_prev (item) = 0; dprintf (3333, ("[g%2d, b%2d]TFF: exit: %Ix->%Ix->%Ix (h: %Ix, t: %Ix)", - gen_number, a_l_number, - free_list_prev (item), item, free_list_slot (item), + gen_number, a_l_number, + free_list_prev (item), item, free_list_slot (item), al->alloc_list_head(), al->alloc_list_tail())); - dprintf (3333, ("[g%2d, b%2d]TFF: h->N: %Ix, h->P: %Ix, t->N: %Ix, t->P: %Ix", - gen_number, a_l_number, + dprintf (3333, ("[g%2d, b%2d]TFF: h->N: %Ix, h->P: %Ix, t->N: %Ix, t->P: %Ix", + gen_number, a_l_number, (al->alloc_list_head() ? free_list_slot (al->alloc_list_head()) : 0), (al->alloc_list_head() ? free_list_prev (al->alloc_list_head()) : 0), (al->alloc_list_tail() ? free_list_slot (al->alloc_list_tail()) : 0), @@ -12403,8 +12403,8 @@ void allocator::copy_from_alloc_list (alloc_list* fromalist) if (repair_list) { //repair the the list - //new items may have been added during the plan phase - //items may have been unlinked. + //new items may have been added during the plan phase + //items may have been unlinked. uint8_t* free_item = alloc_list_head_of (i); while (free_item && count) @@ -12464,13 +12464,13 @@ void allocator::commit_alloc_list_changes() { for (unsigned int i = 0; i < num_buckets; i++) { - //remove the undo info from list. + //remove the undo info from list. uint8_t* free_item = alloc_list_head_of (i); #ifdef DOUBLY_LINKED_FL if (bgc_repair_p) { - dprintf (3, ("C[b%2d] ENTRY: h: %Ix t: %Ix", i, + dprintf (3, ("C[b%2d] ENTRY: h: %Ix t: %Ix", i, alloc_list_head_of (i), alloc_list_tail_of (i))); } @@ -12526,7 +12526,7 @@ void allocator::commit_alloc_list_changes() } uint8_t* head_added = added_alloc_list_head_of (i); - + if (head_added) { alloc_list_head_of (i) = head_added; @@ -12835,7 +12835,7 @@ void gc_heap::check_for_full_gc (int gen_num, size_t size) { return; } - + if (gen_num < max_generation) { gen_num = max_generation; @@ -13156,7 +13156,7 @@ end: #ifdef BACKGROUND_GC void gc_heap::bgc_uoh_alloc_clr (uint8_t* alloc_start, - size_t size, + size_t size, alloc_context* acontext, uint32_t flags, int align_const, @@ -13239,7 +13239,7 @@ void gc_heap::bgc_uoh_alloc_clr (uint8_t* alloc_start, BOOL gc_heap::a_fit_free_list_uoh_p (size_t size, alloc_context* acontext, - uint32_t flags, + uint32_t flags, int align_const, int gen_number) { @@ -14284,7 +14284,7 @@ allocation_state gc_heap::allocate_uoh (int gen_number, can_use_existing_p = uoh_try_fit (gen_number, size, acontext, flags, align_const, &commit_failed_p, &oom_r); uoh_alloc_state = (can_use_existing_p ? - a_state_can_allocate : + a_state_can_allocate : (commit_failed_p ? a_state_trigger_full_compact_gc : a_state_acquire_seg)); @@ -14296,7 +14296,7 @@ allocation_state gc_heap::allocate_uoh (int gen_number, BOOL commit_failed_p = FALSE; BOOL can_use_existing_p = FALSE; - can_use_existing_p = uoh_try_fit (gen_number, size, acontext, flags, + can_use_existing_p = uoh_try_fit (gen_number, size, acontext, flags, align_const, &commit_failed_p, &oom_r); // Even after we got a new seg it doesn't necessarily mean we can allocate, // another LOH allocating thread could have beat us to acquire the msl so @@ -14345,9 +14345,9 @@ allocation_state gc_heap::allocate_uoh (int gen_number, current_full_compact_gc_count = get_full_compact_gc_count(); can_get_new_seg_p = uoh_get_new_seg (gen_number, size, &did_full_compacting_gc, &oom_r); - uoh_alloc_state = (can_get_new_seg_p ? - a_state_try_fit_new_seg : - (did_full_compacting_gc ? + uoh_alloc_state = (can_get_new_seg_p ? + a_state_try_fit_new_seg : + (did_full_compacting_gc ? a_state_check_retry_seg : a_state_check_and_wait_for_bgc)); break; @@ -14363,8 +14363,8 @@ allocation_state gc_heap::allocate_uoh (int gen_number, // Since we release the msl before we try to allocate a seg, other // threads could have allocated a bunch of segments before us so // we might need to retry. - uoh_alloc_state = (can_get_new_seg_p ? - a_state_try_fit_after_cg : + uoh_alloc_state = (can_get_new_seg_p ? + a_state_try_fit_after_cg : a_state_check_retry_seg); break; } @@ -14375,10 +14375,10 @@ allocation_state gc_heap::allocate_uoh (int gen_number, current_full_compact_gc_count = get_full_compact_gc_count(); - can_get_new_seg_p = uoh_get_new_seg (gen_number, size, &did_full_compacting_gc, &oom_r); - uoh_alloc_state = (can_get_new_seg_p ? - a_state_try_fit_new_seg : - (did_full_compacting_gc ? + can_get_new_seg_p = uoh_get_new_seg (gen_number, size, &did_full_compacting_gc, &oom_r); + uoh_alloc_state = (can_get_new_seg_p ? + a_state_try_fit_new_seg : + (did_full_compacting_gc ? a_state_check_retry_seg : a_state_trigger_full_compact_gc)); assert ((uoh_alloc_state != a_state_cant_allocate) || (oom_r != oom_no_failure)); @@ -14391,8 +14391,8 @@ allocation_state gc_heap::allocate_uoh (int gen_number, bgc_in_progress_p = check_and_wait_for_bgc (awr_loh_oos_bgc, &did_full_compacting_gc, true); uoh_alloc_state = (!bgc_in_progress_p ? - a_state_trigger_full_compact_gc : - (did_full_compacting_gc ? + a_state_trigger_full_compact_gc : + (did_full_compacting_gc ? a_state_try_fit_after_cg : a_state_try_fit_after_bgc)); break; @@ -14425,9 +14425,9 @@ allocation_state gc_heap::allocate_uoh (int gen_number, should_retry_get_seg = TRUE; } } - - uoh_alloc_state = (should_retry_gc ? - a_state_trigger_full_compact_gc : + + uoh_alloc_state = (should_retry_gc ? + a_state_trigger_full_compact_gc : (should_retry_get_seg ? a_state_try_fit_after_cg : a_state_cant_allocate)); @@ -15021,7 +15021,7 @@ try_again: if (max_hp != home_hp) { - dprintf (3, ("uoh: %d(%Id)->%d(%Id)", + dprintf (3, ("uoh: %d(%Id)->%d(%Id)", home_hp->heap_number, dd_new_allocation (home_hp->dynamic_data_of (generation_num)), max_hp->heap_number, dd_new_allocation (max_hp->dynamic_data_of (generation_num)))); } @@ -15334,21 +15334,21 @@ BOOL gc_heap::should_set_bgc_mark_bit (uint8_t* o) } else { - // We can have segments outside the BGC range that were allocated during mark - and we + // We can have segments outside the BGC range that were allocated during mark - and we // wouldn't have committed the mark array for them and their background_allocated would be // non-zero. Don't set mark bits for those. // The ones allocated during BGC sweep would have their background_allocated as 0. if ((o >= background_saved_lowest_address) && (o < background_saved_highest_address)) { heap_segment* seg = seg_mapping_table_segment_of (o); - // if bgc_allocated is 0 it means it was allocated during bgc sweep, + // if bgc_allocated is 0 it means it was allocated during bgc sweep, // and everything on it should be considered live. uint8_t* background_allocated = heap_segment_background_allocated (seg); if (background_allocated == 0) return FALSE; // During BGC sweep gen1 GCs could add some free spaces in gen2. // If we use those, we should not set the mark bits on them. - // They could either be a newly allocated seg which is covered by the + // They could either be a newly allocated seg which is covered by the // above case; or they are on a seg that's seen but beyond what BGC mark // saw. else if (o >= background_allocated) @@ -15435,7 +15435,7 @@ uint8_t* gc_heap::allocate_in_older_generation (generation* gen, size_t size, if (record_free_list_allocated_p) { generation_set_bgc_mark_bit_p (gen) = should_set_bgc_mark_bit (free_list); - dprintf (3333, ("SFA: %Ix->%Ix(%d)", free_list, (free_list + free_list_size), + dprintf (3333, ("SFA: %Ix->%Ix(%d)", free_list, (free_list + free_list_size), (generation_set_bgc_mark_bit_p (gen) ? 1 : 0))); } adjust_limit (free_list, free_list_size, gen); @@ -15458,7 +15458,7 @@ uint8_t* gc_heap::allocate_in_older_generation (generation* gen, size_t size, { prev_free_item = free_list; } - free_list = free_list_slot (free_list); + free_list = free_list_slot (free_list); } } #endif //DOUBLY_LINKED_FL @@ -15486,7 +15486,7 @@ uint8_t* gc_heap::allocate_in_older_generation (generation* gen, size_t size, if (!discard_p && !use_undo_p) { gen2_removed_no_undo += free_list_size; - dprintf (3, ("h%d: remove with no undo %Id = %Id", + dprintf (3, ("h%d: remove with no undo %Id = %Id", heap_number, free_list_size, gen2_removed_no_undo)); } @@ -15515,7 +15515,7 @@ uint8_t* gc_heap::allocate_in_older_generation (generation* gen, size_t size, if (!discard_p) { gen2_removed_no_undo += free_list_size; - dprintf (3, ("h%d: b0 remove with no undo %Id = %Id", + dprintf (3, ("h%d: b0 remove with no undo %Id = %Id", heap_number, free_list_size, gen2_removed_no_undo)); } #endif //DOUBLY_LINKED_FL @@ -15650,10 +15650,10 @@ uint8_t* gc_heap::allocate_in_older_generation (generation* gen, size_t size, #ifdef DOUBLY_LINKED_FL if (generation_set_bgc_mark_bit_p (gen)) { - dprintf (2, ("IOM: %Ix(->%Ix(%Id) (%Ix-%Ix)", old_loc, result, pad, + dprintf (2, ("IOM: %Ix(->%Ix(%Id) (%Ix-%Ix)", old_loc, result, pad, (size_t)(&mark_array [mark_word_of (result)]), (size_t)(mark_array [mark_word_of (result)]))); - + set_plug_bgc_mark_bit (old_loc); } @@ -16339,7 +16339,7 @@ int gc_heap::joined_generation_to_condemn (BOOL should_evaluate_elevation, else if ((current_total_committed * 10) >= (heap_hard_limit * 9)) { size_t loh_frag = get_total_gen_fragmentation (loh_generation); - + // If the LOH frag is >= 1/8 it's worth compacting it if ((loh_frag * 8) >= heap_hard_limit) { @@ -16743,8 +16743,8 @@ int gc_heap::generation_to_condemn (int n_initial, for (int i = uoh_start_generation; i < total_generation_count; i++) { - dd_fragmentation (dynamic_data_of (i)) = - generation_free_list_space (generation_of (i)) + + dd_fragmentation (dynamic_data_of (i)) = + generation_free_list_space (generation_of (i)) + generation_free_obj_space (generation_of (i)); } @@ -17168,8 +17168,8 @@ int gc_heap::generation_to_condemn (int n_initial, #ifdef MULTIPLE_HEAPS for (int i = 0; i < n_heaps; i++) { - if (((g_heaps[i]->current_generation_size (max_generation)) > bgc_min_per_heap) || - ((g_heaps[i]->current_generation_size (loh_generation)) > bgc_min_per_heap) || + if (((g_heaps[i]->current_generation_size (max_generation)) > bgc_min_per_heap) || + ((g_heaps[i]->current_generation_size (loh_generation)) > bgc_min_per_heap) || ((g_heaps[i]->current_generation_size (poh_generation)) > bgc_min_per_heap)) { bgc_heap_too_small = FALSE; @@ -17177,8 +17177,8 @@ int gc_heap::generation_to_condemn (int n_initial, } } #else //MULTIPLE_HEAPS - if ((current_generation_size (max_generation) > bgc_min_per_heap) || - (current_generation_size (loh_generation) > bgc_min_per_heap) || + if ((current_generation_size (max_generation) > bgc_min_per_heap) || + (current_generation_size (loh_generation) > bgc_min_per_heap) || (current_generation_size (poh_generation) > bgc_min_per_heap)) { bgc_heap_too_small = FALSE; @@ -17831,7 +17831,7 @@ void gc_heap::gc1() #endif // HOST_64BIT gc_data_global.final_youngest_desired = desired_per_heap; } -#if 1 //subsumed by the linear allocation model +#if 1 //subsumed by the linear allocation model if (gen >= uoh_start_generation) { // to avoid spikes in mem usage due to short terms fluctuations in survivorship, @@ -18155,7 +18155,7 @@ BOOL gc_heap::loh_allocated_for_no_gc() return FALSE; heap_segment* seg = generation_allocation_segment (generation_of (loh_generation)); - do + do { if (seg == saved_loh_segment_no_gc) { @@ -19147,8 +19147,8 @@ gc_heap* gc_heap::heap_of_gc (uint8_t* o) // will find all heap objects (large and small) // // Callers of this method need to guarantee the interior pointer is within the heap range. -// -// If you need it to be stricter, eg if you only want to find an object in ephemeral range, +// +// If you need it to be stricter, eg if you only want to find an object in ephemeral range, // you should make sure interior is within that range before calling this method. uint8_t* gc_heap::find_object (uint8_t* interior) { @@ -20768,7 +20768,7 @@ void gc_heap::background_process_mark_overflow_internal (int condemned_gen_numbe while (seg) { uint8_t* o = hp->background_first_overflow (min_add, seg, concurrent_p, small_object_segments); - + while ((o < hp->background_seg_end (seg, concurrent_p)) && (o <= max_add)) { dprintf (3, ("considering %Ix", (size_t)o)); @@ -21067,7 +21067,7 @@ size_t gc_heap::committed_size() for (int i = max_generation; i < total_generation_count; i++) { generation* gen = generation_of (i); - heap_segment* seg = heap_segment_rw (generation_start_segment (gen)); + heap_segment* seg = heap_segment_rw (generation_start_segment (gen)); while (seg) { @@ -22900,8 +22900,8 @@ BOOL gc_heap::plan_loh() heap_segment* seg = start_seg; uint8_t* o = generation_allocation_start (gen); - dprintf (1235, ("before GC LOH size: %Id, free list: %Id, free obj: %Id\n", - generation_size (loh_generation), + dprintf (1235, ("before GC LOH size: %Id, free list: %Id, free obj: %Id\n", + generation_size (loh_generation), generation_free_list_space (gen), generation_free_obj_space (gen))); @@ -23145,8 +23145,8 @@ void gc_heap::compact_loh() assert (loh_pinned_plug_que_empty_p()); - dprintf (1235, ("after GC LOH size: %Id, free list: %Id, free obj: %Id\n\n", - generation_size (loh_generation), + dprintf (1235, ("after GC LOH size: %Id, free list: %Id, free obj: %Id\n\n", + generation_size (loh_generation), generation_free_list_space (gen), generation_free_obj_space (gen))); } @@ -23201,8 +23201,8 @@ void gc_heap::relocate_in_loh_compact() } } - dprintf (1235, ("after GC LOH size: %Id, free list: %Id, free obj: %Id\n\n", - generation_size (loh_generation), + dprintf (1235, ("after GC LOH size: %Id, free list: %Id, free obj: %Id\n\n", + generation_size (loh_generation), generation_free_list_space (gen), generation_free_obj_space (gen))); } @@ -24883,11 +24883,11 @@ void gc_heap::plan_phase (int condemned_gen_number) #ifdef DOUBLY_LINKED_FL if (condemned_gen_number == (max_generation - 1)) { - dprintf (2, ("[h%d] no undo, FL %Id-%Id -> %Id, FO %Id+%Id=%Id", - heap_number, - generation_free_list_space (older_gen), gen2_removed_no_undo, + dprintf (2, ("[h%d] no undo, FL %Id-%Id -> %Id, FO %Id+%Id=%Id", + heap_number, + generation_free_list_space (older_gen), gen2_removed_no_undo, (generation_free_list_space (older_gen) - gen2_removed_no_undo), - generation_free_obj_space (older_gen), gen2_removed_no_undo, + generation_free_obj_space (older_gen), gen2_removed_no_undo, (generation_free_obj_space (older_gen) + gen2_removed_no_undo))); generation_free_list_space (older_gen) -= gen2_removed_no_undo; @@ -24919,7 +24919,7 @@ void gc_heap::plan_phase (int condemned_gen_number) if (total_recovered_sweep_size > 0) { generation_free_obj_space (generation_of (max_generation)) -= total_recovered_sweep_size; - dprintf (2, ("h%d: deduct %Id for pin, fo->%Id", + dprintf (2, ("h%d: deduct %Id for pin, fo->%Id", heap_number, total_recovered_sweep_size, generation_free_obj_space (generation_of (max_generation)))); } @@ -26631,10 +26631,10 @@ void gc_heap::gcmemcopy (uint8_t* dest, uint8_t* src, size_t len, BOOL copy_car uint8_t* next_o = dest_o + Align (size (dest_o)); background_mark (dest_o, background_saved_lowest_address, background_saved_highest_address); - dest_o = next_o; + dest_o = next_o; } - dprintf (3333, ("[h%d] GM: %Ix(%Ix-%Ix)->%Ix(%Ix-%Ix)", - heap_number, dest, + dprintf (3333, ("[h%d] GM: %Ix(%Ix-%Ix)->%Ix(%Ix-%Ix)", + heap_number, dest, (size_t)(&mark_array [mark_word_of (dest)]), (size_t)(mark_array [mark_word_of (dest)]), dest_end_o, @@ -27519,7 +27519,7 @@ BOOL gc_heap::commit_mark_array_bgc_init() if (!(seg->flags & heap_segment_flags_ma_committed)) { // For ro segments they could always be only partially in range so we'd - // be calling this at the beginning of every BGC. We are not making this + // be calling this at the beginning of every BGC. We are not making this // more efficient right now - ro segments are currently only used by redhawk. if (heap_segment_read_only_p (seg)) { @@ -27551,7 +27551,7 @@ BOOL gc_heap::commit_mark_array_bgc_init() } else { - // For normal segments they are by design completely in range so just + // For normal segments they are by design completely in range so just // commit the whole mark array for each seg. if (commit_mark_array_by_seg (seg, mark_array)) { @@ -28181,9 +28181,9 @@ void gc_heap::background_mark_phase () gen0_bricks_cleared = FALSE; - dprintf (2, ("end of bgc mark: loh: %d, poh: %d, soh: %d", - generation_size (loh_generation), - generation_size (poh_generation), + dprintf (2, ("end of bgc mark: loh: %d, poh: %d, soh: %d", + generation_size (loh_generation), + generation_size (poh_generation), generation_sizes (generation_of (max_generation)))); for (int gen_idx = max_generation; gen_idx < total_generation_count; gen_idx++) @@ -28220,7 +28220,7 @@ void gc_heap::background_mark_phase () heap_segment_background_allocated (seg) = heap_segment_allocated (seg); } - dprintf (3333, ("h%d seg %Ix background allocated is %Ix", + dprintf (3333, ("h%d seg %Ix background allocated is %Ix", heap_number, (size_t)(seg), heap_segment_background_allocated (seg))); @@ -28514,7 +28514,7 @@ void gc_heap::revisit_written_pages (BOOL concurrent_p, BOOL reset_only_p) if ((heap_segment_mem (seg) >= background_saved_lowest_address) || (heap_segment_reserved (seg) <= background_saved_highest_address)) { - dprintf (3, ("h%d: sseg: %Ix(-%Ix)", heap_number, + dprintf (3, ("h%d: sseg: %Ix(-%Ix)", heap_number, heap_segment_mem (seg), heap_segment_reserved (seg))); skip_seg_p = TRUE; } @@ -28530,7 +28530,7 @@ void gc_heap::revisit_written_pages (BOOL concurrent_p, BOOL reset_only_p) dprintf (3, ("h%d: reset only starting %Ix", heap_number, base_address)); } - dprintf (3, ("h%d: starting: %Ix, seg %Ix-%Ix", heap_number, base_address, + dprintf (3, ("h%d: starting: %Ix, seg %Ix-%Ix", heap_number, base_address, heap_segment_mem (seg), heap_segment_reserved (seg))); @@ -28578,7 +28578,7 @@ void gc_heap::revisit_written_pages (BOOL concurrent_p, BOOL reset_only_p) { total_dirtied_pages += bcount; - dprintf (3, ("Found %d pages [%Ix, %Ix[", + dprintf (3, ("Found %d pages [%Ix, %Ix[", bcount, (size_t)base_address, (size_t)high_address)); } @@ -28587,7 +28587,7 @@ void gc_heap::revisit_written_pages (BOOL concurrent_p, BOOL reset_only_p) for (unsigned i = 0; i < bcount; i++) { uint8_t* page = (uint8_t*)background_written_addresses[i]; - dprintf (3, ("looking at page %d at %Ix(h: %Ix)", i, + dprintf (3, ("looking at page %d at %Ix(h: %Ix)", i, (size_t)page, (size_t)high_address)); if (page < high_address) { @@ -28621,7 +28621,7 @@ void gc_heap::revisit_written_pages (BOOL concurrent_p, BOOL reset_only_p) } if (i < loh_generation) - { + { if (!reset_only_p) { dprintf (GTC_LOG, ("h%d: SOH: dp:%Id; mo: %Id", heap_number, total_dirtied_pages, total_marked_objects)); @@ -29364,7 +29364,7 @@ void gc_heap::bgc_tuning::record_bgc_start() // Note that younger gen's collection count is always updated with older gen's collections. // So to calcuate the actual # of gen1 occurred we really should take the # of gen2s into - // acccount (and deduct from gen1's collection count). But right now I am using it for stats. + // account (and deduct from gen1's collection count). But right now I am using it for stats. size_t current_gen1_index = get_current_gc_index (max_generation - 1); dprintf (BGC_TUNING_LOG, ("BTL: g2t[st][g1 %Id]: %0.3f minutes", @@ -32631,13 +32631,13 @@ generation* gc_heap::expand_heap (int condemned_generation, generation* max_gen = generation_of (max_generation); for (int i = 1; i < max_generation; i++) { - generation_free_obj_space (max_gen) += + generation_free_obj_space (max_gen) += generation_free_obj_space (generation_of (i)); dprintf (2, ("[h%d] maxgen freeobj + %Id=%Id", heap_number, generation_free_obj_space (generation_of (i)), generation_free_obj_space (max_gen))); } - + // TODO: This is actually insufficient - if BACKGROUND_GC is not defined we'd need to commit more // in order to accommodate eph gen starts. Also in the no_gc we should make sure used // is updated correctly. @@ -32992,8 +32992,8 @@ size_t gc_heap::desired_new_allocation (dynamic_data* dd, { size_t allocated = 0; size_t committed = uoh_committed_size (gen_number, &allocated); - dprintf (1, ("GC#%Id h%d, GMI: UOH budget, UOH commit %Id (obj %Id, frag %Id), total commit: %Id (recorded: %Id)", - (size_t)settings.gc_index, heap_number, + dprintf (1, ("GC#%Id h%d, GMI: UOH budget, UOH commit %Id (obj %Id, frag %Id), total commit: %Id (recorded: %Id)", + (size_t)settings.gc_index, heap_number, committed, allocated, dd_fragmentation (dynamic_data_of (gen_number)), get_total_committed_size(), (current_total_committed - current_total_committed_bookkeeping))); @@ -33404,7 +33404,7 @@ void gc_heap::trim_youngest_desired_low_memory() { if (g_low_memory_status) { - size_t committed_mem = committed_size(); + size_t committed_mem = committed_size(); dynamic_data* dd = dynamic_data_of (0); size_t current = dd_desired_allocation (dd); size_t candidate = max (Align ((committed_mem / 10), get_alignment_constant(FALSE)), dd_min_size (dd)); @@ -34315,8 +34315,8 @@ void gc_heap::generation_delete_heap_segment (generation* gen, { dprintf (3, ("Preparing empty large segment %Ix for deletion", (size_t)seg)); - // We cannot thread segs in here onto freeable_uoh_segment because - // grow_brick_card_tables could be committing mark array which needs to read + // We cannot thread segs in here onto freeable_uoh_segment because + // grow_brick_card_tables could be committing mark array which needs to read // the seg list. So we delay it till next time we suspend EE. seg->flags |= heap_segment_flags_uoh_delete; // Since we will be decommitting the seg, we need to prevent heap verification @@ -34349,7 +34349,7 @@ void gc_heap::process_background_segment_end (heap_segment* seg, generation* gen, uint8_t* last_plug_end, heap_segment* start_seg, - BOOL* delete_p, + BOOL* delete_p, size_t free_obj_size_last_gap) { *delete_p = FALSE; @@ -34357,7 +34357,7 @@ void gc_heap::process_background_segment_end (heap_segment* seg, uint8_t* background_allocated = heap_segment_background_allocated (seg); BOOL uoh_p = heap_segment_uoh_p (seg); - dprintf (3, ("EoS [%Ix, %Ix[(%Ix[), last: %Ix(%Id)", + dprintf (3, ("EoS [%Ix, %Ix[(%Ix[), last: %Ix(%Id)", (size_t)heap_segment_mem (seg), background_allocated, allocated, last_plug_end, free_obj_size_last_gap)); if (!uoh_p && (allocated != background_allocated)) @@ -34376,7 +34376,7 @@ void gc_heap::process_background_segment_end (heap_segment* seg, fix_brick_to_highest (last_plug_end, background_allocated); // When we allowed fgc's during going through gaps, we could have erased the brick - // that corresponds to bgc_allocated 'cause we had to update the brick there, + // that corresponds to bgc_allocated 'cause we had to update the brick there, // recover it here. fix_brick_to_highest (background_allocated, background_allocated); } @@ -34410,8 +34410,8 @@ void gc_heap::process_background_segment_end (heap_segment* seg, } else { - dprintf (3, ("[h%d] seg %Ix alloc %Ix->%Ix", - heap_number, (size_t)seg, + dprintf (3, ("[h%d] seg %Ix alloc %Ix->%Ix", + heap_number, (size_t)seg, heap_segment_allocated (seg), (size_t)last_plug_end)); heap_segment_allocated (seg) = last_plug_end; @@ -34424,7 +34424,7 @@ void gc_heap::process_background_segment_end (heap_segment* seg, if (free_obj_size_last_gap) { generation_free_obj_space (gen) -= free_obj_size_last_gap; - dprintf (2, ("[h%d] PS: gen2FO-: %Id->%Id", + dprintf (2, ("[h%d] PS: gen2FO-: %Id->%Id", heap_number, free_obj_size_last_gap, generation_free_obj_space (gen))); } @@ -34673,8 +34673,8 @@ void gc_heap::background_sweep() #ifdef DOUBLY_LINKED_FL if (i == max_generation) { - dprintf (2, ("h%d: gen2 still has FL: %Id, FO: %Id", - heap_number, + dprintf (2, ("h%d: gen2 still has FL: %Id, FO: %Id", + heap_number, generation_free_list_space (gen_to_reset), generation_free_obj_space (gen_to_reset))); } @@ -34797,7 +34797,7 @@ void gc_heap::background_sweep() if (i == max_generation) { // start with saved ephemeral segment - // we are no longer holding gc_lock, so a new ephemeral segment could be added, we want the saved one. + // we are no longer holding gc_lock, so a new ephemeral segment could be added, we want the saved one. start_seg = saved_sweep_ephemeral_seg; prev_seg = heap_segment_next(start_seg); } @@ -34858,8 +34858,8 @@ void gc_heap::background_sweep() current_sweep_seg = seg; #endif //DOUBLY_LINKED_FL - // This records the total size of free objects (including the ones on and not on FL) - // in the gap and it gets set to 0 when we encounter a plug. If the last gap we saw + // This records the total size of free objects (including the ones on and not on FL) + // in the gap and it gets set to 0 when we encounter a plug. If the last gap we saw // on a seg is unmarked, we will process this in process_background_segment_end. size_t free_obj_size_last_gap = 0; @@ -34889,7 +34889,7 @@ void gc_heap::background_sweep() if (free_obj_size_last_gap) { generation_free_obj_space (gen) -= free_obj_size_last_gap; - dprintf (3333, ("[h%d] LG: gen2FO-: %Id->%Id", + dprintf (3333, ("[h%d] LG: gen2FO-: %Id->%Id", heap_number, free_obj_size_last_gap, generation_free_obj_space (gen))); free_obj_size_last_gap = 0; @@ -34941,11 +34941,11 @@ void gc_heap::background_sweep() generation_allocator (gen)->unlink_item_no_undo (o, size_o); generation_free_list_space (gen) -= size_o; generation_free_obj_space (gen) += size_o; - - dprintf (3333, ("[h%d] gen2F-: %Ix->%Ix(%Id) FL: %Id", + + dprintf (3333, ("[h%d] gen2F-: %Ix->%Ix(%Id) FL: %Id", heap_number, o, (o + size_o), size_o, generation_free_list_space (gen))); - dprintf (3333, ("h%d: gen2FO+: %Ix(%Id)->%Id (g: %Id)", + dprintf (3333, ("h%d: gen2FO+: %Ix(%Id)->%Id (g: %Id)", heap_number, o, size_o, generation_free_obj_space (gen), free_obj_size_last_gap)); @@ -34953,7 +34953,7 @@ void gc_heap::background_sweep() } else { - // this was not on the free list so it was already part of + // this was not on the free list so it was already part of // free_obj_space, so no need to substract from it. However, // we do need to keep track in this gap's FO space. dprintf (3333, ("h%d: gen2FO: %Ix(%Id)->%Id (g: %Id)", @@ -35079,12 +35079,12 @@ void gc_heap::background_sweep() generation_free_list_space (generation_of (max_generation)), generation_free_obj_space (generation_of (max_generation)))); - dprintf (GTC_LOG, ("h%d: end of bgc sweep: loh FL: %Id, FO: %Id", + dprintf (GTC_LOG, ("h%d: end of bgc sweep: loh FL: %Id, FO: %Id", heap_number, generation_free_list_space (generation_of (loh_generation)), generation_free_obj_space (generation_of (loh_generation)))); - dprintf (GTC_LOG, ("h%d: end of bgc sweep: poh FL: %Id, FO: %Id", + dprintf (GTC_LOG, ("h%d: end of bgc sweep: poh FL: %Id, FO: %Id", heap_number, generation_free_list_space (generation_of (poh_generation)), generation_free_obj_space (generation_of (poh_generation)))); @@ -35112,7 +35112,7 @@ void gc_heap::background_sweep() current_bgc_state = bgc_not_in_process; // We can have an FGC triggered before we set the global state to free - // so we need to not have left over current_sweep_seg that point to + // so we need to not have left over current_sweep_seg that point to // a segment that might've been deleted at the beginning of an FGC. current_sweep_seg = 0; #endif //DOUBLY_LINKED_FL @@ -35181,7 +35181,7 @@ void gc_heap::sweep_uoh_objects (int gen_num) generation_free_list_allocated (gen) = 0; dprintf (3, ("sweeping uoh objects")); - dprintf (3, ("seg: %Ix, [%Ix, %Ix[, starting from %Ix", + dprintf (3, ("seg: %Ix, [%Ix, %Ix[, starting from %Ix", (size_t)seg, (size_t)heap_segment_mem (seg), (size_t)heap_segment_allocated (seg), @@ -35342,8 +35342,8 @@ void gc_heap::mark_through_cards_for_uoh_objects (card_fn fn, size_t total_cards_cleared = 0; #ifdef FEATURE_CARD_MARKING_STEALING - VOLATILE(uint32_t)* chunk_index = (VOLATILE(uint32_t)*) &(gen_num == loh_generation ? - card_mark_chunk_index_loh : + VOLATILE(uint32_t)* chunk_index = (VOLATILE(uint32_t)*) &(gen_num == loh_generation ? + card_mark_chunk_index_loh : card_mark_chunk_index_poh); card_marking_enumerator card_mark_enumerator(seg, low, chunk_index); @@ -35938,7 +35938,7 @@ BOOL gc_heap::bgc_mark_array_range (heap_segment* seg, void gc_heap::bgc_verify_mark_array_cleared (heap_segment* seg) { #ifdef VERIFY_HEAP - if (gc_heap::background_running_p() && + if (gc_heap::background_running_p() && (GCConfig::GetHeapVerifyLevel() & GCConfig::HEAPVERIFY_GC)) { uint8_t* range_beg = 0; @@ -36081,7 +36081,7 @@ void gc_heap::clear_all_mark_array() void gc_heap::verify_mark_array_cleared() { #ifdef VERIFY_HEAP - if (gc_heap::background_running_p() && + if (gc_heap::background_running_p() && (GCConfig::GetHeapVerifyLevel() & GCConfig::HEAPVERIFY_GC)) { for (int i = max_generation; i < total_generation_count; i++) @@ -36283,7 +36283,7 @@ void gc_heap::verify_heap (BOOL begin_gc_p) { int heap_verify_level = static_cast(GCConfig::GetHeapVerifyLevel()); - + #ifdef MULTIPLE_HEAPS t_join* current_join = &gc_t_join; #ifdef BACKGROUND_GC diff --git a/src/coreclr/src/gc/gcpriv.h b/src/coreclr/src/gc/gcpriv.h index 57aa5f6..189ad57 100644 --- a/src/coreclr/src/gc/gcpriv.h +++ b/src/coreclr/src/gc/gcpriv.h @@ -1268,7 +1268,7 @@ public: void balance_heaps (alloc_context* acontext); PER_HEAP ptrdiff_t get_balance_heaps_uoh_effective_budget (int generation_num); - static + static gc_heap* balance_heaps_uoh (alloc_context* acontext, size_t size, int generation_num); // Unlike balance_heaps_uoh, this may return nullptr if we failed to change heaps. static @@ -1281,7 +1281,7 @@ public: // context - we don't actually use the ptr/limit from it so I am // making this explicit by not passing in the alloc_context. // Note: This are instance methods, but the heap instance is only used for - // lowest_address and highest_address, which are currently the same accross all heaps. + // lowest_address and highest_address, which are currently the same across all heaps. PER_HEAP CObjectHeader* allocate_uoh_object (size_t size, uint32_t flags, int gen_num, int64_t& alloc_bytes); @@ -1596,7 +1596,7 @@ protected: PER_HEAP BOOL a_fit_free_list_uoh_p (size_t size, alloc_context* acontext, - uint32_t flags, + uint32_t flags, int align_const, int gen_number); @@ -1651,7 +1651,7 @@ protected: BOOL* short_seg_end_p); PER_HEAP BOOL uoh_try_fit (int gen_number, - size_t size, + size_t size, alloc_context* acontext, uint32_t flags, int align_const, @@ -3014,7 +3014,7 @@ protected: uint8_t* high_page (heap_segment* seg, BOOL concurrent_p); PER_HEAP - void revisit_written_page (uint8_t* page, uint8_t* end, + void revisit_written_page (uint8_t* page, uint8_t* end, BOOL concurrent_p, uint8_t*& last_page, uint8_t*& last_object, BOOL large_objects_p, size_t& num_marked_objects); @@ -3408,7 +3408,7 @@ public: // because it's very short and by the time we are calling it // the settings may have changed and we'd have to do more work // to figure out the right GC to record info of. - // + // // The complications are the GCs triggered without their own // SuspendEE, in which case we will record that GC's duration // as its pause duration and the rest toward the GC that @@ -4085,7 +4085,7 @@ protected: #ifdef DOUBLY_LINKED_FL // For bucket 0 added list, we don't want to have to go through // it to count how many bytes it has so we keep a record here. - // If we need to sweep in gen1, we discard this added list and + // If we need to sweep in gen1, we discard this added list and // need to deduct the size from free_list_space. // Note that we should really move this and the free_list_space // accounting into the alloc_list class. @@ -4133,7 +4133,7 @@ protected: #endif //FEATURE_CARD_MARKING_STEALING PER_HEAP_ISOLATED - int generation_skip_ratio_threshold; + int generation_skip_ratio_threshold; PER_HEAP BOOL gen0_bricks_cleared; @@ -4804,7 +4804,7 @@ size_t& generation_allocated_since_last_pin (generation* inst) } #endif //FREE_USAGE_STATS -inline +inline float generation_allocator_efficiency (generation* inst) { if ((generation_free_list_allocated (inst) + generation_free_obj_space (inst)) != 0) @@ -4817,7 +4817,7 @@ float generation_allocator_efficiency (generation* inst) inline size_t generation_unusable_fragmentation (generation* inst) { - return (size_t)(generation_free_obj_space (inst) + + return (size_t)(generation_free_obj_space (inst) + (1.0f-generation_allocator_efficiency(inst))*generation_free_list_space (inst)); } diff --git a/src/coreclr/src/inc/cordebuginfo.h b/src/coreclr/src/inc/cordebuginfo.h index ae08b2a..66b0d50 100644 --- a/src/coreclr/src/inc/cordebuginfo.h +++ b/src/coreclr/src/inc/cordebuginfo.h @@ -251,7 +251,7 @@ public: }; // VLT_STK2 -- Any 64 bit value which is on the stack, - // in 2 successsive DWords. + // in 2 successive DWords. // eg 2 DWords at [ESP+0x10] struct vlStk2 diff --git a/src/coreclr/src/inc/daccess.h b/src/coreclr/src/inc/daccess.h index 02aad3f..b026959 100644 --- a/src/coreclr/src/inc/daccess.h +++ b/src/coreclr/src/inc/daccess.h @@ -2464,7 +2464,7 @@ typedef DPTR(PTR_PCODE) PTR_PTR_PCODE; // We add a simple macro here which defines DAC_ALIGNAS to the C++11 alignas operator // This helps force the alignment of the next member // For most cross compilation cases the layout of types simply works -// There are a few cases (where this macro is helpful) which are not consistent accross platforms: +// There are a few cases (where this macro is helpful) which are not consistent across platforms: // - Base class whose size is padded to its align size. On Linux the gcc/clang // layouts will reuse this padding in the derived class for the first member // - Class with an vtable pointer and an alignment greater than the pointer size. diff --git a/src/coreclr/src/inc/eventtracebase.h b/src/coreclr/src/inc/eventtracebase.h index 863f704..ab599a9 100644 --- a/src/coreclr/src/inc/eventtracebase.h +++ b/src/coreclr/src/inc/eventtracebase.h @@ -923,7 +923,7 @@ namespace ETW static VOID MethodJitting(MethodDesc *pMethodDesc, SString *namespaceOrClassName, SString *methodName, SString *methodSignature); static VOID MethodJitted(MethodDesc *pMethodDesc, SString *namespaceOrClassName, SString *methodName, SString *methodSignature, PCODE pNativeCodeStartAddress, PrepareCodeConfig *pConfig); static VOID StubInitialized(ULONGLONG ullHelperStartAddress, LPCWSTR pHelperName); - static VOID StubsInitialized(PVOID *pHelperStartAddresss, PVOID *pHelperNames, LONG ulNoOfHelpers); + static VOID StubsInitialized(PVOID *pHelperStartAddress, PVOID *pHelperNames, LONG ulNoOfHelpers); static VOID MethodRestored(MethodDesc * pMethodDesc); static VOID MethodTableRestored(MethodTable * pMethodTable); static VOID DynamicMethodDestroyed(MethodDesc *pMethodDesc); @@ -934,7 +934,7 @@ namespace ETW static VOID MethodJitting(MethodDesc *pMethodDesc, SString *namespaceOrClassName, SString *methodName, SString *methodSignature); static VOID MethodJitted(MethodDesc *pMethodDesc, SString *namespaceOrClassName, SString *methodName, SString *methodSignature, PCODE pNativeCodeStartAddress, PrepareCodeConfig *pConfig); static VOID StubInitialized(ULONGLONG ullHelperStartAddress, LPCWSTR pHelperName) {}; - static VOID StubsInitialized(PVOID *pHelperStartAddresss, PVOID *pHelperNames, LONG ulNoOfHelpers) {}; + static VOID StubsInitialized(PVOID *pHelperStartAddress, PVOID *pHelperNames, LONG ulNoOfHelpers) {}; static VOID MethodRestored(MethodDesc * pMethodDesc) {}; static VOID MethodTableRestored(MethodTable * pMethodTable) {}; static VOID DynamicMethodDestroyed(MethodDesc *pMethodDesc) {}; diff --git a/src/coreclr/src/inc/gcdecoder.cpp b/src/coreclr/src/inc/gcdecoder.cpp index 8b3d9ca..3d929ec 100644 --- a/src/coreclr/src/inc/gcdecoder.cpp +++ b/src/coreclr/src/inc/gcdecoder.cpp @@ -318,7 +318,7 @@ const InfoHdrSmall infoHdrShortcut[128] = { // | | | | | | | | | | | | | | | | | | | returnKind // | | | | | | | | | | | | | | | | | | | | // | | | | | | | | | | | | | | | | | | | | Arg count -// | | | | | | | | | | | | | | | | | | | | | Counted occurences +// | | | | | | | | | | | | | | | | | | | | | Counted occurrences // | | | | | | | | | | | | | | | | | | | | | Frame size | // | | | | | | | | | | | | | | | | | | | | | | | // | | | | | | | | | | | | | | | | | | | | | | untrackedCnt | Header encoding @@ -531,7 +531,7 @@ const unsigned callCommonDelta[4] = { 6,8,10,12 }; * EDI = 0x1, ESI = 0x2, EBX = 0x4, EBP = 0x8 * */ -const unsigned callPatternTable[80] = { // # of occurences +const unsigned callPatternTable[80] = { // # of occurrences 0x0a000200, // 30109 0x0c000200, // 22970 0x0c000201, // 19005 diff --git a/src/coreclr/src/inc/regex_base.h b/src/coreclr/src/inc/regex_base.h index 4938454..3afa539 100644 --- a/src/coreclr/src/inc/regex_base.h +++ b/src/coreclr/src/inc/regex_base.h @@ -550,7 +550,7 @@ public: // *? matches zero or more occurrences of the previous item conservatively // + matches 1 or more occurrences of the previous item eagerly // +? matches 1 or more occurrences of the previous item conservatively -// ? matches 0 or 1 occurences of the previous item +// ? matches 0 or 1 occurrences of the previous item // ( starts a grouping // ) ends a grouping // diff --git a/src/coreclr/src/inc/sstring.h b/src/coreclr/src/inc/sstring.h index 6f04165..99a5219 100644 --- a/src/coreclr/src/inc/sstring.h +++ b/src/coreclr/src/inc/sstring.h @@ -257,7 +257,7 @@ private: // Start searching for a match of the given string, starting at // the given iterator point. // If a match exists, move the iterator to point to the nearest - // occurence of s in the string and return TRUE. + // occurrence of s in the string and return TRUE. // If no match exists, return FALSE and leave the iterator unchanged. BOOL Find(CIterator &i, const SString &s) const; BOOL Find(CIterator &i, const WCHAR *s) const; diff --git a/src/coreclr/src/jit/codegeninterface.h b/src/coreclr/src/jit/codegeninterface.h index ec00904..43782ef 100644 --- a/src/coreclr/src/jit/codegeninterface.h +++ b/src/coreclr/src/jit/codegeninterface.h @@ -490,7 +490,7 @@ public: regNumber vlsrReg; } vlStkReg; - // VLT_STK2 -- Any 64 bit value which is on the stack, in 2 successsive DWords + // VLT_STK2 -- Any 64 bit value which is on the stack, in 2 successive DWords // eg 2 DWords at [ESP+0x10] struct diff --git a/src/coreclr/src/jit/compiler.cpp b/src/coreclr/src/jit/compiler.cpp index 3f0c2f7..cc603b5 100644 --- a/src/coreclr/src/jit/compiler.cpp +++ b/src/coreclr/src/jit/compiler.cpp @@ -1112,7 +1112,7 @@ var_types Compiler::getReturnTypeForStruct(CORINFO_CLASS_HANDLE clsHnd, /////////////////////////////////////////////////////////////////////////////// // -// MEASURE_NOWAY: code to measure and rank dynamic occurences of noway_assert. +// MEASURE_NOWAY: code to measure and rank dynamic occurrences of noway_assert. // (Just the appearances of noway_assert, whether the assert is true or false.) // This might help characterize the cost of noway_assert in non-DEBUG builds, // or determine which noway_assert should be simple DEBUG-only asserts. @@ -3371,7 +3371,7 @@ bool Compiler::compStressCompile(compStressArea stressArea, unsigned weight) //------------------------------------------------------------------------ // compStressCompileHelper: helper to determine if a stress mode should be enabled // -// Argumemnts: +// Arguments: // stressArea - stress mode to possibly enable // weight - percent of time this mode should be turned on // (range 0 to 100); weight 0 effectively disables diff --git a/src/coreclr/src/jit/compiler.h b/src/coreclr/src/jit/compiler.h index d42dfe2..d493ca1 100644 --- a/src/coreclr/src/jit/compiler.h +++ b/src/coreclr/src/jit/compiler.h @@ -6154,12 +6154,12 @@ public: int lpHoistedExprCount; // The register count for the non-FP expressions from inside this loop that have been // hoisted int lpLoopVarCount; // The register count for the non-FP LclVars that are read/written inside this loop - int lpVarInOutCount; // The register count for the non-FP LclVars that are alive inside or accross this loop + int lpVarInOutCount; // The register count for the non-FP LclVars that are alive inside or across this loop int lpHoistedFPExprCount; // The register count for the FP expressions from inside this loop that have been // hoisted int lpLoopVarFPCount; // The register count for the FP LclVars that are read/written inside this loop - int lpVarInOutFPCount; // The register count for the FP LclVars that are alive inside or accross this loop + int lpVarInOutFPCount; // The register count for the FP LclVars that are alive inside or across this loop typedef JitHashTable, bool> FieldHandleSet; FieldHandleSet* lpFieldsModified; // This has entries (mappings to "true") for all static field and object diff --git a/src/coreclr/src/jit/lowerxarch.cpp b/src/coreclr/src/jit/lowerxarch.cpp index 89ae55b..2a8826d 100644 --- a/src/coreclr/src/jit/lowerxarch.cpp +++ b/src/coreclr/src/jit/lowerxarch.cpp @@ -593,7 +593,7 @@ void Lowering::LowerPutArgStk(GenTreePutArgStk* putArgStk) * TODO-XArch-CQ: (Low-pri): Jit64 generates in-line code of 8 instructions for (i) above. * There are hardly any occurrences of this conversion operation in platform * assemblies or in CQ perf benchmarks (1 occurrence in corelib, microsoft.jscript, - * 1 occurence in Roslyn and no occurrences in system, system.core, system.numerics + * 1 occurrence in Roslyn and no occurrences in system, system.core, system.numerics * system.windows.forms, scimark, fractals, bio mums). If we ever find evidence that * doing this optimization is a win, should consider generating in-lined code. */ diff --git a/src/coreclr/src/jit/lsra.cpp b/src/coreclr/src/jit/lsra.cpp index 4f51e28..d24e1f1 100644 --- a/src/coreclr/src/jit/lsra.cpp +++ b/src/coreclr/src/jit/lsra.cpp @@ -4240,7 +4240,7 @@ void LinearScan::spillInterval(Interval* interval, RefPosition* fromRefPosition // an active interval, without spilling. // // Arguments: -// regRec - the RegRecord to be unasssigned +// regRec - the RegRecord to be unassigned // // Return Value: // None. @@ -4266,7 +4266,7 @@ void LinearScan::unassignPhysRegNoSpill(RegRecord* regRec) // physical register record // // Arguments: -// regRec - the physical RegRecord to be unasssigned +// regRec - the physical RegRecord to be unassigned // spillRefPosition - The RefPosition at which the assignedInterval is to be spilled // or nullptr if we aren't spilling // @@ -4304,7 +4304,7 @@ void LinearScan::checkAndClearInterval(RegRecord* regRec, RefPosition* spillRefP // assignedInterval at the given spillRefPosition, if any. // // Arguments: -// regRec - The RegRecord to be unasssigned +// regRec - The RegRecord to be unassigned // newRegType - The RegisterType of interval that would be assigned // // Return Value: @@ -4356,7 +4356,7 @@ void LinearScan::unassignPhysReg(RegRecord* regRec ARM_ARG(RegisterType newRegTy // assignedInterval at the given spillRefPosition, if any. // // Arguments: -// regRec - the RegRecord to be unasssigned +// regRec - the RegRecord to be unassigned // spillRefPosition - The RefPosition at which the assignedInterval is to be spilled // // Return Value: diff --git a/src/coreclr/src/jit/optcse.cpp b/src/coreclr/src/jit/optcse.cpp index 469595d..b2c7005 100644 --- a/src/coreclr/src/jit/optcse.cpp +++ b/src/coreclr/src/jit/optcse.cpp @@ -2785,7 +2785,7 @@ public: if (varTypeIsStruct(cseLclVarTyp)) { // Retrieve the struct handle that we recorded while bulding the list of CSE candidates. - // If all occurances were in GT_IND nodes it could still be NO_CLASS_HANDLE + // If all occurrences were in GT_IND nodes it could still be NO_CLASS_HANDLE // CORINFO_CLASS_HANDLE structHnd = successfulCandidate->CseDsc()->csdStructHnd; if (structHnd == NO_CLASS_HANDLE) diff --git a/src/coreclr/src/jit/simdashwintrinsic.cpp b/src/coreclr/src/jit/simdashwintrinsic.cpp index 059bf82..c9bdccb 100644 --- a/src/coreclr/src/jit/simdashwintrinsic.cpp +++ b/src/coreclr/src/jit/simdashwintrinsic.cpp @@ -428,7 +428,7 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, // Vector, when 32-bytes, requires at least AVX2 assert(!isVectorT256 || compIsaSupportedDebugOnly(InstructionSet_AVX2)); #elif defined(TARGET_ARM64) - // We should have alredy exited early if AdvSimd isn't supported + // We should have already exited early if AdvSimd isn't supported assert(compIsaSupportedDebugOnly(InstructionSet_AdvSimd)); #else #error Unsupported platform diff --git a/src/coreclr/src/md/enc/stgtiggerstorage.cpp b/src/coreclr/src/md/enc/stgtiggerstorage.cpp index e4c799a..435a7a8 100644 --- a/src/coreclr/src/md/enc/stgtiggerstorage.cpp +++ b/src/coreclr/src/md/enc/stgtiggerstorage.cpp @@ -624,7 +624,7 @@ HRESULT STDMETHODCALLTYPE TiggerStorage::OpenStream( // Look for the stream which must be found for this to work. Note that // this error is explicitly not posted as an error object since unfound streams - // are a common occurence and do not warrant a resource file load. + // are a common occurrence and do not warrant a resource file load. IfFailRet(FindStream(rcName, &pStream)); // Get the memory for the stream. diff --git a/src/coreclr/src/pal/inc/rt/safecrt.h b/src/coreclr/src/pal/inc/rt/safecrt.h index 58ea8f3..e440196 100644 --- a/src/coreclr/src/pal/inc/rt/safecrt.h +++ b/src/coreclr/src/pal/inc/rt/safecrt.h @@ -1521,7 +1521,7 @@ errno_t __cdecl _wsplitpath_s( /* extract path string, if any. _Path now points to the first character * of the path, if any, or the filename or extension, if no path was - * specified. Scan ahead for the last occurence, if any, of a '/' or + * specified. Scan ahead for the last occurrence, if any, of a '/' or * '\' path separator character. If none is found, there is no path. * We will also note the last '.' character found, if any, to aid in * handling the extension. diff --git a/src/coreclr/src/pal/src/locale/utf8.cpp b/src/coreclr/src/pal/src/locale/utf8.cpp index 9ded28e..2a3731e 100644 --- a/src/coreclr/src/pal/src/locale/utf8.cpp +++ b/src/coreclr/src/pal/src/locale/utf8.cpp @@ -1836,7 +1836,7 @@ public: pSrc--; // Throw that we don't have enough room (pSrc could be < chars if we had started to process - // a 4 byte sequence alredy) + // a 4 byte sequence already) Contract::Assert(pSrc >= bytes || pTarget == chars, "[UTF8Encoding.GetChars]Expected pSrc to be within input buffer or throw due to no output]"); ThrowCharsOverflow(pTarget == chars); diff --git a/src/coreclr/src/pal/src/objmgr/shmobjectmanager.cpp b/src/coreclr/src/pal/src/objmgr/shmobjectmanager.cpp index 7c4fec9..ca96061 100644 --- a/src/coreclr/src/pal/src/objmgr/shmobjectmanager.cpp +++ b/src/coreclr/src/pal/src/objmgr/shmobjectmanager.cpp @@ -274,7 +274,7 @@ CSharedMemoryObjectManager::RegisterObject( _ASSERTE(fShared); // - // Check if an object by this name alredy exists + // Check if an object by this name already exists // palError = LocateObject( diff --git a/src/coreclr/src/pal/src/safecrt/tsplitpath_s.inl b/src/coreclr/src/pal/src/safecrt/tsplitpath_s.inl index 62b0fcf..7bbaf26 100644 --- a/src/coreclr/src/pal/src/safecrt/tsplitpath_s.inl +++ b/src/coreclr/src/pal/src/safecrt/tsplitpath_s.inl @@ -92,7 +92,7 @@ errno_t __cdecl _FUNC_NAME( /* extract path string, if any. _Path now points to the first character * of the path, if any, or the filename or extension, if no path was - * specified. Scan ahead for the last occurence, if any, of a '/' or + * specified. Scan ahead for the last occurrence, if any, of a '/' or * '\' path separator character. If none is found, there is no path. * We will also note the last '.' character found, if any, to aid in * handling the extension. diff --git a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsrchr/test1/test1.cpp b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsrchr/test1/test1.cpp index af2a58d..7008145 100644 --- a/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsrchr/test1/test1.cpp +++ b/src/coreclr/src/pal/tests/palsuite/c_runtime/wcsrchr/test1/test1.cpp @@ -5,8 +5,8 @@ ** ** Source: test1.c ** -** Purpose: -** Tests to see that wcsrchr correctly returns a pointer to the last occurence +** Purpose: +** Tests to see that wcsrchr correctly returns a pointer to the last occurrence ** of a character in a a string. ** ** @@ -22,7 +22,7 @@ PALTEST(c_runtime_wcsrchr_test1_paltest_wcsrchr_test1, "c_runtime/wcsrchr/test1/ WCHAR c = (WCHAR)' '; WCHAR c2 = (WCHAR)'$'; WCHAR *ptr; - + if (PAL_Initialize(argc, argv)) { return FAIL; @@ -32,14 +32,14 @@ PALTEST(c_runtime_wcsrchr_test1_paltest_wcsrchr_test1, "c_runtime/wcsrchr/test1/ ptr = wcsrchr(str, c); if (ptr != str + 7) { - Fail("ERROR: expected wcsrchr to return pointer to %p, got %p\n", + Fail("ERROR: expected wcsrchr to return pointer to %p, got %p\n", str + 7, ptr); } ptr = wcsrchr(str, c2); if (ptr != NULL) { - Fail("ERROR: expected wcsrchr to return pointer to %p, got %p\n", + Fail("ERROR: expected wcsrchr to return pointer to %p, got %p\n", NULL, ptr); } diff --git a/src/coreclr/src/pal/tests/palsuite/composite/object_management/event/nonshared/event.cpp b/src/coreclr/src/pal/tests/palsuite/composite/object_management/event/nonshared/event.cpp index 72c9fa8..bc521da 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/object_management/event/nonshared/event.cpp +++ b/src/coreclr/src/pal/tests/palsuite/composite/object_management/event/nonshared/event.cpp @@ -10,7 +10,7 @@ ** This test is for Object Management Test case for event where Object type is shareable. ** Algorithm ** o Main Process Creates OBJECT_TYPE Object -** o Create PROCESS_COUNT processes aware of the Shared Object +** o Create PROCESS_COUNT processes aware of the Shared Object ** ** Author: ShamitP ** @@ -38,7 +38,7 @@ struct statistics{ unsigned int processId; unsigned int operationsFailed; unsigned int operationsPassed; - unsigned int operationsTotal; + unsigned int operationsTotal; DWORD operationTime; unsigned int relationId; }; @@ -63,23 +63,21 @@ void PALAPI Run_Thread_event_nonshared(LPVOID lpParam); int GetParameters( int argc, char **argv) { - if( (argc != 5) || ((argc == 1) && !strcmp(argv[1],"/?")) + if( (argc != 5) || ((argc == 1) && !strcmp(argv[1],"/?")) || !strcmp(argv[1],"/h") || !strcmp(argv[1],"/H")) { printf("PAL -Composite Object Management Event Test\n"); printf("Usage:\n"); - printf("Event\n\t[USE_PROCESS_COUNT [greater than 1] \n"); - printf("\t[THREAD_COUNT [greater than 1] \n"); + printf("Event\n\t[USE_PROCESS_COUNT [greater than 1] \n"); + printf("\t[THREAD_COUNT [greater than 1] \n"); printf("\t[REPEAT_COUNT [greater than 1]\n"); printf("\t[RELATION_ID [greater than or Equal to 1]\n"); - + return -1; } - // Trace("Args 1 is [%s], Arg 2 is [%s], Arg 3 is [%s]\n", argv[1], argv[2], argv[3]); - USE_PROCESS_COUNT = atoi(argv[1]); - if( USE_PROCESS_COUNT < 0) + if( USE_PROCESS_COUNT < 0) { printf("\nInvalid USE_PROCESS_COUNT number, Pass greater than 1\n"); return -1; @@ -93,14 +91,14 @@ int GetParameters( int argc, char **argv) } REPEAT_COUNT = atoi(argv[3]); - if( REPEAT_COUNT < 1) + if( REPEAT_COUNT < 1) { printf("\nInvalid REPEAT_COUNT number, Pass greater than 1\n"); return -1; } RELATION_ID = atoi(argv[4]); - if( RELATION_ID < 1) + if( RELATION_ID < 1) { printf("\nMain Process:Invalid RELATION_ID number, Pass greater than 1\n"); return -1; @@ -127,7 +125,7 @@ PALTEST(composite_object_management_event_nonshared_paltest_event_nonshared, "co /* Variables to capture the file name and the file pointer at process level*/ char processFileName[MAX_LONGPATH]; - FILE *pProcessFile = NULL; + FILE *pProcessFile = NULL; struct ProcessStats processStats; DWORD dwStartTime; @@ -142,9 +140,8 @@ PALTEST(composite_object_management_event_nonshared_paltest_event_nonshared, "co { Fail("Error in obtaining the parameters\n"); } -// Trace("Process created, value of process count is [%d]\n", USE_PROCESS_COUNT); - /* Register the start time */ + /* Register the start time */ dwStartTime = GetTickCount(); processStats.relationId = RELATION_ID; processStats.processId = USE_PROCESS_COUNT; @@ -152,7 +149,7 @@ PALTEST(composite_object_management_event_nonshared_paltest_event_nonshared, "co _snprintf(processFileName, MAX_LONGPATH, "%d_process_event_%d_.txt", USE_PROCESS_COUNT, RELATION_ID); pProcessFile = fopen(processFileName, "w+"); if(pProcessFile == NULL) - { + { Fail("Error in opening process File file for write for process [%d]\n", USE_PROCESS_COUNT); } @@ -160,27 +157,27 @@ PALTEST(composite_object_management_event_nonshared_paltest_event_nonshared, "co _snprintf(fileName, MAX_LONGPATH, "%d_thread_event_%d_.txt", USE_PROCESS_COUNT, RELATION_ID); pFile = fopen(fileName, "w+"); - + if(pFile == NULL) - { + { Fail("Error in opening thread File for write for process [%d]\n", USE_PROCESS_COUNT); } // For each thread we will log operations failed (int), passed (int), total (int) // and number of ticks (DWORD) for the operations resultBuffer = new ResultBuffer( THREAD_COUNT, statisticsSize); - StartTestsEvHandle = CreateEvent( + StartTestsEvHandle = CreateEvent( NULL, /* lpEventAttributes*/ TRUE, /* bManualReset */ FALSE, /* bInitialState */ NULL /* name of Event */ - ); + ); if( StartTestsEvHandle == NULL ) { Fail("Error:%d: Unexpected failure " "to create %s Event for process count %d\n", GetLastError(), sTmpEventName, USE_PROCESS_COUNT ); - + } /* Create StartTest Event */ @@ -189,9 +186,9 @@ PALTEST(composite_object_management_event_nonshared_paltest_event_nonshared, "co NULL, /* lpEventAttributes, inheritable to child processes*/ TRUE, /* bAutomaticReset */ TRUE, /* bInitialState */ - NULL + NULL ); - + if( hEventHandle == NULL) { Fail("Unable to create Event handle for process id [%d], returned error [%d]\n", i, GetLastError()); @@ -208,23 +205,23 @@ PALTEST(composite_object_management_event_nonshared_paltest_event_nonshared, "co (LPTHREAD_START_ROUTINE)Run_Thread_event_nonshared,/* thread function */ (LPVOID)dwParam, /* argument to thread function */ 0, /* use default creation flags */ - &threadId[i] /* returns the thread identifier*/ + &threadId[i] /* returns the thread identifier*/ ); - - + + if(hThread[i] == NULL) { Fail("Create Thread failed for %d process, and GetLastError value is %d\n", USE_PROCESS_COUNT, GetLastError()); } - + } if (!SetEvent(StartTestsEvHandle)) { - Fail("Set Event for Start Tests failed for %d process, and GetLastError value is %d\n", USE_PROCESS_COUNT, GetLastError()); + Fail("Set Event for Start Tests failed for %d process, and GetLastError value is %d\n", USE_PROCESS_COUNT, GetLastError()); } /* Test running */ - returnCode = WaitForMultipleObjects( THREAD_COUNT, hThread, TRUE, INFINITE); + returnCode = WaitForMultipleObjects( THREAD_COUNT, hThread, TRUE, INFINITE); if( WAIT_OBJECT_0 != returnCode ) { @@ -232,17 +229,15 @@ PALTEST(composite_object_management_event_nonshared_paltest_event_nonshared, "co testStatus = FAIL; } - processStats.operationTime = GetTimeDiff(dwStartTime); + processStats.operationTime = GetTimeDiff(dwStartTime); /* Write to a file*/ if(pFile!= NULL) - { + { for( i = 0; i < THREAD_COUNT; i++ ) - { + { buffer = (struct statistics *)resultBuffer->getResultBuffer(i); returnCode = fprintf(pFile, "%d,%d,%d,%d,%lu,%d\n", buffer->processId, buffer->operationsFailed, buffer->operationsPassed, buffer->operationsTotal, buffer->operationTime, buffer->relationId ); - //Trace("Iteration %d over\n", i); - } } if(fclose(pFile)) @@ -260,7 +255,6 @@ PALTEST(composite_object_management_event_nonshared_paltest_event_nonshared, "co /* Logging for the test case over, clean up the handles */ -// Trace("Test Thread %d done\n", USE_PROCESS_COUNT); /* Clean Up */ for( i = 0; i < THREAD_COUNT; i++ ) { @@ -281,7 +275,7 @@ PALTEST(composite_object_management_event_nonshared_paltest_event_nonshared, "co { Trace("Error:%d: CloseHandle failed for Process [%d] hEventHandle\n", GetLastError(), USE_PROCESS_COUNT); testStatus = FAIL; - } + } PAL_TerminateEx(testStatus); return testStatus; @@ -291,7 +285,7 @@ PALTEST(composite_object_management_event_nonshared_paltest_event_nonshared, "co void PALAPI Run_Thread_event_nonshared (LPVOID lpParam) { unsigned int i = 0; - DWORD dwWaitResult; + DWORD dwWaitResult; struct statistics stats; DWORD dwStartTime; @@ -304,10 +298,10 @@ void PALAPI Run_Thread_event_nonshared (LPVOID lpParam) stats.operationTime = 0; int Id=(int)lpParam; - - dwWaitResult = WaitForSingleObject( + + dwWaitResult = WaitForSingleObject( StartTestsEvHandle, // handle to start test handle - TIMEOUT); + TIMEOUT); if(dwWaitResult != WAIT_OBJECT_0) { @@ -318,40 +312,35 @@ void PALAPI Run_Thread_event_nonshared (LPVOID lpParam) for( i = 0; i < REPEAT_COUNT; i++ ) { - dwWaitResult = WaitForSingleObject( + dwWaitResult = WaitForSingleObject( hEventHandle, // handle to Event - TIMEOUT); + TIMEOUT); if(dwWaitResult != WAIT_OBJECT_0) { -// Trace("Error while waiting for onject @ thread %d, # iter %d, RC is %d, Error is %d\n", Id, i, dwWaitResult, GetLastError()); - stats.operationsFailed += 1; + stats.operationsFailed += 1; stats.operationsTotal += 1; testStatus = FAIL; continue; } - if (! SetEvent(hEventHandle)) - { + if (! SetEvent(hEventHandle)) + { // Deal with error. -// Trace("Error while setting Event @ thread %d # iter %d\n", Id, i); stats.operationsFailed += 1; stats.operationsTotal += 1; // Do we need to have while true loop to attempt to set event? testStatus = FAIL; continue; - } - + } + stats.operationsTotal += 1; stats.operationsPassed += 1; -// Trace("Successs while setting Event @ iteration %d -> thread %d -> Process %d\n", i, Id, USE_PROCESS_COUNT); - } - - stats.operationTime = GetTimeDiff(dwStartTime); + + stats.operationTime = GetTimeDiff(dwStartTime); if(resultBuffer->LogResult(Id, (char *)&stats)) { Fail("Error:%d: while writing to shared memory, Thread Id is[%d] and Process id is [%d]\n", GetLastError(), Id, USE_PROCESS_COUNT); } - //Trace("Thread %d over for process %d\n", Id, USE_PROCESS_COUNT); } diff --git a/src/coreclr/src/pal/tests/palsuite/composite/object_management/event/shared/event.cpp b/src/coreclr/src/pal/tests/palsuite/composite/object_management/event/shared/event.cpp index b09322d..155d5e9 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/object_management/event/shared/event.cpp +++ b/src/coreclr/src/pal/tests/palsuite/composite/object_management/event/shared/event.cpp @@ -10,7 +10,7 @@ ** This test is for Object Management Test case for event where Object type is shareable. ** Algorithm ** o Main Process Creates OBJECT_TYPE Object -** o Create PROCESS_COUNT processes aware of the Shared Object +** o Create PROCESS_COUNT processes aware of the Shared Object ** ** Author: ShamitP ** Author: ShamitP @@ -35,7 +35,7 @@ struct statistics{ unsigned int processId; unsigned int operationsFailed; unsigned int operationsPassed; - unsigned int operationsTotal; + unsigned int operationsTotal; DWORD operationTime; unsigned int relationId; }; @@ -61,24 +61,22 @@ void PALAPI Run_Thread_event_shared(LPVOID lpParam); int GetParameters( int argc, char **argv) { - if( (!((argc == 5) || (argc == 6) ) )|| ((argc == 1) && !strcmp(argv[1],"/?")) + if( (!((argc == 5) || (argc == 6) ) )|| ((argc == 1) && !strcmp(argv[1],"/?")) || !strcmp(argv[1],"/h") || !strcmp(argv[1],"/H")) { printf("PAL -Composite Object Management event Test\n"); printf("Usage:\n"); - printf("main\n\t[USE_PROCESS_COUNT (greater than 1)] \n"); - printf("\t[THREAD_COUNT (greater than 1)] \n"); + printf("main\n\t[USE_PROCESS_COUNT (greater than 1)] \n"); + printf("\t[THREAD_COUNT (greater than 1)] \n"); printf("\t[REPEAT_COUNT (greater than 1)]\n"); - printf("\t[RELATION_ID [greater than or equal to 1]\n"); + printf("\t[RELATION_ID [greater than or equal to 1]\n"); printf("\t[Object Name Suffix]\n"); return -1; } - // Trace("Args 1 is [%s], Arg 2 is [%s], Arg 3 is [%s]\n", argv[1], argv[2], argv[3]); - USE_PROCESS_COUNT = atoi(argv[1]); - if( USE_PROCESS_COUNT < 0) + if( USE_PROCESS_COUNT < 0) { printf("\nInvalid USE_PROCESS_COUNT number, Pass greater than 1\n"); return -1; @@ -92,14 +90,14 @@ int GetParameters( int argc, char **argv) } REPEAT_COUNT = atoi(argv[3]); - if( REPEAT_COUNT < 1) + if( REPEAT_COUNT < 1) { printf("\nInvalid REPEAT_COUNT number, Pass greater than 1\n"); return -1; } RELATION_ID = atoi(argv[4]); - if( RELATION_ID < 1) + if( RELATION_ID < 1) { printf("\nMain Process:Invalid RELATION_ID number, Pass greater than 1\n"); return -1; @@ -125,7 +123,7 @@ PALTEST(composite_object_management_event_shared_paltest_event_shared, "composit DWORD dwParam = 0; int returnCode = 0; - + /* Variables to capture the file name and the file pointer at thread level*/ char fileName[MAX_PATH]; FILE *pFile = NULL; @@ -134,7 +132,7 @@ PALTEST(composite_object_management_event_shared_paltest_event_shared, "composit /* Variables to capture the file name and the file pointer at process level*/ char processFileName[MAX_PATH]; - FILE *pProcessFile = NULL; + FILE *pProcessFile = NULL; struct ProcessStats processStats; DWORD dwStartTime; @@ -151,14 +149,13 @@ PALTEST(composite_object_management_event_shared_paltest_event_shared, "composit { Fail("Error in obtaining the parameters\n"); } -// Trace("Process created, value of process count is [%d]\n", USE_PROCESS_COUNT); if(argc == 5) { strncat(ObjName, objectSuffix, MAX_PATH - (sizeof(ObjName) + 1) ); } - /* Register the start time */ + /* Register the start time */ dwStartTime = GetTickCount(); processStats.relationId = RELATION_ID; processStats.processId = USE_PROCESS_COUNT; @@ -166,7 +163,7 @@ PALTEST(composite_object_management_event_shared_paltest_event_shared, "composit _snprintf(processFileName, MAX_PATH, "%d_process_event_%d_.txt", USE_PROCESS_COUNT, RELATION_ID); pProcessFile = fopen(processFileName, "w+"); if(pProcessFile == NULL) - { + { Fail("Error:%d: in opening Process File for write for process [%d]\n", GetLastError(), USE_PROCESS_COUNT); } @@ -174,9 +171,9 @@ PALTEST(composite_object_management_event_shared_paltest_event_shared, "composit _snprintf(fileName, MAX_PATH, "%d_thread_event_%d_.txt", USE_PROCESS_COUNT, RELATION_ID); pFile = fopen(fileName, "w+"); - + if(pFile == NULL) - { + { Fail("Error:%d: in opening thread file for write for process [%d]\n", GetLastError(), USE_PROCESS_COUNT); } // For each thread we will log operations failed (int), passed (int), total (int) @@ -194,7 +191,7 @@ PALTEST(composite_object_management_event_shared_paltest_event_shared, "composit { Fail("Error:%d: Unexpected failure " "to create %s Event for process count %d\n", GetLastError(), sTmpEventName, USE_PROCESS_COUNT ); - + } /* Create StartTest Event */ @@ -202,9 +199,9 @@ PALTEST(composite_object_management_event_shared_paltest_event_shared, "composit hEventHandle = OpenEventW( EVENT_ALL_ACCESS, /* lpEventAttributes, inheritable to child processes*/ FALSE, /* bAutomaticReset */ - wcObjName + wcObjName ); - + if( hEventHandle == NULL) { Fail("Unable to create Event handle for process id [%d], returned error [%d]\n", i, GetLastError()); @@ -221,41 +218,39 @@ PALTEST(composite_object_management_event_shared_paltest_event_shared, "composit (LPTHREAD_START_ROUTINE)Run_Thread_event_shared,/* thread function */ (LPVOID)dwParam, /* argument to thread function */ 0, /* use default creation flags */ - &threadId[i] /* returns the thread identifier*/ + &threadId[i] /* returns the thread identifier*/ ); - + if(hThread[i] == NULL) { Fail("Create Thread failed for %d process, and GetLastError value is %d\n", USE_PROCESS_COUNT, GetLastError()); } - + } if (!SetEvent(StartTestsEvHandle)) { - Fail("Set Event for Start Tests failed for %d process, and GetLastError value is %d\n", USE_PROCESS_COUNT, GetLastError()); + Fail("Set Event for Start Tests failed for %d process, and GetLastError value is %d\n", USE_PROCESS_COUNT, GetLastError()); } /* Test running */ - returnCode = WaitForMultipleObjects( THREAD_COUNT, hThread, TRUE, INFINITE); + returnCode = WaitForMultipleObjects( THREAD_COUNT, hThread, TRUE, INFINITE); if( WAIT_OBJECT_0 != returnCode ) { Trace("Wait for Object(s) for %d process returned %d, and GetLastError value is %d\n", USE_PROCESS_COUNT, returnCode, GetLastError()); testStatus = FAIL; } - - processStats.operationTime = GetTimeDiff(dwStartTime); + + processStats.operationTime = GetTimeDiff(dwStartTime); /* Write to a file*/ if(pFile!= NULL) - { + { for( i = 0; i < THREAD_COUNT; i++ ) - { + { buffer = (struct statistics *)resultBuffer->getResultBuffer(i); returnCode = fprintf(pFile, "%d,%d,%d,%d,%lu,%d\n", buffer->processId, buffer->operationsFailed, buffer->operationsPassed, buffer->operationsTotal, buffer->operationTime, buffer->relationId ); -// Trace("Iteration %d over\n", i); - } } @@ -273,8 +268,6 @@ PALTEST(composite_object_management_event_shared_paltest_event_shared, "composit } /* Logging for the test case over, clean up the handles */ -// Trace("Test Thread %d done\n", USE_PROCESS_COUNT); - for( i = 0; i < THREAD_COUNT; i++ ) { if(!CloseHandle(hThread[i]) ) @@ -294,7 +287,7 @@ PALTEST(composite_object_management_event_shared_paltest_event_shared, "composit { Trace("Error:%d: CloseHandle failed for Process [%d] hEventHandle\n", GetLastError(), USE_PROCESS_COUNT); testStatus = FAIL; - } + } free(wcObjName); PAL_Terminate(); @@ -304,7 +297,7 @@ PALTEST(composite_object_management_event_shared_paltest_event_shared, "composit void PALAPI Run_Thread_event_shared (LPVOID lpParam) { unsigned int i = 0; - DWORD dwWaitResult; + DWORD dwWaitResult; struct statistics stats; DWORD dwStartTime; @@ -317,10 +310,10 @@ void PALAPI Run_Thread_event_shared (LPVOID lpParam) stats.operationTime = 0; int Id=(int)lpParam; - - dwWaitResult = WaitForSingleObject( + + dwWaitResult = WaitForSingleObject( StartTestsEvHandle, // handle to start test handle - TIMEOUT); + TIMEOUT); if(dwWaitResult != WAIT_OBJECT_0) { @@ -332,41 +325,35 @@ void PALAPI Run_Thread_event_shared (LPVOID lpParam) for( i = 0; i < REPEAT_COUNT; i++ ) { - dwWaitResult = WaitForSingleObject( + dwWaitResult = WaitForSingleObject( hEventHandle, // handle to Event - TIMEOUT); + TIMEOUT); if(dwWaitResult != WAIT_OBJECT_0) { - //Trace("Error:%d: while waiting for onject @ thread %d, # iter %d\n", GetLastError(), Id, i); - stats.operationsFailed += 1; + stats.operationsFailed += 1; stats.operationsTotal += 1; testStatus = FAIL; continue; } - if (! SetEvent(hEventHandle)) - { + if (! SetEvent(hEventHandle)) + { // Deal with error. -// Trace("Error while setting Event @ thread %d # iter %d\n", Id, i); stats.operationsFailed += 1; stats.operationsTotal += 1; // do we need to have while true loop to attempt to set event...? testStatus = FAIL; continue; - } + } stats.operationsTotal += 1; - stats.operationsPassed += 1; - // Trace("Successs while setting Event @ iteration %d -> thread %d -> Process %d for handle %d\n", i, Id, USE_PROCESS_COUNT, hEventHandle); - + stats.operationsPassed += 1; } - - stats.operationTime = GetTimeDiff(dwStartTime); - //Trace("OPeration time is %d", stats.operationTime ); + + stats.operationTime = GetTimeDiff(dwStartTime); if(resultBuffer->LogResult(Id, (char *)&stats)) { Fail("Error:%d: while writing to shared memory, Thread Id is[%d] and Process id is [%d]\n", GetLastError(), Id, USE_PROCESS_COUNT); } - //Trace("Thread %d over for process %d\n", Id, USE_PROCESS_COUNT); } diff --git a/src/coreclr/src/pal/tests/palsuite/composite/object_management/mutex/nonshared/mutex.cpp b/src/coreclr/src/pal/tests/palsuite/composite/object_management/mutex/nonshared/mutex.cpp index c1dab23..a3503dc 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/object_management/mutex/nonshared/mutex.cpp +++ b/src/coreclr/src/pal/tests/palsuite/composite/object_management/mutex/nonshared/mutex.cpp @@ -2,16 +2,16 @@ // The .NET Foundation licenses this file to you under the MIT license. /*============================================================ -** +** ** Source Code: main.c and mutex.c ** main.c creates process and waits for all processes to get over ** mutex.c creates a mutex and then calls threads which will contend for the mutex -** +** ** This test is for Object Management Test case for Mutex where Object type is not shareable. ** Algorithm ** o Create PROCESS_COUNT processes. -** o Main Thread of each process creates OBJECT_TYPE Object -** +** o Main Thread of each process creates OBJECT_TYPE Object +** ** Author: ShamitP **============================================================ */ @@ -32,7 +32,7 @@ struct statistics{ unsigned int processId; unsigned int operationsFailed; unsigned int operationsPassed; - unsigned int operationsTotal; + unsigned int operationsTotal; DWORD operationTime; unsigned int relationId; }; @@ -55,22 +55,20 @@ void PALAPI Run_Thread_mutex_nonshared(LPVOID lpParam); int GetParameters( int argc, char **argv) { - if( (argc != 5) || ((argc == 1) && !strcmp(argv[1],"/?")) + if( (argc != 5) || ((argc == 1) && !strcmp(argv[1],"/?")) || !strcmp(argv[1],"/h") || !strcmp(argv[1],"/H")) { printf("PAL -Composite Object Management Mutex Test\n"); printf("Usage:\n"); - printf("mutex\n\t[USE_PROCESS_COUNT ( greater than 1] \n"); - printf("\t[THREAD_COUNT ( greater than 1] \n"); + printf("mutex\n\t[USE_PROCESS_COUNT ( greater than 1] \n"); + printf("\t[THREAD_COUNT ( greater than 1] \n"); printf("\t[REPEAT_COUNT ( greater than 1]\n"); - printf("\t[RELATION_ID [greater than 1]\n"); + printf("\t[RELATION_ID [greater than 1]\n"); return -1; } - // Trace("Args 1 is [%s], Arg 2 is [%s], Arg 3 is [%s]\n", argv[1], argv[2], argv[3]); - USE_PROCESS_COUNT = atoi(argv[1]); - if( USE_PROCESS_COUNT < 0) + if( USE_PROCESS_COUNT < 0) { printf("\nInvalid USE_PROCESS_COUNT number, Pass greater than 1\n"); return -1; @@ -84,14 +82,14 @@ int GetParameters( int argc, char **argv) } REPEAT_COUNT = atoi(argv[3]); - if( REPEAT_COUNT < 1) + if( REPEAT_COUNT < 1) { printf("\nInvalid REPEAT_COUNT number, Pass greater than 1\n"); return -1; } RELATION_ID = atoi(argv[4]); - if( RELATION_ID < 1) + if( RELATION_ID < 1) { printf("\nMain Process:Invalid RELATION_ID number, Pass greater than 1\n"); return -1; @@ -111,7 +109,7 @@ PALTEST(composite_object_management_mutex_nonshared_paltest_mutex_nonshared, "co DWORD dwParam = 0; int returnCode = 0; - + /* Variables to capture the file name and the file pointer at thread level*/ char fileName[MAX_PATH]; FILE *pFile = NULL; @@ -120,7 +118,7 @@ PALTEST(composite_object_management_mutex_nonshared_paltest_mutex_nonshared, "co /* Variables to capture the file name and the file pointer at process level*/ char processFileName[MAX_PATH]; - FILE *pProcessFile = NULL; + FILE *pProcessFile = NULL; struct ProcessStats processStats; DWORD dwStartTime; @@ -135,9 +133,8 @@ PALTEST(composite_object_management_mutex_nonshared_paltest_mutex_nonshared, "co { Fail("Error in obtaining the parameters\n"); } -// Trace("Process created, value of process count is [%d]\n", USE_PROCESS_COUNT); - /* Register the start time */ + /* Register the start time */ dwStartTime = GetTickCount(); processStats.relationId = RELATION_ID; processStats.processId = USE_PROCESS_COUNT; @@ -145,16 +142,16 @@ PALTEST(composite_object_management_mutex_nonshared_paltest_mutex_nonshared, "co _snprintf(processFileName, MAX_PATH, "%d_process_mutex_%d_.txt", USE_PROCESS_COUNT,RELATION_ID); pProcessFile = fopen(processFileName, "w+"); if(pProcessFile == NULL) - { + { Fail("Error in opening process File file for write for process [%d]\n", USE_PROCESS_COUNT); } statisticsSize = sizeof(struct statistics); _snprintf(fileName, MAX_PATH, "%d_thread_mutex_%d_.txt", USE_PROCESS_COUNT, RELATION_ID); - pFile = fopen(fileName, "w+"); + pFile = fopen(fileName, "w+"); if(pFile == NULL) - { + { Fail("Error in opening file for write for process [%d]\n", USE_PROCESS_COUNT); } // For each thread we will log operations failed (int), passed (int), total (int) @@ -164,14 +161,14 @@ PALTEST(composite_object_management_mutex_nonshared_paltest_mutex_nonshared, "co StartTestsEvHandle = CreateEvent( NULL, /* lpEventAttributes*/ TRUE, /* bManualReset */ FALSE, /* bInitialState */ - NULL + NULL ); /* name of Event */ if( StartTestsEvHandle == NULL ) { Fail("Error:%d: Unexpected failure " "to create %s Event for process count %d\n", GetLastError(), sTmpEventName, USE_PROCESS_COUNT ); - + } /* Create StartTest Event */ @@ -179,9 +176,9 @@ PALTEST(composite_object_management_mutex_nonshared_paltest_mutex_nonshared, "co hMutexHandle = CreateMutex( NULL, FALSE, /* bInitialOwner, owns initially */ - NULL + NULL ); - + if( hMutexHandle == NULL) { Fail("Unable to create Mutex handle for process id [%d], returned error [%d]\n", i, GetLastError()); @@ -198,41 +195,39 @@ PALTEST(composite_object_management_mutex_nonshared_paltest_mutex_nonshared, "co (LPTHREAD_START_ROUTINE)Run_Thread_mutex_nonshared,/* thread function */ (LPVOID)dwParam, /* argument to thread function */ 0, /* use default creation flags */ - &threadId[i] /* returns the thread identifier*/ + &threadId[i] /* returns the thread identifier*/ ); - + if(hThread[i] == NULL) { Fail("Create Thread failed for %d process, and GetLastError value is %d\n", USE_PROCESS_COUNT, GetLastError()); - } - + } + } - + if (!SetEvent(StartTestsEvHandle)) { - Fail("Set Event for Start Tests failed for %d process, and GetLastError value is %d\n", USE_PROCESS_COUNT, GetLastError()); + Fail("Set Event for Start Tests failed for %d process, and GetLastError value is %d\n", USE_PROCESS_COUNT, GetLastError()); } /* Test running */ - returnCode = WaitForMultipleObjects( THREAD_COUNT, hThread, TRUE, INFINITE); + returnCode = WaitForMultipleObjects( THREAD_COUNT, hThread, TRUE, INFINITE); if( WAIT_OBJECT_0 != returnCode ) { Trace("Wait for Object(s) for %d process returned %d, and GetLastError value is %d\n", USE_PROCESS_COUNT, returnCode, GetLastError()); testStatus = FAIL; } - - processStats.operationTime = GetTimeDiff(dwStartTime); + + processStats.operationTime = GetTimeDiff(dwStartTime); /* Write to a file*/ if(pFile!= NULL) - { + { for( i = 0; i < THREAD_COUNT; i++ ) - { + { buffer = (struct statistics *)resultBuffer->getResultBuffer(i); returnCode = fprintf(pFile, "%d,%d,%d,%d,%lu,%d\n", buffer->processId, buffer->operationsFailed, buffer->operationsPassed, buffer->operationsTotal, buffer->operationTime, buffer->relationId ); -// Trace("Iteration %d over\n", i); - } } fclose(pFile); @@ -242,9 +237,6 @@ PALTEST(composite_object_management_mutex_nonshared_paltest_mutex_nonshared, "co /* Logging for the test case over, clean up the handles */ -// Trace("Test Thread %d done\n", USE_PROCESS_COUNT); - - for( i = 0; i < THREAD_COUNT; i++ ) { if(!CloseHandle(hThread[i]) ) @@ -264,7 +256,7 @@ PALTEST(composite_object_management_mutex_nonshared_paltest_mutex_nonshared, "co { Trace("Error:%d: CloseHandle failed for Process [%d] hMutexHandle\n", GetLastError(), USE_PROCESS_COUNT); testStatus = FAIL; - } + } PAL_Terminate(); return testStatus; @@ -273,7 +265,7 @@ PALTEST(composite_object_management_mutex_nonshared_paltest_mutex_nonshared, "co void PALAPI Run_Thread_mutex_nonshared (LPVOID lpParam) { unsigned int i = 0; - DWORD dwWaitResult; + DWORD dwWaitResult; struct statistics stats; DWORD dwStartTime; @@ -286,10 +278,10 @@ void PALAPI Run_Thread_mutex_nonshared (LPVOID lpParam) stats.operationTime = 0; int Id=(int)lpParam; - - dwWaitResult = WaitForSingleObject( + + dwWaitResult = WaitForSingleObject( StartTestsEvHandle, // handle to mutex - TIMEOUT); + TIMEOUT); if(dwWaitResult != WAIT_OBJECT_0) { @@ -301,37 +293,32 @@ void PALAPI Run_Thread_mutex_nonshared (LPVOID lpParam) for( i = 0; i < REPEAT_COUNT; i++ ) { - dwWaitResult = WaitForSingleObject( + dwWaitResult = WaitForSingleObject( hMutexHandle, // handle to mutex - TIMEOUT); + TIMEOUT); if(dwWaitResult != WAIT_OBJECT_0) { -// Trace("Error while waiting for onject @ thread %d, # iter %d\n", Id, i); stats.operationsFailed += 1; stats.operationsTotal += 1; testStatus = FAIL; continue; } - if (! ReleaseMutex(hMutexHandle)) - { + if (! ReleaseMutex(hMutexHandle)) + { // Deal with error. -// Trace("Error while releasing mutex @ thread %d # iter %d\n", Id, i); stats.operationsFailed += 1; stats.operationsTotal += 1; // Probably need to have while true loop to attempt to release mutex... testStatus = FAIL; continue; - } + } stats.operationsTotal += 1; - stats.operationsPassed += 1; - // Trace("Successs while releasing mutex @ iteration %d -> thread %d -> Process %d\n", i, Id, USE_PROCESS_COUNT); - + stats.operationsPassed += 1; } - stats.operationTime = GetTimeDiff(dwStartTime); - //Trace("OPeration time is %d", stats.operationTime ); + stats.operationTime = GetTimeDiff(dwStartTime); if(resultBuffer->LogResult(Id, (char *)&stats)) { Fail("Error:%d: while writing to shared memory, Thread Id is[%d] and Process id is [%d]\n", GetLastError(), Id, USE_PROCESS_COUNT); diff --git a/src/coreclr/src/pal/tests/palsuite/composite/object_management/mutex/shared/mutex.cpp b/src/coreclr/src/pal/tests/palsuite/composite/object_management/mutex/shared/mutex.cpp index 1429c78..51400a99 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/object_management/mutex/shared/mutex.cpp +++ b/src/coreclr/src/pal/tests/palsuite/composite/object_management/mutex/shared/mutex.cpp @@ -2,18 +2,18 @@ // The .NET Foundation licenses this file to you under the MIT license. /*============================================================ -** +** ** This test is for Object Management Test case for Mutex where Object type is shareable. -** +** ** Source Code: main.c and mutex.c ** main.c creates a mutex, creates processes and waits for all processes to get over ** mutex.c create threads which will contend for the mutex -** +** ** This test is for Object Management Test case for Mutex where Object type is not shareable. ** Algorithm ** o Main Process Creates OBJECT_TYPE Object -** o Create PROCESS_COUNT processes aware of the Shared Object -** +** o Create PROCESS_COUNT processes aware of the Shared Object +** ** Author: ShamitP ** ** @@ -28,7 +28,7 @@ /* Test Input Variables */ unsigned int USE_PROCESS_COUNT = 0; unsigned int THREAD_COUNT = 0; -unsigned int REPEAT_COUNT = 0; +unsigned int REPEAT_COUNT = 0; unsigned int RELATION_ID = 0; @@ -37,7 +37,7 @@ struct statistics{ unsigned int processId; unsigned int operationsFailed; unsigned int operationsPassed; - unsigned int operationsTotal; + unsigned int operationsTotal; DWORD operationTime; unsigned int relationId; }; @@ -63,24 +63,22 @@ void PALAPI Run_Thread_mutex_shared(LPVOID lpParam); int GetParameters( int argc, char **argv) { - if( (!((argc == 5) || (argc == 6) ) )|| ((argc == 1) && !strcmp(argv[1],"/?")) + if( (!((argc == 5) || (argc == 6) ) )|| ((argc == 1) && !strcmp(argv[1],"/?")) || !strcmp(argv[1],"/h") || !strcmp(argv[1],"/H")) { printf("PAL -Composite Object Management event Test\n"); printf("Usage:\n"); - printf("main\n\t[USE_PROCESS_COUNT (greater than 1)] \n"); - printf("\t[THREAD_COUNT (greater than 1)] \n"); + printf("main\n\t[USE_PROCESS_COUNT (greater than 1)] \n"); + printf("\t[THREAD_COUNT (greater than 1)] \n"); printf("\t[REPEAT_COUNT (greater than 1)]\n"); - printf("\t[RELATION_ID [greater than 1]\n"); + printf("\t[RELATION_ID [greater than 1]\n"); printf("\t[Object Name Suffix]\n"); return -1; } - // Trace("Args 1 is [%s], Arg 2 is [%s], Arg 3 is [%s]\n", argv[1], argv[2], argv[3]); - USE_PROCESS_COUNT = atoi(argv[1]); - if( USE_PROCESS_COUNT < 0) + if( USE_PROCESS_COUNT < 0) { printf("\nInvalid USE_PROCESS_COUNT number, Pass greater than 1\n"); return -1; @@ -94,14 +92,14 @@ int GetParameters( int argc, char **argv) } REPEAT_COUNT = atoi(argv[3]); - if( REPEAT_COUNT < 1) + if( REPEAT_COUNT < 1) { printf("\nInvalid REPEAT_COUNT number, Pass greater than 1\n"); return -1; } RELATION_ID = atoi(argv[4]); - if( RELATION_ID < 1) + if( RELATION_ID < 1) { printf("\nMain Process:Invalid RELATION_ID number, Pass greater than 1\n"); return -1; @@ -120,12 +118,12 @@ PALTEST(composite_object_management_mutex_shared_paltest_mutex_shared, "composit unsigned int i = 0; HANDLE hThread[MAXIMUM_WAIT_OBJECTS]; DWORD threadId[MAXIMUM_WAIT_OBJECTS]; - + char ObjName[MAX_PATH] = "SHARED_MUTEX"; DWORD dwParam = 0; int returnCode = 0; - + /* Variables to capture the file name and the file pointer*/ char fileName[MAX_PATH]; FILE *pFile = NULL; @@ -134,7 +132,7 @@ PALTEST(composite_object_management_mutex_shared_paltest_mutex_shared, "composit /* Variables to capture the file name and the file pointer at process level*/ char processFileName[MAX_PATH]; - FILE *pProcessFile = NULL; + FILE *pProcessFile = NULL; struct ProcessStats processStats; DWORD dwStartTime; @@ -151,14 +149,13 @@ PALTEST(composite_object_management_mutex_shared_paltest_mutex_shared, "composit { Fail("Error in obtaining the parameters\n"); } -// Trace("Process created, value of process count is [%d]\n", USE_PROCESS_COUNT); if(argc == 5) { strncat(ObjName, objectSuffix, MAX_PATH - (sizeof(ObjName) + 1) ); } - /* Register the start time */ + /* Register the start time */ dwStartTime = GetTickCount(); processStats.relationId = RELATION_ID; processStats.processId = USE_PROCESS_COUNT; @@ -166,20 +163,20 @@ PALTEST(composite_object_management_mutex_shared_paltest_mutex_shared, "composit _snprintf(processFileName, MAX_PATH, "%d_process_mutex_%d_.txt", USE_PROCESS_COUNT, RELATION_ID); pProcessFile = fopen(processFileName, "w+"); if(pProcessFile == NULL) - { + { Fail("Error in opening process File file for write for process [%d]\n", USE_PROCESS_COUNT); } statisticsSize = sizeof(struct statistics); _snprintf(fileName, MAX_PATH, "%d_thread_mutex_%d_.txt", USE_PROCESS_COUNT, RELATION_ID); pFile = fopen(fileName, "w+"); if(pFile == NULL) - { + { Fail("Error in opening file for write for process [%d]\n", USE_PROCESS_COUNT); } // For each thread we will log operations failed (int), passed (int), total (int) // and number of ticks (DWORD) for the operations resultBuffer = new ResultBuffer( THREAD_COUNT, statisticsSize); - + /* Create StartTest Event */ StartTestsEvHandle = CreateEvent( NULL, /* lpEventAttributes*/ TRUE, /* bManualReset */ @@ -190,15 +187,15 @@ PALTEST(composite_object_management_mutex_shared_paltest_mutex_shared, "composit { Fail("Error:%d: Unexpected failure " "to create %s Event for process count %d\n", GetLastError(), sTmpEventName, USE_PROCESS_COUNT ); - + } hMutexHandle = CreateMutex( NULL, FALSE, /* bInitialOwner, owns initially */ - ObjName + ObjName ); - + if( (hMutexHandle == NULL)|| (GetLastError() != ERROR_ALREADY_EXISTS)) { Fail("Unable to create Mutex handle for process id [%d], returned error [%d], expected ERROR_ALREADY_EXISTS\n", i, GetLastError()); @@ -215,52 +212,48 @@ PALTEST(composite_object_management_mutex_shared_paltest_mutex_shared, "composit (LPTHREAD_START_ROUTINE)Run_Thread_mutex_shared,/* thread function */ (LPVOID)dwParam, /* argument to thread function */ 0, /* use default creation flags */ - &threadId[i] /* returns the thread identifier*/ + &threadId[i] /* returns the thread identifier*/ ); - + if(hThread[i] == NULL) { Fail("Create Thread failed for %d process, and GetLastError value is %d\n", USE_PROCESS_COUNT, GetLastError()); - } - + } + } - + if (!SetEvent(StartTestsEvHandle)) { - Fail("Set Event for Start Tests failed for %d process, and GetLastError value is %d\n", USE_PROCESS_COUNT, GetLastError()); + Fail("Set Event for Start Tests failed for %d process, and GetLastError value is %d\n", USE_PROCESS_COUNT, GetLastError()); } /* Test running */ - returnCode = WaitForMultipleObjects( THREAD_COUNT, hThread, TRUE, INFINITE); + returnCode = WaitForMultipleObjects( THREAD_COUNT, hThread, TRUE, INFINITE); if( WAIT_OBJECT_0 != returnCode ) { Trace("Wait for Object(s) for %d process returned %d, and GetLastError value is %d\n", USE_PROCESS_COUNT, returnCode, GetLastError()); testStatus = FAIL; } - - processStats.operationTime = GetTimeDiff(dwStartTime); - + + processStats.operationTime = GetTimeDiff(dwStartTime); + /* Write to a file*/ if(pFile!= NULL) - { + { for( i = 0; i < THREAD_COUNT; i++ ) - { + { buffer = (struct statistics *)resultBuffer->getResultBuffer(i); returnCode = fprintf(pFile, "%d,%d,%d,%d,%lu,%d\n", buffer->processId, buffer->operationsFailed, buffer->operationsPassed, buffer->operationsTotal, buffer->operationTime, buffer->relationId ); -// Trace("Iteration %d over\n", i); - } } fclose(pFile); - + fprintf(pProcessFile, "%d,%d,%d\n", USE_PROCESS_COUNT, processStats.operationTime, processStats.relationId ); fclose(pProcessFile); /* Logging for the test case over, clean up the handles */ - -// Trace("Process Count %d over\n",USE_PROCESS_COUNT); - + for( i = 0; i < THREAD_COUNT; i++ ) { if(!CloseHandle(hThread[i]) ) @@ -280,7 +273,7 @@ PALTEST(composite_object_management_mutex_shared_paltest_mutex_shared, "composit { Trace("Error:%d: CloseHandle failed for Process [%d] hMutexHandle\n", GetLastError(), USE_PROCESS_COUNT); testStatus = FAIL; - } + } PAL_Terminate(); return testStatus; @@ -289,7 +282,7 @@ PALTEST(composite_object_management_mutex_shared_paltest_mutex_shared, "composit void PALAPI Run_Thread_mutex_shared (LPVOID lpParam) { unsigned int i = 0; - DWORD dwWaitResult; + DWORD dwWaitResult; struct statistics stats; DWORD dwStartTime; @@ -302,10 +295,10 @@ void PALAPI Run_Thread_mutex_shared (LPVOID lpParam) stats.operationTime = 0; int Id=(int)lpParam; - - dwWaitResult = WaitForSingleObject( + + dwWaitResult = WaitForSingleObject( StartTestsEvHandle, // handle to mutex - TIMEOUT); + TIMEOUT); if(dwWaitResult != WAIT_OBJECT_0) { @@ -317,35 +310,31 @@ void PALAPI Run_Thread_mutex_shared (LPVOID lpParam) for( i = 0; i < REPEAT_COUNT; i++ ) { - dwWaitResult = WaitForSingleObject( + dwWaitResult = WaitForSingleObject( hMutexHandle, // handle to mutex - TIMEOUT); + TIMEOUT); if(dwWaitResult != WAIT_OBJECT_0) { -// Trace("Error while waiting for onject @ thread %d, # iter %d, Error Returned [%d]\n", Id, i, GetLastError()); stats.operationsFailed += 1; stats.operationsTotal += 1; testStatus = FAIL; continue; } - if (! ReleaseMutex(hMutexHandle)) - { + if (! ReleaseMutex(hMutexHandle)) + { // Deal with error. -// Trace("Error while releasing mutex @ thread %d # iter %d\n", Id, i); stats.operationsFailed += 1; stats.operationsTotal += 1; // Probably need to have while true loop to attempt to release mutex... testStatus = FAIL; continue; - } - + } + stats.operationsTotal += 1; - stats.operationsPassed += 1; -// Trace("Successs while releasing mutex @ iteration %d -> thread %d -> Process count %d\n", i, Id, USE_PROCESS_COUNT); - + stats.operationsPassed += 1; } - stats.operationTime = GetTimeDiff(dwStartTime); + stats.operationTime = GetTimeDiff(dwStartTime); if(resultBuffer->LogResult(Id, (char *)&stats)) { Fail("Error:%d: while writing to shared memory, Thread Id is[%d] and Process id is [%d]\n", GetLastError(), Id, USE_PROCESS_COUNT); diff --git a/src/coreclr/src/pal/tests/palsuite/composite/object_management/semaphore/nonshared/semaphore.cpp b/src/coreclr/src/pal/tests/palsuite/composite/object_management/semaphore/nonshared/semaphore.cpp index cfa21e9..b37c121 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/object_management/semaphore/nonshared/semaphore.cpp +++ b/src/coreclr/src/pal/tests/palsuite/composite/object_management/semaphore/nonshared/semaphore.cpp @@ -75,8 +75,6 @@ int GetParameters( int argc, char **argv) return -1; } - // Trace("Args 1 is [%s], Arg 2 is [%s], Arg 3 is [%s]\n", argv[1], argv[2], argv[3]); - USE_PROCESS_COUNT = atoi(argv[1]); if( USE_PROCESS_COUNT < 0) { @@ -143,7 +141,6 @@ PALTEST(composite_object_management_semaphore_nonshared_paltest_semaphore_nonsha { Fail("Error in obtaining the parameters\n"); } - // Trace("Process created, value of process count is [%d]\n", USE_PROCESS_COUNT); /* Register the start time */ dwStartTime = GetTickCount(); @@ -241,15 +238,11 @@ PALTEST(composite_object_management_semaphore_nonshared_paltest_semaphore_nonsha { buffer = (struct statistics *)resultBuffer->getResultBuffer(i); returnCode = fprintf(pFile, "%d,%d,%d,%d,%lu,%d\n", buffer->processId, buffer->operationsFailed, buffer->operationsPassed, buffer->operationsTotal, buffer->operationTime, buffer->relationId ); - //Trace("Iteration %d over\n", i); - } } fclose(pFile); /* Logging for the test case over, clean up the handles */ -// Trace("Test Thread %d done\n", USE_PROCESS_COUNT); - for( i = 0; i < THREAD_COUNT; i++ ) { if(!CloseHandle(hThread[i]) ) @@ -311,7 +304,6 @@ void PALAPI Run_Thread_semaphore_nonshared (LPVOID lpParam) if(dwWaitResult != WAIT_OBJECT_0) { -// Trace("Error while waiting for onject @ thread %d, # iter %d, RC is %d, Error is %d\n", Id, i, dwWaitResult, GetLastError()); stats.operationsFailed += 1; stats.operationsTotal += 1; testStatus = FAIL; @@ -320,7 +312,6 @@ void PALAPI Run_Thread_semaphore_nonshared (LPVOID lpParam) if (! ReleaseSemaphore(hSemaphoreHandle, 1, NULL)) { // Deal with error. - // Trace("Error while releasing Semaphore @ thread %d # iter %d\n", Id, i); stats.operationsFailed += 1; stats.operationsTotal += 1; // Probably need to have while true loop to attempt to release semaphore... @@ -330,8 +321,6 @@ void PALAPI Run_Thread_semaphore_nonshared (LPVOID lpParam) stats.operationsTotal += 1; stats.operationsPassed += 1; -// Trace("Successs while releasing Semaphore @ iteration %d -> thread %d -> Process %d\n", i, Id, USE_PROCESS_COUNT); - } stats.operationTime = GetTimeDiff(dwStartTime); @@ -339,5 +328,4 @@ void PALAPI Run_Thread_semaphore_nonshared (LPVOID lpParam) { Fail("Error:%d: while writing to shared memory, Thread Id is[%d] and Process id is [%d]\n", GetLastError(), Id, USE_PROCESS_COUNT); } - // Trace("Thread %d over for process %d\n", Id, USE_PROCESS_COUNT); } diff --git a/src/coreclr/src/pal/tests/palsuite/composite/object_management/semaphore/shared/semaphore.cpp b/src/coreclr/src/pal/tests/palsuite/composite/object_management/semaphore/shared/semaphore.cpp index 7365dff..bcad3c3 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/object_management/semaphore/shared/semaphore.cpp +++ b/src/coreclr/src/pal/tests/palsuite/composite/object_management/semaphore/shared/semaphore.cpp @@ -148,7 +148,6 @@ PALTEST(composite_object_management_semaphore_shared_paltest_semaphore_shared, " { Fail("Error in obtaining the parameters\n"); } -// Trace("Process created, value of process count is [%d]\n", USE_PROCESS_COUNT); if(argc == 6) { @@ -251,14 +250,11 @@ PALTEST(composite_object_management_semaphore_shared_paltest_semaphore_shared, " { buffer = (struct statistics *)resultBuffer->getResultBuffer(i); returnCode = fprintf(pFile, "%d,%d,%d,%d,%lu,%d\n", buffer->processId, buffer->operationsFailed, buffer->operationsPassed, buffer->operationsTotal, buffer->operationTime, buffer->relationId ); -// Trace("Iteration %d over\n", i); - } } fclose(pFile); /* Logging for the test case over, clean up the handles */ -// Trace("Test Thread %d done\n", USE_PROCESS_COUNT); for( i = 0; i < THREAD_COUNT; i++ ) { if(!CloseHandle(hThread[i]) ) @@ -320,7 +316,6 @@ void PALAPI Run_Thread_semaphore_shared (LPVOID lpParam) if(dwWaitResult != WAIT_OBJECT_0) { -// Trace("Error while waiting for onject @ thread %d, # iter %d, RC is %d, Error is %d\n", Id, i, dwWaitResult, GetLastError()); stats.operationsFailed += 1; stats.operationsTotal += 1; testStatus = FAIL; @@ -329,7 +324,6 @@ void PALAPI Run_Thread_semaphore_shared (LPVOID lpParam) if (! ReleaseSemaphore(hSemaphoreHandle, 1, NULL)) { // Deal with error. - // Trace("Error while releasing Semaphore @ thread %d # iter %d\n", Id, i); stats.operationsFailed += 1; stats.operationsTotal += 1; // Probably need to have while true loop to attempt to release semaphore.. @@ -339,8 +333,6 @@ void PALAPI Run_Thread_semaphore_shared (LPVOID lpParam) stats.operationsTotal += 1; stats.operationsPassed += 1; -// Trace("Successs while releasing Semaphore @ iteration %d -> thread %d -> Process %d\n", i, Id, USE_PROCESS_COUNT); - } stats.operationTime = GetTimeDiff(dwStartTime); @@ -348,5 +340,4 @@ void PALAPI Run_Thread_semaphore_shared (LPVOID lpParam) { Fail("Error:%d: while writing to shared memory, Thread Id is[%d] and Process id is [%d]\n", GetLastError(), Id, USE_PROCESS_COUNT); } - // Trace("Thread %d over for process %d\n", Id, USE_PROCESS_COUNT); } diff --git a/src/coreclr/src/pal/tests/palsuite/composite/wfmo/mutex.cpp b/src/coreclr/src/pal/tests/palsuite/composite/wfmo/mutex.cpp index a95f93c..82f5988 100644 --- a/src/coreclr/src/pal/tests/palsuite/composite/wfmo/mutex.cpp +++ b/src/coreclr/src/pal/tests/palsuite/composite/wfmo/mutex.cpp @@ -4,13 +4,13 @@ /*============================================================ **Source Code: main.c and mutex.c ** main.c creates process and waits for all processes to get over -** mutex.c creates a mutex and then calls threads which will +** mutex.c creates a mutex and then calls threads which will ** contend for the mutex ** ** This test is for WFMO Test case for Mutex ** Algorithm ** o Create PROCESS_COUNT processes. -** o Main Thread of each process creates OBJECT_TYPE Object +** o Main Thread of each process creates OBJECT_TYPE Object ** ** Author: ShamitP ** @@ -35,7 +35,7 @@ struct statistics{ unsigned int processId; unsigned int operationsFailed; unsigned int operationsPassed; - unsigned int operationsTotal; + unsigned int operationsTotal; DWORD operationTime; unsigned int relationId; @@ -60,25 +60,22 @@ void PALAPI Run_Thread_composite_wfmo(LPVOID lpParam); int GetParameters( int argc, char **argv) { - if( (argc != 6) || ((argc == 1) && !strcmp(argv[1],"/?")) + if( (argc != 6) || ((argc == 1) && !strcmp(argv[1],"/?")) || !strcmp(argv[1],"/h") || !strcmp(argv[1],"/H")) { printf("PAL -Composite WFMO Test\n"); printf("Usage:\n"); - printf("mutex\n\t[USE_PROCESS_COUNT [greater than 0] \n"); - printf("\t[THREAD_COUNT [greater than 0] \n"); + printf("mutex\n\t[USE_PROCESS_COUNT [greater than 0] \n"); + printf("\t[THREAD_COUNT [greater than 0] \n"); printf("\t[REPEAT_COUNT [greater than 0]\n"); printf("\t[SLEEP_LENGTH [greater than 0]\n"); - printf("\t[RELATION_ID [greater than 0]\n"); - - + printf("\t[RELATION_ID [greater than 0]\n"); + return -1; } - // Trace("Args 1 is [%s], Arg 2 is [%s], Arg 3 is [%s]\n", argv[1], argv[2], argv[3]); - USE_PROCESS_COUNT = atoi(argv[1]); - if( USE_PROCESS_COUNT < 0) + if( USE_PROCESS_COUNT < 0) { printf("\nInvalid USE_PROCESS_COUNT number, Pass greater than 1\n"); return -1; @@ -92,21 +89,21 @@ int GetParameters( int argc, char **argv) } REPEAT_COUNT = atoi(argv[3]); - if( REPEAT_COUNT < 1) + if( REPEAT_COUNT < 1) { printf("\nInvalid REPEAT_COUNT number, Pass greater than 1\n"); return -1; } SLEEP_LENGTH = atoi(argv[4]); - if( SLEEP_LENGTH < 1) + if( SLEEP_LENGTH < 1) { printf("\nMain Process:Invalid SLEEP_LENGTH number, Pass greater than 1\n"); return -1; } RELATION_ID = atoi(argv[5]); - if( RELATION_ID < 1) + if( RELATION_ID < 1) { printf("\nMain Process:Invalid RELATION_ID number, Pass greater than 1\n"); return -1; @@ -117,11 +114,11 @@ int GetParameters( int argc, char **argv) PALTEST(composite_wfmo_paltest_composite_wfmo, "composite/wfmo/paltest_composite_wfmo") { - unsigned int i = 0; + unsigned int i = 0; HANDLE hThread[MAXIMUM_WAIT_OBJECTS]; DWORD threadId[MAXIMUM_WAIT_OBJECTS]; int returnCode = 0; - + DWORD dwParam = 0; /* Variables to capture the file name and the file pointer at thread level*/ @@ -132,7 +129,7 @@ PALTEST(composite_wfmo_paltest_composite_wfmo, "composite/wfmo/paltest_composite /* Variables to capture the file name and the file pointer at process level*/ char processFileName[MAX_PATH]; - FILE *pProcessFile = NULL; + FILE *pProcessFile = NULL; struct ProcessStats processStats; DWORD dwStartTime; @@ -147,9 +144,8 @@ PALTEST(composite_wfmo_paltest_composite_wfmo, "composite/wfmo/paltest_composite { Fail("Error in obtaining the parameters\n"); } -// Trace("Process created, value of process count is [%d] and no. of threads is [%d]\n", USE_PROCESS_COUNT, THREAD_COUNT); - /* Register the start time */ + /* Register the start time */ dwStartTime = GetTickCount(); processStats.relationId = RELATION_ID; processStats.processId = USE_PROCESS_COUNT; @@ -157,7 +153,7 @@ PALTEST(composite_wfmo_paltest_composite_wfmo, "composite/wfmo/paltest_composite _snprintf(processFileName, MAX_PATH, "%d_process_wfmo_%d_.txt", USE_PROCESS_COUNT, RELATION_ID); pProcessFile = fopen(processFileName, "w+"); if(pProcessFile == NULL) - { + { Fail("Error:%d: in opening Process File for write for process [%d]\n", GetLastError(), USE_PROCESS_COUNT); } @@ -166,7 +162,7 @@ PALTEST(composite_wfmo_paltest_composite_wfmo, "composite/wfmo/paltest_composite _snprintf(fileName, MAX_PATH, "%d_thread_wfmo_%d_.txt", USE_PROCESS_COUNT, RELATION_ID); pFile = fopen(fileName, "w+"); if(pFile == NULL) - { + { Fail("Error in opening file for write for process [%d], error [%d]\n", USE_PROCESS_COUNT, GetLastError()); } // For each thread we will log operations failed (int), passed (int), total (int) @@ -182,16 +178,16 @@ PALTEST(composite_wfmo_paltest_composite_wfmo, "composite/wfmo/paltest_composite { Fail("Error:%d: Unexpected failure " "to create start tests Event for process count %d\n", GetLastError(), USE_PROCESS_COUNT ); - + } /* Create StartTest Event */ hMutexHandle = CreateMutex( NULL, FALSE, /* bInitialOwner, owns initially */ - NULL + NULL ); - + if( hMutexHandle == NULL) { Fail("Unable to create Mutex handle for process id [%d], returned error [%d]\n", i, GetLastError()); @@ -208,19 +204,18 @@ PALTEST(composite_wfmo_paltest_composite_wfmo, "composite/wfmo/paltest_composite (LPTHREAD_START_ROUTINE)Run_Thread_composite_wfmo,/* thread function */ (LPVOID)dwParam, /* argument to thread function */ 0, /* use default creation flags */ - &threadId[i] /* returns the thread identifier*/ + &threadId[i] /* returns the thread identifier*/ ); if(hThread[i] == NULL) { Fail("Create Thread failed for %d process, and GetLastError value is %d\n", USE_PROCESS_COUNT, GetLastError()); } - - } - + } + if (!SetEvent(StartTestsEvHandle)) { - Fail("Set Event for Start Tests failed for %d process, and GetLastError value is %d\n", USE_PROCESS_COUNT, GetLastError()); + Fail("Set Event for Start Tests failed for %d process, and GetLastError value is %d\n", USE_PROCESS_COUNT, GetLastError()); } /* Test running */ @@ -230,7 +225,7 @@ PALTEST(composite_wfmo_paltest_composite_wfmo, "composite/wfmo/paltest_composite } else { - returnCode = WaitForSingleObject(hThread[0], INFINITE); + returnCode = WaitForSingleObject(hThread[0], INFINITE); } if( WAIT_OBJECT_0 != returnCode ) @@ -239,17 +234,15 @@ PALTEST(composite_wfmo_paltest_composite_wfmo, "composite/wfmo/paltest_composite testStatus = FAIL; } - processStats.operationTime = GetTimeDiff(dwStartTime); + processStats.operationTime = GetTimeDiff(dwStartTime); /* Write to a file*/ if(pFile!= NULL) - { + { for( i = 0; i < THREAD_COUNT; i++ ) - { + { buffer = (struct statistics *)resultBuffer->getResultBuffer(i); returnCode = fprintf(pFile, "%d,%d,%d,%d,%lu,%d\n", buffer->processId, buffer->operationsFailed, buffer->operationsPassed, buffer->operationsTotal, buffer->operationTime, buffer->relationId ); - //Trace("Iteration %d over\n", i); - } } if(fclose(pFile)) @@ -266,8 +259,6 @@ PALTEST(composite_wfmo_paltest_composite_wfmo, "composite/wfmo/paltest_composite } /* Logging for the test case over, clean up the handles */ - // Trace("Test Process %d done\n", USE_PROCESS_COUNT); - //Trace("Contents of the buffer are [%s]\n", resultBuffer->getResultBuffer()); for( i = 0; i < THREAD_COUNT; i++ ) { if(!CloseHandle(hThread[i]) ) @@ -292,7 +283,7 @@ void PALAPI Run_Thread_composite_wfmo (LPVOID lpParam) unsigned int i = 0; struct statistics stats; - DWORD dwWaitResult; + DWORD dwWaitResult; DWORD dwStartTime; stats.relationId = RELATION_ID; @@ -303,10 +294,10 @@ void PALAPI Run_Thread_composite_wfmo (LPVOID lpParam) stats.operationTime = 0; int Id=(int)lpParam; - - dwWaitResult = WaitForSingleObject( + + dwWaitResult = WaitForSingleObject( StartTestsEvHandle, // handle to mutex - INFINITE); + INFINITE); if(dwWaitResult != WAIT_OBJECT_0) { @@ -320,10 +311,10 @@ void PALAPI Run_Thread_composite_wfmo (LPVOID lpParam) /* Run the tests repeat count times */ for( i = 0; i < REPEAT_COUNT; i++ ) { - dwWaitResult = WaitForSingleObject( + dwWaitResult = WaitForSingleObject( hMutexHandle, // handle to mutex - INFINITE); - + INFINITE); + if(dwWaitResult != WAIT_OBJECT_0) { Trace("Error:%d: while waiting for onject @ thread %d, # iter %d\n", GetLastError(), Id, i); @@ -335,8 +326,8 @@ void PALAPI Run_Thread_composite_wfmo (LPVOID lpParam) Sleep(SLEEP_LENGTH); - if (!ReleaseMutex(hMutexHandle)) - { + if (!ReleaseMutex(hMutexHandle)) + { // Deal with error. Trace("Error:%d: while releasing mutex @ thread %d # iter %d\n", GetLastError(), Id, i); stats.operationsFailed += 1; @@ -344,21 +335,16 @@ void PALAPI Run_Thread_composite_wfmo (LPVOID lpParam) // do we need to have while true loop to attempt to release mutex...? testStatus = FAIL; continue; - } + } stats.operationsTotal += 1; stats.operationsPassed += 1; - -// Trace("Successs while releasing mutex @ iteration %d -> thread %d -> Process %d\n", i, Id, USE_PROCESS_COUNT); - } - - stats.operationTime = GetTimeDiff(dwStartTime); - // Trace("Operation Time %lu, Process Count [%d], ThreadCount[%d]\n", stats.operationTime, USE_PROCESS_COUNT, Id); + + stats.operationTime = GetTimeDiff(dwStartTime); if(resultBuffer->LogResult(Id, (char *)&stats)) { Fail("Error:%d: while writing to shared memory, Thread Id is[%d] and Process id is [%d]\n", GetLastError(), Id, USE_PROCESS_COUNT); } - // Trace("Contents of the buffer are after thread [%d]\n", Id); } diff --git a/src/coreclr/src/tools/Common/JitInterface/CorInfoTypes.VarInfo.cs b/src/coreclr/src/tools/Common/JitInterface/CorInfoTypes.VarInfo.cs index c3a5bac..5e84af7 100644 --- a/src/coreclr/src/tools/Common/JitInterface/CorInfoTypes.VarInfo.cs +++ b/src/coreclr/src/tools/Common/JitInterface/CorInfoTypes.VarInfo.cs @@ -52,7 +52,7 @@ namespace Internal.JitInterface /* Changes to the following types may require revisiting the above layout. - + In coreclr\src\inc\cordebuginfo.h enum VarLocType @@ -140,7 +140,7 @@ namespace Internal.JitInterface } vlStkReg; // VLT_STK2 -- Any 64 bit value which is on the stack, - // in 2 successsive DWords. + // in 2 successive DWords. // eg 2 DWords at [ESP+0x10] struct diff --git a/src/coreclr/src/tools/r2rdump/R2RDiff.cs b/src/coreclr/src/tools/r2rdump/R2RDiff.cs index 7e19653..25e6dd9 100644 --- a/src/coreclr/src/tools/r2rdump/R2RDiff.cs +++ b/src/coreclr/src/tools/r2rdump/R2RDiff.cs @@ -371,7 +371,7 @@ namespace R2RDump { if (first) { - _writer.WriteLine("Methods with identical disasssbly skipped in common method diff:"); + _writer.WriteLine("Methods with identical disassembly skipped in common method diff:"); first = false; } _writer.WriteLine(commonMethod.Key); diff --git a/src/coreclr/src/utilcode/splitpath.cpp b/src/coreclr/src/utilcode/splitpath.cpp index 56e4a8d..b087e6c 100644 --- a/src/coreclr/src/utilcode/splitpath.cpp +++ b/src/coreclr/src/utilcode/splitpath.cpp @@ -137,7 +137,7 @@ void SplitPathInterior( /* extract path string, if any. Path now points to the first character * of the path, if any, or the filename or extension, if no path was - * specified. Scan ahead for the last occurence, if any, of a '/' or + * specified. Scan ahead for the last occurrence, if any, of a '/' or * '\' path separator character. If none is found, there is no path. * We will also note the last '.' character found, if any, to aid in * handling the extension. diff --git a/src/coreclr/src/utilcode/util.cpp b/src/coreclr/src/utilcode/util.cpp index ef35f09..bcec17f 100644 --- a/src/coreclr/src/utilcode/util.cpp +++ b/src/coreclr/src/utilcode/util.cpp @@ -416,7 +416,7 @@ void InitCodeAllocHint(SIZE_T base, SIZE_T size, int randomPageOffset) pStart = (BYTE *)(base + size); } - // Randomize the adddress space + // Randomize the address space pStart += GetOsPageSize() * randomPageOffset; s_CodeAllocStart = pStart; diff --git a/src/coreclr/src/vm/arm/profiler.cpp b/src/coreclr/src/vm/arm/profiler.cpp index 670dedb..eba1280 100644 --- a/src/coreclr/src/vm/arm/profiler.cpp +++ b/src/coreclr/src/vm/arm/profiler.cpp @@ -136,7 +136,7 @@ Stack for the above call will look as follows (stack growing downwards): ctx.R11 = (UINT)pData->R11; ctx.Pc = (UINT)pData->Pc; // For some functions which do localloc, sp is saved in r9. In order to perform unwinding for functions r9 must be set in the context. - // r9 is stored at offset (sizeof(PROFILE_PLATFORM_SPECIFIC_DATA) (this also includes the padding done for 8-byte stack alignement) + size required for (r0,r3)) bytes from pData + // r9 is stored at offset (sizeof(PROFILE_PLATFORM_SPECIFIC_DATA) (this also includes the padding done for 8-byte stack alignment) + size required for (r0,r3)) bytes from pData ctx.R9 = *((UINT*)pData + (sizeof(PROFILE_PLATFORM_SPECIFIC_DATA) + 8)/4); // walk up a frame to the caller frame (called the managed method which diff --git a/src/coreclr/src/vm/class.cpp b/src/coreclr/src/vm/class.cpp index c4fb3ed..4cb1e71 100644 --- a/src/coreclr/src/vm/class.cpp +++ b/src/coreclr/src/vm/class.cpp @@ -1806,7 +1806,7 @@ EEClass::CheckForHFA() } #ifdef FEATURE_64BIT_ALIGNMENT -// Returns true iff the native view of this type requires 64-bit aligment. +// Returns true iff the native view of this type requires 64-bit alignment. bool MethodTable::NativeRequiresAlign8() { LIMITED_METHOD_CONTRACT; diff --git a/src/coreclr/src/vm/domainfile.cpp b/src/coreclr/src/vm/domainfile.cpp index a398b1a..0d25af9 100644 --- a/src/coreclr/src/vm/domainfile.cpp +++ b/src/coreclr/src/vm/domainfile.cpp @@ -1762,7 +1762,7 @@ void DomainAssembly::GetOptimizedIdentitySignature(CORCOMPILE_ASSEMBLY_SIGNATURE ReleaseHolder scope (GetFile()->GetMDImportWithRef()); IfFailThrow(scope->GetScopeProps(NULL, &pSignature->mvid)); - // Use the NGen image if posssible. IL image does not even have to be present on CoreCLR. + // Use the NGen image if possible. IL image does not even have to be present on CoreCLR. if (GetFile()->HasNativeImage()) { PEImageHolder pNativeImage(GetFile()->GetNativeImageWithRef()); diff --git a/src/coreclr/src/vm/hash.h b/src/coreclr/src/vm/hash.h index aa21cce..0ecaa7a 100644 --- a/src/coreclr/src/vm/hash.h +++ b/src/coreclr/src/vm/hash.h @@ -450,7 +450,7 @@ public: WRAPPER_NO_CONTRACT; SUPPORTS_DAC; - _ASSERTE(!m_fEnd); // check we are not alredy at end + _ASSERTE(!m_fEnd); // check we are not already at end MoveNext(); } // operator -- @@ -462,7 +462,7 @@ public: { LIMITED_METHOD_CONTRACT; - _ASSERTE(!m_fEnd); // check we are not alredy at end + _ASSERTE(!m_fEnd); // check we are not already at end return m_pBucket->m_rgKeys[m_id]; } //accessors : SetDisc() , sets the discriminator @@ -475,7 +475,7 @@ public: WRAPPER_NO_CONTRACT; SUPPORTS_DAC; - _ASSERTE(!m_fEnd); // check we are not alredy at end + _ASSERTE(!m_fEnd); // check we are not already at end return m_pBucket->GetValue(m_id); } diff --git a/src/coreclr/src/vm/methodtable.cpp b/src/coreclr/src/vm/methodtable.cpp index 437162f..845c655 100644 --- a/src/coreclr/src/vm/methodtable.cpp +++ b/src/coreclr/src/vm/methodtable.cpp @@ -5560,7 +5560,7 @@ void MethodTable::DoFullyLoad(Generics::RecursionGraph * const pVisited, const } } - // The rules for constraint cycles are same as rules for acccess checks + // The rules for constraint cycles are same as rules for access checks if (fNeedAccessChecks) { // Check for cyclical class constraints @@ -8274,7 +8274,7 @@ MethodTable::MethodDataInterfaceImpl::PopulateNextLevel() MethodTable * pDeclMT = m_pDecl->GetImplMethodTable(); INDEBUG(BOOL dbg_fInterfaceFound = FALSE); - // Call code:ProcessMap for every (duplicate) occurence of interface code:pDeclMT in the interface + // Call code:ProcessMap for every (duplicate) occurrence of interface code:pDeclMT in the interface // map of code:m_pImpl MethodTable::InterfaceMapIterator it = m_pImpl->GetImplMethodTable()->IterateInterfaceMap(); while (it.Next()) diff --git a/src/coreclr/src/vm/methodtable.h b/src/coreclr/src/vm/methodtable.h index 6018c24..850a13d 100644 --- a/src/coreclr/src/vm/methodtable.h +++ b/src/coreclr/src/vm/methodtable.h @@ -1883,7 +1883,7 @@ public: #endif #ifdef FEATURE_64BIT_ALIGNMENT - // Returns true iff the native view of this type requires 64-bit aligment. + // Returns true iff the native view of this type requires 64-bit alignment. bool NativeRequiresAlign8(); #endif // FEATURE_64BIT_ALIGNMENT @@ -3279,7 +3279,7 @@ protected: { LIMITED_METHOD_CONTRACT; return m_pDeclMT->GetNumMethods(); } virtual void UpdateImplMethodDesc(MethodDesc* pMD, UINT32 slotNumber) - { LIMITED_METHOD_CONTRACT; } + { LIMITED_METHOD_CONTRACT; } }; // class MethodDataInterface @@ -3321,7 +3321,7 @@ protected: { WRAPPER_NO_CONTRACT; return m_pDecl->GetNumVirtuals(); } virtual void UpdateImplMethodDesc(MethodDesc* pMD, UINT32 slotNumber) - { LIMITED_METHOD_CONTRACT; } + { LIMITED_METHOD_CONTRACT; } protected: UINT32 MapToImplSlotNumber(UINT32 slotNumber); diff --git a/src/coreclr/src/vm/methodtablebuilder.cpp b/src/coreclr/src/vm/methodtablebuilder.cpp index 8192937..3270813 100644 --- a/src/coreclr/src/vm/methodtablebuilder.cpp +++ b/src/coreclr/src/vm/methodtablebuilder.cpp @@ -615,11 +615,11 @@ MethodTableBuilder::LoadApproxInterfaceMap() } // MethodTableBuilder::LoadApproxInterfaceMap //******************************************************************************* -// Fills array of TypeIDs with all duplicate occurences of pDeclIntfMT in the interface map. +// Fills array of TypeIDs with all duplicate occurrences of pDeclIntfMT in the interface map. // // Arguments: // rg/c DispatchMapTypeIDs - Array of TypeIDs and its count of elements. -// pcIfaceDuplicates - Number of duplicate occurences of the interface in the interface map (ideally <= +// pcIfaceDuplicates - Number of duplicate occurrences of the interface in the interface map (ideally <= // count of elements TypeIDs. // // Note: If the passed rgDispatchMapTypeIDs array is smaller than the number of duplicates, fills it @@ -651,7 +651,7 @@ MethodTableBuilder::ComputeDispatchMapTypeIDs( &pItfType->GetSubstitution(), pDeclIntfSubst, &newVisited)) - { // We found another occurence of this interface + { // We found another occurrence of this interface // Can we fit it into the TypeID array? if (*pcIfaceDuplicates < cDispatchMapTypeIDs) { @@ -2114,7 +2114,7 @@ BOOL MethodTableBuilder::IsEligibleForCovariantReturns(mdToken methodDeclToken) // // Note on covariant return types: right now we only support covariant returns for MethodImpls on - // classes, where the MethodDecl is also on a class. Interface methods are not supported. + // classes, where the MethodDecl is also on a class. Interface methods are not supported. // We will also allow covariant return types if both the MethodImpl and MethodDecl are not on the same type. // @@ -5695,7 +5695,7 @@ MethodTableBuilder::ProcessMethodImpls() } Substitution *pDeclSubst = &bmtMetaData->pMethodDeclSubsts[m]; - + MethodTable * pDeclMT = NULL; MethodSignature declSig(GetModule(), szName, pSig, cbSig, NULL); @@ -5715,7 +5715,7 @@ MethodTableBuilder::ProcessMethodImpls() { // 2. Get or create the correct substitution if (pDeclMT->IsInterface()) - { + { // If the declaration method is a part of an interface, search through // the interface map to find the matching interface so we can provide // the correct substitution chain. @@ -11140,7 +11140,7 @@ VOID MethodTableBuilder::CheckLayoutDependsOnOtherModules(MethodTable * pDepende // Track whether field layout of this type depend on information outside its containing module and compilation unit // // It is a stronger condition than MethodTable::IsInheritanceChainLayoutFixedInCurrentVersionBubble(). - // It has to remain fixed accross versioning changes in the module dependencies. In particular, it does + // It has to remain fixed across versioning changes in the module dependencies. In particular, it does // not take into account NonVersionable attribute. Otherwise, adding NonVersionable attribute to existing // type would be ReadyToRun incompatible change. // diff --git a/src/coreclr/src/vm/methodtablebuilder.h b/src/coreclr/src/vm/methodtablebuilder.h index def6ab9..346ec50 100644 --- a/src/coreclr/src/vm/methodtablebuilder.h +++ b/src/coreclr/src/vm/methodtablebuilder.h @@ -2531,7 +2531,7 @@ public: // // Arguments: // rg/c DispatchMapTypeIDs - Array of TypeIDs and its count of elements. - // pcIfaceDuplicates - Number of duplicate occurences of the interface in the interface map (ideally <= + // pcIfaceDuplicates - Number of duplicate occurrences of the interface in the interface map (ideally <= // count of elements TypeIDs). // void diff --git a/src/coreclr/src/vm/prestub.cpp b/src/coreclr/src/vm/prestub.cpp index 040ca86..6edbe84 100644 --- a/src/coreclr/src/vm/prestub.cpp +++ b/src/coreclr/src/vm/prestub.cpp @@ -2481,7 +2481,7 @@ EXTERN_C PCODE STDCALL ExternalMethodFixupWorker(TransitionBlock * pTransitionBl // Decode indirection cell from callsite if it is not present if (pIndirection == NULL) { - // Asssume that the callsite is call [xxxxxxxx] + // Assume that the callsite is call [xxxxxxxx] PCODE retAddr = pEMFrame->GetReturnAddress(); #ifdef TARGET_X86 pIndirection = *(((TADDR *)retAddr) - 1); @@ -3503,7 +3503,7 @@ extern "C" SIZE_T STDCALL DynamicHelperWorker(TransitionBlock * pTransitionBlock // Decode indirection cell from callsite if it is not present if (pCell == NULL) { - // Asssume that the callsite is call [xxxxxxxx] + // Assume that the callsite is call [xxxxxxxx] PCODE retAddr = pFrame->GetReturnAddress(); #ifdef TARGET_X86 pCell = *(((TADDR **)retAddr) - 1); diff --git a/src/coreclr/src/vm/profilinghelper.cpp b/src/coreclr/src/vm/profilinghelper.cpp index ab64bb0..27e8bcc 100644 --- a/src/coreclr/src/vm/profilinghelper.cpp +++ b/src/coreclr/src/vm/profilinghelper.cpp @@ -174,7 +174,7 @@ BOOL CORProfilerBypassSecurityChecks() if (!(&g_profControlBlock)->pProfInterface->IsCallback3Supported()) return TRUE; - // V4 profiler binaries must opt in to bypasssing transparency checks in full trust + // V4 profiler binaries must opt in to bypassing transparency checks in full trust // assemblies. if (((&g_profControlBlock)->dwEventMask & COR_PRF_DISABLE_TRANSPARENCY_CHECKS_UNDER_FULL_TRUST) != 0) return TRUE; diff --git a/src/coreclr/src/vm/stublink.h b/src/coreclr/src/vm/stublink.h index 0e0b13b..64e7f76 100644 --- a/src/coreclr/src/vm/stublink.h +++ b/src/coreclr/src/vm/stublink.h @@ -813,7 +813,7 @@ class Stub UINT32 m_signature; #else #ifdef HOST_64BIT - //README ALIGNEMENT: in retail mode UINT m_numCodeBytes does not align to 16byte for the code + //README ALIGNMENT: in retail mode UINT m_numCodeBytes does not align to 16byte for the code // after the Stub struct. This is to pad properly UINT m_pad_code_bytes; #endif // HOST_64BIT diff --git a/src/coreclr/src/zap/zapcode.h b/src/coreclr/src/zap/zapcode.h index c75025c..cd9b7cc 100644 --- a/src/coreclr/src/zap/zapcode.h +++ b/src/coreclr/src/zap/zapcode.h @@ -216,7 +216,7 @@ public: { } - virtual UINT GetAligment() + virtual UINT GetAlignment() { return sizeof(DWORD); } diff --git a/src/libraries/Native/Unix/System.Native/pal_time.h b/src/libraries/Native/Unix/System.Native/pal_time.h index 794d680..44030df 100644 --- a/src/libraries/Native/Unix/System.Native/pal_time.h +++ b/src/libraries/Native/Unix/System.Native/pal_time.h @@ -43,7 +43,7 @@ PALEXPORT uint64_t SystemNative_GetTimestamp(void); * Since there is no consistent API on Unix to get the CPU utilization * from a user process, getrusage and gettimeofday are used to * compute the current process's CPU utilization instead. The CPU utilization - * returned is sum of utilization accross all processors, e.g. this function will + * returned is sum of utilization across all processors, e.g. this function will * return 200 when two cores are running at 100%. */ PALEXPORT int32_t SystemNative_GetCpuUtilization(ProcessCpuInformation* previousCpuInfo); diff --git a/src/libraries/System.Console/src/System/IO/StdInReader.cs b/src/libraries/System.Console/src/System/IO/StdInReader.cs index c3bf03f..ba44bce 100644 --- a/src/libraries/System.Console/src/System/IO/StdInReader.cs +++ b/src/libraries/System.Console/src/System/IO/StdInReader.cs @@ -179,7 +179,7 @@ namespace System.IO _readLineSB.Length = len - 1; if (!previouslyProcessed) { - // The ReadLine input may wrap accross terminal rows and we need to handle that. + // The ReadLine input may wrap across terminal rows and we need to handle that. // note: ConsolePal will cache the cursor position to avoid making many slow cursor position fetch operations. if (ConsolePal.TryGetCursorPosition(out int left, out int top, reinitializeForRead: true) && left == 0 && top > 0) diff --git a/src/libraries/System.Console/tests/ManualTests/ManualTests.cs b/src/libraries/System.Console/tests/ManualTests/ManualTests.cs index 5a84f74..cf0ea89 100644 --- a/src/libraries/System.Console/tests/ManualTests/ManualTests.cs +++ b/src/libraries/System.Console/tests/ManualTests/ManualTests.cs @@ -45,7 +45,7 @@ namespace System } [ConditionalFact(nameof(ManualTestsEnabled))] - public static void ReadLine_BackSpaceCanMoveAccrossWrappedLines() + public static void ReadLine_BackSpaceCanMoveAcrossWrappedLines() { Console.WriteLine("Please press 'a' until it wraps to the next terminal line, then press 'Backspace' until the input is erased, and then type a single 'a' and press 'Enter'."); Console.Write("Input: "); @@ -145,7 +145,7 @@ namespace System return new object[] { requestedKeyChord, - new ConsoleKeyInfo(keyChar, consoleKey, + new ConsoleKeyInfo(keyChar, consoleKey, control: modifiers.HasFlag(ConsoleModifiers.Control), alt: modifiers.HasFlag(ConsoleModifiers.Alt), shift: modifiers.HasFlag(ConsoleModifiers.Shift)) diff --git a/src/libraries/System.Drawing.Common/tests/BitmapTests.cs b/src/libraries/System.Drawing.Common/tests/BitmapTests.cs index a55bcde..92a4ec0 100644 --- a/src/libraries/System.Drawing.Common/tests/BitmapTests.cs +++ b/src/libraries/System.Drawing.Common/tests/BitmapTests.cs @@ -1212,7 +1212,7 @@ namespace System.Drawing.Tests if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { // "Reserved" is documented as "Reserved. Do not use.", so it's not clear whether we actually need to test this in any unit tests. - // Additionally, the values are not consistent accross Windows (GDI+) and Unix (libgdiplus) + // Additionally, the values are not consistent across Windows (GDI+) and Unix (libgdiplus) Assert.Equal(expectedReserved, data.Reserved); } diff --git a/src/libraries/System.Drawing.Common/tests/PenTests.cs b/src/libraries/System.Drawing.Common/tests/PenTests.cs index 5fed8fe..3b413bc 100644 --- a/src/libraries/System.Drawing.Common/tests/PenTests.cs +++ b/src/libraries/System.Drawing.Common/tests/PenTests.cs @@ -131,12 +131,12 @@ namespace System.Drawing.Tests [ConditionalTheory(Helpers.IsDrawingSupported)] [InlineData(PenAlignment.Center - 1)] [InlineData(PenAlignment.Right + 1)] - public void Alignment_SetInvalid_ThrowsInvalidEnumArgumentException(PenAlignment aligment) + public void Alignment_SetInvalid_ThrowsInvalidEnumArgumentException(PenAlignment alignment) { using (var brush = new SolidBrush(Color.Red)) using (var pen = new Pen(brush)) { - Assert.ThrowsAny(() => pen.Alignment = aligment); + Assert.ThrowsAny(() => pen.Alignment = alignment); } } diff --git a/src/libraries/System.Drawing.Common/tests/mono/System.Drawing.Imaging/IconCodecTests.cs b/src/libraries/System.Drawing.Common/tests/mono/System.Drawing.Imaging/IconCodecTests.cs index da6c962..0517b94 100644 --- a/src/libraries/System.Drawing.Common/tests/mono/System.Drawing.Imaging/IconCodecTests.cs +++ b/src/libraries/System.Drawing.Common/tests/mono/System.Drawing.Imaging/IconCodecTests.cs @@ -126,7 +126,7 @@ namespace MonoTests.System.Drawing.Imaging string sInFile = Helpers.GetTestBitmapPath("48x48_multiple_entries_4bit.ico"); using (Bitmap bmp = new Bitmap(sInFile)) { - // These values are inconsistent accross Windows & Unix: 0 on Windows, 16 on Unix + // These values are inconsistent across Windows & Unix: 0 on Windows, 16 on Unix Assert.Equal(16, bmp.Palette.Entries.Length); Assert.Equal(-16777216, bmp.Palette.Entries[0].ToArgb()); Assert.Equal(-16777216, bmp.Palette.Entries[1].ToArgb()); @@ -155,7 +155,7 @@ namespace MonoTests.System.Drawing.Imaging string sInFile = Helpers.GetTestBitmapPath("48x48_multiple_entries_4bit.ico"); using (Bitmap bmp = new Bitmap(sInFile)) { - // These values are inconsistent accross Windows & Unix: 0 on Windows, 16 on Unix + // These values are inconsistent across Windows & Unix: 0 on Windows, 16 on Unix Assert.Equal(0, bmp.Palette.Entries.Length); } } @@ -313,7 +313,7 @@ namespace MonoTests.System.Drawing.Imaging string sInFile = Helpers.GetTestBitmapPath("VisualPng.ico"); using (Bitmap bmp = new Bitmap(sInFile)) { - // These values areinconsistent accross Windows & Unix: 0 on Windows, 16 on Unix + // These values areinconsistent across Windows & Unix: 0 on Windows, 16 on Unix Assert.Equal(16, bmp.Palette.Entries.Length); Assert.Equal(-16777216, bmp.Palette.Entries[0].ToArgb()); @@ -342,7 +342,7 @@ namespace MonoTests.System.Drawing.Imaging string sInFile = Helpers.GetTestBitmapPath("VisualPng.ico"); using (Bitmap bmp = new Bitmap(sInFile)) { - // These values areinconsistent accross Windows & Unix: 0 on Windows, 16 on Unix + // These values areinconsistent across Windows & Unix: 0 on Windows, 16 on Unix Assert.Equal(0, bmp.Palette.Entries.Length); } } @@ -557,7 +557,7 @@ namespace MonoTests.System.Drawing.Imaging string sInFile = Helpers.GetTestBitmapPath("48x48_one_entry_1bit.ico"); using (Bitmap bmp = new Bitmap(sInFile)) { - // These values are inconsistent accross Windows & Unix: 0 on Windows, 16 on Unix + // These values are inconsistent across Windows & Unix: 0 on Windows, 16 on Unix Assert.Equal(2, bmp.Palette.Entries.Length); Assert.Equal(-16777216, bmp.Palette.Entries[0].ToArgb()); Assert.Equal(-1, bmp.Palette.Entries[1].ToArgb()); @@ -571,7 +571,7 @@ namespace MonoTests.System.Drawing.Imaging string sInFile = Helpers.GetTestBitmapPath("48x48_one_entry_1bit.ico"); using (Bitmap bmp = new Bitmap(sInFile)) { - // These values are inconsistent accross Windows & Unix: 0 on Windows, 16 on Unix + // These values are inconsistent across Windows & Unix: 0 on Windows, 16 on Unix Assert.Equal(0, bmp.Palette.Entries.Length); } } @@ -803,7 +803,7 @@ namespace MonoTests.System.Drawing.Imaging string sInFile = Helpers.GetTestBitmapPath("64x64_one_entry_8bit.ico"); using (Bitmap bmp = new Bitmap(sInFile)) { - // This value is inconsistent accross Windows & Unix: 0 on Windows, 256 on Unix + // This value is inconsistent across Windows & Unix: 0 on Windows, 256 on Unix Assert.Equal(256, bmp.Palette.Entries.Length); } } @@ -815,7 +815,7 @@ namespace MonoTests.System.Drawing.Imaging string sInFile = Helpers.GetTestBitmapPath("64x64_one_entry_8bit.ico"); using (Bitmap bmp = new Bitmap(sInFile)) { - // This value is inconsistent accross Windows & Unix: 0 on Windows, 256 on Unix + // This value is inconsistent across Windows & Unix: 0 on Windows, 256 on Unix Assert.Equal(0, bmp.Palette.Entries.Length); } } @@ -1083,7 +1083,7 @@ namespace MonoTests.System.Drawing.Imaging string sInFile = Helpers.GetTestBitmapPath("96x96_one_entry_8bit.ico"); using (Bitmap bmp = new Bitmap(sInFile)) { - // This value is inconsistent accross Unix and Windows. + // This value is inconsistent across Unix and Windows. Assert.Equal(256, bmp.Palette.Entries.Length); } } @@ -1095,7 +1095,7 @@ namespace MonoTests.System.Drawing.Imaging string sInFile = Helpers.GetTestBitmapPath("96x96_one_entry_8bit.ico"); using (Bitmap bmp = new Bitmap(sInFile)) { - // This value is inconsistent accross Unix and Windows. + // This value is inconsistent across Unix and Windows. Assert.Equal(0, bmp.Palette.Entries.Length); } } diff --git a/src/libraries/System.Drawing.Common/tests/mono/System.Drawing.Imaging/JpegCodecTests.cs b/src/libraries/System.Drawing.Common/tests/mono/System.Drawing.Imaging/JpegCodecTests.cs index 2f8904e..c2d274a 100644 --- a/src/libraries/System.Drawing.Common/tests/mono/System.Drawing.Imaging/JpegCodecTests.cs +++ b/src/libraries/System.Drawing.Common/tests/mono/System.Drawing.Imaging/JpegCodecTests.cs @@ -67,13 +67,13 @@ namespace MonoTests.System.Drawing.Imaging Assert.Equal(72, bmp.HorizontalResolution); Assert.Equal(72, bmp.VerticalResolution); - // This value is not consistent accross Windows & Unix + // This value is not consistent across Windows & Unix // Assert.Equal(77896, bmp.Flags); ColorPalette cp = bmp.Palette; Assert.Equal(256, cp.Entries.Length); - // This value is not consistent accross Windows & Unix + // This value is not consistent across Windows & Unix // Assert.Equal(0, cp.Flags); for (int i = 0; i < 256; i++) { diff --git a/src/libraries/System.Management/src/System/Management/ManagementScope.cs b/src/libraries/System.Management/src/System/Management/ManagementScope.cs index 95f18ca..110abe4 100644 --- a/src/libraries/System.Management/src/System/Management/ManagementScope.cs +++ b/src/libraries/System.Management/src/System/Management/ManagementScope.cs @@ -948,7 +948,7 @@ namespace System.Management { if (!IsConnected) { - // The locator cannot be marshalled accross apartments, so we must create the locator + // The locator cannot be marshalled across apartments, so we must create the locator // and get the IWbemServices from an MTA thread if (!MTAHelper.IsNoContextMTA()) { diff --git a/src/libraries/System.Net.Primitives/tests/FunctionalTests/IPEndPointTest.cs b/src/libraries/System.Net.Primitives/tests/FunctionalTests/IPEndPointTest.cs index 6eec17f..8e00d00 100644 --- a/src/libraries/System.Net.Primitives/tests/FunctionalTests/IPEndPointTest.cs +++ b/src/libraries/System.Net.Primitives/tests/FunctionalTests/IPEndPointTest.cs @@ -193,7 +193,7 @@ namespace System.Net.Primitives.Functional.Tests Assert.Throws("socketAddress", () => endPoint.Create(null)); } - public static IEnumerable Create_InvalidAdddressFamily_TestData() + public static IEnumerable Create_InvalidAddressFamily_TestData() { yield return new object[] { new IPEndPoint(2, 500), new SocketAddress(Sockets.AddressFamily.InterNetworkV6) }; yield return new object[] { new IPEndPoint(IPAddress.Parse("192.169.0.9"), 500), new SocketAddress(Sockets.AddressFamily.InterNetworkV6) }; @@ -201,7 +201,7 @@ namespace System.Net.Primitives.Functional.Tests } [Theory] - [MemberData(nameof(Create_InvalidAdddressFamily_TestData))] + [MemberData(nameof(Create_InvalidAddressFamily_TestData))] public static void Create_InvalidAddressFamily_ThrowsArgumentException(IPEndPoint endPoint, SocketAddress socketAddress) { AssertExtensions.Throws("socketAddress", () => endPoint.Create(socketAddress)); diff --git a/src/libraries/System.Net.Security/tests/StressTests/SslStress/Utils/ErrorAggregator.cs b/src/libraries/System.Net.Security/tests/StressTests/SslStress/Utils/ErrorAggregator.cs index 9133bc3..379efa3 100644 --- a/src/libraries/System.Net.Security/tests/StressTests/SslStress/Utils/ErrorAggregator.cs +++ b/src/libraries/System.Net.Security/tests/StressTests/SslStress/Utils/ErrorAggregator.cs @@ -38,7 +38,7 @@ namespace SslStress.Utils (Type, string, string)[] key = ClassifyFailure(exception); ErrorType failureType = _failureTypes.GetOrAdd(key, _ => new ErrorType(exception.ToString())); - failureType.OccurencesQueue.Enqueue((timestamp.Value, metadata)); + failureType.OccurrencesQueue.Enqueue((timestamp.Value, metadata)); // classify exception according to type, message and callsite of itself and any inner exceptions static (Type exception, string message, string callSite)[] ClassifyFailure(Exception exn) @@ -101,14 +101,14 @@ namespace SslStress.Utils private sealed class ErrorType : IErrorType { public string ErrorMessage { get; } - public ConcurrentQueue<(DateTime, string?)> OccurencesQueue = new ConcurrentQueue<(DateTime, string?)>(); + public ConcurrentQueue<(DateTime, string?)> OccurrencesQueue = new ConcurrentQueue<(DateTime, string?)>(); public ErrorType(string errorText) { ErrorMessage = errorText; } - public IReadOnlyCollection<(DateTime timestamp, string? metadata)> Occurrences => OccurencesQueue; + public IReadOnlyCollection<(DateTime timestamp, string? metadata)> Occurrences => OccurrencesQueue; } private class StructuralEqualityComparer : IEqualityComparer where T : IStructuralEquatable diff --git a/src/libraries/System.Private.CoreLib/src/System/SpanHelpers.cs b/src/libraries/System.Private.CoreLib/src/System/SpanHelpers.cs index 75f4a8c..a7f99e4 100644 --- a/src/libraries/System.Private.CoreLib/src/System/SpanHelpers.cs +++ b/src/libraries/System.Private.CoreLib/src/System/SpanHelpers.cs @@ -16,7 +16,7 @@ namespace System #if TARGET_AMD64 || TARGET_ARM64 // The exact matrix on when ZeroMemory is faster than InitBlockUnaligned is very complex. The factors to consider include - // type of hardware and memory aligment. This threshold was chosen as a good balance accross different configurations. + // type of hardware and memory alignment. This threshold was chosen as a good balance across different configurations. if (byteLength > 768) goto PInvoke; Unsafe.InitBlockUnaligned(ref b, 0, (uint)byteLength); diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs index 3e94bea..5caf5c0 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs @@ -2172,7 +2172,7 @@ namespace System.Threading.Tasks { Debug.Assert(props != null); - // In rare occurences during AppDomainUnload() processing, it is possible for this method to be called + // In rare occurrences during AppDomainUnload() processing, it is possible for this method to be called // simultaneously on the same task from two different contexts. This can result in m_exceptionalChildren // being nulled out while it is being processed, which could lead to a NullReferenceException. To // protect ourselves, we'll cache m_exceptionalChildren in a local variable. diff --git a/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Win32.cs b/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Win32.cs index 80af766..9319593 100644 --- a/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Win32.cs +++ b/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Win32.cs @@ -416,7 +416,7 @@ namespace System // * FloatingDateRule - // To select the correct day in the month, set the Year member to zero, the Hour and Minute // members to the transition time, the DayOfWeek member to the appropriate weekday, and the - // Day member to indicate the occurence of the day of the week within the month (first through fifth). + // Day member to indicate the occurrence of the day of the week within the month (first through fifth). // // Using this notation, specify the 2:00a.m. on the first Sunday in April as follows: // Hour = 2, diff --git a/src/libraries/System.Reflection.MetadataLoadContext/tests/src/TestUtils/TestData.cs b/src/libraries/System.Reflection.MetadataLoadContext/tests/src/TestUtils/TestData.cs index be88ee0..6ed8b08 100644 --- a/src/libraries/System.Reflection.MetadataLoadContext/tests/src/TestUtils/TestData.cs +++ b/src/libraries/System.Reflection.MetadataLoadContext/tests/src/TestUtils/TestData.cs @@ -151,7 +151,7 @@ namespace System.Reflection.Tests "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" ); - // (NetFX20AsssemblyImage was built with v3.5 C# compiler - has v2.0.50727 ImageRuntimeVersion) + // (NetFX20AssemblyImage was built with v3.5 C# compiler - has v2.0.50727 ImageRuntimeVersion) // // Metadata version: v2.0.50727 // .assembly extern mscorlib // { @@ -3020,12 +3020,12 @@ namespace System.Reflection.Tests //.assembly SimpleAssembly // { // .custom instance void [mscorlib] - // System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) + // System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) // .custom instance void [mscorlib] // System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx // 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. // // --- The following custom attribute is added automatically, do not uncomment ------- - // // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 ) + // // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 ) // .hash algorithm 0x00008004 // .ver 0:0:0:0 //} diff --git a/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/SetComObjectDataTests.Windows.cs b/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/SetComObjectDataTests.Windows.cs index abfb457..a4eb867 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/SetComObjectDataTests.Windows.cs +++ b/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/SetComObjectDataTests.Windows.cs @@ -9,7 +9,7 @@ namespace System.Runtime.InteropServices.Tests public partial class SetComObjectDataTests { [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] - public void SetComObjectData_NonNullValue_Sucesss() + public void SetComObjectData_NonNullValue_Success() { var comObject = new ComImportObject(); @@ -24,7 +24,7 @@ namespace System.Runtime.InteropServices.Tests } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] - public void SetComObjectData_NullValue_Sucesss() + public void SetComObjectData_NullValue_Success() { var comObject = new ComImportObject(); diff --git a/src/libraries/System.Security.Cryptography.Algorithms/tests/RandomNumberGeneratorTests.cs b/src/libraries/System.Security.Cryptography.Algorithms/tests/RandomNumberGeneratorTests.cs index 738aa81..0585aae 100644 --- a/src/libraries/System.Security.Cryptography.Algorithms/tests/RandomNumberGeneratorTests.cs +++ b/src/libraries/System.Security.Cryptography.Algorithms/tests/RandomNumberGeneratorTests.cs @@ -524,9 +524,9 @@ namespace System.Security.Cryptography.RNG.Tests } } const double tolerance = 0.07; - foreach ((_, int occurences) in observedNumbers) + foreach ((_, int occurrences) in observedNumbers) { - double percentage = occurences / (double)numbers.Length; + double percentage = occurrences / (double)numbers.Length; double actual = Math.Abs(expected - percentage); Assert.True(actual < tolerance, $"Occurred number of times within threshold. Actual: {actual}"); } diff --git a/src/libraries/System.Security.Cryptography.Xml/tests/EncryptionPropertyCollectionTest.cs b/src/libraries/System.Security.Cryptography.Xml/tests/EncryptionPropertyCollectionTest.cs index 11ce46f..3eed1fa 100644 --- a/src/libraries/System.Security.Cryptography.Xml/tests/EncryptionPropertyCollectionTest.cs +++ b/src/libraries/System.Security.Cryptography.Xml/tests/EncryptionPropertyCollectionTest.cs @@ -130,7 +130,7 @@ namespace System.Security.Cryptography.Xml.Tests } [Fact] - public void Remove_MultipleOccurences() + public void Remove_MultipleOccurrences() { EncryptionPropertyCollection encPropertyCollection = new EncryptionPropertyCollection(); for (int i = 0; i < 2; i++) @@ -143,7 +143,7 @@ namespace System.Security.Cryptography.Xml.Tests encPropertyCollection.Add(multiple); } encPropertyCollection.Remove(multiple); - // Only the first occurence will be removed. + // Only the first occurrence will be removed. Assert.Equal(3, encPropertyCollection.Count); } diff --git a/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexCompiler.cs b/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexCompiler.cs index bd5bf8a..7316eb8 100644 --- a/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexCompiler.cs +++ b/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexCompiler.cs @@ -3830,7 +3830,7 @@ namespace System.Text.RegularExpressions // if (count >= 0) PopStack(); Stloc(_runtextposLocal!); - PushTrack(count); // Tracked(0) is alredy on the track + PushTrack(count); // Tracked(0) is already on the track TrackUnique2(Branchcountback2); Advance(); diff --git a/src/mono/mono/metadata/custom-attrs.c b/src/mono/mono/metadata/custom-attrs.c index 491ae63..b521943 100644 --- a/src/mono/mono/metadata/custom-attrs.c +++ b/src/mono/mono/metadata/custom-attrs.c @@ -1,7 +1,7 @@ /** * \file * Custom attributes. - * + * * Author: * Paolo Molaro (lupus@ximian.com) * @@ -71,7 +71,7 @@ metadata_foreach_custom_attr_from_index (MonoImage *image, guint32 idx, MonoAsse /* - * LOCKING: Acquires the loader lock. + * LOCKING: Acquires the loader lock. */ static MonoCustomAttrInfo* lookup_custom_attr (MonoImage *image, gpointer member) @@ -361,7 +361,7 @@ handle_enum: goto handle_enum; } else { MonoClass *k = t->data.klass; - + if (mono_is_corlib_image (m_class_get_image (k)) && strcmp (m_class_get_name_space (k), "System") == 0 && strcmp (m_class_get_name (k), "DateTime") == 0){ guint64 *val = (guint64 *)g_malloc (sizeof (guint64)); if (!bcheck_blob (p, 7, boundp, error)) @@ -373,7 +373,7 @@ handle_enum: } g_error ("generic valutype %s not handled in custom attr value decoding", m_class_get_name (t->data.klass)); break; - + case MONO_TYPE_STRING: if (!bcheck_blob (p, 0, boundp, error)) return NULL; @@ -1003,7 +1003,7 @@ create_custom_attr (MonoImage *image, MonoMethod *method, const guchar *data, gu mono_property_set_value_handle (prop, attr, pparams, error); goto_if_nok (error, fail); } - + g_free (name); name = NULL; } @@ -1070,7 +1070,7 @@ mono_reflection_create_custom_attr_data_args (MonoImage *image, MonoMethod *meth return; mono_class_init_internal (method->klass); - + domain = mono_domain_get (); if (len < 2 || read16 (p) != 0x0001) /* Prolog */ @@ -1731,7 +1731,7 @@ mono_custom_attrs_from_method_checked (MonoMethod *method, MonoError *error) */ if (method->is_inflated) method = ((MonoMethodInflated *) method)->declaring; - + if (method_is_dynamic (method) || image_is_dynamic (m_class_get_image (method->klass))) return lookup_custom_attr (m_class_get_image (method->klass), method); @@ -1817,7 +1817,7 @@ MonoCustomAttrInfo* mono_custom_attrs_from_assembly_checked (MonoAssembly *assembly, gboolean ignore_missing, MonoError *error) { guint32 idx; - + error_init (error); if (image_is_dynamic (assembly->image)) @@ -1834,7 +1834,7 @@ mono_custom_attrs_from_module (MonoImage *image, MonoError *error) guint32 idx; error_init (error); - + if (image_is_dynamic (image)) return lookup_custom_attr (image, image); idx = 1; /* there is only one module */ @@ -1861,7 +1861,7 @@ mono_custom_attrs_from_property_checked (MonoClass *klass, MonoProperty *propert guint32 idx; error_init (error); - + if (image_is_dynamic (m_class_get_image (klass))) { property = mono_metadata_get_corresponding_property_from_generic_type_definition (property); return lookup_custom_attr (m_class_get_image (klass), property); @@ -1890,7 +1890,7 @@ mono_custom_attrs_from_event_checked (MonoClass *klass, MonoEvent *event, MonoEr guint32 idx; error_init (error); - + if (image_is_dynamic (m_class_get_image (klass))) { event = mono_metadata_get_corresponding_event_from_generic_type_definition (event); return lookup_custom_attr (m_class_get_image (klass), event); @@ -2116,7 +2116,7 @@ mono_reflection_get_custom_attrs_info_checked (MonoObjectHandle obj, MonoError * HANDLE_FUNCTION_ENTER (); MonoClass *klass; MonoCustomAttrInfo *cinfo = NULL; - + error_init (error); klass = mono_handle_class (obj); @@ -2177,7 +2177,7 @@ mono_reflection_get_custom_attrs_info_checked (MonoObjectHandle obj, MonoError * cinfo = mono_custom_attrs_from_param_checked (method, position + 1, error); goto_if_nok (error, leave); - } + } #ifndef DISABLE_REFLECTION_EMIT else if (mono_is_sre_method_on_tb_inst (member_class)) {/*XXX This is a workaround for Compiler Context*/ // FIXME: Is this still needed ? @@ -2185,7 +2185,7 @@ mono_reflection_get_custom_attrs_info_checked (MonoObjectHandle obj, MonoError * } else if (mono_is_sre_ctor_on_tb_inst (member_class)) { /*XX This is a workaround for Compiler Context*/ // FIXME: Is this still needed ? g_assert_not_reached (); - } + } #endif else { char *type_name = mono_type_get_full_name (member_class); @@ -2252,7 +2252,7 @@ leave: * mono_reflection_get_custom_attrs_by_type: * \param obj a reflection object handle * \returns an array with all the custom attributes defined of the - * reflection handle \p obj. If \p attr_klass is non-NULL, only custom attributes + * reflection handle \p obj. If \p attr_klass is non-NULL, only custom attributes * of that type are returned. The objects are fully build. Return NULL if a loading error * occurs. */ @@ -2395,7 +2395,7 @@ custom_attr_class_name_from_methoddef (MonoImage *image, guint32 method_token, c * custom_attr_class_name_from_method_token: * @image: The MonoImage * @method_token: a token for a custom attr constructor in @image - * @assembly_token: out argment set to the assembly ref token of the custom attr + * @assembly_token: out argument set to the assembly ref token of the custom attr * @nspace: out argument set to namespace (a string in the string heap of @image) of the custom attr * @class_name: out argument set to the class name of the custom attr. * @@ -2495,7 +2495,7 @@ mono_assembly_metadata_foreach_custom_attr (MonoAssembly *assembly, MonoAssembly } /** - * iterate over the custom attributes that belong to the given index and call func, passing the + * iterate over the custom attributes that belong to the given index and call func, passing the * assembly ref (if any) and the namespace and name of the custom attribute. * * Everything is done using low-level metadata APIs, so it is safe to use diff --git a/src/mono/mono/metadata/metadata.h b/src/mono/mono/metadata/metadata.h index 5bda9a3..965b06a 100644 --- a/src/mono/mono/metadata/metadata.h +++ b/src/mono/mono/metadata/metadata.h @@ -206,8 +206,8 @@ MONO_API void mono_metadata_decode_row (const MonoTableInfo *t, uint32_t *res, int res_size); -MONO_API uint32_t mono_metadata_decode_row_col (const MonoTableInfo *t, - int idx, +MONO_API uint32_t mono_metadata_decode_row_col (const MonoTableInfo *t, + int idx, unsigned int col); /* @@ -226,7 +226,7 @@ MONO_API int mono_metadata_compute_size (MonoImage *meta, */ MONO_API const char *mono_metadata_locate (MonoImage *meta, int table, int idx); MONO_API const char *mono_metadata_locate_token (MonoImage *meta, uint32_t token); - + MONO_API const char *mono_metadata_string_heap (MonoImage *meta, uint32_t table_index); MONO_API const char *mono_metadata_blob_heap (MonoImage *meta, uint32_t table_index); MONO_API const char *mono_metadata_user_string (MonoImage *meta, uint32_t table_index); @@ -254,7 +254,7 @@ MONO_API void mono_metadata_free_marshal_spec (MonoMarshalSpec *spec); MONO_API uint32_t mono_metadata_implmap_from_method (MonoImage *meta, uint32_t method_idx); -MONO_API void mono_metadata_field_info (MonoImage *meta, +MONO_API void mono_metadata_field_info (MonoImage *meta, uint32_t table_index, uint32_t *offset, uint32_t *rva, @@ -423,9 +423,9 @@ MONO_API MONO_RT_EXTERNAL_ONLY MonoType *mono_type_create_from_typespec (MonoImage *image, uint32_t type_spec); MONO_API void mono_metadata_free_type (MonoType *type); -MONO_API int mono_type_size (MonoType *type, +MONO_API int mono_type_size (MonoType *type, int *alignment); -MONO_API int mono_type_stack_size (MonoType *type, +MONO_API int mono_type_stack_size (MonoType *type, int *alignment); MONO_API mono_bool mono_type_generic_inst_is_valuetype (MonoType *type); @@ -439,7 +439,7 @@ MONO_API MonoMethodSignature *mono_metadata_signature_alloc (MonoImage *image, MONO_API MonoMethodSignature *mono_metadata_signature_dup (MonoMethodSignature *sig); MONO_API MONO_RT_EXTERNAL_ONLY -MonoMethodSignature *mono_metadata_parse_signature (MonoImage *image, +MonoMethodSignature *mono_metadata_parse_signature (MonoImage *image, uint32_t token); MONO_API MONO_RT_EXTERNAL_ONLY @@ -449,7 +449,7 @@ MonoMethodSignature *mono_metadata_parse_method_signature (MonoImage const char **rptr); MONO_API void mono_metadata_free_method_signature (MonoMethodSignature *method); -MONO_API mono_bool mono_metadata_signature_equal (MonoMethodSignature *sig1, +MONO_API mono_bool mono_metadata_signature_equal (MonoMethodSignature *sig1, MonoMethodSignature *sig2); MONO_API unsigned int mono_signature_hash (MonoMethodSignature *sig); @@ -458,7 +458,7 @@ MONO_API MONO_RT_EXTERNAL_ONLY MonoMethodHeader *mono_metadata_parse_mh (MonoImage *m, const char *ptr); MONO_API void mono_metadata_free_mh (MonoMethodHeader *mh); -/* MonoMethodHeader acccessors */ +/* MonoMethodHeader accessors */ MONO_API const unsigned char* mono_method_header_get_code (MonoMethodHeader *header, uint32_t* code_size, uint32_t* max_stack); @@ -471,8 +471,8 @@ mono_method_header_get_num_clauses (MonoMethodHeader *header); MONO_API int mono_method_header_get_clauses (MonoMethodHeader *header, MonoMethod *method, void **iter, MonoExceptionClause *clause); -MONO_API uint32_t -mono_type_to_unmanaged (MonoType *type, MonoMarshalSpec *mspec, +MONO_API uint32_t +mono_type_to_unmanaged (MonoType *type, MonoMarshalSpec *mspec, mono_bool as_field, mono_bool unicode, MonoMarshalConv *conv); /* @@ -509,7 +509,7 @@ MONO_API void mono_metadata_decode_table_row (MonoImage *image, int table, int res_size); MONO_API uint32_t mono_metadata_decode_table_row_col (MonoImage *image, int table, - int idx, + int idx, unsigned int col); MONO_END_DECLS diff --git a/src/mono/mono/tests/Makefile.am b/src/mono/mono/tests/Makefile.am index fc33d5c..2cd53ff 100755 --- a/src/mono/mono/tests/Makefile.am +++ b/src/mono/mono/tests/Makefile.am @@ -202,11 +202,11 @@ MKBUNDLE = \ $(RUNTIME) $(CLASS)/mkbundle.exe if FULL_AOT_TESTS -PROFILE_MCS_FLAGS = -d:MOBILE,MOBILE_LEGACY,FULL_AOT_DESKTOP +PROFILE_MCS_FLAGS = -d:MOBILE,MOBILE_LEGACY,FULL_AOT_DESKTOP endif if HYBRID_AOT_TESTS -PROFILE_MCS_FLAGS = -d:MOBILE,MOBILE_LEGACY +PROFILE_MCS_FLAGS = -d:MOBILE,MOBILE_LEGACY endif if FULL_AOT_INTERP_TESTS @@ -614,7 +614,7 @@ TESTS_CS_SRC= \ bug-10127.cs \ bug-18026.cs \ allow-synchronous-major.cs \ - block_guard_restore_aligment_on_exit.cs \ + block_guard_restore_alignment_on_exit.cs \ thread_static_gc_layout.cs \ sleep.cs \ bug-27147.cs \ @@ -1471,8 +1471,8 @@ PROFILE_DISABLED_TESTS += \ assembly-loadfrom-simplename.exe endif -# constraints-load.il: -# Failed to load method 0x6000007 from '..../mono/tests/constraints-load.exe' due to +# constraints-load.il: +# Failed to load method 0x6000007 from '..../mono/tests/constraints-load.exe' due to # Could not resolve type with token 01000002 assembly:mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 type:System.BrokenIComparable`1 member:. PROFILE_DISABLED_TESTS += \ constraints-load.exe \ @@ -1713,7 +1713,7 @@ CI_PR_DISABLED_TESTS += process-stress-3.exe if HOST_WIN32 # https://github.com/mono/mono/issues/12839 -CI_PR_DISABLED_TESTS += block_guard_restore_aligment_on_exit.exe +CI_PR_DISABLED_TESTS += block_guard_restore_alignment_on_exit.exe endif # appdomain-threadpool-unload.exe creates 100 appdomains, takes too long with llvm @@ -2068,10 +2068,10 @@ TestingReferenceAssembly.dll: TestingReferenceAssembly.cs TestingReferenceReferenceAssembly.dll: TestingReferenceReferenceAssembly.cs TestingReferenceAssembly.dll $(MCS) -r:TestingReferenceAssembly.dll -target:library -out:$@ $< -%.exe$(PLATFORM_AOT_SUFFIX): %.exe +%.exe$(PLATFORM_AOT_SUFFIX): %.exe $(RUNTIME) $(TEST_AOT_BUILD_FLAGS) $< -%.dll$(PLATFORM_AOT_SUFFIX): %.dll +%.dll$(PLATFORM_AOT_SUFFIX): %.dll $(RUNTIME) $(TEST_AOT_BUILD_FLAGS) $< # mkbundle works on ppc, but the pkg-config POC doesn't when run with make test @@ -2777,7 +2777,7 @@ assemblyresolve_asm.dll$(PLATFORM_AOT_SUFFIX): assemblyresolve_asm.dll assemblyr MONO_PATH="assemblyresolve_deps:$(CLASS)" $(top_builddir)/runtime/mono-wrapper $(TEST_AOT_BUILD_FLAGS) assemblyresolve_asm.dll assemblyresolve_deps/Test.dll$(PLATFORM_AOT_SUFFIX): assemblyresolve_deps/Test.dll assemblyresolve_deps/TestBase.dll$(PLATFORM_AOT_SUFFIX) -EXTRA_DIST += assemblyresolve_TestBase.cs assemblyresolve_Test.cs assemblyresolve_asm.cs +EXTRA_DIST += assemblyresolve_TestBase.cs assemblyresolve_Test.cs assemblyresolve_asm.cs assemblyresolve_deps: mkdir -p assemblyresolve_deps assemblyresolve_deps/TestBase.dll: assemblyresolve_deps $(srcdir)/assemblyresolve_TestBase.cs @@ -2794,7 +2794,7 @@ assemblyresolve_event4.exe$(PLATFORM_AOT_SUFFIX): assemblyresolve_deps/Test.dll$ assemblyresolve_event4.exe: assemblyresolve_deps/Test.dll assemblyresolve_deps/TestBase.dll EXTRA_DIST += assemblyresolve_event5_label.cs assemblyresolve_event5_helper.cs -assemblyresolve_deps/assemblyresolve_event5_label.dll: assemblyresolve_event5_label.cs assemblyresolve_deps +assemblyresolve_deps/assemblyresolve_event5_label.dll: assemblyresolve_event5_label.cs assemblyresolve_deps $(MCS) -target:library -out:assemblyresolve_deps/assemblyresolve_event5_label.dll $(srcdir)/assemblyresolve_event5_label.cs assemblyresolve_event5_helper.dll: assemblyresolve_event5_helper.cs assemblyresolve_deps/assemblyresolve_event5_label.dll $(MCS) -target:library -out:assemblyresolve_event5_helper.dll -r:assemblyresolve_deps/assemblyresolve_event5_label.dll $(srcdir)/assemblyresolve_event5_helper.cs @@ -2828,7 +2828,7 @@ EXTRA_DIST += bug-81691-a.cs bug-81691-b.cs bug-81691.exe$(PLATFORM_AOT_SUFFIX): bug-81691-b.dll$(PLATFORM_AOT_SUFFIX) bug-81691.exe bug-81691-a.dll bug-81691-b.dll: $(srcdir)/bug-81691.cs $(srcdir)/bug-81691-a.cs $(srcdir)/bug-81691-b.cs - $(MCS) -target:library -out:bug-81691-a.dll $(srcdir)/bug-81691-a.cs + $(MCS) -target:library -out:bug-81691-a.dll $(srcdir)/bug-81691-a.cs $(MCS) -r:bug-81691-a.dll -target:library -out:bug-81691-b.dll $(srcdir)/bug-81691-b.cs $(MCS) -r:bug-81691-b.dll -out:bug-81691.exe $(srcdir)/bug-81691.cs rm -f bug-81691-a.dll @@ -3002,7 +3002,7 @@ test-generic-sharing-normal: $(TESTS_GSHARED) $(TESTSAOT_GSHARED) if [ x$(AOT) = x1 ]; then $(with_mono_path) $(JITTEST_PROG_RUN) --aot --debug $$fn > /dev/null || exit 1; $(RUNTIME) $$fn > $$fn.stdout || exit 1; fi; \ done -test-generic-sharing-managed: test-runner.exe $(TESTS_GSHARED) $(TESTSAOT_GSHARED) +test-generic-sharing-managed: test-runner.exe $(TESTS_GSHARED) $(TESTSAOT_GSHARED) $(Q) $(TOOLS_RUNTIME) $(TEST_RUNNER) -j a --testsuite-name "gshared" --disabled "$(DISABLED_TESTS)" --opt-sets "gshared gshared,shared gshared,-inline gshared,-inline,shared" $(TESTS_GSHARED) test-generic-sharing: @@ -3018,7 +3018,7 @@ test-async-exceptions : async-exceptions.exe EXTRA_DIST += modules.cs modules-m1.cs modules-m1.netmodule: modules-m1.cs $(MCS) -out:$@ /target:module $(srcdir)/modules-m1.cs -modules.exe: modules.cs modules-m1.netmodule $(TEST_DRIVER_DEPEND) +modules.exe: modules.cs modules-m1.netmodule $(TEST_DRIVER_DEPEND) $(MCS) -out:$@ /addmodule:modules-m1.netmodule -r:TestDriver.dll $(srcdir)/modules.cs # Useful if mono is compiled with --enable-shared=no @@ -3216,14 +3216,14 @@ test-internalsvisibleto: test-runner.exe $(INTERNALSVISIBLETO_TEST) $(INTERNALSV $(TOOLS_RUNTIME) $(TEST_RUNNER) --testsuite-name $@ $(INTERNALSVISIBLETO_TEST) internalsvisibleto-correctcase.dll internalsvisibleto-wrongcase.dll internalsvisibleto-runtimetest.exe: internalsvisibleto-runtimetest.cs internalsvisibleto-library.cs - $(Q) $(MCS_NO_UNSAFE) -out:internalsvisibleto-correctcase.dll -target:library -d:CORRECT_CASE -d:PERMISSIVE internalsvisibleto-library.cs + $(Q) $(MCS_NO_UNSAFE) -out:internalsvisibleto-correctcase.dll -target:library -d:CORRECT_CASE -d:PERMISSIVE internalsvisibleto-library.cs $(Q) $(MCS_NO_UNSAFE) -out:internalsvisibleto-wrongcase.dll -target:library -d:WRONG_CASE -d:PERMISSIVE internalsvisibleto-library.cs $(Q) $(MCS_NO_UNSAFE) -out:internalsvisibleto-runtimetest.exe -warn:0 -r:internalsvisibleto-correctcase.dll -r:internalsvisibleto-wrongcase.dll internalsvisibleto-runtimetest.cs - $(Q) $(MCS_NO_UNSAFE) -out:internalsvisibleto-correctcase.dll -target:library -d:CORRECT_CASE internalsvisibleto-library.cs + $(Q) $(MCS_NO_UNSAFE) -out:internalsvisibleto-correctcase.dll -target:library -d:CORRECT_CASE internalsvisibleto-library.cs $(Q) $(MCS_NO_UNSAFE) -out:internalsvisibleto-wrongcase.dll -target:library -d:WRONG_CASE internalsvisibleto-library.cs internalsvisibleto-correctcase-2.dll internalsvisibleto-wrongcase-2.dll internalsvisibleto-compilertest.exe: internalsvisibleto-compilertest.cs internalsvisibleto-library.cs - $(Q) $(MCS_NO_UNSAFE) -out:internalsvisibleto-correctcase-2.dll -target:library -d:CORRECT_CASE internalsvisibleto-library.cs + $(Q) $(MCS_NO_UNSAFE) -out:internalsvisibleto-correctcase-2.dll -target:library -d:CORRECT_CASE internalsvisibleto-library.cs $(Q) $(MCS_NO_UNSAFE) -out:internalsvisibleto-wrongcase-2.dll -target:library -d:WRONG_CASE internalsvisibleto-library.cs $(Q) $(MCS_NO_UNSAFE) -out:internalsvisibleto-compilertest.exe -warn:0 -r:internalsvisibleto-correctcase-2.dll -r:internalsvisibleto-wrongcase-2.dll internalsvisibleto-compilertest.cs @@ -3235,7 +3235,7 @@ internalsvisibleto-correctcase-sign2048.dll internalsvisibleto-wrongcase-sign204 $(Q) $(MCS_NO_UNSAFE) -out:internalsvisibleto-wrongcase-sign2048.dll -target:library -d:WRONG_CASE -d:SIGN2048 internalsvisibleto-library.cs internalsvisibleto-correctcase-2-sign2048.dll internalsvisibleto-wrongcase-2-sign2048.dll internalsvisibleto-compilertest-sign2048.exe: internalsvisibleto-compilertest.cs internalsvisibleto-library.cs internalsvisibleto-2048.snk - $(Q) $(MCS_NO_UNSAFE) -out:internalsvisibleto-correctcase-2-sign2048.dll -target:library -d:CORRECT_CASE -d:SIGN2048 internalsvisibleto-library.cs + $(Q) $(MCS_NO_UNSAFE) -out:internalsvisibleto-correctcase-2-sign2048.dll -target:library -d:CORRECT_CASE -d:SIGN2048 internalsvisibleto-library.cs $(Q) $(MCS_NO_UNSAFE) -out:internalsvisibleto-wrongcase-2-sign2048.dll -target:library -d:WRONG_CASE -d:SIGN2048 internalsvisibleto-library.cs $(Q) $(MCS_NO_UNSAFE) -out:internalsvisibleto-compilertest-sign2048.exe -warn:0 -r:internalsvisibleto-correctcase-2-sign2048.dll -r:internalsvisibleto-wrongcase-2-sign2048.dll -d:SIGN2048 internalsvisibleto-compilertest.cs @@ -3260,6 +3260,6 @@ Mono.Runtime.Testing.dll: weakattribute.cs weak-fields.exe: weak-fields.cs Mono.Runtime.Testing.dll $(MCS) -r:Mono.Runtime.Testing.dll -r:$(CLASS)/System.dll -r:$(CLASS)/System.Xml.dll -r:$(CLASS)/System.Core.dll -r:TestDriver.dll $(TEST_DRIVER_HARD_KILL_FEATURE) -out:$@ $< -CLEANFILES = $(TESTS_REGULAR) $(TESTS_STRESS) $(TESTSAOT_CS) $(TESTSAOT_IL) $(TESTSAOT_BENCH) $(TESTSAOT_STRESS) *.dll *.stdout *.aotlog *.exe stest.dat LeafAssembly.dll MidAssembly.dll appdomain-marshalbyref-assemblyload2/*.dll +CLEANFILES = $(TESTS_REGULAR) $(TESTS_STRESS) $(TESTSAOT_CS) $(TESTSAOT_IL) $(TESTSAOT_BENCH) $(TESTSAOT_STRESS) *.dll *.stdout *.aotlog *.exe stest.dat LeafAssembly.dll MidAssembly.dll appdomain-marshalbyref-assemblyload2/*.dll CLEANFILES += $(TESTS_TAILCALL_COMPILE) $(TESTSAOT_TAILCALL) CLEANFILES += $(BUILT_SOURCES) diff --git a/src/mono/mono/tests/block_guard_restore_aligment_on_exit.cs b/src/mono/mono/tests/block_guard_restore_alignment_on_exit.cs similarity index 96% rename from src/mono/mono/tests/block_guard_restore_aligment_on_exit.cs rename to src/mono/mono/tests/block_guard_restore_alignment_on_exit.cs index 270b1dd..9753597 100644 --- a/src/mono/mono/tests/block_guard_restore_aligment_on_exit.cs +++ b/src/mono/mono/tests/block_guard_restore_alignment_on_exit.cs @@ -11,7 +11,7 @@ class Driver { } finally { res = 4; Console.WriteLine ("EEE"); - while (!foo); + while (!foo); res = 5; Console.WriteLine ("in the finally block"); Thread.ResetAbort (); @@ -28,7 +28,7 @@ class Driver { res = 0; } } - + static int Main () { Thread t = new Thread (Func); t.Start (); @@ -40,4 +40,4 @@ class Driver { Thread.Sleep (500); return res; } -} \ No newline at end of file +} diff --git a/src/tests/JIT/HardwareIntrinsics/X86/Regression/GitHub_17073/GitHub_17073_gen.csx b/src/tests/JIT/HardwareIntrinsics/X86/Regression/GitHub_17073/GitHub_17073_gen.csx index 228a023..5285cd3 100644 --- a/src/tests/JIT/HardwareIntrinsics/X86/Regression/GitHub_17073/GitHub_17073_gen.csx +++ b/src/tests/JIT/HardwareIntrinsics/X86/Regression/GitHub_17073/GitHub_17073_gen.csx @@ -273,7 +273,7 @@ class BinaryOpTest : Test { w.WriteLine(); w.WriteLine(" [MethodImpl(MethodImplOptions.NoInlining)]"); - // Pass parameters by reference so we get consistency accross various ABIs. + // Pass parameters by reference so we get consistency across various ABIs. // We get operands in memory and by adding an extra "nop" intrinsic we can // force one of the operands in a register, just enough to catch some cases // of containment. diff --git a/src/tests/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b425314/b425314.cs b/src/tests/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b425314/b425314.cs index c823a3d..da22a64 100644 --- a/src/tests/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b425314/b425314.cs +++ b/src/tests/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b425314/b425314.cs @@ -32,7 +32,7 @@ Text from the first bug report: These two non-atomic operations expose a race if the object is not a local variable, and can be mutated by another thread. - This is the tree generated for unboxing an int. Note the two occurences of "field ref m_obj". + This is the tree generated for unboxing an int. Note the two occurrences of "field ref m_obj". [[ diff --git a/src/tests/JIT/Regression/VS-ia64-JIT/V2.0-RTM/b460385/b460385.il b/src/tests/JIT/Regression/VS-ia64-JIT/V2.0-RTM/b460385/b460385.il index 23c72cc..ab8e327 100644 --- a/src/tests/JIT/Regression/VS-ia64-JIT/V2.0-RTM/b460385/b460385.il +++ b/src/tests/JIT/Regression/VS-ia64-JIT/V2.0-RTM/b460385/b460385.il @@ -70,11 +70,11 @@ IL_47: ret // .method public static int32 Main() {.entrypoint .maxstack 3 - + call int32 FullProof::Test() pop -ldstr "Test SUCCCESS" +ldstr "Test SUCCESS" call void [System.Console]System.Console::WriteLine(string) ldc.i4 100 ret diff --git a/src/tests/Loader/binding/tracing/BinderEventListener.cs b/src/tests/Loader/binding/tracing/BinderEventListener.cs index 4567d36..aef68cf 100644 --- a/src/tests/Loader/binding/tracing/BinderEventListener.cs +++ b/src/tests/Loader/binding/tracing/BinderEventListener.cs @@ -258,7 +258,7 @@ namespace BinderTracingTests lock (eventsLock) { if (!bindOperations.ContainsKey(data.ActivityId)) - Assert.Fail(GetMisssingAssemblyBindStartMessage(data, $"Success={success}, Name={resultName}")); + Assert.Fail(GetMissingAssemblyBindStartMessage(data, $"Success={success}, Name={resultName}")); BindOperation bind = bindOperations[data.ActivityId]; bind.Success = success; @@ -281,7 +281,7 @@ namespace BinderTracingTests lock (eventsLock) { if (!bindOperations.ContainsKey(data.ActivityId)) - Assert.Fail(GetMisssingAssemblyBindStartMessage(data, attempt.ToString())); + Assert.Fail(GetMissingAssemblyBindStartMessage(data, attempt.ToString())); BindOperation bind = bindOperations[data.ActivityId]; bind.ResolutionAttempts.Add(attempt); @@ -297,7 +297,7 @@ namespace BinderTracingTests lock (eventsLock) { if (!bindOperations.ContainsKey(data.ActivityId)) - Assert.Fail(GetMisssingAssemblyBindStartMessage(data, handlerInvocation.ToString())); + Assert.Fail(GetMissingAssemblyBindStartMessage(data, handlerInvocation.ToString())); BindOperation bind = bindOperations[data.ActivityId]; bind.AssemblyLoadContextResolvingHandlers.Add(handlerInvocation); @@ -313,7 +313,7 @@ namespace BinderTracingTests lock (eventsLock) { if (!bindOperations.ContainsKey(data.ActivityId)) - Assert.Fail(GetMisssingAssemblyBindStartMessage(data, handlerInvocation.ToString())); + Assert.Fail(GetMissingAssemblyBindStartMessage(data, handlerInvocation.ToString())); BindOperation bind = bindOperations[data.ActivityId]; bind.AppDomainAssemblyResolveHandlers.Add(handlerInvocation); @@ -329,7 +329,7 @@ namespace BinderTracingTests lock (eventsLock) { if (!bindOperations.ContainsKey(data.ActivityId)) - Assert.Fail(GetMisssingAssemblyBindStartMessage(data, loadFrom.ToString())); + Assert.Fail(GetMissingAssemblyBindStartMessage(data, loadFrom.ToString())); BindOperation bind = bindOperations[data.ActivityId]; bind.AssemblyLoadFromHandler = loadFrom; @@ -346,7 +346,7 @@ namespace BinderTracingTests lock (eventsLock) { if (!bindOperations.ContainsKey(data.ActivityId)) - Assert.Fail(GetMisssingAssemblyBindStartMessage(data, probedPath.ToString())); + Assert.Fail(GetMissingAssemblyBindStartMessage(data, probedPath.ToString())); BindOperation bind = bindOperations[data.ActivityId]; bind.ProbedPaths.Add(probedPath); @@ -361,7 +361,7 @@ namespace BinderTracingTests return this.loadsToTrack.Any(n => n.Equals(name, StringComparison.InvariantCultureIgnoreCase)); } - private string GetMisssingAssemblyBindStartMessage(EventWrittenEventArgs data, string parsedEventAsString) + private string GetMissingAssemblyBindStartMessage(EventWrittenEventArgs data, string parsedEventAsString) { var msg = new System.Text.StringBuilder(); msg.AppendLine($"{data.EventName} (ActivityId: {data.ActivityId}) should have a matching AssemblyBindStart"); diff --git a/src/tests/tracing/eventpipe/common/IpcUtils.cs b/src/tests/tracing/eventpipe/common/IpcUtils.cs index 85e8430..554037c 100644 --- a/src/tests/tracing/eventpipe/common/IpcUtils.cs +++ b/src/tests/tracing/eventpipe/common/IpcUtils.cs @@ -97,14 +97,14 @@ namespace Tracing.Tests.Common fSuccess &= process.Start(); if (!fSuccess) throw new Exception("Failed to start subprocess"); - StreamWriter subprocesssStdIn = process.StandardInput; + StreamWriter subprocessStdIn = process.StandardInput; process.BeginOutputReadLine(); process.BeginErrorReadLine(); Logger.logger.Log($"subprocess started: {fSuccess}"); Logger.logger.Log($"subprocess PID: {process.Id}"); bool fGotToEnd = false; - process.Exited += (s, e) => + process.Exited += (s, e) => { Logger.logger.Log("================= Subprocess Exited ================="); if (!fGotToEnd) @@ -127,8 +127,8 @@ namespace Tracing.Tests.Common await duringExecution(process.Id); fGotToEnd = true; Logger.logger.Log($"Sending 'exit' to subprocess stdin"); - subprocesssStdIn.WriteLine("exit"); - subprocesssStdIn.Close(); + subprocessStdIn.WriteLine("exit"); + subprocessStdIn.Close(); while (!process.WaitForExit(5000)) { Logger.logger.Log("Subprocess didn't exit in 5 seconds!"); @@ -246,7 +246,7 @@ namespace Tracing.Tests.Common public IpcHeader Header { get; private set; } = default; public byte[] Serialize() - { + { byte[] serializedData = null; // Verify things will fit in the size capacity Header.Size = checked((UInt16)(IpcHeader.HeaderSizeInBytes + (Payload?.Length ?? 0))); ; @@ -375,7 +375,7 @@ namespace Tracing.Tests.Common private static string IpcRootPath { get; } = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? @"\\.\pipe\" : Path.GetTempPath(); public static Stream GetStandardTransport(int processId) { - try + try { var process = Process.GetProcessById(processId); } @@ -387,7 +387,7 @@ namespace Tracing.Tests.Common { throw new Exception($"Process {processId} seems to be elevated."); } - + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { string pipeName = $"dotnet-diagnostic-{processId}"; -- 2.7.4