This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

how can i print the GT_3trace function message (on dsp-side) on my stdout?

hi all
now i study the CE_INSTALL_DIR/.../video_copy (my dvsdk version is dvsdk_2_00_00_22),i want to print
the the follow function on my console

I read the web: <Codec Engine Profiling>  but also donot know how th set the environment command ?
 
i donot want set like is: CE_DEBUG=3 ./app.out    ---because it's some 'noise'
======================================
GT_3trace(curTrace, GT_2CLASS, "VIDENCCOPY_TI_process> "
               "memcpy (0x%x, 0x%x, %d)\n",
               outBufs->bufs[curBuf], inBufs->bufs[curBuf], minSamples);
 ==================================================   

thank you !!

  • Hello,

    Indeed CE_DEBUG=3 is noisy as it outputs everything. If you look at this wiki topic: http://wiki.davincidsp.com/index.php/CE_DEBUG you will see that you can control the amount of noise. CE_DEBUG=2 is often enough, but it depends on the type of message you are looking for whether or not it appears at this level.

    Regards, Niclas

     

  • thank you for  your reply

     I use the CE_DEBUG=2  with my execute file like is #CE_DEBUG=2 ./app.out

    but the console also print some 'noise'

    I only want to print  the GT_3trace function's information (    DSP-side ) on my console

    donot print the other things like OM,OG  and so on,...

     

    thank you !!

  • Most users will just pipe the output through grep or some other filter to eliminate the noise.  But I'll describe another method, if filtering the noisy trace output doesn't work for you.

    You can use a combination of "CE_DEBUG" and "CE_DSP0TRACE" to set and acquire trace strings on a remote processor.

    If you set CE_DEBUG=1, you'll get minimal tracing (only warnings and errors) - but you'll enable the CE_DEBUG feature that pulls DSP-side trace off the remote processor.

    If you additionally set CE_DSP0TRACE="<your trace mask>", you can set the trace mask of the remote processor (DSP0).  You just need to know what <your trace mask> should be.  In your codec, the first argument to GT_Xtrace() is a trace object that was initialized with a call to GT_create().  The system-wide-unique string that was provided to GT_create() is your "module" string.  For this example, let's assume it's "videocopy".

    In general, trace mask assignment is done with <module>=<levels> assignments.  The wildcard character '*' can be used on the left side to indicate 'all modules'.  The right side is the levels to enable - there are 8 levels, 0-7.  For example, to enable trace levels 3, 4 and 5, for module "foobar", you can set <your trace mask> to "foobar=345".  To turn all trace _off_ for all modules, you can set <your trace mask> to "*=".  And finally, you can issue multiple commands by seperating them by a semicolon ';'.  For example to turn off all trace except 'foobar' level 3, 4, and 5, you can set <your trace mask> to "*=;foobar=345".

    Back to your concrete example, if your module name is "videocopy", the following should disable all DSP-side trace except your module's trace:

    CE_DEBUG=1 CE_DSP0TRACE="*=;videocopy=01234567" ./app.out

    As you can see, it's possible, but complex... and is why we often just recommend using grep to filter out the noise.

    Chris

  • thank you Chris!!

    I know how to do !!

    thank you  !!

    thank you !!