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 662779 - systemtap probes for gvariant
systemtap probes for gvariant
Status: RESOLVED OBSOLETE
Product: glib
Classification: Platform
Component: gvariant
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Allison Karlitskaya (desrt)
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-10-26 16:00 UTC by Allison Karlitskaya (desrt)
Modified: 2018-05-24 13:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GVariant: add probes for SystemTap (12.63 KB, patch)
2011-10-26 16:02 UTC, Allison Karlitskaya (desrt)
none Details | Review

Description Allison Karlitskaya (desrt) 2011-10-26 16:00:32 UTC
We have probes for ref/unref of GObject and also for alloc/free of gslice and g_malloc.  GVariant could use some love.
Comment 1 Allison Karlitskaya (desrt) 2011-10-26 16:02:15 UTC
Created attachment 200037 [details] [review]
GVariant: add probes for SystemTap
Comment 2 Alexander Larsson 2011-10-27 06:31:18 UTC
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
Comment 3 GNOME Infrastructure Team 2018-05-24 13:29:49 UTC
-- 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.