Hi,
by "direction" I mean where the function is taking the data for this varibale ( &variable ).
Can you explain me a little more your suggestion with kprobe?
Kprobes is a kernel debugger but i think I know the problem of my code, I used printk messages to get the value of "&variable" and checks that when is called from two different context, its value is different and the content of the variable is different too.
Thanks a lot
2008/3/1, Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx>:
Hi...
On Fri, Feb 29, 2008 at 2:29 PM, David Embid <davidembid@xxxxxxxxx> wrote:
>
>
> Hi,
>
> i have been developing a little module to monitoring the use of CPU for some
> processes. For this, I need to handle the moment when the scheduler switch
> the processes. My problem is that I don't know how can I access the handling
> function (contained on my kernel module) from the kernel scheduler
> (sched.c). I have tried with a function callback. My module overwrite a
> function pointer used by the kernel to acces the handler when the module is
> loaded. This solution seems to work properly and the function is called
> every switch made by the scheduler. The problem is that the variables used
> on the function have different memory direction when the function is called
> by the callback on the kernel and the direction when the variable is used on
> other function in the module.
First, what do you mean by "direction"?
Second...seems like you can use kprobe and made it to hook the entry
point of schedule().
regards,
Mulyadi.