From: <Job...@ao...> - 2009-11-03 14:45:21
|
Now, in addition to this error, Eclipse # ./opreport -c Overflow stats not available ./opreport error: Invalid sample file, bad magic number: /var/lib/oprofile/samples/current/{root}/usr/bin/freescale_test/{dep}/{root}/usr/bin/freescal e_test/TIMER.0.0.all.all.all In /var/lib/oprofile/samples/oprofiled.log, I am seeing the following repeated. What could cause this? Opening "/var/lib/oprofile/samples//current/{root}//root/freescale_test/{dep}/{root}//root/freescale_test/TIMER.0.0.all.all.all" oprofiled: open of /var/lib/oprofile/samples//current/{root}//root/freescale_test/{dep}/{root}//root/freescale_test/TIMER.0.0.all.all.all failed: Invalid argument Sample 0x44c(0): /root/freescale_test(c7846700), app invalid(ffffffffffffffff) Opening "/var/lib/oprofile/samples//current/{root}//root/freescale_test/{dep}/{root}//root/freescale_test/TIMER.0.0.all.all.all" oprofiled: open of /var/lib/oprofile/samples//current/{root}//root/freescale_test/{dep}/{root}//root/freescale_test/TIMER.0.0.all.all.all failed: Invalid argument Sample 0x460(0): /root/freescale_test(c7846700), app invalid(ffffffffffffffff) Opening "/var/lib/oprofile/samples//current/{root}//root/freescale_test/{dep}/{root}//root/freescale_test/TIMER.0.0.all.all.all" oprofiled: open of /var/lib/oprofile/samples//current/{root}//root/freescale_test/{dep}/{root}//root/freescale_test/TIMER.0.0.all.all.all failed: Invalid argument Sample 0x44c(0): /root/freescale_test(c7846700), app invalid(ffffffffffffffff) Opening "/var/lib/oprofile/samples//current/{root}//root/freescale_test/{dep}/{root}//root/freescale_test/TIMER.0.0.all.all.all" oprofiled: open of /var/lib/oprofile/samples//current/{root}//root/freescale_test/{dep}/{root}//root/freescale_test/TIMER.0.0.all.all.all failed: Invalid argument Sample 0x440(0): /root/freescale_test(c7846700), app invalid(ffffffffffffffff) In a message dated 11/2/2009 4:53:10 A.M. Pacific Standard Time, rob...@am... writes: On 31.10.09 14:02:23, job...@ao... wrote: > CPUTYPE timer There is a bug in oprofile 0.9.5 wrt timer mode. You may want to apply the changes below to your opcontrol script. There will be a bug fix release 0.9.6 available soon. -Robert commit 18352baa22cad98660dee481d05bf0e7d42d803c Author: maynardj <maynardj> Date: Mon Sep 14 20:18:38 2009 +0000 Fix timer mode regression diff --git a/ChangeLog b/ChangeLog index 9162deb..2538e7d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-09-14 Suravee Suthikulpanit <sur...@am...> + + * utils/opcontrol: Fix timer mode + 2009-09-08 Robert Richter <rob...@am...> * utils/opcontrol: fix deinit; kill daemon only if running to prevent diff --git a/utils/opcontrol b/utils/opcontrol index 0317ecd..c438eca 100644 --- a/utils/opcontrol +++ b/utils/opcontrol @@ -587,7 +587,7 @@ verify_counters() # setup any needed default value in chosen events normalise_events() { - if test "$NR_CHOSEN" -le 0; then + if test "$NR_CHOSEN" -le 0 || test "$IS_TIMER" = 1; then return fi @@ -1453,8 +1453,12 @@ do_start_daemon() --separate-thread=$SEPARATE_THREAD \ --separate-cpu=$SEPARATE_CPU" - if ! test -z "$OPROFILED_EVENTS"; then - OPD_ARGS="$OPD_ARGS --events=$OPROFILED_EVENTS" + if test "$IS_TIMER" = 1; then + OPD_ARGS="$OPD_ARGS --events=" + else + if ! test -z "$OPROFILED_EVENTS"; then + OPD_ARGS="$OPD_ARGS --events=$OPROFILED_EVENTS" + fi fi if test "$VMLINUX" = "none"; then -- Advanced Micro Devices, Inc. Operating System Research Center email: rob...@am... |
From: Maynard J. <may...@us...> - 2009-11-03 15:47:27
|
Job...@ao... wrote: > Now, in addition to this error, > > > > Eclipse # ./opreport -c > Overflow stats not available > ./opreport error: Invalid sample file, bad magic number: > /var/lib/oprofile/samples/current/{root}/usr/bin/freescale_test/{dep}/{root}/usr/bin/freescal > e_test/TIMER.0.0.all.all.all Make sure you clear out the old samples dir and re-run the profiler before trying to generate a report. To clear the samples dir, either do 'opcontrol --reset' or simply 'rm -rf /var/lib/oprofile/samples/current. -Maynard > > In /var/lib/oprofile/samples/oprofiled.log, I am seeing the following > repeated. What could cause this? > Opening > "/var/lib/oprofile/samples//current/{root}//root/freescale_test/{dep}/{root}//root/freescale_test/TIMER.0.0.all.all.all" > oprofiled: open of > /var/lib/oprofile/samples//current/{root}//root/freescale_test/{dep}/{root}//root/freescale_test/TIMER.0.0.all.all.all failed: > Invalid argument > Sample 0x44c(0): /root/freescale_test(c7846700), app > invalid(ffffffffffffffff) > Opening > "/var/lib/oprofile/samples//current/{root}//root/freescale_test/{dep}/{root}//root/freescale_test/TIMER.0.0.all.all.all" > oprofiled: open of > /var/lib/oprofile/samples//current/{root}//root/freescale_test/{dep}/{root}//root/freescale_test/TIMER.0.0.all.all.all failed: > Invalid argument > Sample 0x460(0): /root/freescale_test(c7846700), app > invalid(ffffffffffffffff) > Opening > "/var/lib/oprofile/samples//current/{root}//root/freescale_test/{dep}/{root}//root/freescale_test/TIMER.0.0.all.all.all" > oprofiled: open of > /var/lib/oprofile/samples//current/{root}//root/freescale_test/{dep}/{root}//root/freescale_test/TIMER.0.0.all.all.all failed: > Invalid argument > Sample 0x44c(0): /root/freescale_test(c7846700), app > invalid(ffffffffffffffff) > Opening > "/var/lib/oprofile/samples//current/{root}//root/freescale_test/{dep}/{root}//root/freescale_test/TIMER.0.0.all.all.all" > oprofiled: open of > /var/lib/oprofile/samples//current/{root}//root/freescale_test/{dep}/{root}//root/freescale_test/TIMER.0.0.all.all.all failed: > Invalid argument > Sample 0x440(0): /root/freescale_test(c7846700), app > invalid(ffffffffffffffff) > > > > > In a message dated 11/2/2009 4:53:10 A.M. Pacific Standard Time, > rob...@am... writes: > > On 31.10.09 14:02:23, job...@ao... wrote: >> CPUTYPE timer > > There is a bug in oprofile 0.9.5 wrt timer mode. You may want to apply > the changes below to your opcontrol script. There will be a bug fix > release 0.9.6 available soon. > > -Robert > > commit 18352baa22cad98660dee481d05bf0e7d42d803c > Author: maynardj <maynardj> > Date: Mon Sep 14 20:18:38 2009 +0000 > > Fix timer mode regression > > diff --git a/ChangeLog b/ChangeLog > index 9162deb..2538e7d 100644 > --- a/ChangeLog > +++ b/ChangeLog > @@ -1,3 +1,7 @@ > +2009-09-14 Suravee Suthikulpanit <sur...@am...> > + > + * utils/opcontrol: Fix timer mode > + > 2009-09-08 Robert Richter <rob...@am...> > > * utils/opcontrol: fix deinit; kill daemon only if running to prevent > diff --git a/utils/opcontrol b/utils/opcontrol > index 0317ecd..c438eca 100644 > --- a/utils/opcontrol > +++ b/utils/opcontrol > @@ -587,7 +587,7 @@ verify_counters() > # setup any needed default value in chosen events > normalise_events() > { > - if test "$NR_CHOSEN" -le 0; then > + if test "$NR_CHOSEN" -le 0 || test "$IS_TIMER" = 1; then > return > fi > > @@ -1453,8 +1453,12 @@ do_start_daemon() > --separate-thread=$SEPARATE_THREAD \ > --separate-cpu=$SEPARATE_CPU" > > - if ! test -z "$OPROFILED_EVENTS"; then > - OPD_ARGS="$OPD_ARGS --events=$OPROFILED_EVENTS" > + if test "$IS_TIMER" = 1; then > + OPD_ARGS="$OPD_ARGS --events=" > + else > + if ! test -z "$OPROFILED_EVENTS"; then > + OPD_ARGS="$OPD_ARGS --events=$OPROFILED_EVENTS" > + fi > fi > > if test "$VMLINUX" = "none"; then > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > > > ------------------------------------------------------------------------ > > _______________________________________________ > oprofile-list mailing list > opr...@li... > https://lists.sourceforge.net/lists/listinfo/oprofile-list |
From: <job...@ao...> - 2009-11-03 18:22:39
|
I tried that and am still seeing the "bad magic number" error when running opreport and "Invalid argument" entries in oprofiled.log. The commands I am using and part of oprofiled.log follow. Any suggestions? Eclipse # rm /var/lib/oprofile/samples/oprofiled.log Eclipse # rm -rf /var/lib/oprofile/samples/current/ Eclipse # cd /usr/bin/ Eclipse # ./opcontrol --init mount: mounting nodev on /dev/oprofile failed: Device or resource busy Eclipse # ./opcontrol --no-vmlinux mount: mounting nodev on /dev/oprofile failed: Device or resource busy Eclipse # ./opcontrol --image=freescale_test mount: mounting nodev on /dev/oprofile failed: Device or resource busy Eclipse # ./opcontrol --start -V mount: mounting nodev on /dev/oprofile failed: Device or resource busy 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 timer BUF_SIZE default value BUF_WATERSHED default value CPU_BUF_SIZE default value SEPARATE_LIB 0 SEPARATE_KERNEL 0 SEPARATE_THREAD 0 SEPARATE_CPU 0 CALLGRAPH 0 VMLINUX none KERNEL_RANGE XENIMAGE none XEN_RANGE executing oprofiled --session-dir=/var/lib/oprofile --separate-lib=0 -- separate-kernel=0 --separate-thread=0 --separate-cpu=0 --events= --no- vmlinux --image=freescale_test --verbose=all Adding to image filter: "/usr/bin/freescale_test" Using 2.6+ OProfile kernel interface. Using log file /var/lib/oprofile/samples/oprofiled.log Daemon started. Profiler running. Eclipse # ./freescale_test Eclipse # ./opcontrol --shutdown mount: mounting nodev on /dev/oprofile failed: Device or resource busy Stopping profiling. Killing daemon. Eclipse # ./opreport ./opreport error: Invalid sample file, bad magic number: /var/lib/ oprofile/samples/current/{root}/usr/bin/freescale_test/{dep}/{root}/ usr/bin/freescale_test/TIMER.0.0.all.all.all /var/lib/oprofile/samples/ oprofiled.log has repeated entries like: Opening "/var/lib/oprofile/samples//current/{root}//usr/bin/ freescale_test/{dep}/{root}//usr/bin/freescale_test/TIMER. 0.0.all.all.all" oprofiled: open of /var/lib/oprofile/samples//current/{root}//usr/bin/ freescale_test/{dep}/{root}//usr/bin/freescale_test/TIMER. 0.0.all.all.all failed: Invalid argument Sample 0x574(0): /usr/bin/freescale_test(c784ef80), app invalid (ffffffffffffffff) Opening "/var/lib/oprofile/samples//current/{root}//usr/bin/ freescale_test/{dep}/{root}//usr/bin/freescale_test/TIMER. 0.0.all.all.all" oprofiled: open of /var/lib/oprofile/samples//current/{root}//usr/bin/ freescale_test/{dep}/{root}//usr/bin/freescale_test/TIMER. 0.0.all.all.all failed: Invalid argument Sample 0x58c(0): /usr/bin/freescale_test(c784ef80), app invalid (ffffffffffffffff) Opening "/var/lib/oprofile/samples//current/{root}//usr/bin/ freescale_test/{dep}/{root}//usr/bin/freescale_test/TIMER. 0.0.all.all.all" oprofiled: open of /var/lib/oprofile/samples//current/{root}//usr/bin/ freescale_test/{dep}/{root}//usr/bin/freescale_test/TIMER. 0.0.all.all.all failed: Invalid argument Sample 0x5a8(0): /usr/bin/freescale_test(c784ef80), app invalid (ffffffffffffffff) Opening "/var/lib/oprofile/samples//current/{root}//usr/bin/ freescale_test/{dep}/{root}//usr/bin/freescale_test/TIMER. 0.0.all.all.all" oprofiled: open of /var/lib/oprofile/samples//current/{root}//usr/bin/ freescale_test/{dep}/{root}//usr/bin/freescale_test/TIMER. 0.0.all.all.all failed: Invalid argument Sample 0x574(0): /usr/bin/freescale_test(c784ef80), app invalid (ffffffffffffffff) Opening "/var/lib/oprofile/samples//current/{root}//usr/bin/ freescale_test/{dep}/{root}//usr/bin/freescale_test/TIMER. 0.0.all.all.all" oprofiled: open of /var/lib/oprofile/samples//current/{root}//usr/bin/ freescale_test/{dep}/{root}//usr/bin/freescale_test/TIMER. 0.0.all.all.all failed: Invalid argument Sample 0x5a0(0): /usr/bin/freescale_test(c784ef80), app invalid (ffffffffffffffff) Opening "/var/lib/oprofile/samples//current/{root}//usr/bin/ freescale_test/{dep}/{root}//usr/bin/freescale_test/TIMER. 0.0.all.all.all" oprofiled: open of /var/lib/oprofile/samples//current/{root}//usr/bin/ freescale_test/{dep}/{root}//usr/bin/freescale_test/TIMER. 0.0.all.all.all failed: Invalid argument Sample 0x5a8(0): /usr/bin/freescale_test(c784ef80), app invalid (ffffffffffffffff) Opening "/var/lib/oprofile/samples//current/{root}//usr/bin/ freescale_test/{dep}/{root}//usr/bin/freescale_test/TIMER. 0.0.all.all.all" oprofiled: open of /var/lib/oprofile/samples//current/{root}//usr/bin/ freescale_test/{dep}/{root}//usr/bin/freescale_test/TIMER. 0.0.all.all.all failed: Invalid argument Sample 0x5a0(0): /usr/bin/freescale_test(c784ef80), app invalid (ffffffffffffffff) On Nov 3, 2009, at 7:47 AM, Maynard Johnson <may...@us...> wrote: > Job...@ao... wrote: >> Now, in addition to this error, >> >> >> >> Eclipse # ./opreport -c >> Overflow stats not available >> ./opreport error: Invalid sample file, bad magic number: >> /var/lib/oprofile/samples/current/{root}/usr/bin/freescale_test/ >> {dep}/{root}/usr/bin/freescal >> e_test/TIMER.0.0.all.all.all > > Make sure you clear out the old samples dir and re-run the profiler > before > trying to generate a report. To clear the samples dir, either do > 'opcontrol > --reset' or simply 'rm -rf /var/lib/oprofile/samples/current. > > -Maynard > >> >> In /var/lib/oprofile/samples/oprofiled.log, I am seeing the >> following >> repeated. What could cause this? >> Opening >> "/var/lib/oprofile/samples//current/{root}//root/freescale_test/ >> {dep}/{root}//root/freescale_test/TIMER.0.0.all.all.all" >> oprofiled: open of >> /var/lib/oprofile/samples//current/{root}//root/freescale_test/ >> {dep}/{root}//root/freescale_test/TIMER.0.0.all.all.all failed: >> Invalid argument >> Sample 0x44c(0): /root/freescale_test(c7846700), app >> invalid(ffffffffffffffff) >> Opening >> "/var/lib/oprofile/samples//current/{root}//root/freescale_test/ >> {dep}/{root}//root/freescale_test/TIMER.0.0.all.all.all" >> oprofiled: open of >> /var/lib/oprofile/samples//current/{root}//root/freescale_test/ >> {dep}/{root}//root/freescale_test/TIMER.0.0.all.all.all failed: >> Invalid argument >> Sample 0x460(0): /root/freescale_test(c7846700), app >> invalid(ffffffffffffffff) >> Opening >> "/var/lib/oprofile/samples//current/{root}//root/freescale_test/ >> {dep}/{root}//root/freescale_test/TIMER.0.0.all.all.all" >> oprofiled: open of >> /var/lib/oprofile/samples//current/{root}//root/freescale_test/ >> {dep}/{root}//root/freescale_test/TIMER.0.0.all.all.all failed: >> Invalid argument >> Sample 0x44c(0): /root/freescale_test(c7846700), app >> invalid(ffffffffffffffff) >> Opening >> "/var/lib/oprofile/samples//current/{root}//root/freescale_test/ >> {dep}/{root}//root/freescale_test/TIMER.0.0.all.all.all" >> oprofiled: open of >> /var/lib/oprofile/samples//current/{root}//root/freescale_test/ >> {dep}/{root}//root/freescale_test/TIMER.0.0.all.all.all failed: >> Invalid argument >> Sample 0x440(0): /root/freescale_test(c7846700), app >> invalid(ffffffffffffffff) >> >> >> >> >> In a message dated 11/2/2009 4:53:10 A.M. Pacific Standard Time, >> rob...@am... writes: >> >> On 31.10.09 14:02:23, job...@ao... wrote: >>> CPUTYPE timer >> >> There is a bug in oprofile 0.9.5 wrt timer mode. You may want to >> apply >> the changes below to your opcontrol script. There will be a bug fix >> release 0.9.6 available soon. >> >> -Robert >> >> commit 18352baa22cad98660dee481d05bf0e7d42d803c >> Author: maynardj <maynardj> >> Date: Mon Sep 14 20:18:38 2009 +0000 >> >> Fix timer mode regression >> >> diff --git a/ChangeLog b/ChangeLog >> index 9162deb..2538e7d 100644 >> --- a/ChangeLog >> +++ b/ChangeLog >> @@ -1,3 +1,7 @@ >> +2009-09-14 Suravee Suthikulpanit <sur...@am...> >> + >> + * utils/opcontrol: Fix timer mode >> + >> 2009-09-08 Robert Richter <rob...@am...> >> >> * utils/opcontrol: fix deinit; kill daemon only if running to >> prevent >> diff --git a/utils/opcontrol b/utils/opcontrol >> index 0317ecd..c438eca 100644 >> --- a/utils/opcontrol >> +++ b/utils/opcontrol >> @@ -587,7 +587,7 @@ verify_counters() >> # setup any needed default value in chosen events >> normalise_events() >> { >> - if test "$NR_CHOSEN" -le 0; then >> + if test "$NR_CHOSEN" -le 0 || test "$IS_TIMER" = 1; then >> return >> fi >> >> @@ -1453,8 +1453,12 @@ do_start_daemon() >> --separate-thread=$SEPARATE_THREAD \ >> --separate-cpu=$SEPARATE_CPU" >> >> - if ! test -z "$OPROFILED_EVENTS"; then >> - OPD_ARGS="$OPD_ARGS --events=$OPROFILED_EVENTS" >> + if test "$IS_TIMER" = 1; then >> + OPD_ARGS="$OPD_ARGS --events=" >> + else >> + if ! test -z "$OPROFILED_EVENTS"; then >> + OPD_ARGS="$OPD_ARGS --events=$OPROFILED_EVENTS" >> + fi >> fi >> >> if test "$VMLINUX" = "none"; then >> >> >> >> --- >> --------------------------------------------------------------------- >> >> --- >> --- >> --- >> --------------------------------------------------------------------- >> Come build with us! The BlackBerry(R) Developer Conference in SF, CA >> is the only developer event you need to attend this year. Jumpstart >> your >> developing skills, take BlackBerry mobile applications to market >> and stay >> ahead of the curve. Join us from November 9 - 12, 2009. Register now! >> http://p.sf.net/sfu/devconference >> >> >> --- >> --------------------------------------------------------------------- >> >> _______________________________________________ >> oprofile-list mailing list >> opr...@li... >> https://lists.sourceforge.net/lists/listinfo/oprofile-list > > > --- > --- > --- > --------------------------------------------------------------------- > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart > your > developing skills, take BlackBerry mobile applications to market and > stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > oprofile-list mailing list > opr...@li... > https://lists.sourceforge.net/lists/listinfo/oprofile-list |
From: Robert R. <rob...@am...> - 2009-11-04 10:30:26
|
On 03.11.09 10:21:40, job...@ao... wrote: > I tried that and am still seeing the "bad magic number" error when > running opreport and "Invalid argument" entries in oprofiled.log. > > > The commands I am using and part of oprofiled.log follow. Any > suggestions? > > Eclipse # rm /var/lib/oprofile/samples/oprofiled.log > Eclipse # rm -rf /var/lib/oprofile/samples/current/ > Eclipse # cd /usr/bin/ > Eclipse # ./opcontrol --init > mount: mounting nodev on /dev/oprofile failed: Device or resource busy There is an error mounting oprofilefs, try the following steps to debug this: First, unmount /dev/oprofile if it is there. The script tries to mount the oprofile filesystem that the kernel should provide. It checks /proc/filesystems, you should get something like this on your system: # cat /proc/filesystems | grep oprofile nodev oprofilefs If it is not there, the script tries then to load the oprofile module and checks the filesystem again. oprofile should then be listed in /proc/modules and also oprofilefs in /proc/filesystems. If not, the script fails. Maybe /proc is disabled or not available? Not sure if this is a config option. You can also try to mount oprofile directly: # mkdir /dev/oprofile # mount -t oprofilefs nodev /dev/oprofile Also, it seems you are using an own build of oprofile, which version are you using. Did you use configure/make/make install to install the package on your system? Which config did you use to compile your kernel? -Robert -- Advanced Micro Devices, Inc. Operating System Research Center email: rob...@am... |
From: Maynard J. <may...@us...> - 2009-11-06 18:19:54
|
Robert Richter wrote: > On 03.11.09 10:21:40, job...@ao... wrote: >> I tried that and am still seeing the "bad magic number" error when >> running opreport and "Invalid argument" entries in oprofiled.log. >> >> >> The commands I am using and part of oprofiled.log follow. Any >> suggestions? >> >> Eclipse # rm /var/lib/oprofile/samples/oprofiled.log >> Eclipse # rm -rf /var/lib/oprofile/samples/current/ >> Eclipse # cd /usr/bin/ >> Eclipse # ./opcontrol --init >> mount: mounting nodev on /dev/oprofile failed: Device or resource busy > > There is an error mounting oprofilefs, try the following steps to > debug this: You need to figure out why the init is failing. Any oprofile commands you do afterwards are useless until you fix this. It sounds to me like you still have an oprofile daemon running. Do 'ps awx |grep oprofiled' to see if the daemon is running. If so, do: 1. opcontrol --deinit 2. rm /root/.oprofile/daemonrc 3. opcontrol --init 4. Execute your other opcontrol setup commands to specify profiling parameters 5. 'opcontrol --start' and run your app. 6. generate your report(s) with opreport If the 'ps' command shows oprofiled is not running, you need to determine why you're getting "Device or resource busy". Look at dmesg. Are there any other perf tools on the system that might be using the performance monitoring hardware? -Maynard > > First, unmount /dev/oprofile if it is there. > > The script tries to mount the oprofile filesystem that the kernel > should provide. It checks /proc/filesystems, you should get something > like this on your system: > > # cat /proc/filesystems | grep oprofile > nodev oprofilefs > > If it is not there, the script tries then to load the oprofile module > and checks the filesystem again. oprofile should then be listed in > /proc/modules and also oprofilefs in /proc/filesystems. If not, the > script fails. Maybe /proc is disabled or not available? Not sure if > this is a config option. > > You can also try to mount oprofile directly: > > # mkdir /dev/oprofile > # mount -t oprofilefs nodev /dev/oprofile > > Also, it seems you are using an own build of oprofile, which version > are you using. Did you use configure/make/make install to install the > package on your system? Which config did you use to compile your > kernel? > > -Robert > |
From: <job...@ao...> - 2009-11-06 20:01:08
|
I must confess that I had previously altered check_version() to avoid a "Kernel support not available" error I was getting initially because my kernel should support oprofile. So, I went back to the original version and this is what happens when I try to start oprofile after rebooting my board: Eclipse # insmod oprofile.ko Eclipse # /usr/bin/opcontrol --init Kernel support not available, missing opcontrol --init as root ? /etc/mtab is empty. I am doing everything as root. I apologize for having bypassed this error. Should "oprofilefs" appear in /etc/mtab after inmod'ing oprofile.ko and doing opcontrol -- init? Sent from my iPhone 3G On Nov 6, 2009, at 10:19 AM, Maynard Johnson <may...@us...> wrote: > Robert Richter wrote: >> On 03.11.09 10:21:40, job...@ao... wrote: >>> I tried that and am still seeing the "bad magic number" error >>> when running opreport and "Invalid argument" entries in >>> oprofiled.log. >>> >>> >>> The commands I am using and part of oprofiled.log follow. Any >>> suggestions? >>> >>> Eclipse # rm /var/lib/oprofile/samples/oprofiled.log >>> Eclipse # rm -rf /var/lib/oprofile/samples/current/ >>> Eclipse # cd /usr/bin/ >>> Eclipse # ./opcontrol --init >>> mount: mounting nodev on /dev/oprofile failed: Device or resource >>> busy >> There is an error mounting oprofilefs, try the following steps to >> debug this: > You need to figure out why the init is failing. Any oprofile > commands you do afterwards are useless until you fix this. It > sounds to me like you still have an oprofile daemon running. Do 'ps > awx |grep oprofiled' to see if the daemon is running. If so, do: > 1. opcontrol --deinit > 2. rm /root/.oprofile/daemonrc > 3. opcontrol --init > 4. Execute your other opcontrol setup commands to specify profiling > parameters > 5. 'opcontrol --start' and run your app. > 6. generate your report(s) with opreport > > If the 'ps' command shows oprofiled is not running, you need to > determine why you're getting "Device or resource busy". Look at > dmesg. Are there any other perf tools on the system that might be > using the performance monitoring hardware? > > > -Maynard >> First, unmount /dev/oprofile if it is there. >> The script tries to mount the oprofile filesystem that the kernel >> should provide. It checks /proc/filesystems, you should get something >> like this on your system: >> # cat /proc/filesystems | grep oprofile >> nodev oprofilefs >> If it is not there, the script tries then to load the oprofile module >> and checks the filesystem again. oprofile should then be listed in >> /proc/modules and also oprofilefs in /proc/filesystems. If not, the >> script fails. Maybe /proc is disabled or not available? Not sure if >> this is a config option. >> You can also try to mount oprofile directly: >> # mkdir /dev/oprofile >> # mount -t oprofilefs nodev /dev/oprofile >> Also, it seems you are using an own build of oprofile, which version >> are you using. Did you use configure/make/make install to install the >> package on your system? Which config did you use to compile your >> kernel? >> -Robert > |
From: <job...@ao...> - 2009-11-06 22:46:19
|
Following a posting from last year "/etc/mtab not present on my busybox system," I was able to fix both the "Kernel support not available" and the "Device or resource busy" errors by replacing /etc/ mtab with /proc/mounts. I am still seeing: oprofiled: open of /var/lib/oprofile/samples//current/{root}//root/ freescale_test/{dep}/{root}//root/freescale_test/TIMER.0.0.all.all.all failed: Invalid argument repeated over and over in oprofiled.log. This happens because the call to mmap in odb_open in libdb/db_manage.c is returning MAP_FAILED. The arguments to mmap are start = 0, length = 2680, prot = 3, flags = MAP_SHARED, fd = 5, offset = 0. errno = 22 (Invalid argument) What could cause any of these arguments to be invalid? On Nov 6, 2009, at 12:00 PM, job...@ao... wrote: > I must confess that I had previously altered check_version() to > avoid a "Kernel support not available" error I was getting initially > because my kernel should support oprofile. So, I went back to the > original version and this is what happens when I try to start > oprofile after rebooting my board: > > Eclipse # insmod oprofile.ko > Eclipse # /usr/bin/opcontrol --init > Kernel support not available, missing opcontrol --init as root ? > > /etc/mtab is empty. I am doing everything as root. > > I apologize for having bypassed this error. Should "oprofilefs" > appear in /etc/mtab after inmod'ing oprofile.ko and doing opcontrol > --init? > > Sent from my iPhone 3G > > On Nov 6, 2009, at 10:19 AM, Maynard Johnson <may...@us...> > wrote: > >> Robert Richter wrote: >>> On 03.11.09 10:21:40, job...@ao... wrote: >>>> I tried that and am still seeing the "bad magic number" error >>>> when running opreport and "Invalid argument" entries in >>>> oprofiled.log. >>>> >>>> >>>> The commands I am using and part of oprofiled.log follow. Any >>>> suggestions? >>>> >>>> Eclipse # rm /var/lib/oprofile/samples/oprofiled.log >>>> Eclipse # rm -rf /var/lib/oprofile/samples/current/ >>>> Eclipse # cd /usr/bin/ >>>> Eclipse # ./opcontrol --init >>>> mount: mounting nodev on /dev/oprofile failed: Device or resource >>>> busy >>> There is an error mounting oprofilefs, try the following steps to >>> debug this: >> You need to figure out why the init is failing. Any oprofile >> commands you do afterwards are useless until you fix this. It >> sounds to me like you still have an oprofile daemon running. Do >> 'ps awx |grep oprofiled' to see if the daemon is running. If so, do: >> 1. opcontrol --deinit >> 2. rm /root/.oprofile/daemonrc >> 3. opcontrol --init >> 4. Execute your other opcontrol setup commands to specify >> profiling parameters >> 5. 'opcontrol --start' and run your app. >> 6. generate your report(s) with opreport >> >> If the 'ps' command shows oprofiled is not running, you need to >> determine why you're getting "Device or resource busy". Look at >> dmesg. Are there any other perf tools on the system that might be >> using the performance monitoring hardware? >> >> >> -Maynard >>> First, unmount /dev/oprofile if it is there. >>> The script tries to mount the oprofile filesystem that the kernel >>> should provide. It checks /proc/filesystems, you should get >>> something >>> like this on your system: >>> # cat /proc/filesystems | grep oprofile >>> nodev oprofilefs >>> If it is not there, the script tries then to load the oprofile >>> module >>> and checks the filesystem again. oprofile should then be listed in >>> /proc/modules and also oprofilefs in /proc/filesystems. If not, the >>> script fails. Maybe /proc is disabled or not available? Not sure if >>> this is a config option. >>> You can also try to mount oprofile directly: >>> # mkdir /dev/oprofile >>> # mount -t oprofilefs nodev /dev/oprofile >>> Also, it seems you are using an own build of oprofile, which version >>> are you using. Did you use configure/make/make install to install >>> the >>> package on your system? Which config did you use to compile your >>> kernel? >>> -Robert >> > = > --- > --- > --- > --------------------------------------------------------------------- > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and > focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > oprofile-list mailing list > opr...@li... > https://lists.sourceforge.net/lists/listinfo/oprofile-list |
From: <job...@ao...> - 2009-11-09 20:00:43
|
I believe this error is occurring because JFFS2, which I am using, only supports readonly mmap. It does not support shared writable mmap. Is there a workaround for oprofile using JFFS2? On Nov 6, 2009, at 2:45 PM, job...@ao... wrote: > Following a posting from last year "/etc/mtab not present on my > busybox system," I was able to fix both the "Kernel support not > available" and the "Device or resource busy" errors by replacing / > etc/mtab with /proc/mounts. > > I am still seeing: > > oprofiled: open of /var/lib/oprofile/samples//current/{root}//root/ > freescale_test/{dep}/{root}//root/freescale_test/TIMER. > 0.0.all.all.all failed: Invalid argument > > repeated over and over in oprofiled.log. This happens because the > call to mmap in odb_open in libdb/db_manage.c is returning > MAP_FAILED. The arguments to mmap are start = 0, length = 2680, prot > = 3, flags = MAP_SHARED, fd = 5, offset = 0. errno = 22 (Invalid > argument) > > What could cause any of these arguments to be invalid? > > > > On Nov 6, 2009, at 12:00 PM, job...@ao... wrote: > >> I must confess that I had previously altered check_version() to >> avoid a "Kernel support not available" error I was getting >> initially because my kernel should support oprofile. So, I went >> back to the original version and this is what happens when I try to >> start oprofile after rebooting my board: >> >> Eclipse # insmod oprofile.ko >> Eclipse # /usr/bin/opcontrol --init >> Kernel support not available, missing opcontrol --init as root ? >> >> /etc/mtab is empty. I am doing everything as root. >> >> I apologize for having bypassed this error. Should "oprofilefs" >> appear in /etc/mtab after inmod'ing oprofile.ko and doing opcontrol >> --init? >> >> Sent from my iPhone 3G >> >> On Nov 6, 2009, at 10:19 AM, Maynard Johnson <may...@us...> >> wrote: >> >>> Robert Richter wrote: >>>> On 03.11.09 10:21:40, job...@ao... wrote: >>>>> I tried that and am still seeing the "bad magic number" error >>>>> when running opreport and "Invalid argument" entries in >>>>> oprofiled.log. >>>>> >>>>> >>>>> The commands I am using and part of oprofiled.log follow. Any >>>>> suggestions? >>>>> >>>>> Eclipse # rm /var/lib/oprofile/samples/oprofiled.log >>>>> Eclipse # rm -rf /var/lib/oprofile/samples/current/ >>>>> Eclipse # cd /usr/bin/ >>>>> Eclipse # ./opcontrol --init >>>>> mount: mounting nodev on /dev/oprofile failed: Device or >>>>> resource busy >>>> There is an error mounting oprofilefs, try the following steps to >>>> debug this: >>> You need to figure out why the init is failing. Any oprofile >>> commands you do afterwards are useless until you fix this. It >>> sounds to me like you still have an oprofile daemon running. Do >>> 'ps awx |grep oprofiled' to see if the daemon is running. If so, >>> do: >>> 1. opcontrol --deinit >>> 2. rm /root/.oprofile/daemonrc >>> 3. opcontrol --init >>> 4. Execute your other opcontrol setup commands to specify >>> profiling parameters >>> 5. 'opcontrol --start' and run your app. >>> 6. generate your report(s) with opreport >>> >>> If the 'ps' command shows oprofiled is not running, you need to >>> determine why you're getting "Device or resource busy". Look at >>> dmesg. Are there any other perf tools on the system that might be >>> using the performance monitoring hardware? >>> >>> >>> -Maynard >>>> First, unmount /dev/oprofile if it is there. >>>> The script tries to mount the oprofile filesystem that the kernel >>>> should provide. It checks /proc/filesystems, you should get >>>> something >>>> like this on your system: >>>> # cat /proc/filesystems | grep oprofile >>>> nodev oprofilefs >>>> If it is not there, the script tries then to load the oprofile >>>> module >>>> and checks the filesystem again. oprofile should then be listed in >>>> /proc/modules and also oprofilefs in /proc/filesystems. If not, the >>>> script fails. Maybe /proc is disabled or not available? Not sure if >>>> this is a config option. >>>> You can also try to mount oprofile directly: >>>> # mkdir /dev/oprofile >>>> # mount -t oprofilefs nodev /dev/oprofile >>>> Also, it seems you are using an own build of oprofile, which >>>> version >>>> are you using. Did you use configure/make/make install to install >>>> the >>>> package on your system? Which config did you use to compile your >>>> kernel? >>>> -Robert >>> >> = >> --- >> --- >> --- >> --------------------------------------------------------------------- >> Let Crystal Reports handle the reporting - Free Crystal Reports >> 2008 30-Day >> trial. Simplify your report design, integration and deployment - >> and focus on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> oprofile-list mailing list >> opr...@li... >> https://lists.sourceforge.net/lists/listinfo/oprofile-list > = |
From: Maynard J. <may...@us...> - 2009-11-09 20:36:06
|
job...@ao... wrote: > Following a posting from last year "/etc/mtab not present on my busybox > system," I was able to fix both the "Kernel support not available" and > the "Device or resource busy" errors by replacing /etc/mtab with > /proc/mounts. > > I am still seeing: > > oprofiled: open of > /var/lib/oprofile/samples//current/{root}//root/freescale_test/{dep}/{root}//root/freescale_test/TIMER.0.0.all.all.all > failed: Invalid argument > > repeated over and over in oprofiled.log. This happens because the > call to mmap in odb_open in libdb/db_manage.c is returning MAP_FAILED. > The arguments to mmap are start = 0, length = 2680, prot = 3, flags = > MAP_SHARED, fd = 5, offset = 0. errno = 22 (Invalid argument) > > What could cause any of these arguments to be invalid? mmap is a syscall, and I have no idea why it would be failing for you here since the args being passed are not atypical (instrumenting the daemon running on my system, I see the exact same args). I'm not seeing any evidence that anyone else has ever seen this particular error involving oprofile, so you're experiencing something unique. Is the kernel you're running on from kernel.org or is it a distro kernel? Have you rebooted the system since you've seen this problem? Can you reproduce the mmap error with a simple program -- or are you only seeing this with oprofile? -Maynard > > > > On Nov 6, 2009, at 12:00 PM, job...@ao... wrote: > >> I must confess that I had previously altered check_version() to avoid >> a "Kernel support not available" error I was getting initially because >> my kernel should support oprofile. So, I went back to the original >> version and this is what happens when I try to start oprofile after >> rebooting my board: >> >> Eclipse # insmod oprofile.ko >> Eclipse # /usr/bin/opcontrol --init >> Kernel support not available, missing opcontrol --init as root ? >> >> /etc/mtab is empty. I am doing everything as root. >> >> I apologize for having bypassed this error. Should "oprofilefs" >> appear in /etc/mtab after inmod'ing oprofile.ko and doing opcontrol >> --init? >> >> Sent from my iPhone 3G >> >> On Nov 6, 2009, at 10:19 AM, Maynard Johnson <may...@us...> wrote: >> >>> Robert Richter wrote: >>>> On 03.11.09 10:21:40, job...@ao... wrote: >>>>> I tried that and am still seeing the "bad magic number" error when >>>>> running opreport and "Invalid argument" entries in oprofiled.log. >>>>> >>>>> >>>>> The commands I am using and part of oprofiled.log follow. Any >>>>> suggestions? >>>>> >>>>> Eclipse # rm /var/lib/oprofile/samples/oprofiled.log >>>>> Eclipse # rm -rf /var/lib/oprofile/samples/current/ >>>>> Eclipse # cd /usr/bin/ >>>>> Eclipse # ./opcontrol --init >>>>> mount: mounting nodev on /dev/oprofile failed: Device or resource busy >>>> There is an error mounting oprofilefs, try the following steps to >>>> debug this: >>> You need to figure out why the init is failing. Any oprofile >>> commands you do afterwards are useless until you fix this. It sounds >>> to me like you still have an oprofile daemon running. Do 'ps awx >>> |grep oprofiled' to see if the daemon is running. If so, do: >>> 1. opcontrol --deinit >>> 2. rm /root/.oprofile/daemonrc >>> 3. opcontrol --init >>> 4. Execute your other opcontrol setup commands to specify profiling >>> parameters >>> 5. 'opcontrol --start' and run your app. >>> 6. generate your report(s) with opreport >>> >>> If the 'ps' command shows oprofiled is not running, you need to >>> determine why you're getting "Device or resource busy". Look at >>> dmesg. Are there any other perf tools on the system that might be >>> using the performance monitoring hardware? >>> >>> >>> -Maynard >>>> First, unmount /dev/oprofile if it is there. >>>> The script tries to mount the oprofile filesystem that the kernel >>>> should provide. It checks /proc/filesystems, you should get something >>>> like this on your system: >>>> # cat /proc/filesystems | grep oprofile >>>> nodev oprofilefs >>>> If it is not there, the script tries then to load the oprofile module >>>> and checks the filesystem again. oprofile should then be listed in >>>> /proc/modules and also oprofilefs in /proc/filesystems. If not, the >>>> script fails. Maybe /proc is disabled or not available? Not sure if >>>> this is a config option. >>>> You can also try to mount oprofile directly: >>>> # mkdir /dev/oprofile >>>> # mount -t oprofilefs nodev /dev/oprofile >>>> Also, it seems you are using an own build of oprofile, which version >>>> are you using. Did you use configure/make/make install to install the >>>> package on your system? Which config did you use to compile your >>>> kernel? >>>> -Robert >>> >> = >> ------------------------------------------------------------------------------ >> >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 >> 30-Day >> trial. Simplify your report design, integration and deployment - and >> focus on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> oprofile-list mailing list >> opr...@li... >> https://lists.sourceforge.net/lists/listinfo/oprofile-list > |
From: <job...@ao...> - 2009-11-09 22:33:27
|
On Nov 9, 2009, at 12:35 PM, Maynard Johnson <may...@us...> wrote: > job...@ao... wrote: >> Following a posting from last year "/etc/mtab not present on my >> busybox system," I was able to fix both the "Kernel support not >> available" and the "Device or resource busy" errors by replacing / >> etc/mtab with /proc/mounts. >> I am still seeing: >> oprofiled: open of /var/lib/oprofile/samples//current/{root}//root/ >> freescale_test/{dep}/{root}//root/freescale_test/TIMER. >> 0.0.all.all.all failed: Invalid argument >> repeated over and over in oprofiled.log. This happens because >> the call to mmap in odb_open in libdb/db_manage.c is returning >> MAP_FAILED. The arguments to mmap are start = 0, length = 2680, >> prot = 3, flags = MAP_SHARED, fd = 5, offset = 0. errno = 22 >> (Invalid argument) >> What could cause any of these arguments to be invalid? > mmap is a syscall, and I have no idea why it would be failing for > you here since the args being passed are not atypical (instrumenting > the daemon running on my system, I see the exact same args). I'm > not seeing any evidence that anyone else has ever seen this > particular error involving oprofile, so you're experiencing > something unique. Is the kernel you're running on from kernel.org > or is it a distro kernel? Have you rebooted the system since you've > seen this problem? Can you reproduce the mmap error with a simple > program -- or are you only seeing this with oprofile? According to http://wiki.laptop.org/go/Oprofile_setup, "The jffs2 file system does NOT support the mechanism that OProfile uses." Following the example on that page, I ran the following commands after rebooting my board: Eclipse # insmod oprofile.ko Eclipse # rm -rf /var/lib/oprofile Eclipse # mkdir /var/lib/oprofile Eclipse # mount -t ramfs none /var/lib/oprofile Eclipse # opcontrol --setup --no-vmlinux --separate=library Eclipse # opcontrol --start Eclipse # opcontrol --shutdown Eclipse # opreport I am now getting a report: CPU: CPU with timer interrupt, speed 0 MHz (estimated) Profiling through timer interrupt TIMER:0| samples| %| ------------------ 18544 99.2454 no-vmlinux 84 0.4496 EclipseMSW.elf.CVS TIMER:0| samples| %| ------------------ 68 80.9524 EclipseMSW.elf.CVS 15 17.8571 libc-2.6.so 1 1.1905 libEclipsePai.so 35 0.1873 busybox TIMER:0| samples| %| ------------------ 13 37.1429 ld-2.6.so 12 34.2857 busybox 10 28.5714 libc-2.6.so 9 0.0482 oprofiled TIMER:0| samples| %| ------------------ 8 88.8889 oprofiled 1 11.1111 libc-2.6.so 6 0.0321 snmpd TIMER:0| samples| %| ------------------ 4 66.6667 snmpd 2 33.3333 libc-2.6.so 6 0.0321 dropbearmulti TIMER:0| samples| %| ------------------ 4 66.6667 dropbearmulti 2 33.3333 libc-2.6.so 1 0.0054 opjitconv TIMER:0| samples| %| ------------------ 1 100.000 ld-2.6.so > > -Maynard >> On Nov 6, 2009, at 12:00 PM, job...@ao... wrote: >>> I must confess that I had previously altered check_version() to >>> avoid a "Kernel support not available" error I was getting >>> initially because my kernel should support oprofile. So, I went >>> back to the original version and this is what happens when I try >>> to start oprofile after rebooting my board: >>> >>> Eclipse # insmod oprofile.ko >>> Eclipse # /usr/bin/opcontrol --init >>> Kernel support not available, missing opcontrol --init as root ? >>> >>> /etc/mtab is empty. I am doing everything as root. >>> >>> I apologize for having bypassed this error. Should "oprofilefs" >>> appear in /etc/mtab after inmod'ing oprofile.ko and doing >>> opcontrol --init? >>> >>> Sent from my iPhone 3G >>> >>> On Nov 6, 2009, at 10:19 AM, Maynard Johnson <may...@us...> >>> wrote: >>> >>>> Robert Richter wrote: >>>>> On 03.11.09 10:21:40, job...@ao... wrote: >>>>>> I tried that and am still seeing the "bad magic number" error >>>>>> when running opreport and "Invalid argument" entries in >>>>>> oprofiled.log. >>>>>> >>>>>> >>>>>> The commands I am using and part of oprofiled.log follow. Any >>>>>> suggestions? >>>>>> >>>>>> Eclipse # rm /var/lib/oprofile/samples/oprofiled.log >>>>>> Eclipse # rm -rf /var/lib/oprofile/samples/current/ >>>>>> Eclipse # cd /usr/bin/ >>>>>> Eclipse # ./opcontrol --init >>>>>> mount: mounting nodev on /dev/oprofile failed: Device or >>>>>> resource busy >>>>> There is an error mounting oprofilefs, try the following steps to >>>>> debug this: >>>> You need to figure out why the init is failing. Any oprofile >>>> commands you do afterwards are useless until you fix this. It >>>> sounds to me like you still have an oprofile daemon running. Do >>>> 'ps awx |grep oprofiled' to see if the daemon is running. If so, >>>> do: >>>> 1. opcontrol --deinit >>>> 2. rm /root/.oprofile/daemonrc >>>> 3. opcontrol --init >>>> 4. Execute your other opcontrol setup commands to specify >>>> profiling parameters >>>> 5. 'opcontrol --start' and run your app. >>>> 6. generate your report(s) with opreport >>>> >>>> If the 'ps' command shows oprofiled is not running, you need to >>>> determine why you're getting "Device or resource busy". Look at >>>> dmesg. Are there any other perf tools on the system that might >>>> be using the performance monitoring hardware? >>>> >>>> >>>> -Maynard >>>>> First, unmount /dev/oprofile if it is there. >>>>> The script tries to mount the oprofile filesystem that the kernel >>>>> should provide. It checks /proc/filesystems, you should get >>>>> something >>>>> like this on your system: >>>>> # cat /proc/filesystems | grep oprofile >>>>> nodev oprofilefs >>>>> If it is not there, the script tries then to load the oprofile >>>>> module >>>>> and checks the filesystem again. oprofile should then be listed in >>>>> /proc/modules and also oprofilefs in /proc/filesystems. If not, >>>>> the >>>>> script fails. Maybe /proc is disabled or not available? Not sure >>>>> if >>>>> this is a config option. >>>>> You can also try to mount oprofile directly: >>>>> # mkdir /dev/oprofile >>>>> # mount -t oprofilefs nodev /dev/oprofile >>>>> Also, it seems you are using an own build of oprofile, which >>>>> version >>>>> are you using. Did you use configure/make/make install to >>>>> install the >>>>> package on your system? Which config did you use to compile your >>>>> kernel? >>>>> -Robert >>>> >>> = >>> --- >>> --- >>> --- >>> --- >>> ------------------------------------------------------------------ >>> Let Crystal Reports handle the reporting - Free Crystal Reports >>> 2008 30-Day >>> trial. Simplify your report design, integration and deployment - >>> and focus on >>> what you do best, core application coding. Discover what's new with >>> Crystal Reports now. http://p.sf.net/sfu/bobj-july >>> _______________________________________________ >>> oprofile-list mailing list >>> opr...@li... >>> https://lists.sourceforge.net/lists/listinfo/oprofile-list > |