-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Conversation
@dotnet-bot test Windows_NT arm64 Checked |
@dotnet-bot test Windows_NT arm64 Checked pri1r2r |
@dotnet/arm64-contrib @dotnet/jit-contrib PTAL |
Why do we increment |
@jkotas I had the same question to myself, but I just followed other jit writebarriers including CheckedWriteBarrier with the explicit comment about argument. Who implement this BTW? |
I implemented it for ARM64. The JIT_ByRefWriteBarrier needs to update both the src and dst pointers. |
; void JIT_ByRefWriteBarrier
|
Looks Good |
looks good |
@dotnet-bot test Windows_NT arm64 release pri1r2r |
@dotnet-bot test Windows_NT arm64 release |
I looked at issue 4877 and I am not clear on exactly how this addresses that. So you believe that the ref we were missing to report is in this 8 bytes that we skipped? |
With the off by 8 pointer address we can mark the wrong card table entry. |
Yeah, I get that. But I am not sure how this is related to issue 4877 which talks about we are missing reporting a stack location. |
@Maoni0 Yes. |
Makes sense then! The fix looks good to me. |
I understand why you would like to have the increment for ByRef write barrier. It sounds fine - it is something we always had. But having the increment in regular write barrier - that is much hotter than ByRef write barrier - is just wasting an instruction. |
I deleted the increment of address for the regular write barrier while keeping them for the byref write barrier. @dotnet-bot test Windows_NT arm64 Checked |
@dotnet-bot test Windows_NT arm64 Checked |
@dotnet-bot test Windows_NT arm64 release pri1r2r |
I think this finally fixes most of long outstanding GC issues that appear in different forms so far that include #4877, #4879, dotnet#4890 and more. The issues was WriteBarrier implementation. When we update card table, the address has been already incremented by 8. With this fix, all corefx tests seem to run on xunit framework without crashing. I verified this with an out-of-date build locally, so there are not found assembly errors like System.Runtime.Extensions with different versions, though. These are what I tested so far that safely finished all runs with very high percentage of pass. System.Collections.Tests System.Dynamic.Runtime.Tests System.Linq.Expressions.Tests System.Linq.Parallel.Tests Potentially more coreclr tests will pass. I will update them as tests go.
Without incrementing address for the normal writer barrier, I got over 900 failures -- http://dotnet-ci.cloudapp.net/job/dotnet_coreclr/job/master/job/arm64_cross_checked_windows_nt_prtest/250/consoleText |
I have opened https://github.com/dotnet/coreclr/issues/5833 on getting this cleaned up. |
ARM64: Fix WriteBarrier Commit migrated from dotnet/coreclr@9c50443
Commit migrated from dotnet/coreclr@e01f1e1
I think this finally fixes most of long outstanding GC issues that appear in different
forms so far that include #4877, #4879, #4890 and more.
The issues was WriteBarrier implementation.
When we update card table, the address has been already incremented by 8.
With this fix, all corefx tests seem to run on xunit framework without
crashing. I verified this with an out-of-date build locally, so there are not found
assembly errors like System.Runtime.Extensions with different versions,
though. These are what I tested so far that safely finished all runs with very high percentage of pass.
System.Collections.Tests
System.Dynamic.Runtime.Tests
System.Linq.Expressions.Tests
Potentially more coreclr tests will pass. I will update them as tests go.