Bug 17581 - oprofile not working: "Error: counter 0 not available"
Summary: oprofile not working: "Error: counter 0 not available"
Status: RESOLVED OBSOLETE
Alias: None
Product: Platform Specific/Hardware
Classification: Unclassified
Component: x86-64 (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: platform_x86_64@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-01 09:54 UTC by Török Edwin
Modified: 2012-11-05 14:23 UTC (History)
3 users (show)

See Also:
Kernel Version: 2.6.36-rc3
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
.config (65.42 KB, application/xml)
2010-09-01 09:54 UTC, Török Edwin
Details
dmesg (92.48 KB, application/octet-stream)
2010-09-01 09:55 UTC, Török Edwin
Details

Description Török Edwin 2010-09-01 09:54:49 UTC
Created attachment 28741 [details]
.config

oprofile doesn't work, but 'perf record -e cycles' does.

$ sudo opcontrol --start --verbose
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 x86-64/family10
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 /home/edwin/builds/linux-2.6/vmlinux
KERNEL_RANGE ffffffff80200000,ffffffff805b4e35
XENIMAGE none
XEN_RANGE
Error: counter 0 not available

dmesg says:
[12052.123057] oprofile: AMD IBS detected (0x0000001f)
[12052.123065] oprofile: using NMI interrupt.
[12124.203495] oprofile: AMD IBS detected (0x0000001f)
[12124.203504] oprofile: using NMI interrupt.

Attached .config
Comment 1 Török Edwin 2010-09-01 09:55:15 UTC
Created attachment 28751 [details]
dmesg
Comment 2 Török Edwin 2010-09-01 10:03:10 UTC
Seems to work with 2.6.35.4. Time to bisect.
Comment 3 Török Edwin 2010-09-01 15:23:06 UTC
I bisected a bit, here is my bisection log. 
Kind of hard to bisect because reiserfs evict errors keep popping up, or md resync is started and oopses, etc. Always have to go back to a released kernel to run 'git bisect good/bad' and compile new kernel.
I'll have to see if I can reproduce the bug in KVM, should be easier to bisect there.

git bisect start
# bad: [2bfc96a127bc1cc94d26bfaa40159966064f9c8c] Linux 2.6.36-rc3
git bisect bad 2bfc96a127bc1cc94d26bfaa40159966064f9c8c
# good: [1506707a6c740db316e422239a53ae5df1727591] Linux 2.6.35.4
git bisect good 1506707a6c740db316e422239a53ae5df1727591
# good: [9fe6206f400646a2322096b56c59891d530e8d51] Linux 2.6.35
git bisect good 9fe6206f400646a2322096b56c59891d530e8d51
# good: [ab69bcd66fb4be64edfc767365cb9eb084961246] Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
git bisect good ab69bcd66fb4be64edfc767365cb9eb084961246
# good: [b4eda9cb48eac1b7369ad33e5d015c33b4376431] stallion: prune lock_kernel calls
git bisect good b4eda9cb48eac1b7369ad33e5d015c33b4376431
# good: [b4eda9cb48eac1b7369ad33e5d015c33b4376431] stallion: prune lock_kernel calls
git bisect good b4eda9cb48eac1b7369ad33e5d015c33b4376431
# good: [b4eda9cb48eac1b7369ad33e5d015c33b4376431] stallion: prune lock_kernel calls
git bisect good b4eda9cb48eac1b7369ad33e5d015c33b4376431
# good: [16bb85bc12e7d0b066b1471185f3889cb1ceb382] Merge git://git.infradead.org/battery-2.6
git bisect good 16bb85bc12e7d0b066b1471185f3889cb1ceb382
# good: [16bb85bc12e7d0b066b1471185f3889cb1ceb382] Merge git://git.infradead.org/battery-2.6
git bisect good 16bb85bc12e7d0b066b1471185f3889cb1ceb382
# good: [16bb85bc12e7d0b066b1471185f3889cb1ceb382] Merge git://git.infradead.org/battery-2.6
git bisect good 16bb85bc12e7d0b066b1471185f3889cb1ceb382
Comment 4 Stefan Kost 2011-04-02 19:53:34 UTC
Not sure I have have the same issue:
# opcontrol --start-daemon --verbose
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 x86-64/family10
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
Using default event: CPU_CLK_UNHALTED:100000:0:1:1
Error: counter 0 not available

# uname -a
Linux ada 2.6.37.1-1.2-desktop #1 SMP PREEMPT 2011-02-21 10:34:10 +0100 i686 athlon i386 GNU/Linux

in /var/log/messages:
Apr  2 22:44:54 ada kernel: [40985.251154] [Firmware Bug]: cpu 0, try to setup vector 0x10400, but vector 0xf9 was already reserved by another core, APIC500=0xf9
Apr  2 22:44:54 ada kernel: [40985.251157] [Firmware Bug]: cpu 0, IBS interrupt offset 0 not available (MSRC001103A=0x0000000000000100)
Apr  2 22:44:54 ada kernel: [40985.251167] [Firmware Bug]: workaround enabled for IBS LVT offset
Apr  2 22:44:54 ada kernel: [40985.251168] oprofile: AMD IBS detected (0x0000001f)
Apr  2 22:44:54 ada kernel: [40985.251178] oprofile: using NMI interrupt.
Comment 5 Alan 2012-11-05 14:23:56 UTC
Closing as obsolete. If this is still seen on modern kernels (3.2+) please
update/reopen

Note You need to log in before you can comment on or make changes to this bug.