\hypertarget{group__Eina__Evlog}{}\doxysection{Event Log Debugging}
\label{group__Eina__Evlog}\index{Event Log Debugging@{Event Log Debugging}}


These functions are used internally by EFL in general for profiling.  


\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{struct__Eina__Evlog__Item}{\+\_\+\+Eina\+\_\+\+Evlog\+\_\+\+Item}}
\item 
struct \mbox{\hyperlink{struct__Eina__Evlog__Buf}{\+\_\+\+Eina\+\_\+\+Evlog\+\_\+\+Buf}}
\end{DoxyCompactItemize}
\doxysubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__Eina__Evlog_gabbaa60bab581d3b6356886cf430983cb}\label{group__Eina__Evlog_gabbaa60bab581d3b6356886cf430983cb}} 
typedef struct \mbox{\hyperlink{struct__Eina__Evlog__Item}{\+\_\+\+Eina\+\_\+\+Evlog\+\_\+\+Item}} {\bfseries Eina\+\_\+\+Evlog\+\_\+\+Item}
\item 
\mbox{\Hypertarget{group__Eina__Evlog_gaf23eb6c706626c2cc4d357a22ee4e366}\label{group__Eina__Evlog_gaf23eb6c706626c2cc4d357a22ee4e366}} 
typedef struct \mbox{\hyperlink{struct__Eina__Evlog__Buf}{\+\_\+\+Eina\+\_\+\+Evlog\+\_\+\+Buf}} {\bfseries Eina\+\_\+\+Evlog\+\_\+\+Buf}
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \mbox{\hyperlink{group__Eina__Evlog_ga447074742775e3ce764164de4721dfa5}{eina\+\_\+evlog}} (const char $\ast$event, void $\ast$obj, double srctime, const char $\ast$detail)
\begin{DoxyCompactList}\small\item\em Logs an event for profiling data. \end{DoxyCompactList}\item 
\mbox{\hyperlink{struct__Eina__Evlog__Buf}{Eina\+\_\+\+Evlog\+\_\+\+Buf}} $\ast$ \mbox{\hyperlink{group__Eina__Evlog_ga6bcceb937149d830011beec88f94d4db}{eina\+\_\+evlog\+\_\+steal}} (void)
\begin{DoxyCompactList}\small\item\em Steals an event log buffer from the evlog core. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__Eina__Evlog_ga1a07cd71f2717781580d7226eb8a8a2c}{eina\+\_\+evlog\+\_\+start}} (void)
\begin{DoxyCompactList}\small\item\em Begins logging -\/ until now eina\+\_\+evlog is a NOOP. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__Eina__Evlog_gac87eddcf8e0be9e55f1224f3e736bdc9}{eina\+\_\+evlog\+\_\+stop}} (void)
\begin{DoxyCompactList}\small\item\em Stops logging. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
These functions are used internally by EFL in general for profiling. 

This API is not considered stable or intended for use outside of EFL itself at this stage. The format of debug logs may and likely will change as this feature matures.

\begin{DoxySince}{Since}
1.\+15 
\end{DoxySince}


\doxysubsection{Function Documentation}
\mbox{\Hypertarget{group__Eina__Evlog_ga447074742775e3ce764164de4721dfa5}\label{group__Eina__Evlog_ga447074742775e3ce764164de4721dfa5}} 
\index{Event Log Debugging@{Event Log Debugging}!eina\_evlog@{eina\_evlog}}
\index{eina\_evlog@{eina\_evlog}!Event Log Debugging@{Event Log Debugging}}
\doxysubsubsection{\texorpdfstring{eina\_evlog()}{eina\_evlog()}}
{\footnotesize\ttfamily void eina\+\_\+evlog (\begin{DoxyParamCaption}\item[{const char $\ast$}]{event,  }\item[{void $\ast$}]{obj,  }\item[{double}]{srctime,  }\item[{const char $\ast$}]{detail }\end{DoxyParamCaption})}



Logs an event for profiling data. 

Log some interesting event inside of EFL, e.\+g. a wakeup (and why etc.). The {\ttfamily event} string must always be provided and be of the form\+:

\char`\"{}+eventname\char`\"{} \char`\"{}-\/eventname\char`\"{} \char`\"{}$>$eventname\char`\"{} \char`\"{}$<$eventname\char`\"{} \char`\"{}!eventname\char`\"{} \char`\"{}$\ast$eventname\char`\"{}

etc. The \char`\"{}+\char`\"{} char means an event is beginning (and any subsequent events logged are really children of this event). The \char`\"{}-\/\char`\"{} char means an event is ending and so all child events SHOULD have ended by now. A \char`\"{}!\char`\"{} character means the event is a one-\/off with no beginning or end. A\char`\"{}$\ast$\char`\"{} means this is special metadata and the detail field may need special parsing based on the eventname, so ignore unless known. A \char`\"{}$>$\char`\"{} character means we begin this \char`\"{}state\char`\"{} of the process (these are separate to \char`\"{}+\char`\"{} and \char`\"{}-\/\char`\"{} events and don\textquotesingle{}t nest -\/ are not related to a thread or any other event, but just a state). \char`\"{}$<$\char`\"{} Ends the given state given by the \char`\"{}eventname\char`\"{} part of the string. Any string following this initial character is the event or state name (and must be provided in the exact same string at both \char`\"{}+\char`\"{}, \char`\"{}$<$\char`\"{} and \char`\"{}-\/\char`\"{}, \char`\"{}$>$\char`\"{} events). This is what will be displayed in a debugger (and may be a well known string thus given a nice UI flourish with icons, labels and colors, so don\textquotesingle{}t change this string unless you want to impact such visibility of these events). The event string after the first character as above can be anything, including white space. It is suggested to keep it human readable and as short as feasible.

