#97 samples for modules in initrd have incorrect path


The method used to determine the path for modules
doesn't work correctly for modules that are loaded from
the initrd file at boot time.

I initially saw this problem on the Phoebe beta (hence
the .gz suffixes for the modules). The Phoebe beta uses
OProfile 0.4 with a a 2.4 kernel that has the Linux 2.5
interface backported to it. I saw the following lines
of output from op_time:

137 0.1369 0.0000 /lib/ext3.o.gz
232 0.2318 0.0000 /lib/aic7xxx.o.gz
232 0.2318 0.0000 /lib/scsi_mod.o.gz
438 0.4375 0.0000 /lib/jbd.o.gz

The associated sample files in
/var/lib/oprofile/samples are:


The "/lib/" in the examples lines above should be
"/lib/modules/2.4.20-2.2smp/..." This problem is caused
by the way that daemon_kernel.c extracts the path to
the module using /proc/ksyms. The modules loaded from
the initrd are not going to have the correct path in
/proc/ksyms. Looking at the code, it appears that this
problem still exists in the oprofile cvs head.



  • John Levon

    John Levon - 2003-01-07
    • status: open --> closed-works-for-me
  • John Levon

    John Levon - 2003-01-07

    Logged In: YES

    Not a bug. We have no way of getting the real path, the user
    must specify where to find the module binaries :

    --path pathnamelist','separated, -p
    Specify an alternate list of pathname to
    locate image
    file. This is usefull if your samples files
    name does not
    match the image file name such as module
    loaded at boot
    time through a ram disk

    --recursive-path path_list','separated, -P
    Same as --path but retrieve recursively the
    image file
    name in the path list


Log in to post a comment.