[Top][All Lists]

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

Re: [Discuss-gnuradio] Profiling Gnuradio message based blocks

From: Marcus Müller
Subject: Re: [Discuss-gnuradio] Profiling Gnuradio message based blocks
Date: Tue, 15 Aug 2017 16:27:05 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

Dear Jeff,

from the top of my head:

the perf counters count the time a block spends in its work(), how many items were consumed and produced in calls to work(), as well as things as buffer fillage and such.

Well, all these things don't apply to message passing, since there's no call to work or ring buffers involved.

So, you'd need to formulate exactly what you'd want to measure, and in your block's constructor add the RPC variable, and make sure your message handler function does the benchmarking.

In general, you should probably add these variables to gr::block's constructor and have a "start_perf_counters_msg_handling" or so method (similar to the start_perf_counters() method) that you call before entering the message handling code in tpb_thread_body.

But note: this code is very ugly. Personally, tpb_thread_body shouldn't be doing the message handling, that should've been incorporated in block_executor. Now that you try to add perf counters, that introduces additional complexity, but that's still manageable. But it's yet another "bolt-on" for the current scheduler that makes it less beautiful :/ . Gotta rewrite that stuff (someday).



On 08/15/2017 03:51 PM, Jeffrey Grasty wrote:

I am trying to profile some message based blocks with performance monitor.  The message blocks appear in the gr-perf-monitorx; however, they do not appear in runtime table.  This questions asks same thing: https://lists.gnu.org/archive/html/discuss-gnuradio/2017-01/msg00121.html

It looks like a fix for this was incorporated in (https://github.com/gnuradio/gnuradio/pull/1119). I am running 3.7.12.  Is there a configuration setting to enable profiling of message based blocks I am missing?



Discuss-gnuradio mailing list

reply via email to

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