oprofile-list

Hello,
I've used oprofile lately for some Linux module development and it was
really helpful.
Unfortunately, after I moved from a PIII to a XEON machine I cannot use
it anymore.
More than that, I cannot start oprofile even using RTC on the XEON
machine; the message is:
"Failed to open hash map device: Operation not permitted"
Everything seems to be in the right place and I just replace the
--ctr0-... options with --rtc-value in the command line.
Can anybody tell me if I am doing something wrong or if is it another
problem?
Thank you,
Gaby

From: "Jean-Gabriel Rican" <grican@...> Sent: Wednesday, June 26, 2002 11:05 PM
> Hello,
hi,
>
> I've used oprofile lately for some Linux module development and it was
> really helpful.
>
> Unfortunately, after I moved from a PIII to a XEON machine I cannot use
> it anymore.
It exist verious XEON, from PPro w/o any performance counter
to XEON P4 with pmc but unsuported by oprofile. All of them would
fall back to rtc mode in recent cvs version of oprofile.
> More than that, I cannot start oprofile even using RTC on the XEON
> machine; the message is:
> "Failed to open hash map device: Operation not permitted"
try to delete all device file in /var/oprofile or in /var/lib/oprofile depending
on your version of oprofile. Check than the daemon "oprofiled" is not running
and unload the oprofile module then restart with --rtc-value
Note than if you use RTC mode you can't have RTC compiled in the kernel
nor the RTC module loaded. If this not the case you will get an error message
about RTC_IOPORT not available
If you get failure report to the mail list the contents of /proc/cpuinfo,
oprofile/kernel/distribution version.
> Everything seems to be in the right place and I just replace the
> --ctr0-... options with --rtc-value in the command line.
>
> Can anybody tell me if I am doing something wrong or if is it another
> problem?
I think you have first tried to start with pmc on a processor w/o pmc
which have fail but let the hash map device open so at next restart
the re open fails. There is probably something not enough robust in the
module or in op_start.
regards,
Phil

Hi, Philippe!
I reviewed everythink and I realized that I had made some mistakes in the process.
First I didn't provided enough informations about the problem: the 1.8GHz
XEON/Pentium4 on the platform I am using is seen by oprofile as a RTC-only CPU, then
the kernel is a 2.4.18 without RTC enabled and I am using oprofile-0.2 downloaded
from the site (not from the CVS). And reading the mailing list archives I already
knew that Pentium 4 is not supported [yet] by oprofile.
Second, I remembered meanwhile that the kernel used on that platform was compiled
with gcc 3.1 by whoever set the Linux box and I had forget about that. And since part
of oprofile is running in the kernel as a module this was a problem. Using a "normal"
kernel (i.e. compiled with gcc 2.95.3) allowed me to finally run oprofile in RTC
mode.
Anyway, it is not over yet :
- oprofile doesn't seem to be compilable with gcc 3.1, even the one taken from
CVS and the error seems to be something like: "c++: cannot specify -o with -c or -S
and multiple compilations".
- I cannot get annotated sources in RTC mode; the message is "Request for source
file annotated with samples but no debug info available". I checked again my sources
and I had compiled everything with -g.
Well, you cannot have everything, so in the end I am happy that at least I am able to
do the profiling for my job.
In the end, I want to thank you for your answer and apologize for the possible
imperfections on my part.
I am relatively new in using oprofile so I might have some.
Best Regards,
Gaby
> > Hello,
>
> hi,
>
> >
> > I've used oprofile lately for some Linux module development and it was
> > really helpful.
> >
> > Unfortunately, after I moved from a PIII to a XEON machine I cannot use
> > it anymore.
>
> It exist verious XEON, from PPro w/o any performance counter
> to XEON P4 with pmc but unsuported by oprofile. All of them would
> fall back to rtc mode in recent cvs version of oprofile.
>
> > More than that, I cannot start oprofile even using RTC on the XEON
> > machine; the message is:
> > "Failed to open hash map device: Operation not permitted"
>
> try to delete all device file in /var/oprofile or in /var/lib/oprofile depending
> on your version of oprofile. Check than the daemon "oprofiled" is not running
> and unload the oprofile module then restart with --rtc-value
>
> Note than if you use RTC mode you can't have RTC compiled in the kernel
> nor the RTC module loaded. If this not the case you will get an error message
> about RTC_IOPORT not available
>
> If you get failure report to the mail list the contents of /proc/cpuinfo,
> oprofile/kernel/distribution version.
>
> > Everything seems to be in the right place and I just replace the
> > --ctr0-... options with --rtc-value in the command line.
> >
> > Can anybody tell me if I am doing something wrong or if is it another
> > problem?
>
> I think you have first tried to start with pmc on a processor w/o pmc
> which have fail but let the hash map device open so at next restart
> the re open fails. There is probably something not enough robust in the
> module or in op_start.
>
> regards,
> Phil

On Thu, Jun 27, 2002 at 06:10:52PM -0700, Jean-Gabriel Rican wrote:
> - oprofile doesn't seem to be compilable with gcc 3.1, even the one taken from
> CVS and the error seems to be something like: "c++: cannot specify -o with -c or -S
> and multiple compilations".
oprofile 0.2 won't build due to a silly error but you shouldn't be
seeing this message anyway ...
> - I cannot get annotated sources in RTC mode; the message is "Request for source
> file annotated with samples but no debug info available". I checked again my sources
> and I had compiled everything with -g.
You must compile against a version of binutils that can handle DWARF2 as
generated by gcc 3.1 (essentially you have mis-installed your system).
I haven't time right now to look at your other problems, hopefully soon
regards
john
--
"If a thing is not diminished by being shared, it is not rightly owned if
it is only owned & not shared."
- St. Augustine

> Hello John,
I haven't had too much time to further investigate because I was pretty busy with other
pressing projects but I absolutely agree with you that the system I used was not OK.
The combination of utilities, kernel and kernel modules some of them compiled with gcc
2.95.3 and the other with gcc 3.1 was certainly a problem.
When I will have some more time available I will examine things again.
But even so with all these problems, oprofile proved to be quite useful for me.
And when the compiling problem with gcc3.1 will be solved (in the future) it will be even
more useful.
Thank you,
Gaby
>
>
> > - oprofile doesn't seem to be compilable with gcc 3.1, even the one taken from
> > CVS and the error seems to be something like: "c++: cannot specify -o with -c or -S
> > and multiple compilations".
>
> oprofile 0.2 won't build due to a silly error but you shouldn't be
> seeing this message anyway ...
>
> > - I cannot get annotated sources in RTC mode; the message is "Request for source
> > file annotated with samples but no debug info available". I checked again my sources
> > and I had compiled everything with -g.
>
> You must compile against a version of binutils that can handle DWARF2 as
> generated by gcc 3.1 (essentially you have mis-installed your system).
>
> I haven't time right now to look at your other problems, hopefully soon
>
> regards
> john
>
> --
> "If a thing is not diminished by being shared, it is not rightly owned if
> it is only owned & not shared."
> - St. Augustine