Debugging main loop wakeups

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Debugging main loop wakeups

Michael Gratton
Hi all,

What's an effective way to debug GLib main loop event sources? A person
using Geary has reported[0] that they are getting ~60 wakeups per
second, and from strace this looks like it's the main loop's calls to
poll() returning that are causing this. I'd like to work out what
sources are causing the wakeups so I can work out how to solve the
issue, but am having trouble working out how to do that.

I've tried setting a break on poll() in gdb, but it seems none of the
fd's ever show any revents. I've tried using sysprof, but that just
tells me g_main_context_prepare() and g_source_iter_next() is the cause
of most of Geary's CPU utilisation when it's otherwise idle. I've also
tried to use Dunfell, but it fails with some obscure system tap error.

Any suggestions?


[0] - <>
⊨ Michael Gratton, Percept Wrangler.
⚙ <>

gtk-list mailing list
[hidden email]