Dali 3D User Interface Engine
List of all members | Public Member Functions | Private Member Functions | Private Attributes
Dali::Internal::Adaptor::PerformanceServer Class Reference

Concrete implementation of performance interface. More...

#include <performance-server.h>

Inheritance diagram for Dali::Internal::Adaptor::PerformanceServer:
Inheritance graph
[legend]
Collaboration diagram for Dali::Internal::Adaptor::PerformanceServer:
Collaboration graph
[legend]

Public Member Functions

 PerformanceServer (AdaptorInternalServices &adaptorServices, const EnvironmentOptions &environmentOptions)
 Constructor. More...
 
virtual ~PerformanceServer ()
 Destructor. More...
 
virtual ContextId AddContext (const char *name)
  More...
 
virtual void RemoveContext (ContextId contextId)
  More...
 
virtual void AddMarker (MarkerType markerType)
 Add a performance marker This function can be called from ANY THREAD. More...
 
virtual void AddMarker (MarkerType markerType, ContextId contextId)
  More...
 
virtual void SetLogging (unsigned int statisticsLogOptions, unsigned int timeStampOutput, unsigned int logFrequency)
 Set the logging level and frequency. More...
 
virtual void SetLoggingFrequency (unsigned int logFrequency, ContextId contextId)
 Set the logging frequency. More...
 
virtual void EnableLogging (bool enable, ContextId contextId)
 Set logging on or off for this logger. More...
 
virtual void LogContextStatistics (const char *const text)
  More...
 
- Public Member Functions inherited from Dali::Internal::Adaptor::PerformanceInterface
 PerformanceInterface ()
 Constructor. More...
 
virtual ~PerformanceInterface ()
 Virtual destructor. More...
 

Private Member Functions

void LogMarker (const PerformanceMarker &marker, const char *const description)
 log the marker out to kernel/ DALi log More...
 

Private Attributes

const EnvironmentOptionsmEnvironmentOptions
 environment options More...
 
TraceInterfacemKernelTrace
 kernel trace interface More...
 
TraceInterfacemSystemTrace
 system trace interface More...
 
Dali::Mutex mLogMutex
 mutex More...
 
StatContextManager mStatContextManager
 Stat context manager. More...
 
unsigned int mStatisticsLogBitmask
 statistics log level More...
 
unsigned int mPerformanceOutputBitmask
 performance marker output More...
 
bool mLoggingEnabled:1
 whether logging update / render to a log is enabled More...
 
bool mLogFunctionInstalled:1
 whether the log function is installed More...
 

Additional Inherited Members

- Public Types inherited from Dali::Internal::Adaptor::PerformanceInterface
enum  StatisticsLogOptions {
  DISABLED = 0, LOG_EVERYTHING = 1 << 0, LOG_UPDATE_RENDER = 1 << 1, LOG_EVENT_PROCESS = 1 << 2,
  LOG_CUSTOM_MARKERS = 1 << 3
}
 bitmask of statistics logging options. More...
 
enum  TimeStampOutput {
  NO_TIME_STAMP_OUTPUT = 0, OUTPUT_DALI_LOG = 1 << 0, OUTPUT_KERNEL_TRACE = 1 << 1, OUTPUT_SYSTEM_TRACE = 1 << 2,
  OUTPUT_NETWORK = 1 << 3
}
 bitmask of time stamp output options. More...
 
enum  MarkerType {
  VSYNC = 0, UPDATE_START, UPDATE_END, RENDER_START,
  RENDER_END, SWAP_START, SWAP_END, PROCESS_EVENTS_START,
  PROCESS_EVENTS_END, PAUSED, RESUME, START,
  END
}
 enum for difference performance markers. More...
 
typedef unsigned short ContextId
 Type to represent a context ID. More...
 
- Protected Member Functions inherited from Dali::Internal::Adaptor::StatContextLogInterface
 StatContextLogInterface ()
 Constructor. More...
 
virtual ~StatContextLogInterface ()
 Virtual Destructor. More...
 

Detailed Description

Concrete implementation of performance interface.

Adaptor classes should never include this file, they just need to include the abstract class performance-interface.h

Definition at line 48 of file performance-server.h.

Constructor & Destructor Documentation

Dali::Internal::Adaptor::PerformanceServer::PerformanceServer ( AdaptorInternalServices adaptorServices,
const EnvironmentOptions environmentOptions 
)

Constructor.

Parameters
[in]adaptorServicesadaptor internal services
[in]environmentOptionsenvironment options

Definition at line 43 of file performance-server.cpp.

References Dali::Internal::Adaptor::EnvironmentOptions::GetPerformanceStatsLoggingFrequency(), Dali::Internal::Adaptor::EnvironmentOptions::GetPerformanceStatsLoggingOptions(), Dali::Internal::Adaptor::EnvironmentOptions::GetPerformanceTimeStampOutput(), mEnvironmentOptions, mLoggingEnabled, and SetLogging().

Here is the call graph for this function:

Dali::Internal::Adaptor::PerformanceServer::~PerformanceServer ( )
virtual

Destructor.

Definition at line 70 of file performance-server.cpp.

References mEnvironmentOptions, mLogFunctionInstalled, and Dali::Internal::Adaptor::EnvironmentOptions::UnInstallLogFunction().

Here is the call graph for this function:

Member Function Documentation

PerformanceInterface::ContextId Dali::Internal::Adaptor::PerformanceServer::AddContext ( const char *  name)
virtual
void Dali::Internal::Adaptor::PerformanceServer::AddMarker ( MarkerType  markerType)
virtual
void Dali::Internal::Adaptor::PerformanceServer::AddMarker ( MarkerType  markerType,
ContextId  contextId 
)
virtual
void Dali::Internal::Adaptor::PerformanceServer::EnableLogging ( bool  enable,
ContextId  contextId 
)
virtual

Set logging on or off for this logger.

Parameters
[in]enableEnable logging or not

Implements Dali::Internal::Adaptor::PerformanceInterface.

Definition at line 109 of file performance-server.cpp.

References Dali::Internal::Adaptor::StatContextManager::EnableLogging(), and mStatContextManager.

Here is the call graph for this function:

void Dali::Internal::Adaptor::PerformanceServer::LogContextStatistics ( const char *const  text)
virtual

Implements Dali::Internal::Adaptor::StatContextLogInterface.

Definition at line 188 of file performance-server.cpp.

References Dali::Integration::Log::DebugInfo, and Dali::Integration::Log::LogMessage().

Here is the call graph for this function:

void Dali::Internal::Adaptor::PerformanceServer::LogMarker ( const PerformanceMarker marker,
const char *const  description 
)
private
void Dali::Internal::Adaptor::PerformanceServer::RemoveContext ( ContextId  contextId)
virtual

Implements Dali::Internal::Adaptor::PerformanceInterface.

Definition at line 120 of file performance-server.cpp.

References mStatContextManager, and Dali::Internal::Adaptor::StatContextManager::RemoveContext().

Here is the call graph for this function:

void Dali::Internal::Adaptor::PerformanceServer::SetLogging ( unsigned int  statisticsLogOptions,
unsigned int  timeStampOutput,
unsigned int  logFrequency 
)
virtual

Set the logging level and frequency.

Parameters
[in]StatisticsLogOptions0 = disabled, >0 bitmask of StatisticsLogOptions
[in]timeStampOutput0 = disabled, > 0 bitmask of TimeStampOutput options.
[in]logFrequencyhow often to log out in seconds

Implements Dali::Internal::Adaptor::PerformanceInterface.

Definition at line 85 of file performance-server.cpp.

References mLoggingEnabled, mPerformanceOutputBitmask, mStatContextManager, mStatisticsLogBitmask, and Dali::Internal::Adaptor::StatContextManager::SetLoggingLevel().

Referenced by PerformanceServer().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::Adaptor::PerformanceServer::SetLoggingFrequency ( unsigned int  logFrequency,
ContextId  contextId 
)
virtual

Set the logging frequency.

Parameters
logFrequencyhow often to log out in seconds

Implements Dali::Internal::Adaptor::PerformanceInterface.

Definition at line 104 of file performance-server.cpp.

References mStatContextManager, and Dali::Internal::Adaptor::StatContextManager::SetLoggingFrequency().

Here is the call graph for this function:

Member Data Documentation

const EnvironmentOptions& Dali::Internal::Adaptor::PerformanceServer::mEnvironmentOptions
private

environment options

Definition at line 120 of file performance-server.h.

Referenced by AddMarker(), PerformanceServer(), and ~PerformanceServer().

TraceInterface& Dali::Internal::Adaptor::PerformanceServer::mKernelTrace
private

kernel trace interface

Definition at line 121 of file performance-server.h.

Referenced by LogMarker().

bool Dali::Internal::Adaptor::PerformanceServer::mLogFunctionInstalled
private

whether the log function is installed

Definition at line 135 of file performance-server.h.

Referenced by AddMarker(), and ~PerformanceServer().

bool Dali::Internal::Adaptor::PerformanceServer::mLoggingEnabled
private

whether logging update / render to a log is enabled

Definition at line 134 of file performance-server.h.

Referenced by AddMarker(), PerformanceServer(), and SetLogging().

Dali::Mutex Dali::Internal::Adaptor::PerformanceServer::mLogMutex
private

mutex

Definition at line 123 of file performance-server.h.

Referenced by LogMarker().

unsigned int Dali::Internal::Adaptor::PerformanceServer::mPerformanceOutputBitmask
private

performance marker output

Definition at line 132 of file performance-server.h.

Referenced by LogMarker(), and SetLogging().

StatContextManager Dali::Internal::Adaptor::PerformanceServer::mStatContextManager
private

Stat context manager.

Definition at line 130 of file performance-server.h.

Referenced by AddContext(), AddMarker(), EnableLogging(), RemoveContext(), SetLogging(), and SetLoggingFrequency().

unsigned int Dali::Internal::Adaptor::PerformanceServer::mStatisticsLogBitmask
private

statistics log level

Definition at line 131 of file performance-server.h.

Referenced by SetLogging().

TraceInterface& Dali::Internal::Adaptor::PerformanceServer::mSystemTrace
private

system trace interface

Definition at line 122 of file performance-server.h.

Referenced by LogMarker().


The documentation for this class was generated from the following files:
Dali Docs Home
Read more about Dali