# Profile data

**URL:** <https://www.ruby-forum.com/t/profile-data/215422>\
**Category:** GNU Radio\
**Created:** [January 4, 2012, 1:42am UTC](https://www.ruby-forum.com/t/profile-data/215422 "2012-01-04T01:42:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [January 4, 2012, 1:42am UTC](https://www.ruby-forum.com/t/profile-data/215422/1 "2012-01-04T01:42:36Z")

</div>

Decided this evening to grab some quick profile data for a uhd\_fft.py,  
running at 50Msps from a USRP2.

The kernel was occupied 41% of the time–no great surprise. Handling  
interrupts, doing the network stack “stuff”.

The next largest chunk was libc (memcpy\_sse) 12.5%  
Then uhd (convert\_sc8\_item32\_1\_to\_fcxx\_1) 11.4%  
Then libpython  
9.8%  
Then libgnuradio-core 7.5%

So, the big surprise there was that libpython was so high on the list,  
since Python isn’t used in copying data within the flow-graph. I didn’t  
get any symbol information for libpython, so I wonder what it is  
doing all that time?

–  
Marcus L.  
Principal Investigator  
Shirleys Bay Radio Astronomy Consortium

> **[Live Draw HK Tercepat | Result HK | HK Pools | Live HK | HK Prize Hari Ini](https://www.sbrac.org/)**
>
> Temukan live draw hk tercepat melalui halaman hk pools yang resmi dan dapatkan result hk prize melalui live hk secara langsung di situs kami.

---

<div class="post-metadata">

**Author:** ![Marcus\_DSLeech](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/74df32/32.png) [@Marcus\_DSLeech](https://www.ruby-forum.com/u/Marcus_DSLeech)\
**Post date:** [January 4, 2012, 1:59am UTC](https://www.ruby-forum.com/t/profile-data/215422/2 "2012-01-04T01:59:14Z")

</div>

On Tue, Jan 3, 2012 at 7:41 PM, Marcus D. Leech [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Then libgnuradio-core 7.5%  
> Shirleys Bay Radio Astronomy Consortium  
> [http://www.sbrac.org](http://www.sbrac.org)

The uhd\_fft.py uses the wxPython GUI interface, which does most of its  
work  
in Python. Can you separate the symbols to see more specifically where  
the  
processing is happening?

Tom

---

<div class="post-metadata">

**Author:** ![Marcus\_DSLeech](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/74df32/32.png) [@Marcus\_DSLeech](https://www.ruby-forum.com/u/Marcus_DSLeech)\
**Post date:** [January 4, 2012, 2:02am UTC](https://www.ruby-forum.com/t/profile-data/215422/3 "2012-01-04T02:02:56Z")

</div>

> The uhd\_fft.py uses the wxPython GUI interface, which does most of its  
> work in Python. Can you separate the symbols to see more specifically  
> where the processing is happening?
> 
> Tom

I asked for symbols when I did the opreport, but for libpython, it  
didn’t produce a by-symbol breakdown, which seemed a bit odd. Any magic  
I need to do in opreport to make that happen?

Wrt: wxPython–don’t forget that the FFT display is _heavily_ decimated  
in the typical case, arranging for the FFT to be called only as often  
as is required the maintain the desired display rate (a few Hz,  
typically). But maybe that’s enough?

–  
Marcus L.  
Principal Investigator  
Shirleys Bay Radio Astronomy Consortium

> **[Live Draw HK Tercepat | Result HK | HK Pools | Live HK | HK Prize Hari Ini](https://www.sbrac.org)**
>
> Temukan live draw hk tercepat melalui halaman hk pools yang resmi dan dapatkan result hk prize melalui live hk secara langsung di situs kami.

---

<div class="post-metadata">

**Author:** ![Marcus\_DSLeech](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/74df32/32.png) [@Marcus\_DSLeech](https://www.ruby-forum.com/u/Marcus_DSLeech)\
**Post date:** [January 4, 2012, 7:34am UTC](https://www.ruby-forum.com/t/profile-data/215422/4 "2012-01-04T07:34:54Z")

</div>

On Tue, Jan 3, 2012 at 17:02, Marcus D. Leech [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Wrt: wxPython–don’t forget that the FFT display is _heavily_ decimated in  
> the typical case, arranging for the FFT to be called only as often  
> as is required the maintain the desired display rate (a few Hz,  
> typically). But maybe that’s enough?

The wxPython FFT sink works by creating a FFT vectors, passing them (via  
a  
GR message queue) to a non-GR Python thread, which does some  
processing/preparation and posts events to the wxPython window system  
for  
plotting.

It would be useful to rewrite this as a straight C++ GNU Radio app using  
the QT widgets.

Johnathan

---

<div class="post-metadata">

**Author:** ![Marcus\_DSLeech](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/74df32/32.png) [@Marcus\_DSLeech](https://www.ruby-forum.com/u/Marcus_DSLeech)\
**Post date:** [January 4, 2012, 2:10am UTC](https://www.ruby-forum.com/t/profile-data/215422/5 "2012-01-04T02:10:19Z")

</div>

On Tue, Jan 3, 2012 at 8:02 PM, Marcus D. Leech [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> I need to do in opreport to make that happen?

Hm, probably have to build Python in debug mode to get the symbols out,  
otherwise -l should do it for you with oprofile.

> Wrt: wxPython–don’t forget that the FFT display is _heavily_ decimated in  
> the typical case, arranging for the FFT to be called only as often  
> as is required the maintain the desired display rate (a few Hz,  
> typically). But maybe that’s enough?

I would guess that it’s still enough. More than that, it’s the only  
thing  
that Python is really doing at that point. We could create a duplicate  
of  
uhd\_fft using the qtgui interface, instead (I actually have one in  
[GitHub - trondeau/gr\_apps: GNU Radio applications · GitHub](https://github.com/trondeau/gr_apps) called uhd\_rx\_qt.grc) to see what it  
says. Since the qt-gui is all done in C++ libraries, there should be a  
lot  
less Python in that one.

I’d do it myself, but I have too many other things to get done tonight.

Tom

–
