mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
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.
This commit is contained in:
parent
dc9ca2e39c
commit
3e21ddf81f
5 changed files with 11 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue