n_bytes = $arg2;
probestr = sprintf("glib.slice_free(n_bytes=%d) -> %p", n_bytes, mem);
}
+
+/**
+ * * probe glib.main_before_dispatch - Called before dispatching a GSource
+ * * @source: name of the source
+ * * @callback: address of the callback
+ * */
+probe glib.main_before_dispatch = process("@ABS_GLIB_RUNTIME_LIBDIR@/libglib-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("main__before_dispatch")
+{
+ source = user_string2($arg1, "unnamed");
+ probestr = sprintf("glib.main_before_dispatch(source=%s)", source);
+}
+
+/**
+ * * probe glib.main_after_dispatch - Called after dispatching a GSource
+ * * @source: name of the source
+ * * @callback: address of the callback
+ * */
+probe glib.main_after_dispatch = process("@ABS_GLIB_RUNTIME_LIBDIR@/libglib-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("main__after_dispatch")
+{
+ source = user_string2($arg1, "unnamed");
+ probestr = sprintf("glib.main_after_dispatch(source=%s)", source);
+}
probe slice__alloc(void*, unsigned int);
probe slice__free(void*, unsigned int);
probe quark__new(char *, unsigned int);
+ probe main__before_dispatch (char *);
+ probe main__after_dispatch (char *);
+ probe main__source_attach(char*);
+ probe main__source_destroy(char*);
};
#include <windows.h>
#endif /* G_OS_WIN32 */
+#include "glib_trace.h"
+
#include "gmain.h"
#include "garray.h"
g_return_val_if_fail (source->context == NULL, 0);
g_return_val_if_fail (!SOURCE_DESTROYED (source), 0);
+ TRACE (GLIB_MAIN_SOURCE_ATTACH (g_source_get_name (source)));
+
if (!context)
context = g_main_context_default ();
GMainContext *context,
gboolean have_lock)
{
+ TRACE (GLIB_MAIN_SOURCE_DESTROY (g_source_get_name (source)));
+
if (!have_lock)
LOCK_CONTEXT (context);
current->source = source;
current->depth++;
+ TRACE( GLIB_MAIN_BEFORE_DISPATCH (g_source_get_name (source)));
need_destroy = !(* dispatch) (source, callback, user_data);
+ TRACE( GLIB_MAIN_AFTER_DISPATCH (g_source_get_name (source)));
current->source = prev_source;
current->depth--;