A system call graph is then constructed to provide a graphical
representation of a collection of such traces for a given program. An example
of such a graph for a simple copy program is shown in figure 1.c; the code for this program
is in figure 1.a, while 1.b shows the control flow. Each
node in this graph represents a system call with a given set of arguments.
Consecutive system calls in the trace appear as nodes connected by directed
edges indicating the order. The weight of each edge indicates the number
of times the sequence appears. This graph forms the basis for compile-time
transformations for grouping system calls. The general idea is to find frequently
executed sequences of calls in the system call graph; if the corresponding
system calls are not syntactically adjacent in the program source, we attempt
to restructure the program code so as to make them adjacent, as described
below.
|