From mattj at google.com Fri Jun 8 17:54:05 2007 From: mattj at google.com (Matt Jones) Date: Fri, 8 Jun 2007 14:54:05 -0700 Subject: [Mono-gc-list] Tracing GC operations Message-ID: <904636f60706081454i3fcb6afah6ae553e573b5d220@mail.gmail.com> Hi - I'm trying to hunt down a threading bug in wine that shows up when some of the unit tests from mono are run under wine (so using a windows version of mono). The bug shows up during the GC collect cycle (the function is gc_push or something like that). It's not a bug in mono per se, but being able to trace the operation of the gc would make figuring out what's going on much easier. Is there any good tracing facility for this? I've tried "mono --trace=System.GC", but I don't get anything out. Also, is there any way to control the operation of the GC (such as forcing a full pass at a pre-determined time etc.). Part of the problem with the bug I'm trying to hunt down is that it occurs very rarely (unsurprising as its likely to do with wine's handling of threading), so coming up with a better way than running the tests until the bug occurs would be awesome. Thanks, Matt Jones -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.ximian.com/pipermail/mono-gc-list/attachments/20070608/3cef486b/attachment.html From lupus at ximian.com Mon Jun 11 11:19:37 2007 From: lupus at ximian.com (Paolo Molaro) Date: Mon, 11 Jun 2007 17:19:37 +0200 Subject: [Mono-gc-list] Tracing GC operations In-Reply-To: <904636f60706081454i3fcb6afah6ae553e573b5d220@mail.gmail.com> References: <904636f60706081454i3fcb6afah6ae553e573b5d220@mail.gmail.com> Message-ID: <20070611151937.GH2377@debian.org> On 06/08/07 Matt Jones wrote: > I'm trying to hunt down a threading bug in wine that shows up when some of > the unit tests from mono are run under wine (so using a windows version of > mono). The bug shows up during the GC collect cycle (the function is gc_push > or something like that). It's not a bug in mono per se, but being able to > trace the operation of the gc would make figuring out what's going on much > easier. Is there any good tracing facility for this? I've tried "mono > --trace=System.GC", but I don't get anything out. That will trace only the calls to the managed methods in the GC class. Setting the env vars GC_DUMP_REGULARLY and GC_PRINT_STATS will generate GC logging information, though I'm not sure it would be useful in your case. Likely getting the crash to happen while under gdb and poking around can be more useful. > Also, is there any way to control the operation of the GC (such as forcing a > full pass at a pre-determined time etc.). Part of the problem with the bug > I'm trying to hunt down is that it occurs very rarely (unsurprising as its > likely to do with wine's handling of threading), so coming up with a better > way than running the tests until the bug occurs would be awesome. That's not possible without adding specific code to the GC and recompiling. You may also want to repost to mono-devel where people that use windows are more likely to read your email and maybe help more. lupus -- ----------------------------------------------------------------- lupus at debian.org debian/rules lupus at ximian.com Monkeys do it better