discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Performance monitoring within Gnuradio


From: Dave NotTelling
Subject: Re: [Discuss-gnuradio] Performance monitoring within Gnuradio
Date: Mon, 30 Oct 2017 10:57:25 -0400

There is also the Linux tool `perf`.  I use that instead of the GNU Radio tools due to library compatibility issues (also thrift is a pita to get working with GNU Radio in my experience).  An example is: `perf top -p <PID> --call-graph=fp` (use sudo if needed).  If you want to see everything you can use the PID of the flowgraph itself.  If you want to see individual modules then you'll need to use `top -H` or whatever htop flags are needed to see thread names.  From there you can get the PID of a specific block and use that PID in the call to `perf`.  You can get an idea of where your module is spending a lot of it's time.  Not sure if you need debugging symbols installed or not.  I just use the habit of always building debugging symbols while doing dev work.  An example of usage in the real world: https://jvns.ca/blog/2016/02/24/perf-top-my-new-best-friend/


On Mon, Oct 30, 2017 at 10:41 AM, Vipin Sharma <address@hidden> wrote:
Thanks for the tip!

I will try htop first and then rebuild if necessary. 

On Mon, Oct 30, 2017 at 5:29 AM Michael Dickens <address@hidden> wrote:
Hi Vipin - To get performance counters, you have to rebuild GNU Radio
and enable them specifically via the cmake command addition
"-DENABLE_PERFORMANCE_COUNTERS=ON". Make sure to review the output of
the cmake command to verify that they have been enabled, then once
you're satisfied do the usual build and install. You'll have to figure
out how to make use of PCs; I think TomR did a presentation on them,
once upon a time, that would be useful.

An alternative is to use "htop" and turn on thread names since GR
internally names all threads based on the block running in the thread.
"htop" won't give you the high level of detail of PCs, but it also
doesn't require you to install Thrift nor rebuild GR; it can be used
with your current GR install & will give you an idea of which blocks are
using the most CPU cycles.

Hope this helps! - MLD

On Sun, Oct 29, 2017, at 10:21 AM, Vipin Sharma wrote:
> I am trying to monitor performance for my custom blocks using GnuRadio's perf monitoring tools. After researching a bit, I found out that I need to install Apache Thrift.
>
> Do I need to re-build GnuRadio to leverage Thrift?
>
> If yes, what options should I give to build script so that it recognizes and builds with Thrift?
>
> I really just want to measure how much time the work function of my custom block is taking. This way of measuring performance sounds very invasive. May be I should just add code to the work function to measure CPU cycles?
>
> What is the simplest way to do this?

_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio



reply via email to

[Prev in Thread] Current Thread [Next in Thread]