1. 08 10月, 2020 5 次提交
  2. 07 10月, 2020 17 次提交
    • M
      Extend use of w32subset API partitioning to cover more Win32 functions. (#42977) · de6f9114
      monojenkins 提交于
      Expand usage of w32subset API partitioning making it possible to include/exclude/use/replace different subset of Win32 API's.
      
      Merge UWP source files into regular Windows specific source files keeping one set of Windows implementation files in upstream repro leverage w32subset.h to support CLASSIC or UWP API subsets.
      
      PR also extend capabilities to replace API usage using HAVE_EXTERN_DEFINED_WIN32* making it possible to exclude and replace API usage in downstream repositories.
      Co-authored-by: NlateralusX <lateralusX@users.noreply.github.com>
      de6f9114
    • T
      Console.Unix: reset terminal at exit in less cases to avoid blocking the parent. (#42303) · d6887d4a
      Tom Deseyn 提交于
      * Console.Unix: reset terminal at exit in less cases to avoid blocking the parent.
      
      When a parent is fetching the Console.Cursor position, it configures the terminal
      to not echo, writes an escape sequence to query the position, and then reads the
      position from stdin.
      
      Because this doesn't happen atomically a child process can overwrite the terminal
      settings to echo before the parent starts reading. This causes the position to
      be echoed to the user, and the parent gets stuck waiting for input on stdin.
      
      Currently terminal settings are reset at exit for applications that use the
      Console or Process class. This change tracks whether the application has
      changes the terminal settings and only then resets the terminal settings.
      
      This doesn't fix the issue, but makes it less likely to occur.
      
      * TermInfo changes are no longer needed
      
      * Only configure terminal for child if we've touched the settings.
      
      * minor change to comment wording
      d6887d4a
    • G
      add System.Net.Quic assembly and use it in HttpClient (#43076) · fdc6472b
      Geoff Kizer 提交于
      * add System.Net.Quic assembly and use it in HttpClient
      
      * fix build issue
      
      * remove old quic code from shared directory
      
      * fix Common.Tests project
      
      * fix WinHttp tests
      
      * fix typo
      Co-authored-by: NGeoffrey Kizer <geoffrek@windows.microsoft.com>
      fdc6472b
    • S
      1be89071
    • A
      Start stopwatch immediately before sending http request (#41537) · bb3cf179
      Anas Mazioudi 提交于
      * Start stopwatch immediately before sending http request
      
      * Remove extra line
      
      * Remove trailing white space
      bb3cf179
    • N
      Jit: Remove bounds checks with tests against length. (#40180) · 30e643e2
      nathan-moore 提交于
      * Introduce a concept of minimum array length into range check
      
      * Some cleanup
      
      * fix potential underflow
      
      * bug fix and cleanup
      
      * Revert string changes
      
      * Allow elimination of arr[0] with  len != 0 test
      
      * Revert "Revert string changes"
      
      This reverts commit 6f77bf8c8acce1f5382bb704875384c6f8e2f984.
      
      * Fix up tests
      
      * reverting lower bound merging as it may be unsound
      
      * Fix CI exposed bug and add a couple of test cases
      
      * code review feedback
      
      * comment nit
      
      * feedback
      
      * Add missing break
      30e643e2
    • A
      Roslyn update response (#43056) · d1c0fa82
      Aaron Robinson 提交于
      * Update function pointer syntax usage to official.
      
      * Fix warnings with new Roslyn
      Co-authored-by: NJan Kotas <jkotas@microsoft.com>
      d1c0fa82
    • E
    • E
      CoreDisTools and R2RDump support Arm Thumb2 disassembling (#42964) · 0c011a35
      Egor Chesakov 提交于
      * Clear the low bit of "Function Start RVA" on Arm Thumb2 machines in ReadyToRunMethod.cs
      
      * Remove restrictions on InputArchitecture in ReadyToRunReader.cs and R2RDump.cs
      0c011a35
    • E
      Small optimization in LSRA for RMW intrinsics (#42564) · 83449c77
      Egor Chesakov 提交于
      RMW intrinsic operands doesn't have to be marked as "delay-free" when they can be assigned the same register as op1Reg (i.e. read-modify-write operand) and one of them is the last use.
      83449c77
    • M
      Changing the free list from singly linked to doubly linked (#43021) · f099416d
      Maoni Stephens 提交于
      One of the problems with BGC sweep is it zeros out the gen2 FL at the beginning which means we might need to increase gen2 size before it builds up enough FL to accommodate gen1 survivors. To lift this limitation I'm changing this to a doubly linked list so we can easily take items off and thread new ones back on.
      
      Note that this is the initial checkin for the feature - there needs to be more stress testing and perf testing done on this so I'm checking in with the feature DOUBLY_LINKED_FL undefined. I've done some stress testing but not a whole lot.
      
      This is only used for gen2 FL, not UOH - we already don't allow UOH allocations while we are sweeping UOH (which should be quite quick). In the future we will make it work so UOH allocs are allowed while it's being swept but that's beyond the scope of this feature (it would require work in the synchronization between the allocator and BGC sweep).
      
      2 new bits were introduced -
      
      Previously we didn't need to care about bgc mark bits at all since we can't possibly compact into the part of the heap that hasn't been swept. But now we can. So if we compact into a free item that hasn't been swept, we need to set the mark bits correctly. So we introduce a new bit:
      
      // This bit indicates that we'll need to set the bgc mark bit for this object during an FGC.
      // We only do this when we decide to compact.
      
      Also now we don't have the luxury to allocate a min obj in the plan phase if what's allocated in this alloc context is too short. Previously we have this situation:
      
      SB|MT|L|N
      
      and if we plan allocated a min obj in this free item, we can allocate a min free obj right after it because the min free obj will not overwrite anything of that free item:
      
      SB|MT|L|N
      min free:
              SB|MT|Payload
      
      since we don't touch SB. But now we have this:
      
      SB|MT|L|N|P
      
      and if we only allocated 3 ptr size into this free item, and if we want to allocate a min free obj, we'd be over writing P (previous pointer of this free item):
      
      SB|MT|L|N |P
              SB|MT|Payload
      
      One note on this is that we check the "allocated size" with (alloc_ptr - start_region), but start_region is updated every time we pad in the same free item. And it's really only necessary for the actual alloc context start (because we just need to preserve that free item's prev). But this is saved by the fact that in gen2 we don't pad. If we do pad in gen2 it would be good to handle this.
      
      This is handled by set_free_obj_in_compact_bit (which sets the new MAKE_FREE_OBJ_IN_COMPACT bit) in adjust_limit where we set the bit and record the size of the "filler object". and we'll actually make the filler obj in gcmemcopy. This means this feature is as of now ONLY FOR 64-bit as the bit we use to do this means we are taking up 3 bits in MT to do our bookkeeping. We could make it work for 32-bit by finding bits in the gap - I haven't done that.
      
      Major areas changed were -
      + allocate_in_older_generation - this also has a complication wrt repair and commit. I introduced the new added list concept so we can repair and commit quickly, with one exception for bucket 0. For b0 since we do discard items, we do need to set prev of discarded items to PREV_EMPTY because we need to indicate that it's not the freelist anymore. However, we can still recover by going through the original head and set the prev of the discarded items one by one which wouldn't be fast so I choose to not do it - the discarded items are generally very small anyway.
      
      + gcmemcopy - this needs to care about the bits we added.
      
      + background_sweep - this takes items off of the FL and thread new ones back on. Since this never happens at the same time as the gen1 GCs using these items we don't need synchronization here.
      
      + allocator class - obviously this needs to care about the prev field now. The principle is we don't touch the prev field in unlink_item (except for the special b0 case) so when we repair we don't need to go repair the prev fields. When we commit, we do need to set the new prev field accordingly (unless for the added list which we would have already set the prev correctly).
      
      ---
      
      Fixed some existing bugs -
      
      The refactor change stopped updating next_sweep_obj but it's incorrect because it's used by the verification code in sos so brought that back.
      
      More accounting to count free_list/obj spaces correctly.
      
      ---
      
      TODO
      
      Optimizations we can do in background_sweep -
      
      + Don't need to actually take items off if we are just going to thread back on the same one (and others from my design notes);
      
      + If there's a big item we may not want to remove, imagine this simplied scenario - we have 1 2-mb free item on the list and we just removed it. Now current_num_objs happens to be big enough so we left an FGC happen and this FGC is gen1 and now it doesn't find any free space and would have to grow gen2.
      
      It's actually beneficial to switch to using the added list even for singly linked list so we could consider enabling it even when the feature is not on.
      f099416d
    • D
      Correctly report struct types in asCorInfoType for normalized structs (#43068) · 9cdc3915
      David Wrighton 提交于
      - Fix last issue causing significant misbehavior in X86 Crossgen2 testing
        - Correctly report struct types in asCorInfoType for normalized structs
        - Previous efforts would not report the struct if it was normalized, where the correct behavior was to normalize, and report the struct if it isn't an enum
      9cdc3915
    • T
      642b7cb7
    • N
    • T
      Fix for 'not fully instantiated' Crossgen2 issue bucket (#43054) · 57d2ea5a
      Tomáš Rylek 提交于
      Around September 25 several dozens of Crossgen2 tests started
      failing with a runtime error around incomplete instantiation of
      GetArrayDataReference. I believe that for generic methods we
      should skip the METHOD_ENTRY_DEF_TOKEN shortcut, otherwise we
      lose the instantiation information and cause the runtime problem.
      
      I originally thought this may be related to JanK's function
      pointer changes but I no longer believe it is the case
      (my apologies to Jan for the false accusation). I rather think
      that some ambient code change caused a subtle difference in IL
      encoding of access to the method that started tripping the
      "shortcut" code path.
      
      Thanks
      
      Tomas
      57d2ea5a
    • E
      Expose BackgroundService.ExecuteTask (#42981) · e18d25e1
      Eric Erhardt 提交于
      * Expose BackgroundService.ExecuteTask
      
      Expose the task that executes the background service, so consumers can check if it is running and/or has ran to competition or faulted.
      
      Use the new ExecuteTask to log exceptions when a BackgroundService fails after await, instead of appearing to hang.
      
      Fix #35991
      Fix #36017
      e18d25e1
    • S
  3. 06 10月, 2020 14 次提交
  4. 05 10月, 2020 4 次提交
    • M
      f1e131a4
    • J
      Reenable MUSL ARM tests (#42202) · 8cb35183
      Jan Vorlicek 提交于
      * Reenable MUSL ARM tests
      
      The packages for MUSL ARM should now be available, so reenable the
      libraries tests in the CI
      
      * Update DotnetHost and DotnetHostPolicy versions
      
      * Add Linux arm musl to libraries queues
      
      * Reenabling the arm32 queue in the coreclr templates queues
      
      * Updated versions by darc tool, reverted libraries/helix-queues-setup.yml
      8cb35183
    • A
      Improve WASM test output via xharness (#42860) · bd33fc4e
      Alexander Köplinger 提交于
      With https://github.com/dotnet/xharness/pull/315 we can now make the test output similar to the regular xunit desktop runner.
      It no longer prints the passed tests by default, only failing tests. To get the old behavior, add the `-v` flag back to xharness in tests.mobile.targets or check the new wasm-console.log file in the xharness-output folder.
      
      ```
        XHarness command issued: wasm test --app=. --engine=V8 --engine-arg=--stack-trace-limit=1000 --js-file=runtime.js --output-directory=/Users/alexander/dev/runtime/artifacts/bin/System.Runtime.Handles.Tests/net5.0-Release/browser-wasm/AppBundle/xharness-output -- --run WasmTestRunner.dll System.Runtime.Handles.Tests.dll -notrait category=OuterLoop -notrait category=failing
        info: 21:57:45.3244690 v8 --expose_wasm --stack-trace-limit=1000 runtime.js -- --run WasmTestRunner.dll System.Runtime.Handles.Tests.dll -notrait category=OuterLoop -notrait category=failing
        info: Arguments: --run,WasmTestRunner.dll,System.Runtime.Handles.Tests.dll,-notrait,category=OuterLoop,-notrait,category=failing
        info: console.debug: MONO_WASM: Initializing mono runtime
        info: console.debug: MONO_WASM: ICU data archive(s) loaded, disabling invariant mode
        info: console.debug: mono_wasm_runtime_ready fe00e07a-5519-4dfe-b35a-f867dbaf2e28
        info: Initializing.....
        info: Discovering: System.Runtime.Handles.Tests.dll (method display = ClassAndMethod, method display options = None)
        info: Discovered:  System.Runtime.Handles.Tests.dll (found 14 of 15 test cases)
        info: Starting:    System.Runtime.Handles.Tests.dll
        fail: [FAIL] SafeWaitHandleTests.SafeWaitHandle_False
        info: Assert.False() Failure
        info: Expected: False
        info: Actual:   True
        info:    at SafeWaitHandleTests.SafeWaitHandle_False()
        info:    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
        info: Finished:    System.Runtime.Handles.Tests.dll
        info:
        info: === TEST EXECUTION SUMMARY ===
        info: Total: 14, Errors: 0, Failed: 1, Skipped: 0, Time: 0.097211s
        info:
        info: 21:57:46.3323620 Process exited with 1
      ```
      bd33fc4e
    • J
      PR handling port of Diagnostic Server C++ library from CoreCLR into a C (#41872) · f63b6f0a
      Johan Lorensson 提交于
      library that can be shared between Mono as well as CoreCLR runtime.
      
      Port follows same guidelines setup for event pipe port #34600.
      Diagnostic server library is currently hosted as part of event pipe
      library but hosting its own runtime shim as well as source files
      (so could be split into separate library if ever make sense).
      Diagnostic Server have dependencies on event pipe library
      (and reuse part of event pipe runtime shim from its how shim).
      
      This is the first PR getting the code from diagnostic server codebase
      over to C library.
      f63b6f0a