Bug 2553 - Improve root information from the log profiler
Summary: Improve root information from the log profiler
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: GC ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Rodrigo Kumpera
URL:
Depends on:
Blocks: 3613
  Show dependency tree
 
Reported: 2011-12-16 21:00 UTC by Rolf Bjarne Kvinge [MSFT]
Modified: 2017-07-11 22:03 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
sgen: Don't report all pinned roots as stack roots. (948 bytes, patch)
2011-12-16 21:03 UTC, Rolf Bjarne Kvinge [MSFT]
Details
sgen: Report gchandle roots as such when profiling (3.30 KB, patch)
2011-12-16 21:09 UTC, Rolf Bjarne Kvinge [MSFT]
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Rolf Bjarne Kvinge [MSFT] 2011-12-16 21:00:50 UTC
1) GCHandles are not reported as such [attaching patch]
2) Pinned roots are reported as stack roots [attaching patch]
3) Static fields are reported as unknown roots.

Bug #386 has a test case (in the first comment) that reproduces at least 1) and 2).
Comment 1 Rolf Bjarne Kvinge [MSFT] 2011-12-16 21:03:15 UTC
Created attachment 1064 [details]
sgen: Don't report all pinned roots as stack roots.

This just avoids confusing by reporting most roots as unknown roots instead of stack roots. A better fix would of course be to report more(exact?) information about where the roots come from.
Comment 2 Rolf Bjarne Kvinge [MSFT] 2011-12-16 21:09:47 UTC
Created attachment 1065 [details]
sgen: Report gchandle roots as such when profiling

This patch does not handle locking (I don't know the exact requirements).

TODO: maybe distinguish between the different types of GCHandles when reporting them to the profiler?

Paolo, I know this isn't what you proposed (which was to give sgen a pointer to the gc_handles array, so sgen could traverse it instead), but this seemed like an easier way (as in less code changed/shuffled around).
Comment 3 Paolo Molaro 2011-12-18 13:50:34 UTC
I'll implement the exporting of the handle arrays next week: the first patch is fine to commit, the second is not, as it doesn't help us move in the right direction and the added function doesn't have very useful semantics imho.
Comment 4 Rodrigo Kumpera 2013-05-23 12:07:09 UTC
Paolo, did you finish the work on this?
Comment 5 Rodrigo Kumpera 2017-07-11 22:03:36 UTC
Wow, we finally have a PR for this, only 6 years late.