From: Jian P. <ji...@br...> - 2011-04-19 23:22:25
|
Hi, Maynard, Here is the root cause # echo 0 > /dev/oprofile/backtrace_depth -sh: echo: write error: Invalid argument # # # cat /dev/oprofile/backtrace_depth 0 # # ls -lt /dev/oprofile/backtrace_depth -rw-r--r-- 1 root root 0 Jan 1 01:05 /dev/oprofile/backtrace_depth # mount | grep oprofile nodev on /dev/oprofile type oprofilefs (rw,relatime) I found a related post http://old.nabble.com/-usr-bin-opcontrol:-line-1016:-echo:-write-error:-Invalid-argument-td25897517.html, and will debug our oprofile driver. Since the default value is 0 already, does this failure really matter? Thanks, Jian -----Original Message----- From: Maynard Johnson [mailto:may...@us...] Sent: Tuesday, April 19, 2011 2:16 PM To: Jian Peng Cc: opr...@li... Subject: Re: failed to dump symbol info from opreport on MIPS Jian Peng wrote: > I am running Linux 2.6.31 and enabled Oprofile support in kernel image, and run simple testing as follow, > > # opcontrol --init > # > # opcontrol --vmlinux=/root/vmlinux-initrd-7468b0-opf > # > # opcontrol --separate=kernel > # > # opcontrol --event=CYCLES:5000 > # > # opcontrol --status > Daemon not running > Event 0: CYCLES:5000:0:1:1 > Separate options: library kernel > vmlinux file: /root/vmlinux-initrd-7468b0-opf > Image filter: none > Call-graph depth: 0 > # You should add 'opcontrol --reset' before starting to clear out old profile data. > # > # opcontrol --start > /bin/opcontrol: line 1081: echo: write error: Invalid argument This is bad-ness. This error implies that oprofile isn't working properly, and you need to do some debugging. What's on line 1081 of your opcontrol script? Do you see any nasty messages in dmesg? > Using 2.6+ OProfile kernel interface. > Reading module info. > Using log file /var/lib/oprofile/samples/oprofiled.log > Daemon started. > Profiler running. > # > # > # opcontrol --stop > Stopping profiling. > # > # > # opreport --symbols > Overflow stats not available > warning: /bin/bash could not be found. > warning: /bin/busybox could not be found. > warning: /bin/ophelp could not be found. > warning: /bin/oprofiled could not be found. > warning: /lib/ld-uClibc-0.9.29.so could not be found. > warning: /lib/libdl-0.9.29.so could not be found. > warning: /lib/libgcc_s.so.1 could not be found. > warning: /lib/libuClibc-0.9.29.so could not be found. > warning: /root/vmlinux-initrd-7468b0-opf could not be found. > CPU: Broadcom BMIPS3300, speed 405 MHz (estimated) > Counted CYCLES events (Processor cycles (PClock)) with a unit mask of 0x00 (No unit mask) count 5000 > samples % image name app name symbol name > 389217 62.4515 vmlinux-initrd-7468b0-opf vmlinux-initrd-7468b0-opf /root/vmlinux-initrd-7468b0-opf > 159935 25.6622 oprofiled oprofiled /bin/oprofiled > 18333 2.9416 bash bash /bin/bash > 16124 2.5872 vmlinux-initrd-7468b0-opf busybox /root/vmlinux-initrd-7468b0-opf > 12276 1.9697 vmlinux-initrd-7468b0-opf bash /root/vmlinux-initrd-7468b0-opf > 7200 1.1553 vmlinux-initrd-7468b0-opf oprofiled /root/vmlinux-initrd-7468b0-opf > 7139 1.1455 ld-uClibc-0.9.29.so busybox /lib/ld-uClibc-0.9.29.so > 4908 0.7875 libuClibc-0.9.29.so bash /lib/libuClibc-0.9.29.so > 2663 0.4273 vmlinux-initrd-7468b0-opf ophelp /root/vmlinux-initrd-7468b0-opf > 1319 0.2116 ld-uClibc-0.9.29.so ophelp /lib/ld-uClibc-0.9.29.so > 1282 0.2057 busybox busybox /bin/busybox > 1185 0.1901 libuClibc-0.9.29.so busybox /lib/libuClibc-0.9.29.so > 555 0.0891 ld-uClibc-0.9.29.so bash /lib/ld-uClibc-0.9.29.so > 462 0.0741 libuClibc-0.9.29.so oprofiled /lib/libuClibc-0.9.29.so > 369 0.0592 libuClibc-0.9.29.so ophelp /lib/libuClibc-0.9.29.so > 208 0.0334 ophelp ophelp /bin/ophelp > 40 0.0064 libgcc_s.so.1 bash /lib/libgcc_s.so.1 > 11 0.0018 libgcc_s.so.1 ophelp /lib/libgcc_s.so.1 > 5 8.0e-04 libdl-0.9.29.so bash /lib/libdl-0.9.29.so > > WHY there is warning while all files can be located??? > warning: /root/vmlinux-initrd-7468b0-opf could not be found. When the symbol name defaults to the pathname of the binary, it means the binary has no symbol information in it. I presume that 'objdump -t /bin/bash' tells you there's no symbol information, too. Try profiling a little test program -- something that will use up a lot of cpu cycles so you can profile it. Make sure to compile it with -g. Do you see symbol info for that? > > Is that the reason why no symbol info was dumped? > > How to fix it? > > Thanks, > Jian > > > > > > ------------------------------------------------------------------------------ > Benefiting from Server Virtualization: Beyond Initial Workload > Consolidation -- Increasing the use of server virtualization is a top > priority.Virtualization can reduce costs, simplify management, and improve > application availability and disaster protection. Learn more about boosting > the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev > > > > _______________________________________________ > oprofile-list mailing list > opr...@li... > https://lists.sourceforge.net/lists/listinfo/oprofile-list |