The {\ttfamily object} is optional, and if not used, pass in NULL. If it is used, it can be a pointer to anything. It is intended simply to be of use to indicate an event happens on object A vs object B. What this points to is irrelevant as the pointer is never de-\/referenced or used other than as a label to differentiate an event on 2 different objects.

The {\ttfamily srctime} parameter is 0.\+0 if not used, or if used, contains a timepoint for an event that triggered this once. For example, if a device or hardware interrupt causes this event, that device may provide a timestamp/timepoint as part of the device information to indicate the exact time the hardware interrupt happened. This can be useful to have more information as to the latency of an actual source of an event such as the hardware interrupt time, and when the code actually begins seeing or processing it.

The {\ttfamily detail} string is optional (and if unused should be NULL). This is for providing more detailed information to log such as perhaps a the state at the time of the log events or a series of parameters and input that caused this event.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em event} & The event string -\/ see above for format \\
\hline
\mbox{\texttt{ in}}  & {\em obj} & An optional object \char`\"{}pointer\char`\"{} to associate \\
\hline
\mbox{\texttt{ in}}  & {\em srctime} & An optional source event timestamp that caused this event \\
\hline
\mbox{\texttt{ in}}  & {\em detail} & An optional event detail string with more info\\
\hline
\end{DoxyParams}
\begin{DoxySince}{Since}
1.\+15 
\end{DoxySince}


Referenced by ecore\+\_\+init(), and ecore\+\_\+main\+\_\+loop\+\_\+begin().

\mbox{\Hypertarget{group__Eina__Evlog_ga6bcceb937149d830011beec88f94d4db}\label{group__Eina__Evlog_ga6bcceb937149d830011beec88f94d4db}} 
\index{Event Log Debugging@{Event Log Debugging}!eina\_evlog\_steal@{eina\_evlog\_steal}}
\index{eina\_evlog\_steal@{eina\_evlog\_steal}!Event Log Debugging@{Event Log Debugging}}
\doxysubsubsection{\texorpdfstring{eina\_evlog\_steal()}{eina\_evlog\_steal()}}
{\footnotesize\ttfamily \mbox{\hyperlink{struct__Eina__Evlog__Buf}{Eina\+\_\+\+Evlog\+\_\+\+Buf}}$\ast$ eina\+\_\+evlog\+\_\+steal (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Steals an event log buffer from the evlog core. 

Only one buffer can be stolen at any time. If you steal a new buffer, the old stolen buffer is \char`\"{}released\char`\"{} back to the evlog core.

\begin{DoxyReturn}{Returns}
The stolen evlog buffer
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+15 
\end{DoxySince}


References eina\+\_\+spinlock\+\_\+release(), and eina\+\_\+spinlock\+\_\+take().

\mbox{\Hypertarget{group__Eina__Evlog_ga1a07cd71f2717781580d7226eb8a8a2c}\label{group__Eina__Evlog_ga1a07cd71f2717781580d7226eb8a8a2c}} 
\index{Event Log Debugging@{Event Log Debugging}!eina\_evlog\_start@{eina\_evlog\_start}}
\index{eina\_evlog\_start@{eina\_evlog\_start}!Event Log Debugging@{Event Log Debugging}}
\doxysubsubsection{\texorpdfstring{eina\_evlog\_start()}{eina\_evlog\_start()}}
{\footnotesize\ttfamily void eina\+\_\+evlog\+\_\+start (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Begins logging -\/ until now eina\+\_\+evlog is a NOOP. 

\begin{DoxySince}{Since}
1.\+15 
\end{DoxySince}


References eina\+\_\+spinlock\+\_\+release(), and eina\+\_\+spinlock\+\_\+take().

\mbox{\Hypertarget{group__Eina__Evlog_gac87eddcf8e0be9e55f1224f3e736bdc9}\label{group__Eina__Evlog_gac87eddcf8e0be9e55f1224f3e736bdc9}} 
\index{Event Log Debugging@{Event Log Debugging}!eina\_evlog\_stop@{eina\_evlog\_stop}}
\index{eina\_evlog\_stop@{eina\_evlog\_stop}!Event Log Debugging@{Event Log Debugging}}
\doxysubsubsection{\texorpdfstring{eina\_evlog\_stop()}{eina\_evlog\_stop()}}
{\footnotesize\ttfamily void eina\+\_\+evlog\+\_\+stop (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Stops logging. 

You must not be using any evlog buffers stolen by \mbox{\hyperlink{group__Eina__Evlog_ga6bcceb937149d830011beec88f94d4db}{eina\+\_\+evlog\+\_\+steal()}} by the time you call this function.

\begin{DoxySince}{Since}
1.\+15 
\end{DoxySince}


References eina\+\_\+spinlock\+\_\+release(), and eina\+\_\+spinlock\+\_\+take().

