The UIARoundtrip module defines events that allow
tooling to analyze the absolute time elapsed between
a start point event and a stop point event. It differs
from UIABenchmark in that UIABenchmark supports context-awareness
(i.e. exclusive time elapsed) whereas UIARoundtrip is always
inclusive (i.e. the time elapsed that DVT displays includes
time spent in all other threads / tasks).
The following configuration script demonstrates how the application might
control the logging of ANALYSIS events embedded in the Mod module at configuration
time. In this case, the configuration script arranges for the Log
statements within modules to always generate ANALYSIS events.
Without these configuration statements, no ANALYSIS events would be generated
by any modules.
config UIARoundtrip_start // module-wide |
 |
Roundtrip event used to log the start of an operation
VALUES
fmt
a constant string that provides format specifiers for up to 6 additional parameters
EXAMPLE
The following C code shows how to log a simple
roundtrip 'start' event along with a user-specified
format string describing the event.
#include <xdc/runtime/Log.h>
#include <ti/uia/events/UIARoundtrip.h>
...
Log_write1(UIARoundtrip_start, "My roundtrip event");
The following text will be displayed for the event:
Roundtrip_Start: My roundtrip event
config UIARoundtrip_startInstance // module-wide |
 |
Roundtrip event used to log the start of an operation instance
extern const Log_Event UIARoundtrip_startInstance;
VALUES
fmt
a constant string that provides format specifiers for up to 5 additional parameters
instanceId
a unique instance ID that can be used to match Roundtrip start and stop events
DETAILS
Event parameter provides instance data to differentiate
between multiple instances that can run in parallel.
EXAMPLE
The following C code shows how to log a roundtrip
'startInstance' event along with a user-specified
instance identifier and a format string describing the event.
#include <xdc/runtime/Gate.h>
#include <xdc/runtime/Log.h>
#include <ti/uia/events/UIARoundtrip.h>
static volatile int gMyGlobalInstanceId = 0;
...
IArg key;
int localInstanceId;
// protect pre-increment operation from race conditions
key = Gate_enterSystem();
localInstanceId = ++gMyGlobalInstanceId;
Gate_leaveSystem(key);
Log_write2(UIARoundtrip_startInstance, "My roundtrip event: instanceId=%d",localInstanceId);
...
Log_write2(UIARoundtrip_stopInstance, "My roundtrip event: instanceId=%d",localInstanceId);
The following text will be displayed for the event:
Roundtrip_StartInstance: My roundtrip event: instanceId=1
Roundtrip_StopInstance: My roundtrip event: instanceId=1
config UIARoundtrip_startInstanceWithAdrs // module-wide |
 |
