From: Stefan Kost Date: Mon, 29 Jun 2009 08:24:04 +0000 (+0300) Subject: logging: add a performace log category X-Git-Tag: RELEASE-0.10.24~56 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3e21ddf81fccbe79509ef24dd756a9036d7748d1;p=platform%2Fupstream%2Fgstreamer.git logging: add a performace log category This category can be used to log slow code path and help auditing the performance. Add FIXME-0.11 to some questionable categories. --- diff --git a/gst/gst_private.h b/gst/gst_private.h index 0c5bddf..9fcff2f 100644 --- a/gst/gst_private.h +++ b/gst/gst_private.h @@ -122,8 +122,8 @@ gboolean gst_registry_binary_write_cache (GstRegistry * registry, const char * #ifndef GST_REMOVE_GST_DEBUG GST_EXPORT GstDebugCategory *GST_CAT_GST_INIT; -GST_EXPORT GstDebugCategory *GST_CAT_AUTOPLUG; -GST_EXPORT GstDebugCategory *GST_CAT_AUTOPLUG_ATTEMPT; +GST_EXPORT GstDebugCategory *GST_CAT_AUTOPLUG; /* FIXME 0.11: remove? */ +GST_EXPORT GstDebugCategory *GST_CAT_AUTOPLUG_ATTEMPT; /* FIXME 0.11: remove? */ GST_EXPORT GstDebugCategory *GST_CAT_PARENTAGE; GST_EXPORT GstDebugCategory *GST_CAT_STATES; GST_EXPORT GstDebugCategory *GST_CAT_SCHEDULING; @@ -134,6 +134,7 @@ GST_EXPORT GstDebugCategory *GST_CAT_CAPS; GST_EXPORT GstDebugCategory *GST_CAT_CLOCK; GST_EXPORT GstDebugCategory *GST_CAT_ELEMENT_PADS; GST_EXPORT GstDebugCategory *GST_CAT_PADS; +GST_EXPORT GstDebugCategory *GST_CAT_PERFORMANCE; GST_EXPORT GstDebugCategory *GST_CAT_PIPELINE; GST_EXPORT GstDebugCategory *GST_CAT_PLUGIN_LOADING; GST_EXPORT GstDebugCategory *GST_CAT_PLUGIN_INFO; @@ -168,6 +169,7 @@ GST_EXPORT GstDebugCategory *GST_CAT_TYPES; /* FIXME 0.11: remove? */ #define GST_CAT_CLOCK NULL #define GST_CAT_ELEMENT_PADS NULL #define GST_CAT_PADS NULL +#define GST_CAT_PERFORMANCE NULL #define GST_CAT_PIPELINE NULL #define GST_CAT_PLUGIN_LOADING NULL #define GST_CAT_PLUGIN_INFO NULL diff --git a/gst/gstinfo.c b/gst/gstinfo.c index b9f6cd0..e5f8243 100644 --- a/gst/gstinfo.c +++ b/gst/gstinfo.c @@ -147,6 +147,7 @@ GstDebugCategory *GST_CAT_CAPS = NULL; GstDebugCategory *GST_CAT_CLOCK = NULL; GstDebugCategory *GST_CAT_ELEMENT_PADS = NULL; GstDebugCategory *GST_CAT_PADS = NULL; +GstDebugCategory *GST_CAT_PERFORMANCE = NULL; GstDebugCategory *GST_CAT_PIPELINE = NULL; GstDebugCategory *GST_CAT_PLUGIN_LOADING = NULL; GstDebugCategory *GST_CAT_PLUGIN_INFO = NULL; @@ -358,6 +359,8 @@ _gst_debug_init (void) GST_CAT_ELEMENT_PADS = _gst_debug_category_new ("GST_ELEMENT_PADS", GST_DEBUG_BOLD | GST_DEBUG_FG_WHITE | GST_DEBUG_BG_RED, NULL); GST_CAT_PADS = _gst_debug_category_new ("GST_PADS", + GST_DEBUG_BOLD | GST_DEBUG_FG_RED | GST_DEBUG_BG_RED, NULL); + GST_CAT_PERFORMANCE = _gst_debug_category_new ("GST_PERFORMANCE", GST_DEBUG_BOLD | GST_DEBUG_FG_WHITE | GST_DEBUG_BG_RED, NULL); GST_CAT_PIPELINE = _gst_debug_category_new ("GST_PIPELINE", GST_DEBUG_BOLD | GST_DEBUG_FG_WHITE | GST_DEBUG_BG_RED, NULL); diff --git a/gst/gstminiobject.c b/gst/gstminiobject.c index 2386dba..a219959 100644 --- a/gst/gstminiobject.c +++ b/gst/gstminiobject.c @@ -275,6 +275,7 @@ gst_mini_object_make_writable (GstMiniObject * mini_object) if (gst_mini_object_is_writable (mini_object)) { ret = (GstMiniObject *) mini_object; } else { + GST_CAT_DEBUG (GST_CAT_PERFORMANCE, "copy miniobject"); ret = gst_mini_object_copy (mini_object); gst_mini_object_unref ((GstMiniObject *) mini_object); } diff --git a/libs/gst/base/gstadapter.c b/libs/gst/base/gstadapter.c index 4c69e4d..3c44e8e 100644 --- a/libs/gst/base/gstadapter.c +++ b/libs/gst/base/gstadapter.c @@ -108,7 +108,7 @@ * Last reviewed on 2009-05-13 (0.10.24). */ - +#include #include "gstadapter.h" #include @@ -421,6 +421,7 @@ gst_adapter_peek (GstAdapter * adapter, guint size) } adapter->assembled_len = size; + GST_CAT_DEBUG (GST_CAT_PERFORMANCE, "copy data from adapter"); copy_into_unchecked (adapter, adapter->assembled_data, skip, size); return adapter->assembled_data; diff --git a/win32/common/libgstreamer.def b/win32/common/libgstreamer.def index 070c64f..c737da9 100644 --- a/win32/common/libgstreamer.def +++ b/win32/common/libgstreamer.def @@ -17,6 +17,7 @@ EXPORTS GST_CAT_PADS DATA GST_CAT_PARAMS DATA GST_CAT_PARENTAGE DATA + GST_CAT_PERFORMANCE DATA GST_CAT_PIPELINE DATA GST_CAT_PLUGIN_INFO DATA GST_CAT_PLUGIN_LOADING DATA