[Mono-dev] Profiling with heapshot (only)
cswiedler at trionworlds.com
Tue Aug 16 01:24:40 UTC 2016
It looks like what's happening is that the writer_thread is spinning constantly calling mono_lock_free_queue_dequeue(). Adding a nanosleep(100000) in the outer loop fixes the CPU usage, with no ill effects that I can see. How often does the writer thread need to dequeue/write out data?
As far as I can tell this would affect any users of the log profiler.
From: Greg Young [mailto:gregoryyoung1 at gmail.com]
Sent: Monday, August 15, 2016 5:15 PM
To: Chris Swiedler <cswiedler at trionworlds.com>
Cc: mono-devel-list <mono-devel-list at lists.ximian.com>
Subject: Re: [Mono-dev] Profiling with heapshot (only)
ill have to try it then
On Tue, Aug 16, 2016 at 1:12 AM, Chris Swiedler <cswiedler at trionworlds.com> wrote:
> The heapshot option turns both of those off automatically (and empirically, adding nocalls/noalloc doesn't help the CPU usage).
> -----Original Message-----
> From: Greg Young [mailto:gregoryyoung1 at gmail.com]
> Sent: Monday, August 15, 2016 5:07 PM
> To: Chris Swiedler <cswiedler at trionworlds.com>
> Cc: mono-devel-list <mono-devel-list at lists.ximian.com>
> Subject: Re: [Mono-dev] Profiling with heapshot (only)
> Likely also noalloc.
> On Tue, Aug 16, 2016 at 1:04 AM, Greg Young <gregoryyoung1 at gmail.com> wrote:
>> Is an option you want. Without the enter/leave hooks are registered
>> which has a significant cost.
>> Not sure if this is the only option or just one of a few (have not
>> tested on your use case)
>> On Tue, Aug 16, 2016 at 12:57 AM, Chris Swiedler
>> <cswiedler at trionworlds.com> wrote:
>>> I'm trying to use the heapshot=ondemand feature of the logging profiler. I want to turn off all of the other features of the logging profiler, since the allocation/method tracing stuff runs too slow to be useful in the situation that I need to test. However, even with a command line like this:
>>> mono-sgen --debug
>>> ...I still get extremely high CPU usage in my apps. From what I understand of the heapshot part of the profiler, it shouldn't need to incur any overhead except when generating the heapshot file. Is there any way to reduce the runtime overhead when it's not generating a heapshot? This link suggests that I should disable counters, but I don't see any options for that:
>>> Mono-devel-list mailing list
>>> Mono-devel-list at lists.dot.net
>> Studying for the Turing test
> Studying for the Turing test
Studying for the Turing test
More information about the Mono-devel-list