-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Profiler fixes for Cycle 9 #3688
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It could previously fail to process a newly allocated buffer.
This has not actually been necessary since allocation reporting was moved into the GC implementations.
* mono_gc_enable_events: This did nothing for SGen and we called it unconditionally for Boehm. So no point in having it around. * mono_gc_enable_alloc_events: The performance difference between checking a static alloc_events variable versus checking mono_profiler_events is marginal at best and doesn't justify the indirection, especially now that we support managed allocators while profiling.
It was never documented and is no longer functional.
Also refactor the heap walk code a bit.
…API + MONO_RT_EXTERNAL_ONLY. Also make it work with MSVC.
This variable can be changed at any time by any thread. It makes no sense to assert that it has a particular flag.
* Emit an NUnit test report file. * Set a timeout of 6 hours per test. * Do a thread dump for timed-out tests. * Don't print stdout/stderr for passing tests.
…c, and clean it up. * Drop support for fast/null timers. * Use Mono runtime functions for getting the thread ID and allocating buffers.
…tency with other profilers.
This avoids exposing the SGen worker threads through the profiler APIs. Doing so had two main problems: * It's easy for a user of the profiler API to accidentally mess with the state of the worker thread in all sorts of ways, which could break the GC. * It's been a long-standing guarantee that any profiler API callback will be invoked on a thread that is, at the very least, attached to the runtime via the mono-threads infrastructure. This is not the case for SGen workers. This fixes a deadlock in the log profiler when using major=marksweep-conc.
…d.buffer. Only in very few situations is it okay to access this field without first taking the reader lock or exclusive lock. Fixes some crashes observed in the profiler stress tests.
…cros. This also has the nice effect of reducing the amount of times we attempt to take the reader lock. Now we take it and release it once for a single event.
We need it in all cases now that we use it to periodically flush all buffers. The only platforms it was disabled on was NaCl, which we haven't bothered to support in a while anyway.
We get this from mono-threads.h now.
Half of these aren't even needed - get rid of those. Sort the rest.
…nctions. This is now available on the MonoProfilerThread structure.
* Don't invoke undefined behavior if an fd is >= FD_SETSIZE. * Allow multiple command sockets. * Close the command socket(s) on shutdown. * Properly run cleanup logic on shutdown.
They serve no purpose when allocation profiling is enabled, and just make log files bigger than they have to be.
Contributor
Author
|
@kumpera has already OK'd everything here, so merging once it's green. |
Contributor
Author
|
Failures are unrelated. |
picenka21
pushed a commit
to picenka21/runtime
that referenced
this pull request
Feb 18, 2022
Profiler fixes for Cycle 9 Commit migrated from mono/mono@30754ee
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These are extracted from #3546 since that PR is going to take longer to get done than I expected, and we need these fixes merged in time for Cycle 9.