page fault monitoring tools wanted.

Malaclypse the Elder dwc at cbnewsh.ATT.COM
Wed Nov 15 06:47:30 AEST 1989


In article <541 at ssp2.idca.tds.philips.nl>, pb at idca.tds.PHILIPS.nl (Peter Brouwer) writes:
> I am looking for software ( tools ) that can monitor page faults.

i have one.  i wrote about it in the 1988 summer usenix proceedings
(in san francisco).  it is part of a tracing package called CASPER.
the way it currently works is to arrange for the clock interrupt handler
to invalidate the pages of the currently running process, and hooks
in the page fault handler to write out a trace of the faults.  i am
updating it to simply look at the page table entry use bits so that
all i have to do is install a pseudo-device driver instead of running
with modified kernel code.

after about 2 years, we may finally be able to license CASPER (which
is more general than just memory reference tracing) out.  if you are
interested, send me mail and i'll keep you posted.

> Let me explain:
> To give programmers an idea on how the working set of there code and data
> is it would be nice if they could enable a page monitoring option.
> With this tool one could see which routines causes pagefaults. By grouping
> source and linking object in a specific order one could reduce the working
> set and the number of pagefaults.
> 

i have also been working on this.  it is a bit harder than you think
(at least more difficult than what you describe above).  a function
my cause a page fault if it is the first function to be called in a
page.  other functions in that page will not fault once the page is
valid.  my page sampling technique helps a bit but it is only sampling.
what i did as a first cut is to obtain a trace of all function calls
in a program (CASPER helps you do all this).  using this trace, moved
functions to achieve a minimum cost function (whatever you want it to be).
it works but is very time consuming and there are questions about what
input data to obtain a trace from.  i am now investigating source code
analysis techniques to determine address space layout of both text and data.
its non-trivial.

danny chen
att!hocus!dwc



More information about the Comp.unix.i386 mailing list