Hello,
oprofile-1.0.0 doesn't recognize AMD Athlon CPU family.
Problem is in op_cpu_type.c code ignoring 0x6 CPU family which corresponds to AMD Athlon/Athlon-XP CPUs. Attached patch fixes this issue and I'm able to use oprofile on this host again.
$ ./operf
Unable to obtain cpu_type
Verify that a pre-1.0 version of OProfile is not in use.
If the /dev/oprofile/cpu_type file exists, locate the pre-1.0 OProfile
installation, and use its 'opcontrol' command, passing the --deinit option.
Unable to ascertain cpu type. Exiting.
$ cat /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 6
model : 10
model name : AMD Athlon(tm) XP 3200+
stepping : 0
cpu MHz : 2204.923
cache size : 512 KB
fdiv_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow
bogomips : 4409.84
clflush size : 32
cache_alignment : 32
address sizes : 34 bits physical, 32 bits virtual
power management: ts
Suravee, please review the atttached patch.
Added parenthesis to the patch to ensure that newer compilers do not complain about precedence of "&&" and "||". The patch has been checked in as commit c9141a4.