On Nov 10, 2009, at 5:40 PM, Maynard Johnson <maynardj@us.ibm.com> wrote:

jobhunts02@aol.com wrote:
On Nov 10, 2009, at 2:16 PM, Maynard Johnson <maynardj@us.ibm.com>  
wrote:

jobhunts02@aol.com wrote:
Correction..driver.ko is in the /AAESystems/bin diectory.


On Nov 10, 2009, at 11:23 AM, Washington Ratso <JobHunts02@aol.com>
wrote:

I am running Linux 2.6.26 on an MPC8248 with busybox and JFFS2.  The
driver
that I want to profile (driver.ko) is in the /drivers directory.  I
loaded
the module using insmod.  Here are the commands I am using:

Eclipse # /usr/bin/opcontrol --setup --no-vmlinux
Eclipse # /usr/bin/opcontrol --start
Using 2.6+ OProfile kernel interface.
Using log file /var/lib/oprofile/samples/oprofiled.log
Daemon started.
Profiler running.
Eclipse # /usr/bin/opcontrol --stop
Stopping profiling.
Eclipse # /usr/bin/opreport -p=/AAESystems/bin
I presume this isn't *really* the way you specified the -p option,  
since you would get an error this way.  Assuming you actually used '-
p /AAESystems/bin', then opreport should find your kernel module.   
Are you sure the module was doing anything where it would actually  
generate samples?

-Maynard

I get a report whether I use "-p=/AAESystems/bin" or "-p /AAESystems/
bin". No error either way.
At least the last couple of releases do *not* support '-p=blah'.  What oprofile release are you using?

The module is definitely running and several functions are being  
executed repeatedly.  What do you mean by a module "doing anything  
where it would actually generate samples?"
When the timer profiling timer pops, what's the likelihood that the driver is actively executing and, thus, be sampled by oprofile?  From the output below, it doesn't look like you're running oprofile very long -- only ~1200 samples.  Try running for lot longer period.  The sampling timer is not going to give you very fine-grained profile data, so you need to run much longer to get a valid profile.

-Maynard

I ran it longer (see below) and there is still no sign of my inserted module.  I did not run it longer because putting vmlinux on my board uses up almost all the memory and I was concerned I might run out of memory.

Note, there is also no sign of the oprofile module in the report either.

I also ran a test module which had a loop with 100 billion iterations to insure it would be in the function awhile and sampled and there was no sign of that module in the report either.

What could cause there not being any samples for the inserted modules? 


Eclipse # /usr/bin/opreport

CPU: CPU with timer interrupt, speed 0 MHz (estimated)

Profiling through timer interrupt

          TIMER:0|

  samples|      %|

------------------

    93763 95.7127 vmlinux.PRO_MOD

     2141  2.1855 EclipseMSW.elf.NOV8

                  TIMER:0|

          samples|      %|

        ------------------

             2133 99.6263 EclipseMSW.elf.NOV8

                8  0.3737 [heap] (tgid:88 range:0x1011e000-0x104c1000)

     1251  1.2770 libc-2.6.so

      214  0.2184 libpthread-2.6.so

      132  0.1347 dropbearmulti

      123  0.1256 libEclipseSem.so

       83  0.0847 snmpd

       70  0.0715 libm-2.6.so

       50  0.0510 libEclipseLst.so

       43  0.0439 oprofiled

       39  0.0398 librt-2.6.so

       16  0.0163 libEclipseLog.so

       13  0.0133 ld-2.6.so

        9  0.0092 busybox

        8  0.0082 libEclipseHms.so

        4  0.0041 libEclipseMmap.so

        2  0.0020 libEclipsePai.so

        1  0.0010 gateway

        1  0.0010 libutil-2.6.so





Am I using the correct commands to get profile information from a  
module?


Overflow stats not available
CPU: CPU with timer interrupt, speed 0 MHz (estimated)
Profiling through timer interrupt
       TIMER:0|
samples|      %|
------------------
  1145 93.6989 no-vmlinux
    26  2.1277 libc-2.6.so
    18  1.4730 EclipseMSW.elf.NOV8
    15  1.2275 ld-2.6.so
    10  0.8183 busybox
     4  0.3273 dropbearmulti
     4  0.3273 libpthread-2.6.so


As you can see, I am getting no information regarding driver.ko.

I did specify the path where the driver.ko file is.  How do I get
information regarding driver.ko?


--
View this message in context: http://old.nabble.com/Trouble-profiling-kernel-module-tp26289063p26289063.html
Sent from the oprofile-list mailing list archive at Nabble.com.


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

=