Hi Jon

Sorry for the delay in responding.  
I have been busy trying to gather as much info on the problem as possible.

I went away and tried to get the profiler running via environment variables
as per your suggestion, however I didn't see a way of invoking the profiler
other than using the command line option '--profile=log:heapshot'.  
There certainly weren't any documented environment variables that I found,
so I guess I have hit a brick wall in getting the profiler to run on Mono
for Android right now.

The next step I took was to strip back our codebase to run just the very
core network stack (which is cross platform and runs on .NET and Mono),
removing all UI layer code.  
I managed to find a leak when repeatedly starting/stopping our network stack
on a busy network on a mac using mono (with boehm GC).  
The interesting thing is that the exact same code does not leak when running
on Windows using .NET.  
Again, sadly, I also ran into the very same problem that we encountered with
the GC crashes bug we discussed previously - it only seems to happen on a
busy network with plenty of Upnp devices kicking about, so it will be
difficult for me to give you a working repro app.

My next line of attack was to try to get the mono profiler running on the
mac, and try and chase down the leaked objects but unfortunately the
profiler requires the use of sgen and as soon as I run it using sgen, both
mono 2.10.8 and the 2.10.9 beta crash out with mono-sgen related
stacktraces.
So next I had a shot at compiling and running the latest mono from a fresh
git clone today, but this crashed out with an EntryPointNotFoundException
trying to run CreateNLSocket() from libMonoPosixHelper, so I obviously
missed some build switch or something.

I have tried and failed to isolate any one area of code, since the only
reliable way that I have to monitor heap usage in the mono vm is by setting
MONO_GC_DEBUG=5, waiting for nursery collections to be created and watching
the logcat output for debug messages from the GC.  
Thus my only means of measuring memory usage is in itself interfering with
my attempts to isolate it to a particular piece of code.

So how I can take this forward from here as this memory leak is now
preventing me from releasing my app?  Do you have any other suggestions for
debugging memory usage pending profiler support in Mono for Android?

Cheers
Iain

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/profiling-support-in-monodroid-tp5564284p5577752.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to