32 # pragma GCC diagnostic ignored "-Wunused-function" 34 #include "ittnotify.h" 44 using extends::extends;
58 const __itt_event parent_event_ = 0 )
74 this,
"StartFromEventN", 1,
"After what event we stop profiling. If 0 than we also profile finalization stage."};
76 this,
"StopAtEventN", 0,
77 "After what event we stop profiling. If 0 than we also profile finalization stage. Default = 0."};
80 "ComponentsForTaskTypes",
82 "Algorithm name, for which intel amplifier task type will be created." 83 "By default all algorithms have a corresponding task type."};
85 "The String delimiter between sequences/algorithms names in " 86 "\"Task Type\" grouping at Amplifier. Default=\" \"."};
88 "Enable frames (needed for detecting slow events). Default=false."};
90 "Frames rate. The recommended maximum rate for calling the Frame API is " 91 "1000 frames (events) per second. A higher rate may result in large product" 92 " memory consumption and slow finalization. " 93 "You need update \"slow-frames-threshold\" and \"fast-frames-threshold\" " 94 "parameters of amplxe-cl tool to separate slow, medium and fast events. " 95 "For use frames you need to switch on \"EnableFrames\". " 138 __itt_event taskId = 0;
151 if ( parent != NULL ) {
152 if ( parent->
event ) {
159 if ( taskId &&
state.parent_event ) {
161 __itt_event_end(
state.parent_event );
170 __itt_event_start(
state.event );
223 for (
const auto& value :
m_stack ) {
224 result += delim + value.name;
239 inSvc->
addListener(
this, IncidentType::BeginEvent );
242 inSvc->
addListener(
this, IncidentType::EndProcessing );
244 std::string str_excluded, str_included, str_eventtypes;
262 domain = __itt_domain_create(
"Event loop" );
269 if ( IncidentType::BeginEvent != incident.
type() )
return;
340 if (
state.event != 0 ) {
342 __itt_event_end(
state.event );
344 if (
state.parent_event != 0 ) {
346 __itt_event_start(
state.parent_event );
353 }
else if (
state.status ) {
void start_profiling_component(const std::string &name)
std::map< std::string, __itt_event > TaskTypes
Gaudi::Property< int > m_nStartFromEvent
Gaudi::Property< int > m_nStopAtEvent
Implementation of property with value of concrete type.
const std::string & type() const
Access to the incident type.
void after(StandardEventType type, INamedInterface *i, const StatusCode &sc) override
Gaudi::Property< std::vector< std::string > > m_algs_for_tasktypes
void skip_profiling_component(const std::string &name)
constexpr static const auto SUCCESS
Gaudi::Property< std::vector< std::string > > m_included
StatusCode initialize() override
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
SmartIF< ISvcLocator > & serviceLocator() const override
The standard service locator.
Gaudi::Property< int > m_frames_rate
virtual const std::string & name() const =0
Retrieve the name of the instance.
#define DECLARE_COMPONENT(type)
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
stack_entity(const std::string &name_, bool status_, const __itt_event event_=0, const __itt_event parent_event_=0)
This class is used for returning status codes from appropriate routines.
void after(StandardEventType, INamedInterface *, const StatusCode &) override
Gaudi::Property< std::vector< std::string > > m_excluded
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
bool isExcluded(const std::string &name) const
Gaudi::Property< bool > m_enable_frames
std::vector< stack_entity > m_stack
IInterface compliant class extending IInterface with the name() method.
Gaudi::Property< std::string > m_alg_delim
Base class used to extend a class implementing other interfaces.
void handle(const Incident &incident) override
Base class for all Incidents (computing events).
virtual void addListener(IIncidentListener *lis, const std::string &type="", long priority=0, bool rethrow=false, bool singleShot=false)=0
Add listener.
std::string taskTypeName(const std::string &component_name) const
const std::string & name() const override
std::string stackIndent(bool newLevel=false) const
bool isIncluded(const std::string &name) const
std::string typeName(const std::type_info &typ)
void before(StandardEventType, INamedInterface *) override
The following methods are meant to be implemented by the child class...
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
The interface implemented by the IncidentSvc service.
void before(StandardEventType type, INamedInterface *i) override