Roundtrip event used to log the start of an operation instance
extern const Log_Event UIARoundtrip_startInstanceWithAdrs;
VALUES
fmt
a constant string that provides format specifiers for up to 5 additional parameters
instanceId
a unique instance ID that can be used to match benchmark start and stop events
functionAdrs
the address of a function that can differentiate this pair of start and stop events from others
DETAILS
Event parameter provides instance data to differentiate
between multiple instances that can run in parallel
EXAMPLE
The following C code shows how to log a roundtrip
'startInstanceWithAdrs' event along with a task handle as the
instance identifier, the function address and a format string
describing the event.
#include <ti/sysbios/knl/Task.h>
#include <xdc/runtime/Log.h>
#include <ti/uia/events/UIARoundtrip.h>
...
Void myFunction(){
Task_Handle hTsk = Task_selfMacro();
Log_write3(UIARoundtrip_startInstanceWithAdrs, "My roundtrip event: task=0x%x, fnAdrs=0x%x",(IArg)hTsk,(IArg)&myFunc);
...
Log_write3(UIARoundtrip_stopInstanceWithAdrs, "My roundtrip event: task=0x%x", fnAdrs=0x%x",(IArg)hTsk,(IArg)&myFunc);
}
The following text will be displayed for the event:
Roundtrip_StartInstanceWithAdrs: My roundtrip event: task=0x893230, fnAdrs=0x820060
Roundtrip_StopInstanceWithAdrs: My roundtrip event: task=0x893230, fnAdrs=0x820060
config UIARoundtrip_startInstanceWithStr // module-wide |
 |
Roundtrip event used to log the start of an operation instance
extern const Log_Event UIARoundtrip_startInstanceWithStr;
VALUES
fmt
a constant string that provides format specifiers for up to 4 additional parameters
instanceId
a unique instance ID that can be used to match Roundtrip start and stop events
str
a constant string reference
DETAILS
Event parameter provides instance data to differentiate
between multiple instances that can run in parallel
EXAMPLE
The following C code shows how to log a roundtrip
'startInstanceWithStr' event along with a unique instance identifier
and a string reference used only by the pair of start / stop events.
#include <xdc/runtime/Log.h>
#include <ti/uia/events/UIARoundtrip.h>
...
Void packetHdlr(Int packetId){
Log_write3(UIARoundtrip_startInstanceWithStr, "My roundtrip event: packetId=0x%x",packetId,(IArg)"(routing)");
...
Log_write3(UIARoundtrip_stopInstanceWithStr, "My roundtrip event: packetId=0x%x",packetId,(IArg)"(routing)");
}
The following text will be displayed for the event:
Roundtrip_StartInstanceWithStr: My roundtrip event: packetId=0x3bc3 (routing)
Roundtrip_StopInstanceWithStr: My roundtrip event: packetId=0x3bc3 (routing)
Event parameter provides instance data to differentiate
between multiple instances that can run in parallel
config UIARoundtrip_stop // module-wide |
 |
Roundtrip event used to log the end of an operation
VALUES
fmt
a constant string that provides format specifiers for up to 6 additional parameters
EXAMPLE
The following C code shows how to log a simple
roundtrip 'stop' event along with a user-specified
format string describing the event.
#include <xdc/runtime/Log.h>
#include <ti/uia/events/UIARoundtrip.h>
...
Log_write1(UIARoundtrip_stop, "My roundtrip event");
The following text will be displayed for the event:
Roundtrip_Stop: My roundtrip event
config UIARoundtrip_stopInstance // module-wide |
 |
Roundtrip event used to log the end of an operation instance
extern const Log_Event UIARoundtrip_stopInstance;
VALUES
fmt
a constant string that provides format specifiers for up to 4 additional parameters
instanceId
a unique instance ID that can be used to match Roundtrip start and stop events
DETAILS
Event parameter provides instance data to differentiate
between multiple instances that can run in parallel
EXAMPLE
The following C code shows how to log a roundtrip
'stopInstance' event along with a user-specified
instance identifier and a format string describing the event.
#include <xdc/runtime/Gate.h>
#include <xdc/runtime/Log.h>
#include <ti/uia/events/UIARoundtrip.h>
static volatile int gMyGlobalInstanceId = 0;
...
IArg key;
int localInstanceId;
// protect pre-increment operation from race conditions
key = Gate_enterSystem();
localInstanceId = ++gMyGlobalInstanceId;
Gate_leaveSystem(key);
Log_write2(UIARoundtrip_startInstance, "My roundtrip event: instanceId=%d",localInstanceId);
...
Log_write2(UIARoundtrip_stopInstance, "My roundtrip event: instanceId=%d",localInstanceId);
The following text will be displayed for the event:
Roundtrip_StartInstance: My roundtrip event: instanceId=1
Roundtrip_StopInstance: My roundtrip event: instanceId=1
config UIARoundtrip_stopInstanceWithAdrs // module-wide |
 |
Roundtrip event used to log the end of an operation instance
extern const Log_Event UIARoundtrip_stopInstanceWithAdrs;
VALUES
fmt
a constant string that provides format specifiers for up to 4 additional parameters
instanceId
a unique instance ID that can be used to match Roundtrip start and stop events
functionAdrs
the address of the function
EXAMPLE
The following C code shows how to log a roundtrip
'stopInstanceWithAdrs' event along with a task handle as the
instance identifier, the function address and a format string
describing the event.
#include <ti/sysbios/knl/Task.h>
#include <xdc/runtime/Log.h>
#include <ti/uia/events/UIARoundtrip.h>
...
Void myFunction(){
Task_Handle hTsk = Task_selfMacro();
Log_write3(UIARoundtrip_startInstanceWithAdrs, "My roundtrip event: task=0x%x, fnAdrs=0x%x",(IArg)hTsk,(IArg)&myFunc);
...
Log_write3(UIARoundtrip_stopInstanceWithAdrs, "My roundtrip event: task=0x%x", fnAdrs=0x%x",(IArg)hTsk,(IArg)&myFunc);
}
The following text will be displayed for the event:
Roundtrip_StartInstanceWithAdrs: My roundtrip event: task=0x893230, fnAdrs=0x820060
Roundtrip_StopInstanceWithAdrs: My roundtrip event: task=0x893230, fnAdrs=0x820060
config UIARoundtrip_stopInstanceWithStr // module-wide |
 |
Roundtrip event used to log the end of an operation instance
extern const Log_Event UIARoundtrip_stopInstanceWithStr;
VALUES
fmt
a constant string that provides format specifiers for up to 4 additional parameters
instanceId
a unique instance ID that can be used to match Roundtrip start and stop events
str
a constant string reference
DETAILS
Event parameter provides instance data to differentiate
between multiple instances that can run in parallel
EXAMPLE
The following C code shows how to log a roundtrip
'stopInstanceWithStr' event along with a unique instance identifier
and a string reference used only by the pair of start / stop events.
#include <xdc/runtime/Log.h>
#include <ti/uia/events/UIARoundtrip.h>
...
Void packetHdlr(Int packetId){
Log_write3(UIARoundtrip_startInstanceWithStr, "My roundtrip event: packetId=0x%x",packetId,(IArg)"(routing)");
...
Log_write3(UIARoundtrip_stopInstanceWithStr, "My roundtrip event: packetId=0x%x",packetId,(IArg)"(routing)");
}
The following text will be displayed for the event:
Roundtrip_StartInstanceWithStr: My roundtrip event: packetId=0x3bc3 (routing)
Roundtrip_StopInstanceWithStr: My roundtrip event: packetId=0x3bc3 (routing)
Event parameter provides instance data to differentiate
between multiple instances that can run in parallel
Module-Wide Built-Ins |
 |
// Get this module's unique id
Bool UIARoundtrip_Module_startupDone();
// Test if this module has completed startup
// The heap from which this module allocates memory
Bool UIARoundtrip_Module_hasMask();
// Test whether this module has a diagnostics mask
Bits16 UIARoundtrip_Module_getMask();
// Returns the diagnostics mask for this module
Void UIARoundtrip_Module_setMask(Bits16 mask);
// Set the diagnostics mask for this module
config UIARoundtrip.start // module-wide |
 |
Roundtrip event used to log the start of an operation
msg: "Roundtrip_Start: %$S"
};
VALUES
fmt
a constant string that provides format specifiers for up to 6 additional parameters
EXAMPLE
The following C code shows how to log a simple
roundtrip 'start' event along with a user-specified
format string describing the event.
#include <xdc/runtime/Log.h>
#include <ti/uia/events/UIARoundtrip.h>
...
Log_write1(UIARoundtrip_start, "My roundtrip event");
The following text will be displayed for the event:
Roundtrip_Start: My roundtrip event
C SYNOPSIS
config UIARoundtrip.startInstance // module-wide |
 |
Roundtrip event used to log the start of an operation instance
msg: "Roundtrip_StartInstance: %$S"
};
VALUES
fmt
a constant string that provides format specifiers for up to 5 additional parameters
instanceId
a unique instance ID that can be used to match Roundtrip start and stop events
DETAILS
Event parameter provides instance data to differentiate
between multiple instances that can run in parallel.
EXAMPLE
The following C code shows how to log a roundtrip
'startInstance' event along with a user-specified
instance identifier and a format string describing the event.
#include <xdc/runtime/Gate.h>
#include <xdc/runtime/Log.h>
#include <ti/uia/events/UIARoundtrip.h>
static volatile int gMyGlobalInstanceId = 0;
...
IArg key;
int localInstanceId;
// protect pre-increment operation from race conditions
key = Gate_enterSystem();
localInstanceId = ++gMyGlobalInstanceId;
Gate_leaveSystem(key);
Log_write2(UIARoundtrip_startInstance, "My roundtrip event: instanceId=%d",localInstanceId);
...
Log_write2(UIARoundtrip_stopInstance, "My roundtrip event: instanceId=%d",localInstanceId);
The following text will be displayed for the event:
Roundtrip_StartInstance: My roundtrip event: instanceId=1
Roundtrip_StopInstance: My roundtrip event: instanceId=1
C SYNOPSIS
config UIARoundtrip.startInstanceWithAdrs // module-wide |
 |
Roundtrip event used to log the start of an operation instance
msg: "Roundtrip_StartInstanceWithAdrs: %$S"
};
VALUES
fmt
a constant string that provides format specifiers for up to 5 additional parameters
instanceId
a unique instance ID that can be used to match benchmark start and stop events
functionAdrs
the address of a function that can differentiate this pair of start and stop events from others
DETAILS
Event parameter provides instance data to differentiate
between multiple instances that can run in parallel
EXAMPLE
The following C code shows how to log a roundtrip
'startInstanceWithAdrs' event along with a task handle as the
instance identifier, the function address and a format string
describing the event.
#include <ti/sysbios/knl/Task.h>
#include <xdc/runtime/Log.h>
#include <ti/uia/events/UIARoundtrip.h>
...
Void myFunction(){
Task_Handle hTsk = Task_selfMacro();
Log_write3(UIARoundtrip_startInstanceWithAdrs, "My roundtrip event: task=0x%x, fnAdrs=0x%x",(IArg)hTsk,(IArg)&myFunc);
...
Log_write3(UIARoundtrip_stopInstanceWithAdrs, "My roundtrip event: task=0x%x", fnAdrs=0x%x",(IArg)hTsk,(IArg)&myFunc);
}
The following text will be displayed for the event:
Roundtrip_StartInstanceWithAdrs: My roundtrip event: task=0x893230, fnAdrs=0x820060
Roundtrip_StopInstanceWithAdrs: My roundtrip event: task=0x893230, fnAdrs=0x820060
C SYNOPSIS
config UIARoundtrip.startInstanceWithStr // module-wide |
 |
Roundtrip event used to log the start of an operation instance
msg: "Roundtrip_StartInstanceWithStr: %$S"
};
VALUES
fmt
a constant string that provides format specifiers for up to 4 additional parameters
instanceId
a unique instance ID that can be used to match Roundtrip start and stop events
str
a constant string reference
DETAILS
Event parameter provides instance data to differentiate
between multiple instances that can run in parallel
EXAMPLE
The following C code shows how to log a roundtrip
'startInstanceWithStr' event along with a unique instance identifier
and a string reference used only by the pair of start / stop events.
#include <xdc/runtime/Log.h>
#include <ti/uia/events/UIARoundtrip.h>
...
Void packetHdlr(Int packetId){
Log_write3(UIARoundtrip_startInstanceWithStr, "My roundtrip event: packetId=0x%x",packetId,(IArg)"(routing)");
...
Log_write3(UIARoundtrip_stopInstanceWithStr, "My roundtrip event: packetId=0x%x",packetId,(IArg)"(routing)");
}
The following text will be displayed for the event:
Roundtrip_StartInstanceWithStr: My roundtrip event: packetId=0x3bc3 (routing)
Roundtrip_StopInstanceWithStr: My roundtrip event: packetId=0x3bc3 (routing)
Event parameter provides instance data to differentiate
between multiple instances that can run in parallel
C SYNOPSIS
config UIARoundtrip.stop // module-wide |
 |
