Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::ProfInfos Class Reference
Inheritance diagram for Arcane::ProfInfos:
Collaboration diagram for Arcane::ProfInfos:

Classes

class  SortedProfStackInfo
struct  FuncAddrInfo
class  IStackInfoProvider
 Interface to retrieve call stack information. More...
class  IFuncInfoProvider
class  NullFuncInfoProvider

Public Types

typedef std::map< void *, ProfAddrInfo, std::less< void * >, StaticAlloc< std::pair< void *const, ProfAddrInfo > > > AddrMap
typedef std::map< Int64, ProfFuncInfo *, std::less< Int64 >, StaticAlloc< std::pair< const Int64, ProfFuncInfo * > > > FuncMap
typedef std::map< ProfStackInfo, Int64, std::less< ProfStackInfo >, StaticAlloc< std::pair< const ProfStackInfo, Int64 > > > StackMap

Public Member Functions

 ProfInfos (ITraceMng *tm)
void printInfos (bool dump_file)
void dumpJSON (JSONWriter &writer)
void getInfos (Int64Array &)
void startProfiling ()
void addEvent (void *address, int overflow_event[MAX_COUNTER], int nb_overflow_event)
void stopProfiling ()
void reset ()
void setFunctionDepth (int v)
void setPeriod (int v)
void setNbEventBeforeGettingStack (Integer v)
Int64 nbEventBeforeGettingStack () const
Public Member Functions inherited from Arcane::TraceAccessor
 TraceAccessor (ITraceMng *m)
 Constructs an accessor via the trace manager m.
 TraceAccessor (const TraceAccessor &rhs)
 Copy constructor.
TraceAccessoroperator= (const TraceAccessor &rhs)
 Copy assignment operator.
virtual ~TraceAccessor ()
 Frees resources.
ITraceMngtraceMng () const
 Trace manager.
TraceMessage info () const
 Flow for an information message.
TraceMessage pinfo () const
 Flow for a parallel information message.
TraceMessage info (char category) const
 Flow for an information message of a given category.
TraceMessage pinfo (char category) const
 Flow for a parallel information message of a given category.
TraceMessage info (bool v) const
 Flow for an information message.
TraceMessage warning () const
 Flow for a warning message.
TraceMessage pwarning () const
TraceMessage error () const
 Flow for an error message.
TraceMessage perror () const
TraceMessage log () const
 Flow for a log message.
TraceMessage plog () const
 Flow for a log message.
TraceMessage logdate () const
 Flow for a log message preceded by the date.
TraceMessage fatal () const
 Flow for a fatal error message.
TraceMessage pfatal () const
 Flow for a parallel fatal error message.
TraceMessageDbg debug (Trace::eDebugLevel=Trace::Medium) const
 Flow for a debug message.
Trace::eDebugLevel configDbgLevel () const
 Debug level of the configuration file.
TraceMessage info (Int32 verbose_level) const
 Flow for an information message of a given level.
TraceMessage linfo () const
 Flow for an information message with the local information level of this instance.
TraceMessage linfo (Int32 relative_level) const
 Flow for an information message with the local information level of this instance.
void fatalMessage (const StandaloneTraceMessage &o) const

Protected Member Functions

void _addEvent (void *address, int overflow_event[MAX_COUNTER], int nb_overflow_event, IStackInfoProvider &stack_info, Integer function_depth)
bool _getFunc (void *addr, FuncAddrInfo &info)
void _sortFunctions (std::set< ProfFuncInfo *, ProfFuncComparer > &sorted_func)
Protected Member Functions inherited from Arcane::TraceAccessor
void _setLocalVerboseLevel (Int32 v)
Int32 _localVerboseLevel () const

Private Member Functions

ProfFuncInfo_getNextFuncInfo ()
ProfFuncInfo_funcInfoFromIndex (Int32 index)
void _storeAddress (void *address, bool is_counter0, int overflow_event[MAX_COUNTER], int nb_overflow_event, bool *do_add, bool *do_stack, bool *func_already_added)
void _checkNotStarted ()

Private Attributes

