Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@alexrp
Copy link
Contributor

@alexrp alexrp commented Oct 2, 2016

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.

Alex Rønne Petersen added 30 commits October 2, 2016 18:23
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.
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.
Half of these aren't even needed - get rid of those. Sort the rest.
Alex Rønne Petersen added 20 commits October 2, 2016 18:51
…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.
@alexrp
Copy link
Contributor Author

alexrp commented Oct 2, 2016

@kumpera has already OK'd everything here, so merging once it's green.

@alexrp alexrp merged commit 30754ee into mono:master Oct 2, 2016
@alexrp
Copy link
Contributor Author

alexrp commented Oct 2, 2016

Failures are unrelated.

picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants