Profiling In-band SignalingWe are in the stage of profiling the code and are looking for users to help contribute profile results on different architectures. If you could contribute to an architecture, we would greatly appreciate it. You should be able to follow through the instructions sequentially, for which I'm going to provide Ubuntu specifics and general. We have profile statistics for the following architectures already:
Building VMLinuxRunning oprofile with full kernel profiling is required. To do this you must acquire an uncompressed version of your kernel, vmlinux. In Ubuntu, building VMLinux can be done as follows:sudo apt-get install linux-kernel-devel fakeroot build-essentialIf you are running a custom or self-built kernel, go to your kernel source tree and run the following command: make vmlinux Obtaining oprofileIn Ubuntu you can use apt-get or aptitude to retrieve oprofile. Installing glibc-dbg is also necessary to get full symbol statistics for libc.sudo apt-get install oprofile glibc-dbg To build oprofile manually, download it from the official oprofile site and follow the instructions. http://oprofile.sourceforge.net/download/ Before running the oprofile daemon, we must tell it where vmlinux is located. replace $VMLINUX_PATH with the path that vmlinux is located, such as /boot or /usr/src/linux/sudo opcontrol --setup --vmlinux=$VMLINUX_PATH/vmlinuxTest that oprofile will at least start with no errors: sudo opcontrol --startYou should receive output similar to this, which specifies that it is using the kernel interface: $ sudo opcontrol --start Obtaining the In-band codeTo get the most current copy of the profiling in-band code, use SVN:svn co http://gnuradio.org/svn/gnuradio/branches/developers/gnychis/inband-profilingTo build the code, perform the following series of commands. cd inband-profiling/Install the code: sudo make install If you encounter any errors building the code, please report your inband_log. Obtaining the new USRP in-band RBFSince the new in-band code uses new packet formats across the USB bus which the USRP needs to interpret, a new RBF must be used. You can obtain the RBF that will be used for profiling here: To install it, copy it to /usr/local/share/usrp/rev2/ In summary:wget http://www.andrew.cmu.edu/user/gnychis/usrp_inband_profiling.rbf Profiling the In-band CodeEnter the following directory within the inband-profiling branch which contains all of the applications which we will profile:cd inband-profiling/usrp/host/apps-inband/The following applications will be profiled:
$ time ./test_usrp_inband_rxSo let's get to the actual profiling! Start oprofile if you have not done so yet: sudo opcontrol --startBefore EVERY oprofile run, reset the statistics or else they will carry over to other runs, and go ahead and run an application. Please provide your time per application with the reports. As soon as the application finishes, immediately save the statistics and perform a dump to ensure everything was written to disk. You now have a snapshot at the time your application finished. You will need to choose a different save name per run. sudo opcontrol --resetFinally, let's retrieve the statistics. The applications you actually run in the top-most directory are scripts which run the true binaries in the .libs directory. opreport needs the true binary, which is prefixed with lt in the .libs directory. opreport -l session:test_usrp_inband_rx_1 .libs/lt-test_usrp_inband_rx &> oprofile-test_usrp_inband_rxAnd there you have it, if you look through oprofile-test_usrp_inband_rx you should see something similar to this: CPU: P4 / Xeon with 2 hyper-threads, speed 2993 MHz (estimated) Counted GLOBAL_POWER_EVENTS events (time during which processor is not stopped) with a unit mask of 0x01 (mandatory) count 240000 samples % image name app name symbol name 40224 14.0335 libm-2.5.so libm-2.5.so sincosf 15753 5.4960 libpmt.so libpmt.so pmt_nthcdr(unsigned int, boost::shared_ptr<pmt_base>) 12494 4.3589 lt-test_usrp_inband_tx lt-test_usrp_inband_tx ui_nco<float, float>::sincos(std::complex<float>*, int, double) 12088 4.2173 libc-2.5.so libc-2.5.so malloc 11798 4.1161 libc-2.5.so libc-2.5.so free ....... If you see _ under _symbol name for images such as libc, you did not install debug symbols for the library. libc should be the only issue, scroll back up to read about installing this, we require that these symbols be included. Submitting Your ResultsCreate a machine_specs file with information about your machine:uname -a >> machine_specsCreate a times file with information about the times of each application, such as: test_usrp_inband_rxtar and compress your output files like so, for an attachment (or zip them, whichever is easier for you): tar czvf inband_results.tar.gz machine_specs times oprofile-test_usrp_inband_tx oprofile-test_usrp_inband_rx oprofile-test_usrp_inband_underrun Send an e-mail to George: gnychis at cmu dot edu, with inband_results.tar.gz as an attachment. We greatly appreciate any help with the profiling, and once we collect enough profile results we will host them and there will be discussion on the board if you'd like to participate. Thank you for your time! 注: Profiling In-band Signaling(原文出处,翻译整理仅供参考!) |