Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 1679 → Rev 1680

/sharkdoc/trunk/vol5/vol5.tex
67,6 → 67,37
kernel must be built with this option set.
 
%----------------------------------------------------------------------------
\section{Chunk management}
%----------------------------------------------------------------------------
 
Tracer events are stored in memory into buffers called \textbf{chunks}. To be as
flexible as possible, it is possible to create many chunks, that can be linked one
after the other, using the FTrace\_chunk\_link primitive, to obtain a huge memory
buffer where to store tracer events.
 
Chunks are created using the \textbf{FTrace\_chunk\_create} function. During the
chunk creation, the programmer can decide the size of the chunk and its type. There
are different types of chunks, which can be specified using the following flags:
 
\begin{itemize}
\item FTRACE\_CHUNK\_FLAG\_FREE;
\item FTRACE\_CHUNK\_FLAG\_FULL;
\item FTRACE\_CHUNK\_FLAG\_CYC;
\item FTRACE\_CHUNK\_FLAG\_JTN;
\item FTRACE\_CHUNK\_FLAG\_STOP.
\end{itemize}
 
The available flags condition the behavior of the tracer when a chunk is fullfilled.
The FTRACE\_CHUNK\_FLAG\_CYC flag specifies that when the chunk is full, the tracer
starts to insert the new events from the beginning of the same chunk. The
FTRACE\_CHUNK\_FLAG\_JTN flag (Jump To Next) indicates that, when the current chunk
is full, the next event is written at the beginning of the next chunk. The
FTRACE\_CHUNK\_FLAG\_STOP makes the tracing engine to stop when the current chunk is
full. This function has not been implemented yet.
FTRACE\_CHUNK\_FLAG\_FREE and FTRACE\_CHUNK\_FLAG\_FULL only indicate that the chunk
is free to be used or is already full.
 
%----------------------------------------------------------------------------
\chapter{Primitives}
%----------------------------------------------------------------------------
 
102,6 → 133,14
\begin{description}
\item [\textbf{int FTrace\_chunk\_create(int normal\_size, int emergency\_size, FTrace\_flags flags);}]
\item [\textbf{Description:}] Create a new chunk.
\item The following flags can be set to the created chunk:
\begin{itemize}
\item FTRACE\_CHUNK\_FLAG\_FREE : the chunk is free to use;
\item FTRACE\_CHUNK\_FLAG\_FULL : the chunk is full;
\item FTRACE\_CHUNK\_FLAG\_CYC : the chunk stores event in a cyclical way (see \textbf{FTrace\_chunk\_link}) ;
\item FTRACE\_CHUNK\_FLAG\_JTN : when full the chunk jumps to the next chunk;
\item FTRACE\_CHUNK\_FLAG\_STOP : when full the chunk stops. This function has not been implemented yet.
\end{itemize}
\end{description}
 
%------------------------------------------------------------