After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 736757 - Add source tags to GTasks
Add source tags to GTasks
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: network
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2014-09-16 15:56 UTC by Philip Withnall
Modified: 2014-09-23 07:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tls: Add source tags to GTasks (2.31 KB, patch)
2014-09-16 15:56 UTC, Philip Withnall
committed Details | Review
proxy: Add source tags to GTasks (1.85 KB, patch)
2014-09-16 15:56 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2014-09-16 15:56:06 UTC
Trivial patches to add missing source tags to GTasks in glib-networking, to help with debugging.
Comment 1 Philip Withnall 2014-09-16 15:56:08 UTC
Created attachment 286306 [details] [review]
tls: Add source tags to GTasks

To help with debugging.
Comment 2 Philip Withnall 2014-09-16 15:56:12 UTC
Created attachment 286307 [details] [review]
proxy: Add source tags to GTasks

To help with debugging.
Comment 3 Dan Winship 2014-09-17 13:47:32 UTC
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...
Comment 4 Philip Withnall 2014-09-17 14:22:23 UTC
(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. :-\
Comment 5 Philip Withnall 2014-09-17 16:49:35 UTC
(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=736806https://bugzilla.gnome.org/show_bug.cgi?id=736809
Comment 6 Philip Withnall 2014-09-23 07:05:20 UTC
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