Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Conversation

@erozenfeld
Copy link
Member

This change modified the importer to create GenTreeAllocObj node for
box and newobj instead of a helper call in R2R mode. ObjectAllocator phase
decides whether the object can be allocated on the stack or has to be created
on the heap via a helper call.

To trigger object stack allocation COMPlus_JitObjectStackAllocation has
to be set (it's not set by default).

@erozenfeld
Copy link
Member Author

Fixes #20977.

@erozenfeld
Copy link
Member Author

Re-enables R2R mode for ObjectStackAllocationTests (disabled in #20980 and #21010).

@erozenfeld
Copy link
Member Author

Verified no -pmi and --crossgen framework diffs with COMPlus_JitObjectStackAllocation not set .
Verified no --pmi framework diffs with COMPlus_JitObjectStackAllocation set.

--crossgen framework diffs with COMPlus_JitObjectStackAllocation set:

Found 10 files with textual diffs.
Crossgen Diffs for System.Private.CoreLib.dll, framework assemblies for  default jit
Summary:
(Lower is better)
Total bytes of diff: 32 (0.00% of base)
    diff is a regression.
Top file regressions by size (bytes):
          18 : xunit.execution.dotnet.dasm (0.01% of base)
          14 : System.Runtime.Serialization.Formatters.dasm (0.05% of base)
2 total files with size differences (0 improved, 2 regressed), 127 unchanged.
Top method regressions by size (bytes):
          14 ( 1.44% of base) : System.Runtime.Serialization.Formatters.dasm - ObjectWriter:Serialize(ref,ref,bool):this
           9 ( 1.75% of base) : xunit.execution.dotnet.dasm - <>c__DisplayClass26_0:<Find>b__0():this
           9 ( 2.97% of base) : xunit.execution.dotnet.dasm - <>c__DisplayClass28_0:<Find>b__0():this
Top method regressions by size (percentage):
           9 ( 2.97% of base) : xunit.execution.dotnet.dasm - <>c__DisplayClass28_0:<Find>b__0():this
           9 ( 1.75% of base) : xunit.execution.dotnet.dasm - <>c__DisplayClass26_0:<Find>b__0():this
          14 ( 1.44% of base) : System.Runtime.Serialization.Formatters.dasm - ObjectWriter:Serialize(ref,ref,bool):this
3 total methods with size differences (0 improved, 3 regressed), 123953 unchanged.
8 files had text diffs but not size diffs.
System.Linq.Parallel.dasm had 347850 diffs
Microsoft.Diagnostics.Tracing.TraceEvent.dasm had 4772 diffs
System.CommandLine.dasm had 3984 diffs
System.Data.Common.dasm had 790 diffs
CommandLine.dasm had 474 diffs

@erozenfeld
Copy link
Member Author

@AndyAyersMS @echesakovMSFT @dotnet/jit-contrib PTAL

@erozenfeld
Copy link
Member Author

@dotnet-bot test Windows_NT x64 Release r2r

Copy link
Member

@AndyAyersMS AndyAyersMS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

This change modified the importer to create GenTreeAllocObj node for
box and newobj instead of a helper call in R2R mode. ObjectAllocator phase
decides whether the object can be allocated on the stack or has to be created
on the heap via a helper call.

To trigger object stack allocation COMPlus_JitObjectStackAllocation has
to be set (it's not set by default).
@erozenfeld erozenfeld force-pushed the R2RObjectStackAllocation branch from 1e79360 to d4e9e5d Compare December 14, 2018 20:16
@erozenfeld
Copy link
Member Author

@dotnet-bot test Windows_NT x64 Release r2r

@erozenfeld
Copy link
Member Author

@dotnet-bot test Windows_NT arm64 Cross Checked Innerloop Build and Test

@erozenfeld erozenfeld merged commit 3e06d9f into dotnet:master Dec 16, 2018
@erozenfeld
Copy link
Member Author

This was an item from the object stack allocation list tracked in https://github.com/dotnet/coreclr/issues/20253

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants