Next: Frequency Prediction using
Up: No Title
Previous: No Title
The Hipparch project [Cas94b] uses the Esterel language [Dio95] for describing protocol
building blocks. These blocks can be configured to form an application specific
protocol implementation. Using
application specific knowledge should improve the performance of such an implementation
when compared to the use of a standard protocol.
However, the C code generated by the currently existing Esterel compiler is not very fast,
and moreover has a large code size [Cas94a]. This is a problem the compiler shares with
many similar tools that generate executable code starting from a protocol defined in a
formal description technique (FDT). This paper describes our design for
an optimizer that we incorporated into the Esterel compiler.
After analyzing the code generated by the Esterel compiler, we decided
that two optimization techniques merit further investigation:
- implementation of a fast path: this optimization concerns the order in which
the different paths through the protocol configuration are sequentialized in the C code.
This will increase the spatial locality of the
code, and lead to benefits due to a better use of the memory hierarchy, e.g.
with modern cache-based RISC-CPUs [Mos95].
Applying this optimization requires information on how often each of the
paths will be executed, and which nodes on the path will be executed together.
- function inlining: the Esterel implementation of a protocol building block may contain
calls to auxiliary C functions. In general, function inline expansion can lead to a considerable
performance increase. However, function inlining must
be applied in a controled way in order to avoid code size explosion and adversary
effects on cache performance [Mos95]. Thus, only functions that will be used frequently
at run time should be inlined.
Thus, the application of both optimization techniques requires information on
the execution frequency of the different parts in an Esterel specification.
The rest of this paper is structured as follows: Section 2 explains how execution
frequencies of different code sections can be calculated from the equivalent Markov
model of an Esterel specification. Section 3 demonstrates the use of this approach
on an Esterl module implementing the management of the TCP retransmission timer.
Section 4 gives our conclusions, and discusses further directions of this work.
Next: Frequency Prediction using
Up: No Title
Previous: No Title