AddrMap m_addr_map
FuncMap m_func_map
StackMap m_stack_map
Int64 m_total_event = 0
Int64 m_total_stack = 0
Int64 m_counters [MAX_COUNTER]
Int32 m_current_func_info = 0
ProfFuncInfo m_func_info_buffer [MAX_FUNC]
int m_period = 0
Int64 m_nb_event_before_getting_stack = 5000
int m_function_depth = 3
bool m_use_backtrace = false
bool m_use_libunwind = false
MonoFuncAddrGetterm_mono_func_getter = nullptr
bool m_is_started = false
IFuncInfoProviderm_default_func_info_provider = nullptr
IFuncInfoProviderm_libunwind_func_info_provider = nullptr
IFuncInfoProviderm_backtrace_func_info_provider = nullptr
IFuncInfoProviderm_func_info_provider = nullptr

Detailed Description

Definition at line 231 of file ProfilingInfo.h.

Member Typedef Documentation

◆ AddrMap

typedef std::map<void*, ProfAddrInfo, std::less<void*>, StaticAlloc<std::pair<void* const, ProfAddrInfo> > > Arcane::ProfInfos::AddrMap

Definition at line 298 of file ProfilingInfo.h.

◆ FuncMap

typedef std::map<Int64, ProfFuncInfo*, std::less<Int64>, StaticAlloc<std::pair<const Int64, ProfFuncInfo*> > > Arcane::ProfInfos::FuncMap

Definition at line 299 of file ProfilingInfo.h.

◆ StackMap

typedef std::map<ProfStackInfo, Int64, std::less<ProfStackInfo>, StaticAlloc<std::pair<const ProfStackInfo, Int64> > > Arcane::ProfInfos::StackMap

Definition at line 300 of file ProfilingInfo.h.

Constructor & Destructor Documentation

◆ ProfInfos()

Arcane::ProfInfos::ProfInfos ( ITraceMng * tm)

Definition at line 494 of file ProfilingInfo.cc.

◆ ~ProfInfos()

Arcane::ProfInfos::~ProfInfos ( )

Definition at line 525 of file ProfilingInfo.cc.

Member Function Documentation

◆ _addEvent()

void Arcane::ProfInfos::_addEvent ( void * address,
int overflow_event[MAX_COUNTER],
int nb_overflow_event,
IStackInfoProvider & stack_info,
Integer function_depth )
protected

Definition at line 709 of file ProfilingInfo.cc.

◆ _checkNotStarted()

void Arcane::ProfInfos::_checkNotStarted ( )
private

Definition at line 603 of file ProfilingInfo.cc.

◆ _funcInfoFromIndex()

ProfFuncInfo & Arcane::ProfInfos::_funcInfoFromIndex ( Int32 index)
inlineprivate

Definition at line 352 of file ProfilingInfo.h.

◆ _getFunc()

bool Arcane::ProfInfos::_getFunc ( void * addr,
FuncAddrInfo & info )
protected

Definition at line 797 of file ProfilingInfo.cc.

◆ _getNextFuncInfo()

ProfFuncInfo * Arcane::ProfInfos::_getNextFuncInfo ( )
private

Definition at line 537 of file ProfilingInfo.cc.

◆ _sortFunctions()

void Arcane::ProfInfos::_sortFunctions ( std::set< ProfFuncInfo *, ProfFuncComparer > & sorted_func)
protected

Definition at line 666 of file ProfilingInfo.cc.

◆ _storeAddress()

void Arcane::ProfInfos::_storeAddress ( void * address,
bool is_counter0,
int overflow_event[MAX_COUNTER],
int nb_overflow_event,
bool * do_add,
bool * do_stack,
bool * func_already_added )
private

Definition at line 677 of file ProfilingInfo.cc.

◆ addEvent()

void Arcane::ProfInfos::addEvent ( void * address,
int overflow_event[MAX_COUNTER],
int nb_overflow_event )

Definition at line 637 of file ProfilingInfo.cc.

◆ dumpJSON()

void Arcane::ProfInfos::dumpJSON ( JSONWriter & writer)

Definition at line 1074 of file ProfilingInfo.cc.

◆ getInfos()

void Arcane::ProfInfos::getInfos ( Int64Array & pkt)

Definition at line 1015 of file ProfilingInfo.cc.

◆ nbEventBeforeGettingStack()

Int64 Arcane::ProfInfos::nbEventBeforeGettingStack ( ) const
inline

Definition at line 318 of file ProfilingInfo.h.

