\section{Introduction}
\label{sec:introduction}

The value of profiling code is indisputable.  \R's own \code{Rprof()} function 
is extremely useful, but its profiling capabilities are limited to simple 
timings of \R functions. This is a very good starting point in performance 
analysis and can quickly help the \R programmer focus in on bottlenecks.  But 
for more experienced developers (especially those working with compiled code) 
additional performance information can be invaluable. Access to low-level 
hardware counter data can have tremendous impact when trying to understand and 
optimize performance of compiled code. 

The \thispackage~\citep{Schmidt2014pbdPAPIpackage} package offers access to  
this low-level hardware counter information by way of the high-level \C library 
\PAPI~\citep{mucci1999papi}.  Therefore, an installation of \PAPI is required in 
order to use the package.  For convenience, we bundle \PAPI version \PAPIversion 
with \thispackage, which will install by default.  However, with appropriate 
configure arguments, one can easily build \thispackage with an existing system 
installation of \PAPI.  See Section~\ref{sec:installation} for details.

The current main features of \thispackage include:
\begin{enumerate}
  \item Simple, high-level interfaces that mimic \R's own profiling syntax.
  \item A low-level interface that mimics \PAPI's native calls, with extremely 
  general functionality.
  \item A comprehensive set of package demonstrations.
  \item This vignette.
\end{enumerate}

Note that the \pkg{pbdPAPI} package is not officially affiliated with the 
\pkg{PAPI} project.



%%% Generic message for vignettes
\subsection{Installation Issues and Reporting Bugs}

\secref{sec:installation} contains useful information about how to install 
\thispackage.  Additionally, Sections~\ref{sec:use}, \ref{sec:examples}, and 
\ref{sec:moreinfo} offer useful information about using \thispackage.  

If something goes wrong with installation or package use, please feel free to 
make use of our google group \url{http://group.r-pbd.org/}.  We also actively 
monitor a mailing list if you wish to contact us directly:
\href{mailto:RBigData@gmail.com}{RBigData@gmail.com}


%%% pbdPAPI specific 
For installation issues, please try to give us as much information as 
reasonably possible to help you.  If \thispackage installs but you have trouble 
using it (for example, a function explicitly encourages you to report an error 
to us), please provide us the output of \code{pbdPAPI:::hw.info.internal()} 
(note the three colons) and \code{hw.info()}.