struct
#include <src/vt/trace/trace.h>
Trace A optional VT component that traces execution on multiple node for performance analysis.
Traces distributed execution on every node for registered handlers, user events, and MPI invocations, to produce traces that can be analyzed after the program terminates. Tracks dependencies between handlers for later analysis. VT handlers are automatically traced through registration and dispatch from the scheduler. Through the PMPI interface, MPI events can be traced while VT is not running.
Outputs Projections log and sts files, which can be examined by the java Projections tool.
Base classes
-
template<typename T>struct vt::runtime::component::Component<Trace>
Component
class for a generic VT runtime module, CRTP'ed over the component's actual type- struct TraceLite
Public static functions
Constructors, destructors, conversion operators
Public functions
- auto name() -> std::string override
- Get the name of the component.
- void initialize() override
- Empty default overridden initialize method.
- void startup() override
- Empty default overridden startup method.
- void finalize() override
- Empty default overridden finalize method.
-
void setProxy(objgroup::
proxy:: Proxy<Trace> in_proxy) - auto beginProcessing(TraceEntryIDType const ep, TraceMsgLenType const len, TraceEventIDType const event, NodeType const from_node, TimeType const time, uint64_t const idx1 = 0, uint64_t const idx2 = 0, uint64_t const idx3 = 0, uint64_t const idx4 = 0) -> TraceProcessingTag
- Initiate a paired processing event.
- void endProcessing(TraceProcessingTag const& processing_tag, TimeType const time)
- Finalize a paired event.
- void pendingSchedulerLoop()
- Scheduler trigger for
sched::SchedulerEvent::PendingSchedulerLoop
. - auto beginSchedulerLoop() -> TimeType
- Scheduler trigger for
sched::SchedulerEvent::BeginSchedulerLoop
. - void endSchedulerLoop()
- Scheduler trigger for
sched::SchedulerEvent::EndSchedulerLoop
. - auto registerUserEventRoot(std::string const& name) -> UserEventIDType
- Register a user event rooted on a single node.
- auto registerUserEventHash(std::string const& name) -> UserEventIDType
- Idempotent registration of a user event using a hash of its name.
- void registerUserEventManual(std::string const& name, UserSpecEventIDType id)
- Manually register a user event, directly passing the ID for the sts file.
- void addUserEvent(UserEventIDType event)
- Log a user event.
- void addUserEventManual(UserSpecEventIDType event)
- Log a user event generated manually.
- void addUserEventBracketedManual(UserSpecEventIDType event, TimeType begin, TimeType end)
- Log a bracketed user event manually with start and end time.
- void addUserEventBracketedBegin(UserEventIDType event)
- Log the start of a user event that is bracketed.
- void addUserEventBracketedEnd(UserEventIDType event)
- Log the end of a user event that is bracketed.
- void addUserEventBracketedManualBegin(UserSpecEventIDType event)
- Log the start of a manual user event that is bracketed.
- void addUserEventBracketedManualEnd(UserSpecEventIDType event)
- Log the end of a manual user event that is bracketed.
- void addUserNote(std::string const& note)
- Log a user note.
- void addUserData(int32_t data)
- Log a user note with an integer.
- void setUserEvents(const UserEventRegistry& events)
- Update event registry on Node 0 with all gathered events.
- void gatherUserEvents()
- Gathers all user-defined event hashes onto node 0.
- void addMemoryEvent(std::size_t memory, TimeType const time = getCurrentTime())
- Log a memory usage event.
- auto messageCreation(TraceEntryIDType const ep, TraceMsgLenType const len, TimeType const time = getCurrentTime()) -> TraceEventIDType
- Log a message send.
- auto messageCreationBcast(TraceEntryIDType const ep, TraceMsgLenType const len, TimeType const time = getCurrentTime()) -> TraceEventIDType
- Log a message broadcast.
- auto messageRecv(TraceEntryIDType const ep, TraceMsgLenType const len, NodeType const from_node, TimeType const time = getCurrentTime()) -> TraceEventIDType
- Log a received message.
- void loadAndBroadcastSpec()
- Load and broadcast the trace specification file.
- void setTraceEnabledCurrentPhase(PhaseType cur_phase)
- Tell tracing that a new phase has been reached so tracing can be enabled/disabled based on a specification file.
- auto inIdleEvent() const -> bool
- Check if trace is in a idle event.
- void setInInvokeContext(bool set)
- Set if we are inside an invoke context.
- auto inInvokeContext() const -> bool
- Return if we are inside an invoke context.
-
template<typename SerializerT>void serialize(SerializerT& s)
Friends
- void insertNewUserEvent(UserEventIDType event, std::string const& name)
Function documentation
vt:: trace:: Trace:: Trace(std::string const& in_prog_name)
System call to construct the trace component.
Parameters | |
---|---|
in_prog_name in | the program name |
TraceProcessingTag vt:: trace:: Trace:: beginProcessing(TraceEntryIDType const ep,
TraceMsgLenType const len,
TraceEventIDType const event,
NodeType const from_node,
TimeType const time,
uint64_t const idx1 = 0,
uint64_t const idx2 = 0,
uint64_t const idx3 = 0,
uint64_t const idx4 = 0)
Initiate a paired processing event.
Parameters | |
---|---|
ep in | the entry point (registered handler ID) |
len in | size of message in bytes |
event in | the associated trace event |
from_node in | which node instigated this processing |
time in | the time this occurred |
idx1 in | (optional) if collection, dimension 1 |
idx2 in | (optional) if collection, dimension 2 |
idx3 in | (optional) if collection, dimension 3 |
idx4 in | (optional) if collection, dimension 4 |
Returns | a tag to close this processing event |
Currently endProcessing
MUST be called in the opposite order of beginProcessing
void vt:: trace:: Trace:: endProcessing(TraceProcessingTag const& processing_tag,
TimeType const time)
Finalize a paired event.
Parameters | |
---|---|
processing_tag in | the matching tag from beginProcessing |
time in | the time this occurred |
The processing_tag
value comes from beginProcessing
.
TimeType vt:: trace:: Trace:: beginSchedulerLoop()
Scheduler trigger for sched::SchedulerEvent::BeginSchedulerLoop
.
Returns | the time the between scheduler event was ended |
---|
UserEventIDType vt:: trace:: Trace:: registerUserEventRoot(std::string const& name)
Register a user event rooted on a single node.
Parameters | |
---|---|
name in | name for the user event |
Returns | the user event ID |
UserEventIDType vt:: trace:: Trace:: registerUserEventHash(std::string const& name)
Idempotent registration of a user event using a hash of its name.
Parameters | |
---|---|
name in | name for the user event |
Returns | the user event ID |
void vt:: trace:: Trace:: registerUserEventManual(std::string const& name,
UserSpecEventIDType id)
Manually register a user event, directly passing the ID for the sts file.
Parameters | |
---|---|
name in | name for the user event |
id in | the ID for the sts file |
void vt:: trace:: Trace:: addUserEvent(UserEventIDType event)
Log a user event.
Parameters | |
---|---|
event in | the event ID |
void vt:: trace:: Trace:: addUserEventManual(UserSpecEventIDType event)
Log a user event generated manually.
Parameters | |
---|---|
event in | the event ID |
void vt:: trace:: Trace:: addUserEventBracketedManual(UserSpecEventIDType event,
TimeType begin,
TimeType end)
Log a bracketed user event manually with start and end time.
Parameters | |
---|---|
event in | the ID for the sts file |
begin in | the begin time |
end in | the end time |
void vt:: trace:: Trace:: addUserEventBracketedBegin(UserEventIDType event)
Log the start of a user event that is bracketed.
Parameters | |
---|---|
event in | the event ID |
void vt:: trace:: Trace:: addUserEventBracketedEnd(UserEventIDType event)
Log the end of a user event that is bracketed.
Parameters | |
---|---|
event in | the event ID |
void vt:: trace:: Trace:: addUserEventBracketedManualBegin(UserSpecEventIDType event)
Log the start of a manual user event that is bracketed.
Parameters | |
---|---|
event in | the ID for the sts file |
void vt:: trace:: Trace:: addUserEventBracketedManualEnd(UserSpecEventIDType event)
Log the end of a manual user event that is bracketed.
Parameters | |
---|---|
event in | the ID for the sts file |
void vt:: trace:: Trace:: addUserNote(std::string const& note)
Log a user note.
Parameters | |
---|---|
note in | the note to add |
void vt:: trace:: Trace:: addUserData(int32_t data)
Log a user note with an integer.
Parameters | |
---|---|
data in | the integer to add |
void vt:: trace:: Trace:: addMemoryEvent(std::size_t memory,
TimeType const time = getCurrentTime())
Log a memory usage event.
Parameters | |
---|---|
memory in | the amount of memory used |
time in | the time it occurred |
TraceEventIDType vt:: trace:: Trace:: messageCreation(TraceEntryIDType const ep,
TraceMsgLenType const len,
TimeType const time = getCurrentTime())
Log a message send.
Parameters | |
---|---|
ep in | the handler ID |
len in | the size of the message in bytes |
time in | the time is was sent |
Returns | the trace event ID |
TraceEventIDType vt:: trace:: Trace:: messageCreationBcast(TraceEntryIDType const ep,
TraceMsgLenType const len,
TimeType const time = getCurrentTime())
Log a message broadcast.
Parameters | |
---|---|
ep in | the handler ID |
len in | the size of the message in bytes |
time in | the time is was sent |
Returns | the trace event ID |
TraceEventIDType vt:: trace:: Trace:: messageRecv(TraceEntryIDType const ep,
TraceMsgLenType const len,
NodeType const from_node,
TimeType const time = getCurrentTime())
Log a received message.
Parameters | |
---|---|
ep in | the handler ID |
len in | the size of the message in bytes |
from_node in | node that sent the message |
time in | the time is was sent |
Returns | the trace event ID |
void vt:: trace:: Trace:: setTraceEnabledCurrentPhase(PhaseType cur_phase)
Tell tracing that a new phase has been reached so tracing can be enabled/disabled based on a specification file.
Parameters | |
---|---|
cur_phase in | the phase |
bool vt:: trace:: Trace:: inIdleEvent() const
Check if trace is in a idle event.
Returns | whether in an idle event |
---|
void vt:: trace:: Trace:: setInInvokeContext(bool set)
Set if we are inside an invoke context.
Parameters | |
---|---|
set in | the variable value to set |
bool vt:: trace:: Trace:: inInvokeContext() const
Return if we are inside an invoke context.
Returns | whether we are inside an invoke context |
---|