Remove IAssemblyName (and various fusion remnants)#50755
Remove IAssemblyName (and various fusion remnants)#50755elinor-fung merged 8 commits intodotnet:mainfrom
Conversation
|
Tagging subscribers to this area: @vitek-karas, @agocke, @CoffeeFlux, @VSadov Issue Details
|
vitek-karas
left a comment
There was a problem hiding this comment.
I assume we have to use normal pointer type to pass around the new data structure because it goes through one COM-like interface...
Regardless I think it would be nice if we could make it a reference in all other places - it is stack allocated (only - which is great). Maybe even a const reference if possible.
|
I love this change - delete bunch of code, remove complexity... and get a perf win ... |
|
@stephentoub based on his love of perf wins |
|
Merging, since the latest commit was non-functional changes and all the CI legs passed before it, so I don't think I need to add to the current PR/CI backlog. |
* upstream/main: (568 commits) [wasm] Set __DistroRid on Windows to browser-wasm (dotnet#50842) [wasm] Fix order of include paths, to have the obj dir first (dotnet#50303) [wasm] Fix debug build of AOT cross compiler (dotnet#50418) Fix outdated comment (dotnet#50834) [wasm][tests] Add properties to allow passing args to xharness (dotnet#50678) Vectorized common String.Split() paths (dotnet#38001) Fix binplacing symbol files. (dotnet#50819) Move type check to after the null ref branch in out marshalling of blittable classes. (dotnet#50735) Remove extraneous CMake version requirement. (dotnet#50805) [wasm] Remove unncessary condition for EMSDK (dotnet#50810) Add loop alignment stats to JitLogCsv (dotnet#50624) Resolve ILLink warnings in System.Diagnostics.DiagnosticSource (dotnet#50265) Avoid unnecessary closures/delegates in Process (dotnet#50496) Fix for field layout verification across version bubble boundary (dotnet#50364) JIT: Enable CSE for VectorX.Create (dotnet#50644) [main] Update dependencies from mono/linker (dotnet#50779) [mono] More domain cleanup (dotnet#50771) Race condition in Mock reference tracker runtime with GC. (dotnet#50804) Remove IAssemblyName (and various fusion remnants) (dotnet#50755) Disable failing test for GCStress. (dotnet#50828) ...
Remove a bunch of remnants of fusion from the binder. Definitely lots more that this change doesn't deal with (e.g. the existence of the
ICLRPrivBinderinterface - it is internal only and our usage of if it already doesn't adhere to COM semantics).IAssemblyNamewith a simple struct (AssemblyNameData) for passing information to binder instances. (If we get rid of the interface per above, we can remove the intermediary struct as well - but it is at least simpler and less costly thanIAssemblyName.)IAssemblyNamePEKINDfrom peinformation.h,AssemblyContentTypeandASM_DISPLAY_FLAGSfrom fusion.hThis avoids re-parsing of the display name and some data copying, so it actually improves perf some too. Relative to the cost of actually loading an assembly, it is small / lost in the noise, so I tried narrowing down a measurement to the cost of just going through bind resolution by using custom ALCs and calling
LoadFromAssemblyNamefor an already loaded assembly.Stopwatch timings for 150k iterations using my local build:
Test code
For returning assembly in Load:
For fallling back to default ALC: