[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

kernel-application comm. && reference strings && program counter



I'm continuing an old thread, thanks erik for your time.

New question:  I want to get the reference strings (and a litle bit more 
information) of a process running on the linux kernel, and probably later on 
the reference strings of all processes running in the system. UP to now I've 
been printk ing during kswapd, which gives me all the information I want but 
not really in the place where I want it, i.e. my printks are misplaced, I 
need to put them some place where the process is referencing the (virtual) 
pages.

a) What function should be a good place for my printk's?


>From: Erik Mouw <J.A.K.Mouw@ITS.TUDelft.NL>
>To: alejandro alliana <aalliana@hotmail.com>
>On Mon, Jul 02, 2001 at 09:13:00AM -0400, alejandro alliana wrote:
> >   Hi. I've been doing something similar, what about if I just want to 
>get
> > info out of the kernel, is this still the best way?  I've been using 
>printk
> > up to now.
>
>Yes, use printk() or make a simple /proc file (see my procfs-guide on
>www.kernelnewbies.org or in recent -ac kernels).
>Erik

b) The reference strings should be big (50 M, maybe 200 M), does making a 
/proc file still make sense? (sorry if the question is stupid)

c) One of the data I want to printk is the program counter, and so far I 
wasn't able to find where it is in the task struct.  I've read "The Linux 
Kernel" (David A Rusling) and in chapter 4 (processes):

Swap processes    If the most deserving process to run is not the current 
process, then the current process must be suspended [...] When that process 
comes to be suspended, all of its machine state, including the program 
counter (PC) and all of the processor's registers, must be saved in the 
processes task_struct data structure. Then, all of the machine state for the

T.I.A. (and sorry for my "inglish")

Alejandro





_________________________________________________________________
Descargue GRATUITAMENTE MSN Explorer en http://explorer.msn.es/intl.asp

-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/