Roundtrip event used to log the end of an operation
msg: "Roundtrip_Stop: %$S"
};
VALUES
fmt
a constant string that provides format specifiers for up to 6 additional parameters
EXAMPLE
The following C code shows how to log a simple
roundtrip 'stop' event along with a user-specified
format string describing the event.
#include <xdc/runtime/Log.h>
#include <ti/uia/events/UIARoundtrip.h>
...
Log_write1(UIARoundtrip_stop, "My roundtrip event");
The following text will be displayed for the event:
Roundtrip_Stop: My roundtrip event
C SYNOPSIS
config UIARoundtrip.stopInstance // module-wide |
 |
Roundtrip event used to log the end of an operation instance
msg: "Roundtrip_StopInstance: %$S"
};
VALUES
fmt
a constant string that provides format specifiers for up to 4 additional parameters
instanceId
a unique instance ID that can be used to match Roundtrip start and stop events
DETAILS
Event parameter provides instance data to differentiate
between multiple instances that can run in parallel
EXAMPLE
The following C code shows how to log a roundtrip
'stopInstance' event along with a user-specified
instance identifier and a format string describing the event.
#include <xdc/runtime/Gate.h>
#include <xdc/runtime/Log.h>
#include <ti/uia/events/UIARoundtrip.h>
static volatile int gMyGlobalInstanceId = 0;
...
IArg key;
int localInstanceId;
// protect pre-increment operation from race conditions
key = Gate_enterSystem();
localInstanceId = ++gMyGlobalInstanceId;
Gate_leaveSystem(key);
Log_write2(UIARoundtrip_startInstance, "My roundtrip event: instanceId=%d",localInstanceId);
...
Log_write2(UIARoundtrip_stopInstance, "My roundtrip event: instanceId=%d",localInstanceId);
The following text will be displayed for the event:
Roundtrip_StartInstance: My roundtrip event: instanceId=1
Roundtrip_StopInstance: My roundtrip event: instanceId=1
C SYNOPSIS
config UIARoundtrip.stopInstanceWithAdrs // module-wide |
 |
