Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use function pointers instead of marshalled delegates in EventSource #79970

Merged
merged 5 commits into from
Jan 6, 2023

Conversation

jkotas
Copy link
Member

@jkotas jkotas commented Dec 26, 2022

Function pointers are more efficient and avoid JITing. This is one of the last remaining uses of marshalled delegates in core framework. It allows the infrastructure for marshalled delegates to be trimmed.

@jkotas jkotas requested a review from noahfalk December 26, 2022 23:27
Copy link
Member

@noahfalk noahfalk left a comment

Choose a reason for hiding this comment

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

LGTM

cc @davmason

Copy link
Member

@davmason davmason left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@maraf maraf left a comment

Choose a reason for hiding this comment

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

WASM bits LGTM

@janvorli
Copy link
Member

@jkotas this PR has broken unloadability for a couple of coreclr tests on both Windows and Unix. The unloading is blocked due to root like this (the root path differs a bit test by test):

(lldb) gcroot -all 00007fbf6a813690
HandleTable:
    00007FFFF4AC1390 (strong handle)
    -> 00007FBF6A81A800 System.Diagnostics.Tracing.EventPipeEventProvider
    -> 00007FBF6A81A828 System.Diagnostics.Tracing.EventEnableCallback
    -> 00007FBF6A81A7A8 System.Diagnostics.Tracing.EventSource+OverrideEventProvider
    -> 00007FBF6A816538 System.Threading.Tasks.ParallelEtwProvider
    -> 00007FBF6A813690 System.Reflection.LoaderAllocator

Found 1 roots.

The failing tests are:
JIT/Performance/CodeQuality/BenchmarksGame/k-nucleotide/k-nucleotide-9
JIT/Performance/CodeQuality/BenchmarksGame/spectralnorm/spectralnorm-3
JIT/Performance/CodeQuality/BenchmarksGame/mandelbrot/mandelbrot-7
JIT/Performance/CodeQuality/Roslyn/CscBench
JIT/Regression/JitBlue/GitHub_19361/GitHub_19361
JIT/superpmi/superpmicollect/CscBench
profiler/multiple/multiple
Regressions/coreclr/GitHub_45929/test45929
tracing/eventlistener/eventlistener

@janvorli
Copy link
Member

To repro this, just run the coreclr tests with "runincontext" argument added. Btw, there are few additional failed test that fail due to incompatibilities with unloading that I am working on disabling.

@janvorli
Copy link
Member

@jkotas can you please take a look when you have a chance?

@jkotas
Copy link
Member Author

jkotas commented Jan 10, 2023

I have opened #80450 on this.

@ghost ghost locked as resolved and limited conversation to collaborators Feb 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants