Next: GstTypeFindFactory, Previous: GstTask, Up: Top
Tracing functionality
Traces allows to track object allocation. They provide a instance counter per
<g-type>
. The counter is incremented for each object allocated and
decremented it when it's freed.
// trace un-freed object instances gst_alloc_trace_set_flags_all (GST_ALLOC_TRACE_LIVE); if (!gst_alloc_trace_available ()) { g_warning ("Trace not available (recompile with trace enabled)."); } gst_alloc_trace_print_live (); // do something here gst_alloc_trace_print_live ();
Last reviewed on 2005-11-21 (0.9.5)
mchars
) (size int
) (ret <gst-trace*>
)Create a ringbuffer of size in the file with filename to store trace results in.
- filename
- a filename
- size
- the max size of the file
- ret
- a new
<gst-trace>
.
<gst-trace*>
)Flush an close the previously allocated trace.
- trace
- the
<gst-trace>
to destroy
<gst-trace*>
)Flush any pending trace entries in trace to the trace file. trace can be NULL in which case the default
<gst-trace>
will be flushed.
- trace
- the
<gst-trace>
to flush.
<gst-trace*>
)Flush any pending trace entries in trace to the trace file, formatted as a text line with timestamp and sequence numbers. trace can be NULL in which case the default
<gst-trace>
will be flushed.
- trace
- the
<gst-trace>
to flush.
<gst-trace*>
)Set the default
<gst-trace>
to trace.
- trace
- the
<gst-trace>
to set as the default.
int64
)Read a platform independent timer value that can be used in benchmarks.
- dst
- pointer to hold the result.
bool
)Check if alloc tracing was compiled into the core
- ret
- TRUE if the core was compiled with alloc tracing enabled.
glist-of
)Get a list of all registered alloc trace objects.
- ret
- a GList of GstAllocTrace objects.
int
)Get the total number of live registered alloc trace objects.
- ret
- the total number of live registered alloc trace objects.
<gst-alloc-trace-flags>
)Enable the specified options on all registered alloc trace objects.
- flags
- the options to enable
mchars
) (ret <gst-alloc-trace*>
)Get the named alloc trace object.
- name
- the name of the alloc trace object
- ret
- a GstAllocTrace with the given name or NULL when no alloc tracer was registered with that name.
<gst-alloc-trace*>
)Print the status of the given GstAllocTrace.
- trace
- the GstAllocTrace to print