1global gobject_types_2_0_@LT_CURRENT@_@LT_REVISION@ 2global gobject_type_names_2_0_@LT_CURRENT@_@LT_REVISION@ 3global gobject_signal_names_2_0_@LT_CURRENT@_@LT_REVISION@ 4 5/* These are needed to keep track of gtype and signal names for the below 6 * probes. 7 */ 8probe process("@ABS_GLIB_RUNTIME_LIBDIR@/libgobject-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("type__new") 9{ 10 gobject_types_2_0_@LT_CURRENT@_@LT_REVISION@[pid(),user_string($arg1)] = $arg3; 11 gobject_type_names_2_0_@LT_CURRENT@_@LT_REVISION@[pid(),$arg3] = user_string($arg1); 12} 13probe process("@ABS_GLIB_RUNTIME_LIBDIR@/libgobject-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("signal__new") 14{ 15 gobject_signal_names_2_0_@LT_CURRENT@_@LT_REVISION@[pid(),$arg1] = user_string($arg2); 16} 17 18/** 19 * probe gobject.type_new - Called when any entity registered with the #GType system is created 20 * @name: String name of type 21 * @parent_gtype: The parent #GType of this type 22 * @gtype: The #GType for this type 23 */ 24probe gobject.type_new = process("@ABS_GLIB_RUNTIME_LIBDIR@/libgobject-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("type__new") 25{ 26 name = user_string($arg1); 27 parent_gtype = $arg2; 28 gtype = $arg3; 29 probestr = sprintf("gobject.type_new(%s, %d) -> %d", name, parent_gtype, gtype); 30} 31 32/** 33 * probe gobject.object_new - Called when a #GObject is created 34 * @object: Raw pointer to object 35 * @gtype: #GType for this object 36 * @type: String name of object type 37 */ 38probe gobject.object_new = process("@ABS_GLIB_RUNTIME_LIBDIR@/libgobject-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("object__new") 39{ 40 object = $arg1; 41 gtype = $arg2; 42 type = gobject_type_names_2_0_@LT_CURRENT@_@LT_REVISION@[pid(),$arg2]; 43 probestr = sprintf("gobject.object_new(%s) -> %p", type, object); 44} 45 46/** 47 * probe gobject.object_ref - Called when a new reference is added to a #GObject 48 * @object: Raw pointer to object 49 * @gtype: #GType for this object 50 * @type: String name of object type 51 * @old_refcount: Original value of the reference count 52 * @refcount: New value of the reference count 53 */ 54probe gobject.object_ref = process("@ABS_GLIB_RUNTIME_LIBDIR@/libgobject-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("object__ref") 55{ 56 object = $arg1; 57 gtype = $arg2; 58 type = gobject_type_names_2_0_@LT_CURRENT@_@LT_REVISION@[pid(),gtype]; 59 old_refcount = $arg3; 60 refcount = old_refcount+1; 61 probestr = sprintf("gobject.object_ref(%p[%s]) -> %d", object, type, refcount); 62} 63 64/** 65 * probe gobject.object_unref - Called when a reference is removed from a #GObject 66 * @object: Raw pointer to object 67 * @gtype: #GType for this object 68 * @type: String name of object type 69 * @old_refcount: Original value of the reference count 70 */ 71probe gobject.object_unref = process("@ABS_GLIB_RUNTIME_LIBDIR@/libgobject-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("object__unref") 72{ 73 object = $arg1; 74 gtype = $arg2; 75 type = gobject_type_names_2_0_@LT_CURRENT@_@LT_REVISION@[pid(),gtype]; 76 old_refcount = $arg3; 77 refcount = old_refcount-1; 78 probestr = sprintf("gobject.object_unref(%p [%s]) -> %d", object, type, refcount); 79} 80 81/** 82 * probe gobject.object_dispose - Called when a g_object_dispose() run for a #GObject is initiated 83 * @object: Raw pointer to object 84 * @gtype: #GType for this object 85 * @type: String name of object type 86 * @last_unref: FIXME 87 */ 88probe gobject.object_dispose = process("@ABS_GLIB_RUNTIME_LIBDIR@/libgobject-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("object__dispose") 89{ 90 object = $arg1; 91 gtype = $arg2; 92 type = gobject_type_names_2_0_@LT_CURRENT@_@LT_REVISION@[pid(),$arg2]; 93 last_unref = $arg3; 94 probestr = sprintf("gobject.object_dispose(%p[%s])", object, type); 95} 96 97/** 98 * probe gobject.object_dispose_end - Called when a g_object_dispose() run for a #GObject is completed 99 * @object: Raw pointer to object 100 * @gtype: #GType for this object 101 * @type: String name of object type 102 * @last_unref: FIXME 103 */ 104probe gobject.object_dispose_end = process("@ABS_GLIB_RUNTIME_LIBDIR@/libgobject-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("object__dispose__end") 105{ 106 object = $arg1; 107 gtype = $arg2; 108 type = gobject_type_names_2_0_@LT_CURRENT@_@LT_REVISION@[pid(),$arg2]; 109 last_unref = $arg3; 110 probestr = sprintf("gobject.object_dispose_end(%p[%s])", object, type); 111} 112 113/** 114 * probe gobject.object_finalize - Called when finalization for a #GObject is started 115 * @object: Raw pointer to object 116 * @gtype: #GType for this object 117 * @type: String name of object type 118 */ 119probe gobject.object_finalize = process("@ABS_GLIB_RUNTIME_LIBDIR@/libgobject-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("object__finalize") 120{ 121 object = $arg1; 122 gtype = $arg2; 123 type = gobject_type_names_2_0_@LT_CURRENT@_@LT_REVISION@[pid(),$arg2]; 124 probestr = sprintf("gobject.object_finalize(%p[%s])", object, type); 125} 126 127/** 128 * probe gobject.object_finalize - Called when finalization for a #GObject is completed 129 * @object: Raw pointer to object 130 * @gtype: #GType for this object 131 * @type: String name of object type 132 */ 133probe gobject.object_finalize_end = process("@ABS_GLIB_RUNTIME_LIBDIR@/libgobject-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("object__finalize__end") 134{ 135 object = $arg1; 136 gtype = $arg2; 137 type = gobject_type_names_2_0_@LT_CURRENT@_@LT_REVISION@[pid(),$arg2]; 138 probestr = sprintf("gobject.object_finalize_end(%p[%s])", object, type); 139} 140 141/** 142 * probe gobject.signal_new - Called when a new signal is registered for a #GObject 143 * @gsignal: Integer value for this signal 144 * @name: String name for this signal 145 * @gtype: #GType for the type which will gain the new signal 146 * @type: String name of the type which will gain the new signal 147 */ 148probe gobject.signal_new = process("@ABS_GLIB_RUNTIME_LIBDIR@/libgobject-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("signal__new") 149{ 150 gsignal = $arg1; 151 name = user_string($arg2); 152 gtype = $arg3; 153 type = gobject_type_names_2_0_@LT_CURRENT@_@LT_REVISION@[pid(),$arg3]; 154 probestr = sprintf("gobject.signal_new(%s, %s) -> %d", name, type, gsignal); 155} 156 157/** 158 * probe gobject.signal_emit - Called when a signal emission for a #GObject is started 159 * @gsignal: Integer value for this signal 160 * @detail: String containing signal "detail" 161 * @signal: String name of the signal 162 * @object: Raw pointer for object emitting signal 163 * @gtype: #GType for the type emitting the signal 164 * @type: String name of the type emitting the signal 165 */ 166probe gobject.signal_emit = process("@ABS_GLIB_RUNTIME_LIBDIR@/libgobject-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("signal__emit") 167{ 168 gsignal = $arg1; 169 detail = $arg2; 170 signal = gobject_signal_names_2_0_@LT_CURRENT@_@LT_REVISION@[pid(),$arg1]; 171 if (detail != 0) 172 signal = signal . "::" . gquarks[pid(), detail] 173 object = $arg3; 174 gtype = $arg4; 175 type = gobject_type_names_2_0_@LT_CURRENT@_@LT_REVISION@[pid(),$arg4]; 176 probestr = sprintf("gobject.signal_emit(%p[%s], %s)", object, type, signal); 177} 178 179/** 180 * probe gobject.signal_emit_end - Called when a signal emission for a #GObject is completed 181 * @gsignal: Integer value for this signal 182 * @detail: String containing signal "detail" 183 * @signal: String name of the signal 184 * @object: Raw pointer for object emitting signal 185 * @gtype: #GType for the type emitting the signal 186 * @type: String name of the type emitting the signal 187 */ 188probe gobject.signal_emit_end = process("@ABS_GLIB_RUNTIME_LIBDIR@/libgobject-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("signal__emit__end") 189{ 190 gsignal = $arg1; 191 detail = $arg2; 192 signal = gobject_signal_names_2_0_@LT_CURRENT@_@LT_REVISION@[pid(),$arg1]; 193 if (detail != 0) 194 signal = signal . "::" . gquarks[pid(), detail] 195 object = $arg3; 196 gtype = $arg4; 197 type = gobject_type_names_2_0_@LT_CURRENT@_@LT_REVISION@[pid(),$arg4]; 198 probestr = sprintf("gobject.signal_emit_end(%p[%s], %s)", object, type, signal); 199} 200