summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kost <ensonic@users.sf.net>2009-06-29 11:24:04 +0300
committerStefan Kost <ensonic@users.sf.net>2009-06-29 11:28:01 +0300
commit3e21ddf81fccbe79509ef24dd756a9036d7748d1 (patch)
tree5d77e653f43c20b57a939b65c5ca1f077e41819c
parentdc9ca2e39cf9961aa69dee1e0619ec071f6b5d70 (diff)
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.
-rw-r--r--gst/gst_private.h6
-rw-r--r--gst/gstinfo.c3
-rw-r--r--gst/gstminiobject.c1
-rw-r--r--libs/gst/base/gstadapter.c3
-rw-r--r--win32/common/libgstreamer.def1
5 files changed, 11 insertions, 3 deletions
diff --git a/gst/gst_private.h b/gst/gst_private.h
index 0c5bddfae..9fcff2fb0 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 b9f6cd0ac..e5f8243b9 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 2386dba05..a2199592a 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 4c69e4d75..3c44e8ec2 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 <gst/gst_private.h>
#include "gstadapter.h"
#include <string.h>
@@ -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 070c64fd5..c737da946 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