diff --git a/docs/design/part-tracing.txt b/docs/design/part-tracing.txt index 2400a360a1..4c0b4d51c4 100644 --- a/docs/design/part-tracing.txt +++ b/docs/design/part-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_TRACER_PLUGINS="meminfo;dbus". One can also pass parameters to -plugins: GST_TRACER_PLUGINS="log(events,buffers);stats(all)". +variable, such as GST_TRACERS="meminfo;dbus". One can also pass parameters to +plugins: GST_TRACERS="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_TRACER_PLUGINS="rusage(timer=100ms);meminfo(timer=75ms)". Maybe +the tracers like, GST_TRACERS="rusage(timer=100ms);meminfo(timer=75ms)". Maybe we can create them ad-hoc and avoid the GST_TRACE_TIMERS var. Hooks (* already implemented) @@ -339,19 +339,19 @@ Problems / Open items Try it ====== -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 +GST_DEBUG="GST_TRACER:7,GST_BUFFER*:7,GST_EVENT:7,GST_MESSAGE:7" GST_TRACERS=log gst-launch-1.0 fakesrc num-buffers=10 ! fakesink - traces for buffer flow in TRACE level -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_DEBUG="GST_TRACER:7" GST_TRACERS="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_TRACER_PLUGINS="stats;rusage" GST_DEBUG_FILE=trace.log /usr/bin/gst-play-1.0 --interactive $HOME/Videos/movie.mp4 +GST_DEBUG="GST_TRACER:7" GST_TRACERS="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_TRACER_PLUGINS=latency gst-launch-1.0 audiotestsrc num-buffers=10 ! audioconvert ! volume volume=0.7 ! autoaudiosink +GST_DEBUG="GST_TRACER:7" GST_TRACERS=latency gst-launch-1.0 audiotestsrc num-buffers=10 ! audioconvert ! volume volume=0.7 ! autoaudiosink - print processing latencies Performance diff --git a/gst/gsttracerutils.c b/gst/gsttracerutils.c index 1b70d391bf..9e322edc70 100644 --- a/gst/gsttracerutils.c +++ b/gst/gsttracerutils.c @@ -66,7 +66,7 @@ GHashTable *_priv_tracers = NULL; void _priv_gst_tracing_init (void) { - const gchar *env = g_getenv ("GST_TRACER_PLUGINS"); + const gchar *env = g_getenv ("GST_TRACERS"); if (env != NULL && *env != '\0') { GstRegistry *registry = gst_registry_get (); diff --git a/tests/benchmarks/tracing.sh b/tests/benchmarks/tracing.sh index 47aad2e0af..dd29acbf8a 100755 --- a/tests/benchmarks/tracing.sh +++ b/tests/benchmarks/tracing.sh @@ -27,12 +27,12 @@ function test() { } echo "$tracer" -GST_DEBUG="GST_TRACER:7" GST_TRACER_PLUGINS="$tracer" test +GST_DEBUG="GST_TRACER:7" GST_TRACERS="$tracer" test GST_DEBUG= echo "no-log" -GST_TRACER_PLUGINS="$tracer" test -GST_TRACER_PLUGINS= +GST_TRACERS="$tracer" test +GST_TRACERS= echo "reference" test