savannah-hackers
[Top][All Lists]
Advanced

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

[Savannah-hackers] submission of Fast Kernel Tracing - savannah.nongnu.o


From: rdr
Subject: [Savannah-hackers] submission of Fast Kernel Tracing - savannah.nongnu.org
Date: Sat, 17 Apr 2004 11:33:34 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0

A package was submitted to savannah.nongnu.org
This mail was sent to address@hidden, address@hidden


Bob Russell <address@hidden> described the package as follows:
License: gpl
Other License: 
Package: Fast Kernel Tracing
System name: fkt
Type: non-GNU

Description:
This project has developed a flexible, efficient software tool for
accurate performance evaluation and tracing of code in the kernel
and in loadable kernel modules of the Linux operating system on
Intel Pentium processors, both uniprocessors and multiprocessors.
We call the tool FKT (Fast Kernel Tracing).  It consists of a
number of modifications and additions to the Linux kernel that
collect and record data in real time, as well as some user-level
programs to control the probing and to perform off-line analysis.
The current code base is at the URL:
http://perso.ens-lyon.fr/samuel.thibault/fkt-20040412.tgz

The method consists of placing special software "probe" macros at
various locations in the kernel source code.  The source code must
then be recompiled, and compilation of the probes is controlled by
a configuration symbol (CONFIG_FKT).  Placement of probes is
determined by the kernel programmer, and can be done manually or
automatically via the "instrument_function" attribute provided by the GNU C 
compiler.  Typically, one probe is placed at the entry to, and another probe at 
the exit from, every kernel function of interest to the programmer.  By 
default, probes are always placed at the entry to and exit from every system 
call, trap, and interrupt, and at the process switch point in the kernel.

Each probe supplies a "mask" parameter with one or more bits set
in it.  All probes having the same bit set in their keymask form
a "probe-set", and a probe-set can be enabled or disabled by
user-level programs through the use of some new system calls.
When a probe is disabled, the only overhead it introduces is the cost of a 
bitmask test and branch.  A probe can also be supplied with other parameters of 
the programmer's choosing, which makes it a useful debugging tool, especially 
valuable when developing new modules and/or additions to the kernel.

Probes record data into kernel buffers that are written to a file
set up at the beginning of an FKT run.  Recording is done using
the Linux "sendpage()" mechanism, which avoids extra copying of
the buffers.  Each probe records an unique identification code, a
timestamp obtained from the hardware Time Stamp Counter, the
number of the processor executing the code, and the additional
parameters, if any.  The off-line analysis program, run after the
file has been completely written, maps the identification code to
text identifying the probe (typically the name of the function in
which it was placed).  At the start of a run, the kernel symbol
table, and the symbol tables of all loaded modules, are recorded
in the file so that they are kept together with the data recorded
by the probes.  The offline analysis can use these symbol tables
to map the locations generated by the GCC "instrument_function"
feature into symbolic names.

The current offline analysis offers a number of options to produce detailed 
traces, function nesting traces, and exact accounting for every machine cycle.  
Future plans call for developing a general library that would allow users to 
easily develop their own analysis programs, and a graphical interface to the 
analysis output.




Other Software Required:
This project depends on the Linux kernel and the Intel x86 hardware.  It should 
be possible to extend it to run on other hardware.


Other Comments:



_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/







reply via email to

[Prev in Thread] Current Thread [Next in Thread]