1. 19 6月, 2021 3 次提交
    • E
      Backport bugfixes, infrastructural changes and perf improvements from the... · 6737dce3
      Eirik Tsarpalis 提交于
      Backport bugfixes, infrastructural changes and perf improvements from the polymorphism feature branch (#54420)
      
      * backport opportunistic bugfixes
      
      * strengthen debug assertions and add clarifying comments
      
      * Rework WriteStack/ReadStack implementations
      
      * Use array instead of list for storing frames. Previous frames can now be passed by reference
      * Ensure that the _count field always reflects the current depth.
      * Remove StackFrame.Reset() methods which are occassionally a source of dirty frames being reused.
      
      * Take advantage of JIT optimizations in the serialization hot path
      
      * address PR feedback
      6737dce3
    • T
      f722ad00
    • B
      Create a summary Markdown file for all asm diffs (#54430) · fd7e9241
      Bruce Forstall 提交于
      Create a per-MCH file summary.md file, then accumulate them all into
      a single overall summary Markdown file, for use in GitHub comments.
      Uses the existing `jit-analyze --md` functionality.
      
      Also, change asm diffs to not report missing data or asm diffs as a
      replay failure.
      
      Finally, don't overwrite superpmi.log files (or the new diff_summary.md files):
      create new, unique file names for each run.
      fd7e9241
  2. 18 6月, 2021 19 次提交
  3. 17 6月, 2021 18 次提交
    • S
      Remove some overhead from XmlNode.SelectSingleNode (#54299) · bbc3366a
      Stephen Toub 提交于
      * Remove unnecessary cost from XmlNode.SelectSingleNode
      
      It's currently implemented by delegating to SelectSingleNodes and returning the first one.  While the list is lazily-populated, this still entails creating an `XPathNodeList`, creating a `List<XmlNode>`, storing the enumerated into the list, and then returning the element from the list, which is then thrown away.  With just a few lines, we can cut through all of that.
      
      * Make XPathScanner and XPathParser into structs
      
      No need for these to be allocated classes.  They can just live on the stack where they're created.
      
      * Reduce ScanName overhead
      
      This shows up on the hot path of parsing the xpath expression.  We can use a span to avoid bounds checking.
      
      * Avoid bounds check in NextChar
      
      NextChar is used by lots of routines to advance to the next character.  We can streamline it to avoid the bounds check when indexing into the string.
      
      * Optimize SkipSpace for there not being any
      
      The typical case is there isn't any whitespace, so inline that fast check.  This was showing up as a few percentage of a simple scenario.
      bbc3366a
    • S
      Delete invalid assert in PathInternal.CaseSensitivity (#54325) · 386d0b19
      Stephen Toub 提交于
      * Delete invalid assert in PathInternal.CaseSensitivity
      
      * Update PathInternal.CaseSensitivity.cs
      386d0b19
    • J
      Resolving first part of System.Drawing.Common IlLink warnings (#54076) · c4c3c93c
      Jose Perez Rodriguez 提交于
      * Resolving first part of System.Drawing.Common IlLink warnings
      
      * Address PR feedback
      Co-authored-by: NEric Erhardt <eric.erhardt@microsoft.com>
      c4c3c93c
    • V
      4e4989dd
    • W
      Add PipeWriter CanGetUnflushedBytes and UnflushedBytes properties (#54164) · bd2931ea
      Wraith 提交于
      * Add PipeWriter CanGetUnflushedBytes and UnflushedBytes properties and covering tests
      
      * address feedback
      bd2931ea
    • A
      [mono] Add accessors m_method_is_final and m_method_is_abstract (#54271) · 2832987b
      Aleksey Kliger (λgeek) 提交于
      * [metadata] Cleanup redundant logic
      
      Follow-up to 4e03f366
      
      * Add m_method_is_abstract and m_method_is_final accessors
      2832987b
    • A
      Fix profiling R2R code on Windows x64 (#54318) · 97c2e2f6
      Anton Lapounov 提交于
      The kernel requires the function table to be 4-byte aligned.
      97c2e2f6
    • V
      [mono] Fix comparisons between non runtime types (#54062) · 96a4671b
      Vlad Brezae 提交于
      * [interp] Fix comparisons between non runtime types
      
      We know that the result of object.GetType and ldftn + GetTypeFromHandle are runtime types and we track it on the compilation stack. If type equality operator is applied on two runtime types we use reference equality comparison, otherwise we use the managed implementation which uses Type.Equals.
      
      * [mini] Fix comparisons between non runtime types
      
      We know that the result of object.GetType and ldftn + GetTypeFromHandle are runtime types and we track it on the compilation stack. If type equality operator is applied on two runtime types we use reference equality comparison, otherwise we use the managed implementation which uses Type.Equals.
      
      * [interp] Resolve GetType on constrained valuetype to the actual type
      96a4671b
    • S
    • B
      Improve live variable JitDump output (#54256) · a02b6682
      Bruce Forstall 提交于
      The variable live range output is unnecessarily verbose. Simplify it; clean it up;
      make it smaller; use standard dumpers.
      
      Example, before:
      ```
      ////////////////////////////////////////
      ////////////////////////////////////////
      Variable Live Range History Dump for Block 2
      IL Var Num 0:
      [rcx [ (G_M13669_IG02,ins#0,ofs#0), (G_M13669_IG03,ins#1,ofs#2) ]; rbp[16] (1 slot) [ (G_M13669_IG03,ins#1,ofs#2), NON_CLOSED_RANGE ]; ]
      IL Var Num 1:
      [rsi [ (G_M13669_IG03,ins#1,ofs#2), NON_CLOSED_RANGE ]; ]
      ////////////////////////////////////////
      ////////////////////////////////////////
      End Generating code for Block 2
      ```
      After:
      ```
      Variable Live Range History Dump for BB02
      V00 this: rcx [(G_M13669_IG02,ins#0,ofs#0), (G_M13669_IG03,ins#1,ofs#2)]; rbp[16] (1 slot) [(G_M13669_IG03,ins#1,ofs#2), ...]
      V01 loc0: rsi [(G_M13669_IG03,ins#1,ofs#2), ...]
      ```
      
      And the end-of-dump output, before:
      ```
      ////////////////////////////////////////
      ////////////////////////////////////////
      PRINTING VARIABLE LIVE RANGES:
      IL Var Num 0:
      [rsi [18 , B5 )rsi [100 , 13A )rsi [14D , 186 )rsi [196 , 1C5 )rsi [1E3 , 271 )rsi [280 , 285 )]
      IL Var Num 1:
      [rdi [18 , B9 )rdi [100 , 137 )rdi [14D , 184 )rdi [196 , 1C2 )rdi [1E3 , 271 )rdi [280 , 288 )]
      IL Var Num 2:
      [rbx [18 , CA )rbx [100 , 10D )rbx [14D , 15A )rbx [196 , 1C7 )rbx [1E3 , 271 )rbx [280 , 28B )]
      IL Var Num 3:
      [rbp [3A , F0 )rbp [100 , 141 )rbp [14D , 18C )rbp [196 , 1D6 )rbp [1E3 , 275 )]
      IL Var Num 4:
      [r14 [3E , EC )r14 [100 , 13D )r14 [14D , 188 )r14 [196 , 1D2 )r14 [1E3 , 271 )]
      IL Var Num 5:
      [rcx [22A , 263 )]
      ////////////////////////////////////////
      ////////////////////////////////////////
      ```
      After:
      ```
      VARIABLE LIVE RANGES:
      V00 arg0: rsi [18, B5); rsi [100, 13A); rsi [14D, 186); rsi [196, 1C5); rsi [1E3, 271); rsi [280, 285)
      V01 arg1: rdi [18, B9); rdi [100, 137); rdi [14D, 184); rdi [196, 1C2); rdi [1E3, 271); rdi [280, 288)
      V02 arg2: rbx [18, CA); rbx [100, 10D); rbx [14D, 15A); rbx [196, 1C7); rbx [1E3, 271); rbx [280, 28B)
      V03 loc0: rbp [3A, F0); rbp [100, 141); rbp [14D, 18C); rbp [196, 1D6); rbp [1E3, 275)
      V04 loc1: r14 [3E, EC); r14 [100, 13D); r14 [14D, 188); r14 [196, 1D2); r14 [1E3, 271)
      V05 loc2: rcx [22A, 263)
      ```
      a02b6682
    • B
      Remove duplicate tests (#54230) · afcbd8c8
      Bruce Forstall 提交于
      csgen.1 also exists in src\tests\Regressions\coreclr\0582
      simple1 also exists in src\tests\JIT\Directed\Arrays
      afcbd8c8
    • E
      Remove System.Drawing code that doesn't work (#54245) · c70e2e42
      Eric Erhardt 提交于
      This code only runs on macOS, and expects mono's System.Windows.Forms assembly is loaded into the process. This is causing trim warnings, and it is easier just to delete this code than try to make ILLink happy.
      
      This code is only called from Graphics.FromHwnd, which doesn't work because the Carbon.framework no longer exists on macOS. Issue https://github.com/dotnet/runtime/issues/22221 is tracking the test failures that use FromHwnd.
      c70e2e42
    • E
      Improve cancellation in StreamPipeReader.ReadAtLeastAsync (#53306) · 419f30d9
      Emmanuel André 提交于
      * Improve cancellation in StreamPipeReader.ReadAtLeastAsync
      
      * Introduce task variable
      Co-authored-by: NStephen Toub <stoub@microsoft.com>
      
      * Fix tests
      
      * Expect TaskCanceledException on canceled token
      Co-authored-by: NStephen Toub <stoub@microsoft.com>
      419f30d9
    • J
      Follow the same failure behavior for [ComImport] classes on Windows with... · e16be6db
      Jeremy Koritzinsky 提交于
      Follow the same failure behavior for [ComImport] classes on Windows with built-in COM disabled as non-Windows. (#54298)
      
      e16be6db
    • A
      9c0bf218
    • F
      [Mono] Fix memory leak during data registration (#54045) · 888601aa
      Fan Yang 提交于
      * Fix memory leak
      
      * Update src/mono/mono/mini/mini-generic-sharing.c
      Co-authored-by: NAleksey Kliger (λgeek) <akliger@gmail.com>
      
      * Update src/mono/mono/mini/mini-generic-sharing.c
      Co-authored-by: NAleksey Kliger (λgeek) <akliger@gmail.com>
      
      * Fix the return
      Co-authored-by: NAleksey Kliger (λgeek) <akliger@gmail.com>
      888601aa
    • J
    • A
      [wasm][aot][tests] Enable libraries that have been consistently passing (#54291) · 42a764d6
      Ankit Jain 提交于
      * [wasm][aot][tests] Enable libraries that have been consistently passing
      
      .. on the tracking PR.
      
      - `System.Linq.Tests`
      Fixes https://github.com/dotnet/runtime/issues/51722
      
      - `System.Runtime.Extensions.Tests`
      - `System.IO.Pipelines.Tests`
          - the failing tests have been disabled
      
      * [wasm][aot][tests] Disable more tests that depend on stacktraces
      
      .. in System.Runtime.Tests . The library is still disabled for AOT,
      because it hasn't been stable only for the last 7 days.
      
      * Re-enable System.Runtime.Loader.Tests which is passing now.
      42a764d6