Profiling service using the PAPI library. More...
#include <arcane/std/PapiPerformanceService.h>
Public Member Functions | |
| PapiPerformanceService (const ServiceBuildInfo &sbi) | |
| void | initialize () override |
| Initializes the profiling service. | |
| bool | isInitialized () const override |
| Indicates if initialize() has already been called. | |
| void | startProfiling () override |
| Starts profiling. | |
| void | switchEvent () override |
| void | stopProfiling () override |
| Stops profiling. | |
| void | printInfos (bool dump_file) override |
| Displays profiling information. | |
| void | getInfos (Int64Array &) override |
| void | dumpJSON (JSONWriter &writer) override |
| Writes the profiling information to the writer writer. | |
| void | reset () override |
| Resets the counters. | |
| ITimerMng * | timerMng () override |
| Timer using the features of this service if they exist. Can be null. | |
| Public Member Functions inherited from Arcane::AbstractService | |
| ~AbstractService () override | |
| Destructor. | |
| virtual void | build () |
| Build-level construction of the service. | |
| IServiceInfo * | serviceInfo () const override |
| Access to service information. See IServiceInfo for details. | |
| IBase * | serviceParent () const override |
| Access to the base interface of main Arcane objects. | |
| IService * | serviceInterface () override |
| Returns the low-level IService interface of the service. | |
| Public Member Functions inherited from Arcane::TraceAccessor | |
| TraceAccessor (ITraceMng *m) | |
| Constructs an accessor via the trace manager m. | |
| TraceAccessor (const TraceAccessor &rhs) | |
| Copy constructor. | |
| TraceAccessor & | operator= (const TraceAccessor &rhs) |
| Copy assignment operator. | |
| virtual | ~TraceAccessor () |
| Frees resources. | |
| ITraceMng * | traceMng () 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 |
| Public Member Functions inherited from Arcane::IService | |
| virtual | ~IService () |
| Releases resources. | |
Private Member Functions | |
| void | _printFlops () |
| bool | _addEvent (int event_code, int event_index) |
Static Private Member Functions | |
| static void | arcane_papi_handler (int EventSet, void *address, long_long overflow_vector, void *context) |
Private Attributes | |
| int | m_period = 0 |
| int | m_event_set = 0 |
| bool | m_only_flops = false |
| bool | m_is_running = false |
| bool | m_is_initialized = false |
| ITimerMng * | m_timer_mng = nullptr |
| IApplication * | m_application = nullptr |
Additional Inherited Members | |
| Protected Member Functions inherited from Arcane::AbstractService | |
| AbstractService (const ServiceBuildInfo &) | |
| Constructor from a ServiceBuildInfo. | |
| Protected Member Functions inherited from Arcane::TraceAccessor | |
| void | _setLocalVerboseLevel (Int32 v) |
| Int32 | _localVerboseLevel () const |
| Protected Member Functions inherited from Arcane::IService | |
| IService () | |
| Constructor. | |
Profiling service using the PAPI library.
Definition at line 35 of file PapiPerformanceService.h.
|
explicit |
Definition at line 77 of file PapiPerformanceService.cc.
|
override |
Definition at line 89 of file PapiPerformanceService.cc.
|
private |
Definition at line 137 of file PapiPerformanceService.cc.
|
private |
Definition at line 304 of file PapiPerformanceService.cc.
|
staticprivate |
Definition at line 107 of file PapiPerformanceService.cc.
|
overridevirtual |
Writes the profiling information to the writer writer.
Implements Arcane::IProfilingService.
Definition at line 369 of file PapiPerformanceService.cc.
|
overridevirtual |
Implements Arcane::IProfilingService.
Definition at line 379 of file PapiPerformanceService.cc.
|
overridevirtual |
Initializes the profiling service.
This method can only be called once.
Implements Arcane::IProfilingService.
Definition at line 156 of file PapiPerformanceService.cc.
References ARCANE_FATAL, Arcane::TraceAccessor::fatal(), Arcane::platform::getEnvironmentVariable(), Arcane::TraceAccessor::info(), Arcane::String::localstr(), Arcane::math::min(), Arcane::String::null(), Arcane::TraceAccessor::pwarning(), Arcane::AbstractArray< T >::size(), Arcane::String::split(), and Arcane::TraceAccessor::traceMng().
|
inlineoverridevirtual |
Indicates if initialize() has already been called.
Reimplemented from Arcane::IProfilingService.
Definition at line 47 of file PapiPerformanceService.h.
|
overridevirtual |
Displays profiling information.
Profiling must be stopped. If dump_file is true, file outputs containing the information are generated, which may take time.
Implements Arcane::IProfilingService.
Definition at line 359 of file PapiPerformanceService.cc.
|
overridevirtual |
Resets the counters.
Profiling must be stopped for this.
Implements Arcane::IProfilingService.
Definition at line 389 of file PapiPerformanceService.cc.
|
overridevirtual |
Starts profiling.
Implements Arcane::IProfilingService.
Definition at line 277 of file PapiPerformanceService.cc.
References ARCANE_CHECK_POINTER, and ARCANE_FATAL.
|
overridevirtual |
Stops profiling.
Implements Arcane::IProfilingService.
Definition at line 333 of file PapiPerformanceService.cc.
References ARCANE_FATAL.
|
overridevirtual |
Implements Arcane::IProfilingService.
Definition at line 296 of file PapiPerformanceService.cc.
|
overridevirtual |
Timer using the features of this service if they exist. Can be null.
Implements Arcane::IProfilingService.
Definition at line 565 of file PapiPerformanceService.cc.
References Arcane::TraceAccessor::traceMng().
|
private |
Definition at line 65 of file PapiPerformanceService.h.
|
private |
Definition at line 60 of file PapiPerformanceService.h.
|
private |
Definition at line 63 of file PapiPerformanceService.h.
|
private |
Definition at line 62 of file PapiPerformanceService.h.
|
private |
Definition at line 61 of file PapiPerformanceService.h.
|
private |
Definition at line 59 of file PapiPerformanceService.h.
|
private |
Definition at line 64 of file PapiPerformanceService.h.