runtime icon indicating copy to clipboard operation
runtime copied to clipboard

[Arm64/Windows] Optimize JIT_WriteBarriers

Open sdmaclea opened this issue 9 years ago • 8 comments

Test and enable JIT_WriteBarriers optimizations from dotnet/coreclr#12334

These were causing contract violations so Windows support was removed.

category:cq theme:runtime skill-level:expert cost:small

sdmaclea avatar Aug 25 '17 18:08 sdmaclea

@jkotas I think label might be arch-arm64 instead ?

hqueue avatar Aug 28 '17 05:08 hqueue

Why don't we inline WriteBarriers into jitted code and using runtime helper instead? I believe it would be the best optimization.

rartemev avatar Nov 07 '17 23:11 rartemev

These are the runtime helpers that need to be optimized

sdmaclea avatar Nov 08 '17 00:11 sdmaclea

Why don't we inline WriteBarriers into jitted code

@rartemev It may make sense for higher tiers of the JIT eventually. It does not make sense for the default optimization level because of it would lead to significant code bloat.

In additional to the code bloat factor, we are getting the following benefits from using the central helper:

  • The central helper can be patched to adjust for changing GC heap geometry. Inlined write barriers would require extra indirections to do the same.
  • The central helper is implicit "no GC" region. Inlined write barriers would need to be marked as explicit no GC regions in GC info.

jkotas avatar Nov 08 '17 00:11 jkotas

@adityamandaleeka is this resolved by dotnet/coreclr#22003?

AndyAyersMS avatar Jan 18 '19 02:01 AndyAyersMS

Yes, I'll close this once that's merged. Unfortunately, the ARM64 CI has been in terrible shape (long waits and general flakiness).

adityamandaleeka avatar Jan 18 '19 23:01 adityamandaleeka

@adityamandaleeka Close?

RussKeldorph avatar Jan 25 '19 00:01 RussKeldorph

Yup, thanks!

adityamandaleeka avatar Jan 25 '19 02:01 adityamandaleeka