Go to the documentation of this file.
32 # pragma GCC diagnostic ignored "-Wunused-function"
34 #include <ittnotify.h>
44 using extends::extends;
58 const __itt_event parent_event_ = 0 )
72 this,
"IncludeAlgorithms", {},
"Names of included algorithms." };
74 this,
"ExcludeAlgorithms", {},
"Names of excluded algorithms." };
76 this,
"StartFromEventN", 1,
"After what event we stop profiling. If 0 than we also profile finalization stage." };
78 this,
"StopAtEventN", 0,
79 "After what event we stop profiling. If 0 than we also profile finalization stage. Default = 0." };
82 "ComponentsForTaskTypes",
84 "Algorithm name, for which intel amplifier task type will be created."
85 "By default all algorithms have a corresponding task type." };
87 "The String delimiter between sequences/algorithms names in "
88 "\"Task Type\" grouping at Amplifier. Default=\" \"." };
90 "Enable frames (needed for detecting slow events). Default=false." };
92 "Frames rate. The recommended maximum rate for calling the Frame API is "
93 "1000 frames (events) per second. A higher rate may result in large product"
94 " memory consumption and slow finalization. "
95 "You need update \"slow-frames-threshold\" and \"fast-frames-threshold\" "
96 "parameters of amplxe-cl tool to separate slow, medium and fast events. "
97 "For use frames you need to switch on \"EnableFrames\". "
140 __itt_event taskId = 0;
153 if ( parent != NULL ) {
154 if ( parent->
event ) {
161 if ( taskId &&
state.parent_event ) {
163 __itt_event_end(
state.parent_event );
172 __itt_event_start(
state.event );
225 for (
const auto& value :
m_stack ) {
226 result += delim + value.name;
233 info() <<
"Initialised" <<
endmsg;
239 inSvc->
addListener(
this, IncidentType::BeginEvent );
242 inSvc->addListener(
this, IncidentType::EndProcessing );
244 std::string str_excluded, str_included, str_eventtypes;
250 info() <<
"Included algorithms (" <<
m_included.size() <<
"): " << str_included <<
endmsg;
254 info() <<
"Excluded algorithms (" <<
m_excluded.size() <<
"): " << str_excluded <<
endmsg;
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 ) {
Gaudi::Property< std::vector< std::string > > m_algs_for_tasktypes
void before(StandardEventType type, INamedInterface *i) override
Gaudi::Property< std::vector< std::string > > m_included
void after(StandardEventType type, INamedInterface *i, const StatusCode &sc) override
virtual void addListener(IIncidentListener *lis, const std::string &type="", long priority=0, bool rethrow=false, bool singleShot=false)=0
Add listener.
void skip_profiling_component(const std::string &name)
void start_profiling_component(const std::string &name)
void before(StandardEventType, INamedInterface *) override
The following methods are meant to be implemented by the child class...
virtual const std::string & name() const =0
Retrieve the name of the instance.
Gaudi::Property< int > m_frames_rate
stack_entity(const std::string &name_, bool status_, const __itt_event event_=0, const __itt_event parent_event_=0)
const std::string & name() const override
Gaudi::Property< std::vector< std::string > > m_excluded
void after(StandardEventType, INamedInterface *, const StatusCode &) override
StatusCode initialize() override
std::vector< stack_entity > m_stack
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
void handle(const Incident &incident) override
Base class used to extend a class implementing other interfaces.
constexpr static const auto SUCCESS
std::string typeName(const std::type_info &typ)
bool isExcluded(const std::string &name) const
std::map< std::string, __itt_event > TaskTypes
#define DECLARE_COMPONENT(type)
Gaudi::Property< bool > m_enable_frames
const std::string & type() const
Access to the incident type.
Gaudi::Property< std::string > m_alg_delim
Gaudi::Property< int > m_nStopAtEvent
bool isIncluded(const std::string &name) const
SmartIF< ISvcLocator > & serviceLocator() const override
The standard service locator.
std::string taskTypeName(const std::string &component_name) const
Implementation of property with value of concrete type.
std::string stackIndent(bool newLevel=false) const
Gaudi::Property< int > m_nStartFromEvent