From 70d2a676af2bc51ed7b828dfd762b506bb82083b Mon Sep 17 00:00:00 2001 From: Stefan Sauer Date: Mon, 19 Oct 2015 21:39:19 +0200 Subject: [PATCH] tracer: rename the envvar to GST_TRACER_PLUGINS The subsystem reused the GST_TRACE var that is allready in use by the alloc tracer. Fixes #756760 --- docs/design/draft-tracing.txt | 14 +++++++------- docs/plugins/gstreamer-plugins-docs.sgml | 6 +++--- gst/gsttracerutils.c | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/design/draft-tracing.txt b/docs/design/draft-tracing.txt index 3a6f692..98f75e6 100644 --- a/docs/design/draft-tracing.txt +++ b/docs/design/draft-tracing.txt @@ -36,8 +36,8 @@ condition to check if active. Certain GStreamer core function (such as gst_pad_push or gst_element_add_pad) will call into the tracer subsystem to dispatch into active tracing modules. Developers will be able to select a list of plugins by setting an environment -variable, such as GST_TRACE="meminfo;dbus". One can also pass parameters to -plugins: GST_TRACE="log(events,buffers);stats(all)". +variable, such as GST_TRACER_PLUGINS="meminfo;dbus". One can also pass parameters to +plugins: GST_TRACER_PLUGINS="log(events,buffers);stats(all)". When then plugins are loaded, we'll add them to certain hooks according to which they are interested in. @@ -83,7 +83,7 @@ In addition to api hooks we should also provide timer hooks. Interval timers are useful to get e.g. resource usage snapshots. Also absolute timers might make sense. All this could be implemented with a clock thread. We can use another env-var GST_TRACE_TIMERS="100ms,75ms" to configure timers and then pass them to -the tracers like, GST_TRACE="rusage(timer=100ms);meminfo(timer=75ms)". Maybe +the tracers like, GST_TRACER_PLUGINS="rusage(timer=100ms);meminfo(timer=75ms)". Maybe we can create them ad-hoc and avoid the GST_TRACE_TIMERS var. Hooks (* already implemented) @@ -332,19 +332,19 @@ Problems / Open items Try it ====== -GST_DEBUG="GST_TRACER:7,GST_BUFFER*:7,GST_EVENT:7,GST_MESSAGE:7" GST_TRACE=log gst-launch-1.0 fakesrc num-buffers=10 ! fakesink +GST_DEBUG="GST_TRACER:7,GST_BUFFER*:7,GST_EVENT:7,GST_MESSAGE:7" GST_TRACER_PLUGINS=log gst-launch-1.0 fakesrc num-buffers=10 ! fakesink - traces for buffer flow in TRACE level -GST_DEBUG="GST_TRACER:7" GST_TRACE="stats;rusage" GST_DEBUG_FILE=trace.log gst-launch-1.0 fakesrc num-buffers=10 sizetype=fixed ! queue ! fakesink +GST_DEBUG="GST_TRACER:7" GST_TRACER_PLUGINS="stats;rusage" GST_DEBUG_FILE=trace.log gst-launch-1.0 fakesrc num-buffers=10 sizetype=fixed ! queue ! fakesink gst-stats-1.0 trace.log - print some pipeline stats on exit -GST_DEBUG="GST_TRACER:7" GST_TRACE="stats;rusage" GST_DEBUG_FILE=trace.log /usr/bin/gst-play-1.0 --interactive $HOME/Videos/movie.mp4 +GST_DEBUG="GST_TRACER:7" GST_TRACER_PLUGINS="stats;rusage" GST_DEBUG_FILE=trace.log /usr/bin/gst-play-1.0 --interactive $HOME/Videos/movie.mp4 ./scripts/gst-plot-traces.sh --format=png | gnuplot eog trace.log.*.png - get ts, average-cpuload, current-cpuload, time and plot -GST_DEBUG="GST_TRACER:7" GST_TRACE=latency gst-launch-1.0 audiotestsrc num-buffers=10 ! audioconvert ! volume volume=0.7 ! autoaudiosink +GST_DEBUG="GST_TRACER:7" GST_TRACER_PLUGINS=latency gst-launch-1.0 audiotestsrc num-buffers=10 ! audioconvert ! volume volume=0.7 ! autoaudiosink - print processing latencies Performance diff --git a/docs/plugins/gstreamer-plugins-docs.sgml b/docs/plugins/gstreamer-plugins-docs.sgml index c97ddc4..89edb0c 100644 --- a/docs/plugins/gstreamer-plugins-docs.sgml +++ b/docs/plugins/gstreamer-plugins-docs.sgml @@ -20,19 +20,19 @@ - + - + - + diff --git a/gst/gsttracerutils.c b/gst/gsttracerutils.c index e7afa49..a5a82df 100644 --- a/gst/gsttracerutils.c +++ b/gst/gsttracerutils.c @@ -65,7 +65,7 @@ GHashTable *_priv_tracers = NULL; void _priv_gst_tracing_init (void) { - const gchar *env = g_getenv ("GST_TRACE"); + const gchar *env = g_getenv ("GST_TRACER_PLUGINS"); if (env != NULL && *env != '\0') { GstRegistry *registry = gst_registry_get (); -- 2.7.4