Roundtrip event used to log the end of an operation instance
msg: "Roundtrip_StopInstanceWithAdrs: %$S"
};
VALUES
fmt
a constant string that provides format specifiers for up to 4 additional parameters
instanceId
a unique instance ID that can be used to match Roundtrip start and stop events
functionAdrs
the address of the function
EXAMPLE
The following C code shows how to log a roundtrip
'stopInstanceWithAdrs' event along with a task handle as the
instance identifier, the function address and a format string
describing the event.
#include <ti/sysbios/knl/Task.h>
#include <xdc/runtime/Log.h>
#include <ti/uia/events/UIARoundtrip.h>
...
Void myFunction(){
Task_Handle hTsk = Task_selfMacro();
Log_write3(UIARoundtrip_startInstanceWithAdrs, "My roundtrip event: task=0x%x, fnAdrs=0x%x",(IArg)hTsk,(IArg)&myFunc);
...
Log_write3(UIARoundtrip_stopInstanceWithAdrs, "My roundtrip event: task=0x%x", fnAdrs=0x%x",(IArg)hTsk,(IArg)&myFunc);
}
The following text will be displayed for the event:
Roundtrip_StartInstanceWithAdrs: My roundtrip event: task=0x893230, fnAdrs=0x820060
Roundtrip_StopInstanceWithAdrs: My roundtrip event: task=0x893230, fnAdrs=0x820060
C SYNOPSIS
config UIARoundtrip.stopInstanceWithStr // module-wide |
 |
Roundtrip event used to log the end of an operation instance
msg: "Roundtrip_StopInstanceWithStr: %$S"
};
VALUES
fmt
a constant string that provides format specifiers for up to 4 additional parameters
instanceId
a unique instance ID that can be used to match Roundtrip start and stop events
str
a constant string reference
DETAILS
Event parameter provides instance data to differentiate
between multiple instances that can run in parallel
EXAMPLE
The following C code shows how to log a roundtrip
'stopInstanceWithStr' event along with a unique instance identifier
and a string reference used only by the pair of start / stop events.
#include <xdc/runtime/Log.h>
#include <ti/uia/events/UIARoundtrip.h>
...
Void packetHdlr(Int packetId){
Log_write3(UIARoundtrip_startInstanceWithStr, "My roundtrip event: packetId=0x%x",packetId,(IArg)"(routing)");
...
Log_write3(UIARoundtrip_stopInstanceWithStr, "My roundtrip event: packetId=0x%x",packetId,(IArg)"(routing)");
}
The following text will be displayed for the event:
Roundtrip_StartInstanceWithStr: My roundtrip event: packetId=0x3bc3 (routing)
Roundtrip_StopInstanceWithStr: My roundtrip event: packetId=0x3bc3 (routing)
Event parameter provides instance data to differentiate
between multiple instances that can run in parallel
C SYNOPSIS
metaonly config UIARoundtrip.common$ // module-wide |
 |
Common module configuration parameters
DETAILS
All modules have this configuration parameter. Its name
contains the '$' character to ensure it does not conflict with
configuration parameters declared by the module. This allows
new configuration parameters to be added in the future without
any chance of breaking existing modules.