GNOME Bugzilla – Bug 736757
Add source tags to GTasks
Last modified: 2014-09-23 07:05:34 UTC
Trivial patches to add missing source tags to GTasks in glib-networking, to help with debugging.
Created attachment 286306 [details] [review] tls: Add source tags to GTasks To help with debugging.
Created attachment 286307 [details] [review] proxy: Add source tags to GTasks To help with debugging.
How does this help with debugging? You generally don't see GTasks "in the wild", and if you see one in, eg, close_thread(), you know where it came from...
(In reply to comment #3) > How does this help with debugging? You generally don't see GTasks "in the > wild", and if you see one in, eg, close_thread(), you know where it came > from... Mostly when tracking down leaks, in two major cases: • Leaked GTasks, either due to a missing unref in the owning object, or due to a bug in GTask itself (I’m just preparing a patch for that). • Incomplete GTasks, where the owning object has been destroyed without yielding on all the GTasks it created having finished — ideally it should, and having source tags set on all of them makes it faster to debug where they all came from, so you can work out which bit of the owning object needs fixing to yield on them. These patches came out of some work I’m just finishing to fix GTask leaks in GTlsConnectionGnutls and GTask itself (reference cycle). I’ll create bugs for those shortly. However, in general, I think it would be useful to have the source tag information. I have plans (though I don’t know when I’ll ever find time to implement them) for some kind of debugging tool which allows examination of the creation, execution and completion of GTasks in a program. Having source tags would make that nicer to use. And adding them doesn’t hurt. Sorry for the long reply. Hope it makes sense. :-\
(In reply to comment #4) > These patches came out of some work I’m just finishing to fix GTask leaks in > GTlsConnectionGnutls and GTask itself (reference cycle). I’ll create bugs for > those shortly. Voila: • https://bugzilla.gnome.org/show_bug.cgi?id=736806 • https://bugzilla.gnome.org/show_bug.cgi?id=736809
Fixed! Attachment 286306 [details] pushed as 10644ed - tls: Add source tags to GTasks Attachment 286307 [details] pushed as 89d7dad - proxy: Add source tags to GTasks