gst-tracelib usage

Stefan Kost ensonic at hora-obscura.de
Tue May 17 05:50:29 PDT 2011


Am 12.05.2011 17:29, schrieb mingqian Han:
> Many thanks Stefan!
> 
> Another question:
> When I use LD_PRELOAD=/usr/lib/libgsttracelib.so gst-launch ...... on TI Dm365,
> I find the performance shown by gst-tracelib not quite correct.
> For example, when I test element v4l2src src pad push data interval, it shows
> around 50ms for PAL inputs, which breaks real-time. But I have tested it with
> the same pipeline before, by adding some g_print when pushing data downstream,
> and it showed 40ms interval at that time.
> So will gst-tracelib affect performance?
> In my mind,  gst-tracelib is used for profiling and should not have this
> phenomenon. 
> So I think maybe it is my problem not correctly using it?

You can e.g. use GSTTL_NO_STATS=1 to tell tracelib to not gather statistics. On
arm that might be sensible. You can also use GSTTL_{SHOW,HIDE} to customize the
log details (e.g. GSTTL_HIDE="caps;chk;mallinfo;rusage;topo" or
GSTTL_SHOW="ev;msg;pad;qry" ). Check the README for more info.

Stefan

> 
>> To: gstreamer-devel at lists.freedesktop.org
>> Subject: Re: gst-tracelib usage
>>
>> On 12.05.2011 03:52, mingqian Han wrote:
>> > Thanks Stefan,
>> >
>> > You are right, I resolved the problem after I upgraded to python 2.7.
>> Cool!
>> >
>> &g t; Besides, could you please tell me more about the statistics, such as:
>>
>> > buffers 360 (ro 0,pre 0,dis 110,gap 0,dlt 0),
>> This is 360 buffers send, the next details are the flags on the buffers,
>> read-only, preroll, discont, gap, delta-unit
>>
>> Stefan
>> > I do not quite understand things like ro, pre, dis, gap, dlt.
>> >
>> > Thanks again!
>> >
>> > Rafael
>> >
>> > > Date: Wed, 11 May 2011 17:14:55 +0300
>> > > From: ensonic at hora-obscura.de
>> > > To: gstreamer-devel at lists.freedesktop.org
>> > > Subject: Re: gst-tracelib usage
>> > >
>> > > On 11.05.2011 06:31, mingqian Han wrote:
>> > > > Hi all,
>> > > > I am now trying to use gst-tracelib to profile gstreamer performance
>> > > > on TI Dm365.
>> > > > After several trials, it works.
>> > > > B ut I meet a problem with the log.
>> > > > When I use ./gsttl_splitlog.py gsttl.log, it fails, saying :
>> > > > AttributeError: 'str' object has no attribute 'partition'
>> > > < br>> Your python seems a bit dated. This was added in python 2.5.
>> > > http://docs.python.org/library/stdtypes.html#str.partition
>> > >
>> > > Copy the log from the device to your laptop and run gsttl_splitlog.py
>> > > and other post-processing there. Its anyway a good idea to run only the
>> > > capture on the device.
>> > >
>> > > Stefan
>> > >
>> > > >
>> > > > my log file looks like:
>> > > > get_caps 0:00:01.542899375 1.542899 0 v4l2source_src
>> > > > mallinfo 0:00:01.542899375 1.542899 3796992 1261568 3765720 31272
>> > > > mallinfo 0:00:01.612360084 1.612360 3932160 1261568 3776576 15 5584
>> > > > get_caps 0:00:01.613437375 1.613437 1 videoinputfilter_sink
>> > > > mallinfo 0:00:01.613437375 1.613437 3911680 1261568 3776840 134840
>> > > > mallinfo 0:00:01.616136167 1.616136 3911680 1261568 3776904 134776
>> > > > msg_structure-change 0:00:01.618435834 1.618436 0 v4l2source
>> > > > mallinfo 0:00:01.618435834 1.618436 3911680 1261568 3766176 145504
>> > > > mallinfo 0:00:01.620666834 1. 620667 3911680 1261568 3766200 145480
>> > > > msg_structure-change 0:00:01.683715542 1.683716 0 v4l2source
>> > > > mallinfo 0:00:01.683715542 1.683716 3911680 1261568 3766464 145216
>> > > > mallinfo 0:00:01.686293168 1.686293 3911680 1261568 3765912 145768
>> > > > get_caps 0:00:01.687726668 1.687727 2 videoinputfilter_src
>> > > > mallinfo 0:00:01.687726668 1.687727 3911680 1261568 3766120 145560
>> > > &g t; mallinfo 0:00:01.764980293 1.764980 3911680 1261568 3766504 145176
>> > > > get_caps 0:00:01.766166709 1.766167 3 videoaccel_sink
>> > > > mallinfo 0:00:01.766166709 1.766167 3911680 1261568 3766744 144936
>> > > > mallinfo 0:00:01.767746834 1.767747 3911680 1261568 3766808 144872
>> > > > msg_structure-change 0:00:01.768862959 1.768863 2 videoinputfilter
>> > > > mallinfo 0:00:01.768862959 1.768863 3911680 1261568 3766552 145128
>> > > > ma llinfo 0:00:01.770855251 1.770855 3911680 1261568 3766568 145112
>> > > > msg_structure-change 0:00:01.847549875 1.847550 2 videoinputfilter
>> > > > mallinfo 0:00:01.847549875 1.847550 3911680 1261568 3766832 14 4848
>> > > > mallinfo 0:00:01.849411209 1.849411 3911680 1261568 3766288 145392
>> > > > get_caps 0:00:01.850398709 1.850399 4 videoaccel_src
>> > > >
>> > > > ;
>> > > > Besides, I need help on interpreting the statistics.
>> > > > For example,
>> > > > Pad Statistics:
>> > > > > tivideorate0_src : buffers 360 (ro 0,pre 0,dis 110,gap 0,dlt 0),
>> > > > size (min/avg/max) ......./ 829440/......., time 0:00:42.713248790,
>> > > > bytes/sec 6990767.699925
>> > > > < videoinputqueue_sink : buffers 0 (ro 0,pre 0,dis 0,gap 0,dlt 0),
>> > > > size (min/avg/max) 4294967295/ 0/ 0, time 0:00:00.000000000,
>> > bytes/sec nan
>> > > > < appsink_sink : buffers 0 (ro 0,pre 0,dis 0,gap 0,dlt 0), size
>> > > > (min /avg/max) 4294967295/ 0/ 0, time 0:00:00.000000000, bytes/sec nan
>> > > > > videoinputfilter_src : buffers 1110 (ro 1110,pre 0,dis 370,gap 0,dlt
>> > > > 0), size (min/avg/max) ......./ 829440/......., time
>> > > > 0:00:44.444906708, b ytes/sec 20715048.544230
>> > > > > ticlockoverlay_src : buffers 361 (ro 0,pre 0,dis 110,gap &nbs p;
>> > > > 0,dlt 0), size (min/avg/max) ......./ 829440/......., time
>> > > > 0:00:43.162948999, bytes/sec 6937149.730129
>> > > > > titextoverlay_src : buffers 361 (ro 0,pre 0,dis 110,gap 0,dlt 0),
>> > > > size (min/avg/max) ......./ 829440/......., time 0:00:43.104183585,
>> > > > bytes/sec 6946607.384630
>> > > > > videotee_src2 : buffers 361 (ro 0,pre 0,dis 110,gap 0,dlt 0), size
>> > > > (min/avg/max) ......./ 829440/......., time 0:00:43.068566417,
>> > > > bytes/sec 6952352.142416
>> > > >
>> > > > Element Statistics:
>> > > > GstQueue:osdqueue ; : buffers in/ou t 362/ 361 bytes in/out 300257280/
>> > > > 299427840 first activity 0:00:06.126533002, ev/msg/qry sent 6/ 7/ 0
> &g t; > > > GstTextOverlay:titextoverlay : buffers in/out 361/ 361 bytes in/out
>> > > > 299427840/ 299427840 first activity 0:00:07.294452794, ev/msg/qry sent
>> > > > 6/ 5/ 0
>> > > > GstTee:videotee : buffers in/out 361/ ; 1081 bytes in/out 299427840/
>> > > > 896624640 first activity 0:00:07.366531001, ev/msg/qry sent 6/ 9/ 0
>> > > > GstGhostPad:sink : buffers in/out -/ 361 bytes in/out -/ 299427840
>> > > > first activity 0:00:07.416145126, ev/msg/qry sent 0/ 0/ 0
>> > > >
>> > > > What do these different columns mean?
>> > > >
>> > > > Thanks in advance.
>> > > >
>> > > > Rafael
>> > > >
>> > > >
>> > > > _______________________________________________
>> > > > gstreamer-devel mailing list
>> > > > gstreamer-devel at lists.freedesk top.org
>> > > > http://lists.freedesktop.org/mailman/l istinfo/gstreamer-devel
>> > >
>> > > _______________________________________________
>> > > gstreamer-devel mailing list
>> > > gstreamer-devel at lists.freedesktop.org
>> > > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>> >
>> >
>> > _______________________________________________
>> > gstreamer-devel mailing list
>> > gstreamer-devel at lists.freedesktop.org
>> > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> 
> 
> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



More information about the gstreamer-devel mailing list