%$Id: intro.tex,v 1.6 1997/07/24 15:51:11 cierniak Exp $

\section{INTRODUCTION}

Performance is at the heart of scientific and engineering computing.
Tuning a critical inner loop could lead to significant reduction in the
running time of a large scientific or engineering application. This
paper is about a portable performance programming tool for the
scientific and engineering programmer.

Larry Carter and Bowen Alpern define {\em performance programming\/}
as ``programming when a 30\% improvement in speed may be worth weeks
of work''~\cite{PerfProgram}.  According to their work obtaining
maximum application performance on a given platform is difficult.
Completely automatic optimizations, while very effective, do not fully
solve the problem. Performance programming usually requires manual
tuning of the source code and compiler options to obtain the fastest
code.  

The unfortunate reality is that performance programming is hard.  The
advent of optimizing compilers which perform various transformations
on the program source to utilize the memory hierarchy better has made
performance programming even harder. To add to that the scientific and
engineering codes themselves have gotten more complex.


We have designed jCITE---A Java based browser---to alleviate the
performance programming problem. jCITE helps optimize applications
whose performance is difficult to understand.  It does so by adding
several things to the performance programmers arsenal:
\begin{itemize}
\item Details of compiler optimization or optimization failure
  (non-optimizations) information at the level of the application
  source.
\item Visual metaphors for correlating original source, compiler
  transformed source, and runtime performance information.
\item Ability to query for detailed compiler optimization information
  at application hot-spots (elsewhere as well).
\item Provides a portable browser to be used in a heterogeneous
  environment (e.g., connecting to an SGI Origin2000 through an SGI
  O2, Apple Power Mac, or a Compaq Presario).
\end{itemize}


jCITE uses profiling information to find program fragments which the
performance programmer has to to concentrate on. If the hardware
allows it, the same runtime information can be also used to make a
rough judgment on the nature of the performance problem (R10000
performance counters~\cite{R10kCountersSC96,R10kCounters} can measure
and classify cache misses, floating point operation and other
processor events useful for understanding the performance).  The
runtime information is combined with the information produced by the
compiler about applied optimizations/non optimizations. 


In the jCITE browser we combine both the compile time and runtime
performance information in a visually appealing way. We introduce a
new visual metaphor known as {\em synchronization}.  Say you have two
text windows one containing the original program source and the other
containing the compiler transformed source.  By synchronizing them we
mean that when the mouse is moved over a region of text in the
original source window, regions of text that are compiler transformed
(derived from that region) are highlighted on the second window and
vice versa.  We also have borrowed other metaphors such as hypertext
and context sensitive pop-up menus that have become popular in Web
browsers.

The following section illustrates how jCITE works using a standard
benchmark as an example.  
%Section~\ref{sec:design} gives on overview of jCITE's architecture.
We show how jCITE can be used to optimize an application in
Section~\ref{sec:exp}.  Section~\ref{sec:concl} concludes and
describes related and future work.

%A performance programmer usually has the following in their arsenal:
%\begin{itemize}
%\item Algorithmic and computational knowledge in specific areas such
%  as Fluid dynamics, Operations Research, Structural Mechanics,
%  Computational Chemistry.
%\item Good understanding of various compiler options (flags), computer
%  architecture, and assembly programming.
%\item Dynamic tools such as prof, pixie, and hardware counters (in
%  newer microprocessors such as the MIPS R10000, the Digital Alpha
%  21164, and the Sun UltraSPARC)---to understand the profile of their
%  application and identify subroutines or functions to focus their
%  attention.
%\end{itemize}
%jCITE {\bf does not}
%\begin{itemize}
%\item Assist the performance programmer in choosing data structures or
%  algorithms.
%\item Allow editing of the program. We assume that available editors
%  are used for that purpose.
%\end{itemize}