◆ printInfos()

void Arcane::ProfInfos::printInfos ( bool dump_file)

Definition at line 856 of file ProfilingInfo.cc.

◆ reset()

void Arcane::ProfInfos::reset ( )

Definition at line 831 of file ProfilingInfo.cc.

◆ setFunctionDepth()

void Arcane::ProfInfos::setFunctionDepth ( int v)

Definition at line 613 of file ProfilingInfo.cc.

◆ setNbEventBeforeGettingStack()

void Arcane::ProfInfos::setNbEventBeforeGettingStack ( Integer v)
inline

Definition at line 317 of file ProfilingInfo.h.

◆ setPeriod()

void Arcane::ProfInfos::setPeriod ( int v)

Definition at line 623 of file ProfilingInfo.cc.

◆ startProfiling()

void Arcane::ProfInfos::startProfiling ( )

Definition at line 551 of file ProfilingInfo.cc.

◆ stopProfiling()

void Arcane::ProfInfos::stopProfiling ( )

Definition at line 584 of file ProfilingInfo.cc.

Member Data Documentation

◆ m_addr_map

AddrMap Arcane::ProfInfos::m_addr_map
private

Definition at line 322 of file ProfilingInfo.h.

◆ m_backtrace_func_info_provider

IFuncInfoProvider* Arcane::ProfInfos::m_backtrace_func_info_provider = nullptr
private

Definition at line 339 of file ProfilingInfo.h.

◆ m_counters

Int64 Arcane::ProfInfos::m_counters[MAX_COUNTER]
private

Definition at line 327 of file ProfilingInfo.h.

◆ m_current_func_info

Int32 Arcane::ProfInfos::m_current_func_info = 0
private

Definition at line 328 of file ProfilingInfo.h.

◆ m_default_func_info_provider

IFuncInfoProvider* Arcane::ProfInfos::m_default_func_info_provider = nullptr
private

Definition at line 337 of file ProfilingInfo.h.

◆ m_func_info_buffer

ProfFuncInfo Arcane::ProfInfos::m_func_info_buffer[MAX_FUNC]
private

Definition at line 329 of file ProfilingInfo.h.

◆ m_func_info_provider

IFuncInfoProvider* Arcane::ProfInfos::m_func_info_provider = nullptr
private

Definition at line 340 of file ProfilingInfo.h.

◆ m_func_map

FuncMap Arcane::ProfInfos::m_func_map
private

Definition at line 323 of file ProfilingInfo.h.

◆ m_function_depth

int Arcane::ProfInfos::m_function_depth = 3
private

Definition at line 332 of file ProfilingInfo.h.

◆ m_is_started

bool Arcane::ProfInfos::m_is_started = false
private

Definition at line 336 of file ProfilingInfo.h.

◆ m_libunwind_func_info_provider

IFuncInfoProvider* Arcane::ProfInfos::m_libunwind_func_info_provider = nullptr
private

Definition at line 338 of file ProfilingInfo.h.

◆ m_mono_func_getter

MonoFuncAddrGetter* Arcane::ProfInfos::m_mono_func_getter = nullptr
private

Definition at line 335 of file ProfilingInfo.h.

◆ m_nb_event_before_getting_stack

Int64 Arcane::ProfInfos::m_nb_event_before_getting_stack = 5000
private

Definition at line 331 of file ProfilingInfo.h.

◆ m_period

int Arcane::ProfInfos::m_period = 0
private

Definition at line 330 of file ProfilingInfo.h.

◆ m_stack_map

StackMap Arcane::ProfInfos::m_stack_map
private

Definition at line 324 of file ProfilingInfo.h.

◆ m_total_event

Int64 Arcane::ProfInfos::m_total_event = 0
private

Definition at line 325 of file ProfilingInfo.h.

◆ m_total_stack

Int64 Arcane::ProfInfos::m_total_stack = 0
private

Definition at line 326 of file ProfilingInfo.h.

◆ m_use_backtrace

bool Arcane::ProfInfos::m_use_backtrace = false
private

Definition at line 333 of file ProfilingInfo.h.

◆ m_use_libunwind

bool Arcane::ProfInfos::m_use_libunwind = false
private

Definition at line 334 of file ProfilingInfo.h.


The documentation for this class was generated from the following files: