Would you need to see the assembly code for that?
Would you mind tell me why?

As a starting point it was good for me to read out the GNU Radio documentation 
of Dawei Shen:
http://www.nd.edu/~jnl/sdr/docs/

Hoo Chang.


----- Original Message ----
From: Mikyung Han <[EMAIL PROTECTED]>
To: Eric Blossom <[EMAIL PROTECTED]>
Cc: discuss-gnuradio@gnu.org
Sent: Tuesday, June 24, 2008 12:53:07 AM
Subject: Re: [Discuss-gnuradio] oprofile callgraph question




On Mon, Jun 23, 2008 at 6:37 PM, Eric Blossom <[EMAIL PROTECTED]> wrote:

On Mon, Jun 23, 2008 at 05:42:16PM -0400, Mikyung Han wrote:
> BTW, any suggestion for finding out who caused calling the symbols such as
> __ieee754_atan2
> and __kernel_cosf, __kernel_sinf, __ieee754_rem_pio2f from libm-2.5.so?

What kind of a machine are you running on?

uname -a gives
2.6.18-53.1.19.el5 #1 SMP Tue Apr 22 03:01:10 EDT 2008 x86_64 x86_64 x86_64 
GNU/Linux
  


The first is of course the guts of atan2.  I'm surprised to see it.
I think the only place it could be getting called is by way of the
complex arg(z) function.   We're replace all the others with calls to 
gr_fast_atan2


Yeah, I think I used 3.1.1 for atsc example. 
 


[EMAIL PROTECTED] trunk]$ dgs . '\barg[ \t]*('
../gnuradio-core/src/lib/general/gr_remez.cc: *      Change: ColumnVector 
x=arg(i).vector_value();
../gnuradio-core/src/lib/general/gr_remez.cc: *      to: ColumnVector 
x(arg(i).vector_value());
../gnuradio-core/src/lib/general/gr_mpsk_receiver_cc.cc:  return 
-arg(sample*conj(d_constellation[d_current_const_point]));
../gnuradio-core/src/lib/general/gr_ofdm_frame_sink.cc:  float angle = 
arg(accum_error);
../gnuradio-core/src/lib/general/gr_complex_to_xxx.cc:    //    out[i] = 
std::arg (in[i]);
../gnuradio-core/src/lib/general/gr_quadrature_demod_cf.cc:    // out[i] = 
d_gain * arg (product);


The last 3 are from the guts of cosf and sinf.

What's your test case?


Besides, atsc example, I tried profiling benchmark_ofdm_rx/tx.py  

- profiling benchmark_ofdm_rx.py now gives 

samples  %        app name                 symbol name
226875   22.8492  libgnuradio-core.so.0.0.0 .fcomplex_dotprod_sse64_loop2
79310     7.9875  libgnuradio-core.so.0.0.0 .float_dotprod_sse64_loop2
61142     6.1578  libm-2.5.so              __ieee754_rem_pio2f
57980     5.8393  libm-2.5.so              __kernel_rem_pio2f
31631     3.1856  libgnuradio-core.so.0.0.0 
gr_fir_ccf_simd::filter(std::complex<float> const*)
30052     3.0266  libm-2.5.so              __kernel_sinf
26588     2.6778  libm-2.5.so              sincosf
25214     2.5394  libm-2.5.so              __kernel_cosf
23153     2.3318  libgnuradio-core.so.0.0.0 gr_fast_atan2f(float, float)
22000     2.2157  libgnuradio-core.so.0.0.0 
gr_single_threaded_scheduler::main_loop()
20853     2.1002  libgnuradio-core.so.0.0.0 .cleanup
13089     1.3182  libmozjs.so              (no symbols)
12536     1.2625  libgnuradio-core.so.0.0.0 
gr_ofdm_frame_acquisition::coarse_freq_comp(int, int)
12384     1.2472  libgnuradio-core.so.0.0.0 gr_fft_filter_ccc::work(int, 
std::vector<void const*, std::allocator<
void const*> >&, std::vector<void*, std::allocator<void*> >&)
12080     1.2166  libm-2.5.so              __ieee754_hypotf
11982     1.2067  libgnuradio-core.so.0.0.0 
gr_ofdm_frame_acquisition::general_work(int, std::vector<int, std::al
locator<int> >&, std::vector<void const*, std::allocator<void const*> >&, 
std::vector<void*, std::allocator<void*
> >&)
11453     1.1535  libgnuradio-core.so.0.0.0 
gr_fir_ccf_generic::filterN(std::complex<float>*, std::complex<float>
 const*, unsigned long)
10726     1.0802  libgnuradio-core.so.0.0.0 gr_multiply_cc::work(int, 
std::vector<void const*, std::allocator<voi
d const*> >&, std::vector<void*, std::allocator<void*> >&)
10250     1.0323  libgnuradio-core.so.0.0.0 gr_peak_detector_fb::work(int, 
std::vector<void const*, std::allocato
r<void const*> >&, std::vector<void*, std::allocator<void*> >&)
10135     1.0207  libfftw3f.so.3.1.2       t2fv_32

- for profiling benchmark_ofdm_tx.py gives: 

21303    10.8694  libpython2.4.so.1.0      (no symbols)
18889     9.6377  vmlinux-2.6.18-53.1.19.el5 mwait_idle
8283      4.2262  libgnuradio-core.so.0.0.0 
gr_single_threaded_scheduler::main_loop()
6579      3.3568  libgnuradio-core.so.0.0.0 gr_multiply_const_cc::work(int, 
std::vector<void const*, std::allocator<void const*> >
&, std::vector<void*, std::allocator<void*> >&)
6266      3.1971  vmlinux-2.6.18-53.1.19.el5 apic_timer_interrupt
5521      2.8170  ehci_hcd                 (no symbols)
5106      2.6052  libc-2.5.so              memcpy
5011      2.5568  libc-2.5.so              strcmp
4356      2.2226  libfftw3f.so.3.1.2       t2bv_64
3691      1.8833  libcrypto.so.0.9.8b      (no symbols)
3471      1.7710  libgnuradio-core.so.0.0.0 gr_ofdm_mapper_bcv::work(int, 
std::vector<void const*, std::allocator<void const*> >&,
 std::vector<void*, std::allocator<void*> >&)
2769      1.4128  vmlinux-2.6.18-53.1.19.el5 schedule
2675      1.3649  oprofiled                (no symbols)
2534      1.2929  _usrp1.so                
usrp1_sink_c::copy_to_usrp_buffer(std::vector<void const*, std::allocator<void 
const*> 
>&, int, int, int&, void*, int, int&)
2403      1.2261  libX11.so.6.2.0          (no symbols)
2212      1.1286  libgnuradio-core.so.0.0.0 gr_ofdm_cyclic_prefixer::work(int, 
std::vector<void const*, std::allocator<void const*
> >&, std::vector<void*, std::allocator<void*> >&)
1978      1.0092  libgnuradio-core.so.0.0.0 gr_block_detail::input(unsigned int)



> Also .cleanup?

..cleanup is a just a label toward the bottom of the SIMD code.
It's unlikely you're getting any serious amount of hits there, it's
not in a loop.


Eric


I guess I need to study the mapping from python code to c files and assembly 
codes. 
What would you suggest doing, reading, etc in order to figure out this mapping 
and skeleton of ofdm example? 
My eventual goal is to firgure out which piece of code is taking most of the 
resources for ofdm.


Thanks!

Mikie 


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

Reply via email to