RE: Announcement: Release Candidate 1 for OProfile 1.0.0
"Maucci, Cyrille" <[email protected]>
| Newsgroups | gmane.linux.oprofile |
|---|---|
| Message-ID | <7D0928B9A8397D4B9E2F9E5FFFB8D86015937C25@G6W2477.americas.hpqcorp.net> |
Hey Maynard, Arnaldo, Carl,
Sorry to get back late on this one.
So you guys were all right about the kernel's Performance Events subsystem issue.
Now what is interesting is the following:
I'm running a base RHEL6.5 which I've upgraded the kernel steps by steps:
Step 1: recompiled 2.6.39.4 from the original 2.6.32-431.
Step 2: recompiled 3.3.2 from 2.6.39.4.
Step 3: recompiled 3.4.92 from 3.3.2.
Step 4: recompiled 3.9.11 from 3.4.92.
Step 5: recompiled 3.10.46 from 3.9.11.
Step 6: recompiled 3.15.9 from 3.10.46.
What is interesting is that a simple 'perf stat ls' after each step (once rebooted on the new kernel of course) has always shown 'normal' things like:
Performance counter stats for 'ls':
1.662938 task-clock # 0.085 CPUs utilized
3 context-switches # 0.002 M/sec
1 cpu-migrations # 0.601 K/sec
248 page-faults # 0.149 M/sec
3,310,577 cycles # 1.991 GHz [27.82%]
<not supported> stalled-cycles-frontend
<not supported> stalled-cycles-backend
1,949,533 instructions # 0.59 insns per cycle [52.34%]
174,059 branches # 104.670 M/sec
19,177 branch-misses # 11.02% of all branches
0.019625276 seconds time elapsed
Up to 3.10.46. Starting with 3.10.46, I get the following issue with 4 'not supported' measurements.
Performance counter stats for 'ls':
1.242282 task-clock # 0.617 CPUs utilized
19 context-switches # 0.015 M/sec
0 cpu-migrations # 0.000 K/sec
241 page-faults # 0.194 M/sec
<not supported> cycles
<not supported> stalled-cycles-frontend
<not supported> stalled-cycles-backend
<not supported> instructions
<not supported> branches
<not supported> branch-misses
0.002012065 seconds time elapsed
I've actually just verified that it occurs when jumping from 3.9.11 to 3.10.
If I remain on 3.9.11, operf does not exhibit the pb
[root@nv34 ~]# operf
usage: operf [ options ] [ --system-wide | --pid <pid> | [ command [ args ] ] ]
See operf man page for details.
As soon as I jump on 3.10, I of course get the operf pb, which is in line with the <not supported> issue 'perf' detected.
[root@nv34 ~]# operf
Your kernel's Performance Events Subsystem does not support your processor type.
So now I need to understand why the Perf Events subsystem is having these issues from 3.10 on.
That will probably take me some time coz of my newbiness with Linux kernel but in case you've got some ideas, I'd appreciate.
The way I compile the kernel is very 'basic' as below:
make O=${TARGETDIR} clean;
make O=${TARGETDIR} mrproper;
/bin/cp -f /boot/config-`uname -r` ${TARGETDIR}/.config;
make O=${TARGETDIR} menuconfig; # note I just exit and click on OK to save the changes.
make -j ${C:-32} O=${TARGETDIR};
make -j ${C:-32} O=${TARGETDIR} modules;
make -j ${C:-32} O=${TARGETDIR} modules_install;
make -j ${C:-32} O=${TARGETDIR} install;
/bin/cp -f ${TARGETDIR}/.config /boot/config-${VERSION};
reboot;
Of course I'm using operf 1.0.0 rc1. No chance for any other version since I had not installed it since the RHEL6.5 installation.
[root@nv34 ~]# which operf
/usr/local/bin/operf
[root@nv34 ~]# which ophelp
/usr/local/bin/ophelp
[root@nv34 ~]# operf -v
operf: oprofile 1.0.0-rc1 compiled on Aug 28 2014 19:17:27
[root@nv34 ~]# ophelp -v
ophelp: oprofile 1.0.0-rc1 compiled on Aug 28 2014 19:16:33
Thanks a lot
++Cyrille
-----Original Message-----
From: Maynard Johnson [mailto:[email protected]]
Sent: Monday, August 25, 2014 6:06 PM
To: Arnaldo Carvalho de Melo; Maucci, Cyrille
Cc: Carl Love; oprofile-list
Subject: Re: Announcement: Release Candidate 1 for OProfile 1.0.0
On 08/18/2014 01:46 PM, Arnaldo Carvalho de Melo wrote:
> Em Mon, Aug 18, 2014 at 10:36:01AM -0700, Carl Love escreveu:
>> Cyrille:
>
>> OK, it looks like oprofile is there and recognizes your CPU. Not sure
>> why you get the message "Your kernel's Performance Events Subsystem
>> does not support your processor type" that you reported given that
>> perf is there and the ophelp command is recognizing the correct CPU.
>
> No, perf is not there, as we determined in this thread, perf is not
> being able, as operf, to access the PMU counter (aka "cycles", aka
> PERF_COUNT_HW_CPU_CYCLES, in oprofile/intel jargon:
> CPU_CLK_UNHALTED.CORE), it is just fallbacking to the software event
> "cpu-clock".
>
> I.e., perf, on Cyrille's machine, is using this:
>
> [acme@zoo linux]$ perf list cpu-clock
>
> List of pre-defined events (to be used in -e):
> cpu-clock [Software event]
>
Cyrille, as Arnaldo pointed out, the kernel's Performance Events subsystem does not support your processor type for accessing the hardware event counters, so the perf tool nicely falls back to using the software-defined event, cpu-cycles, which is more or less timer-based. But operf and ocount support only native hardware events. In a July 23 posting to the oprofile-list (subject "Re: Removal of events for unsupported architectures or processor models"), I said the following:
Right now, timer mode is supported only with the "legacy" opcontrol-based profiler.
The operf profiler could, theoretically, support a timer-like option (e.g., configuring
perf_events with PERF_COUNT_SW_CPU_CLOCK). I've not been motivated to add this myself,
but would certainly review patches if anyone would like to contribute such support
(after 1.0 is released).
-Maynard
> [acme@zoo linux]$
>
> Because it is not being able to use this one (as, it seems, operf):
>
> [acme@zoo linux]$ perf list cpu-cycles
>
> List of pre-defined events (to be used in -e):
> cpu-cycles OR cycles [Hardware event]
>
> [acme@zoo linux]$
>
>
> - Arnaldo
>
>> I assume that when you built the new OProfile 1.0 release you did do
>> the make install and verified that the installed operf and ocount
>> tools were installed in your path.
>>
>> Maynard will be back on Aug 25. Maybe he has some additional ideas.
>>
>> Carl Love
>>
>>
>> On Mon, 2014-08-18 at 16:56 +0000, Maucci, Cyrille wrote:
>>> Carl,
>>>
>>> Here they are:
>>>
>>> [root@nv34 ~]# ophelp | head -10;
>>> oprofile: available events for CPU type "Core 2"
>>>
>>> See Intel Architecture Developer's Manual Volume 3B, Appendix A and
>>> Intel Architecture Optimization Reference Manual
>>>
>>> For architectures using unit masks, you may be able to specify unit
>>> masks by name. See 'operf' or 'ocount' man page for more details.
>>>
>>> CPU_CLK_UNHALTED: (counter: all)
>>> Clock cycles when not halted (min count: 6000)
>>>
>>> Thanks
>>> ++Cyrille
>>> -----Original Message-----
>>> From: Carl Love [mailto:[email protected]]
>>> Sent: Monday, August 18, 2014 6:40 PM
>>> To: Maucci, Cyrille
>>> Cc: Arnaldo Carvalho de Melo; oprofile-list
>>> Subject: RE: Announcement: Release Candidate 1 for OProfile 1.0.0
>>>
>>> On Mon, 2014-08-18 at 16:23 +0000, Maucci, Cyrille wrote:
>>>> Hey Carl,
>>>>
>>>>
>>>>
>>>> My system is an old HP Proliant DL 380 G5 with those processors.
>>>>
>>>
>>> Cyrille:
>>>
>>> I checked and the processor is still listed in libop/op_cpu_type.c as a supported CPU type.
>>>
>>> What do you get when you type ophelp? Just need the first 10 or so lines as this will print out all of the supported events, if it works correctly.
>>>
>>> Carl Love
>>>
>>>>
>>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> --------- _______________________________________________
>> oprofile-list mailing list
>> [email protected]<mailto:[email protected]>
>> https://lists.sourceforge.net/lists/listinfo/oprofile-list
>
> ----------------------------------------------------------------------
> --------
> Slashdot TV.
> Video for Nerds. Stuff that matters.
> http://tv.slashdot.org/
> _______________________________________________
> oprofile-list mailing list
> [email protected]<mailto:[email protected]>
> https://lists.sourceforge.net/lists/listinfo/oprofile-list
>
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
oprofile-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oprofile-list