From: BruceSong <bru...@gm...> - 2010-06-24 14:53:09
|
Hi Maynard, Thanks for your quick reply. I search some information in this forum, and find that maybe I need recompile the oprofile using the latest binutils package, especially with libbfd.a. So I recompile again. Now it works. Thanks! Bruce Maynard Johnson wrote: > > BruceSong wrote: >> >> Hi, >> >> I am a new learner for oprofile. Those day, I use it to test my binary. >> But >> i meet some problems, here is the detailed steps: >> >> [brucehuang@rat013:~/Desktop/ToolAssessment/oprofile]$ uname -r >> 2.6.18-128.el5PAE >> >> [brucehuang@rat013:~/Desktop/ToolAssessment/oprofile]$ ls /dev/oprofile/ >> 0 1 backtrace_depth buffer buffer_size buffer_watershed >> cpu_buffer_size cpu_type dump enable pointer_size stats >> >> [brucehuang@rat013:~/Desktop/ToolAssessment/oprofile]$ more >> /dev/oprofile/cpu_type >> i386/core_2 >> >> [brucehuang@rat013:~/dev/workspace/CAPC2]$ ophelp -v >> ophelp: oprofile 0.9.6 compiled on Jun 22 2010 17:28:26 >> >> [brucehuang@rat013:~/Desktop/ToolAssessment/oprofile]$ sudo opcontrol >> --init >> >> [brucehuang@rat013:~/Desktop/ToolAssessment/oprofile]$ sudo opcontrol >> --start --verbose >> Parameters used: >> SESSION_DIR /var/lib/oprofile >> LOCK_FILE /var/lib/oprofile/lock >> SAMPLES_DIR /var/lib/oprofile/samples >> CURRENT_SAMPLES_DIR /var/lib/oprofile/samples/current >> CPUTYPE i386/core_2 >> BUF_SIZE default value >> BUF_WATERSHED default value >> CPU_BUF_SIZE default value >> SEPARATE_LIB 1 >> SEPARATE_KERNEL 0 >> SEPARATE_THREAD 0 >> SEPARATE_CPU 0 >> CALLGRAPH 4 >> VMLINUX none >> KERNEL_RANGE >> XENIMAGE none >> XEN_RANGE >> executing oprofiled --session-dir=/var/lib/oprofile --separate-lib=1 >> --separate-kernel=0 --separate-thread=0 --separate-cpu=0 >> --events=CPU_CLK_UNHALTED:60:0:100000:0:1:1, --no-vmlinux --verbose=all >> Events: CPU_CLK_UNHALTED:60:0:100000:0:1:1, >> Using 2.6+ OProfile kernel interface. >> Using log file /var/lib/oprofile/samples/oprofiled.log >> Daemon started. >> Profiler running. >> >> [brucehuang@rat013:~/Desktop/ToolAssessment/oprofile]$ ./a.out 1 >> This is a test >> arg[1]=1 >> ++1++ >> ++1++ >> >> [brucehuang@rat013:~/Desktop/ToolAssessment/oprofile]$ opreport|less >> CPU: Core 2, speed 2800 MHz (estimated) >> Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a >> unit >> mask of 0x00 (Unhalted core cycles) count 100000 >> CPU_CLK_UNHALT...| >> samples| %| >> ------------------ >> 4693115 49.3060 a.out >> CPU_CLK_UNHALT...| >> samples| %| >> ------------------ >> 4369967 93.1144 libc-2.5.so >> 322982 6.8820 a.out >> 77 0.0016 [vdso] (tgid:6181 range:0x9f7000-0x9f8000) >> 76 0.0016 [vdso] (tgid:7370 range:0xd90000-0xd91000) >> 12 2.6e-04 ld-2.5.so >> 1 2.1e-05 [vdso] (tgid:9493 range:0x8ad000-0x8ae000) >> ...... >> >> [brucehuang@rat013:~/Desktop/ToolAssessment/oprofile]$ opreport -lc >> /home/brucehuang/Desktop/ToolAssessment/oprofile/a.out|less >> warning: [vdso] (tgid:6181 range:0x9f7000-0x9f8000) could not be found. >> warning: [vdso] (tgid:7370 range:0xd90000-0xd91000) could not be found. >> warning: [vdso] (tgid:9493 range:0x8ad000-0x8ae000) could not be found. >> CPU: Core 2, speed 2800 MHz (estimated) >> Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a >> unit >> mask of 0x00 (Unhalted core cycles) count 100000 > > So your opreport output just ends here . . .-----^ ? Try running > 'opreport -l --verbose=all'. > > -Maynard > >> >> So it is clear that the last step appears error. Error happens when I use >> -l >> to lit per-symbol information instead of a binary image summary or use -c >> to >> show callgraph information. >> Would you please help me? Thanks very much in advance! >> >> Best regards, >> Bruce.Huang >> > > > ------------------------------------------------------------------------------ > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > _______________________________________________ > oprofile-list mailing list > opr...@li... > https://lists.sourceforge.net/lists/listinfo/oprofile-list > > -- View this message in context: http://old.nabble.com/Error-happens-when-using-command-%22opreport--lc%22-tp28969440p28983314.html Sent from the oprofile-list mailing list archive at Nabble.com. |