GNOME Bugzilla – Bug 662779
systemtap probes for gvariant
Last modified: 2018-05-24 13:29:49 UTC
We have probes for ref/unref of GObject and also for alloc/free of gslice and g_malloc. GVariant could use some love.
Created attachment 200037 [details] [review] GVariant: add probes for SystemTap
Review of attachment 200037 [details] [review]: Not really sure what type of feedback you want here. It looks like it'd work, I'll give some opinions on the "api". ::: glib/glib.stp.in @@ +199,3 @@ + typeinfo = $arg2; + typestr = gvarianttypeinfo[pid(), typeinfo]; + ref_count = $arg3; I think its more natural to report the post-function refcount. Here is what i do for the GObject case: * @old_refcount: Original value of the reference count * @refcount: New value of the reference count old_refcount = $arg3; refcount = old_refcount+1; @@ +218,3 @@ + typeinfo = $arg2; + typestr = gvarianttypeinfo[pid(), typeinfo]; + ref_count = $arg3; Same here. @@ +237,3 @@ + typeinfo = $arg2; + typestr = gvarianttypeinfo[pid(), typeinfo]; + ref_count = $arg3; I think you want a nicer helper variable here, like "floating" that extracts the right bit from the state field. @@ +251,3 @@ + * Reports that g_variant_ref() has been called on a value. + **/ +probe glib.variant_take_ref = process("@ABS_GLIB_RUNTIME_LIBDIR@/libglib-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("variant__take_ref") Want a floating arg here too
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/473.