home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!pmafire!news.dell.com!swrinde!sdd.hp.com!decwrl!pa.dec.com!nntpd2.cxo.dec.com!nabeth!alan
- From: alan@nabeth.enet.dec.com (Alan Rollow - Alan's Home for Wayward Tumbleweeds.)
- Newsgroups: comp.unix.ultrix
- Subject: Re: What happened to p_swaddr?
- Message-ID: <1992Sep2.173818.20277@nntpd2.cxo.dec.com>
- Date: 2 Sep 92 17:38:18 GMT
- References: <BtxI6v.3CG@cs.psu.edu>
- Sender: alan@nabeth (Alan Rollow - Alan's Home for Wayward Tumbleweeds.)
- Reply-To: alan@nabeth.enet.dec.com (Alan Rollow - Alan's Home for Wayward Tumbleweeds.)
- Organization: Digital Equipment Corporation
- Lines: 49
-
-
- In article <BtxI6v.3CG@cs.psu.edu>, kenh@leps5.phys.psu.edu (Ken Hornstein) writes:
- >
- >Lately I've been trying to compile sps, top, ofiles, lsof .... with very little
- >success on our Ultrix 4.0 system.
-
- You want to look around on gatekeeper.dec.com to see there are V4 versions
- of any of these programs. Monitor (pub/DEC/monitor.tar.Z) has V4 algorithms
- for reading the user structure when it's swapped.
-
- > [ Description of how p_swaddr was removed and a bunch of dmap structures
- > added. ]
-
- If you look closely at the proc structure you'll see that the field
- added are all addresses of dmap structures. The dmap structure will
- probably be defined in /usr/include/sys/dmap.h. I don't much about
- the details of it though. The different dmap structures are:
-
- p_dmap - Disk map for data segment
- p_smap - Disk map for stack segment
- p_cdmap - Shadows for data/stack swap
- p_csmap - used during fork/exec
-
- Since the user structure lives at one end of the stack, the disk
- map for the stack will describe where the stack is and therefore
- where the user structure is. So as not to leave the details as
- an exercise to the reader, I borrow the following segment from
- Monitor.
-
- struct dmap l_dmap ;
-
- if( Process is swapped... ) {
- readk(proc.p_smap, (char *)&l_dmap, sizeof(struct dmap)) ;
-
- readk(l_dmap.dm_ptdaddr, (char *)&ublkno, sizeof(int)) ;
-
- addr = dtob(ublkno) ;
-
- reads(addr, (char *)&user, sizeof(struct user)) ;
- }
-
- The Monitor function readk read from /dev/kmem. The first argument is
- the kernel address, the 2nd the data address and the 3rd the data length.
- The reads function reads from /dev/drum.
-
- >--Ken
- >
- --
- Alan Rollow alan@nabeth.cxo.dec.com
-