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 <maynardj@us.ibm.com> wrote:

JobHunts02@aol.com 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,  
robert.richter@amd.com writes:

On  31.10.09 14:02:23, jobhunts02@aol.com 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 <suravee.suthikulpanit@amd.com>
+
+     * utils/opcontrol: Fix timer mode
+
2009-09-08  Robert  Richter <robert.richter@amd.com>

*  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
oprofile-list@lists.sourceforge.net
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
oprofile-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list
=