diff options
author | Thibault Saunier <tsaunier@gnome.org> | 2016-11-30 15:10:48 -0300 |
---|---|---|
committer | Thibault Saunier <tsaunier@gnome.org> | 2016-12-12 15:06:20 -0300 |
commit | 33616d47becf743c038d10819e013bf0d0314804 (patch) | |
tree | 66c08dd2ed6359bf0834acf279a22925bfd5c30d /plugins | |
parent | 6b73bf38d1ee2869d94801d6cd601f83d05951de (diff) |
info: Add a 'flags' parametter to gst_debug_get_stack_trace
This is an API break but that API has not been released yet.
We are passing a flag rather than a simple boolean as we can imagine
to implement more features in the future for example to retrieve a
stack trace for all the threads, etc..
Retrieving source file and line numbers is pretty
expensive while getting a stack trace, this new argument
allows the user to decide to retrieve a backtrace
without those infos instead which is much faster.
For example running $ GST_LEAKS_TRACER_STACK_TRACE=1 GST_DEBUG=GST_TRACER:7 \
GST_TRACERS=leaks time gst-launch-1.0 videotestsrc num-buffers=1 ! fakesink:
* With simple stack traces:
0.04s user 0.02s system 99% cpu 0.060 total
* With full stack traces:
0.66s user 0.23s system 96% cpu 0.926 total
https://bugzilla.gnome.org/show_bug.cgi?id=775423
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/tracers/gstleaks.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/tracers/gstleaks.c b/plugins/tracers/gstleaks.c index e31031d96..abe7801f3 100644 --- a/plugins/tracers/gstleaks.c +++ b/plugins/tracers/gstleaks.c @@ -221,7 +221,7 @@ handle_object_created (GstLeaksTracer * self, gpointer object, GType type, GST_OBJECT_LOCK (self); if (self->log_stack_trace) { - trace = gst_debug_get_stack_trace (); + trace = gst_debug_get_stack_trace (GST_STACK_TRACE_SHOW_FULL); } g_hash_table_insert (self->objects, object, trace); @@ -264,7 +264,7 @@ gst_leaks_tracer_init (GstLeaksTracer * self) gchar *trace; /* Test if we can retrieve backtrace */ - trace = gst_debug_get_stack_trace (); + trace = gst_debug_get_stack_trace (GST_STACK_TRACE_SHOW_FULL); if (trace) { self->log_stack_trace = TRUE; g_free (trace); |