Hi i came across this problem on x86_64 related to task command of
lcrash. I am using 2.6.5 based SLES kernel with lkcdutils 6.1 from cvs
>> task
ADDR UID PID PPID STATE FLAGS CPU NAME
======================================================================
cannot find per cpu symbol 'runqueues'
0xffffffff803c5180 0 0 0 0 0 - swapper
cannot find per cpu symbol 'runqueues'
0x100fbf012a0 0 1 0 1 0x100 - init
cannot find per cpu symbol 'runqueues'
0x100fbf00080 0 2 1 1 0x40 - migration/0
.........
.........
The problem seems to be with the symaddr_per_cpu_2_6 function in
lcrash/util.c
For x86_64 the __per_cpu_offset is a #define instead of a variable as a
result of which kl_lkup_symname( ) fails on it and hence this error
being printed " cannot find per cpu symbol 'runqueues'
a probable fix for this might be on the following lines ..
For x86_64 arch use the cpu_pda variable instead of __per_cpu_offset.
+ if (KL_ARCH == KL_ARCH_X86_64)
+ sp = kl_lkup_symname("cpu_pda");
+ else
+ sp = kl_lkup_symname("__per_cpu_offset");
+ if (!sp) {
rc = 0;
and then use the kl_get_structure( ) function to retrive the data.
+ if (KL_ARCH == KL_ARCH_X86_64) {
+ if (kl_get_structure(sp->s_addr,"x8664_pda", &size,
&cpu_dat)){
+ rc = 0;
+ goto out;
+ }
+
+ cpu_offset = (long unsigned int *)K_PTR(cpu_dat,
"x8664_pda", "data_offset")
+ + cpu + kl_struct_len("x8664_pda");
+ } else
+ cpu_offset = KL_VREAD_PTR(sp->s_addr + cpu * KL_NBPW);
Not sure if this is the correct way to do it.
Comments/suggestions are welcome ..
--
Thanks
-Sachin
-----------------------------------
Sachin Sant
Linux Technology Center
IBM Software Lab
Bangalore, INDIA.
sachinp@...
Ph: 91-80-5044647
-----------------------------------
|