The LoggingSetup module automates the process of configuring an application
to use UIA events, and configures TI-RTOS modules to capture user-specified
information such as CPU Load, Task Load and Task Execution so that it can
be displayed by System Analyzer. It also automates the creation of
infrastructure modules such as loggers, the ServiceManager and RTA modules
to enable the capture and upload of the events over a user-specified
transport.
Both JTAG and Non-JTAG transports are supported.
The following configuration script demonstrates the use of the LoggingSetup
module in the XDC configuration file for the application:
Example 1: Configuring an application to use the default settings provided
by LoggingSetup. The following default settings are automatically applied:
Example 2: Use all the default settings of LoggingSetup, except use the
minimal footprint logger, LoggerMin. The following settings will be applied:
enum LoggingSetup.LoggerType |
|
Enum of the type of loggers that can be used
values of type LoggingSetup.LoggerType
const LoggingSetup.LoggerType_MIN;
// LoggerMin - Minimal footprint logger
(JTAG only)
const LoggingSetup.LoggerType_STOPMODE;
// LoggerStopMode (JTAG only)
const LoggingSetup.LoggerType_JTAGRUNMODE;
// LoggerRunMode JTAG (c6x only)
const LoggingSetup.LoggerType_RUNMODE;
// LoggerRunMode ETHERNET upload
const LoggingSetup.LoggerType_IDLE;
// LoggerIdle - Upload in Idle loop
const LoggingSetup.LoggerType_STREAMER2;
// LoggerStreamer2 - Application manages
logger buffers
enum LoggingSetup.TimestampSize |
|
values of type LoggingSetup.TimestampSize
const LoggingSetup.TimestampSize_AUTO;
// Use the logger's default timestamp size
const LoggingSetup.TimestampSize_NONE;
// No timestamps logged with events
const LoggingSetup.TimestampSize_32b;
// 32-bit timestamps
const LoggingSetup.TimestampSize_64b;
// 64-bit timestamps
config LoggingSetup.benchmarkLogging // module-wide |
|
Enable logging of benchmark events
LoggingSetup.benchmarkLogging = Bool false;
DETAILS
If this is false, the events will be disabled. Otherwise the events
will be enabled.
config LoggingSetup.countingAndGraphingLogging // module-wide |
|
Enable logging of counting and graphing events
LoggingSetup.countingAndGraphingLogging = Bool false;
DETAILS
If this is false, the events will be disabled. Otherwise the events
will be enabled.
config LoggingSetup.cpuId // module-wide |
|
CPU ID to put in the packet header as the endpoint ID
LoggingSetup.cpuId = Int 0;
DETAILS
Not required for C6X or C7X devices (uses DNUM).
config LoggingSetup.enableContextAwareFunctionProfiler // module-wide |
|
Enable System Analyzer's Context Aware Function Profiler
LoggingSetup.enableContextAwareFunctionProfiler = Bool false;
DETAILS
Setting to true enables function entry and exit logging
in order to generate function profiling information.
This requires that the compiler's function entry and exit
hook functions be enabled.
config LoggingSetup.enableTaskProfiler // module-wide |
|
Enable System Analyzer's Task Profiler
LoggingSetup.enableTaskProfiler = Bool false;
DETAILS
Setting enableTaskProfiler to true enables task, hwi and swi
entry and exit logging in order to generate profiling
information
config LoggingSetup.loadHwiLogging // module-wide |
|
Enable Hardware Interrupt (Hwi) event logging
LoggingSetup.loadHwiLogging = Bool false;
DETAILS
If this is false, the Hwi load events will be disabled.
Otherwise the events will be enabled.
Use the
loadLoggingRuntimeControl parameter
to determine whether the state can be modified during runtime.
config LoggingSetup.loadLogger // module-wide |
|
User-created logger used for the Load module Log events
DETAILS
Leave null to have LoggingSetup automatically create
the loadLogger if required.
config LoggingSetup.loadLoggerSize // module-wide |
|
Size (in MAUs) of the packet used to upload the Load module Log events
LoggingSetup.loadLoggerSize = SizeT 512;
config LoggingSetup.loadLogging // module-wide |
|
Enable CPU load event logging
LoggingSetup.loadLogging = Bool true;
DETAILS
If loadLogging is false, CPU Load events will be disabled, otherwise the events
will be logged.
Use the
loadLoggingRuntimeControl parameter
to determine whether the state can be modified during runtime.
config LoggingSetup.loadLoggingRuntimeControl // module-wide |
|
Specify whether load logging can be enabled / disabled at runtime
LoggingSetup.loadLoggingRuntimeControl = Bool false;
DETAILS
This determines what
Diags settings are
applied to the module's Diags mask.
If 'false', the Diags bits will be configured as
ALWAYS_ON, meaning they can't be changed at runtime. If 'true', the
bits will be configured as 'RUNTIME_ON'.
Use the
loadLogging parameter
to determine whether the event is ON or OFF. For example, the
following two lines set the Load module's events to 'ALWAYS_ON'.
LoggingSetup.loadLogging = true;
LoggingSetup.loadLoggingRuntimeControl = false;
config LoggingSetup.loadSwiLogging // module-wide |
|
Enable Software Interrupt (Swi) event logging
LoggingSetup.loadSwiLogging = Bool false;
DETAILS
If this is false, the Swi load events will be disabled.
Otherwise the events will be enabled.
Use the
loadLoggingRuntimeControl parameter
to determine whether the state can be modified during runtime.
config LoggingSetup.loadTaskLogging // module-wide |
|
Enable Task load logging
LoggingSetup.loadTaskLogging = Bool false;
DETAILS
If this is false, the Task load events will be disabled.
Otherwise the events will be enabled.
Use the
loadLoggingRuntimeControl parameter
to determine whether the state can be modified during runtime.
config LoggingSetup.loggerType // module-wide |
|
Configures the type of logger to use
config LoggingSetup.mainLogger // module-wide |
|
Logger used for application Log events
DETAILS
Leave null to have LoggingSetup automatically create
the mainLogger if required.
config LoggingSetup.mainLoggerSize // module-wide |
|
Size (in MAUs) of packet used for application Log
events
LoggingSetup.mainLoggerSize = SizeT 1024;
config LoggingSetup.mainLogging // module-wide |
|
Enable logging of application code
LoggingSetup.mainLogging = Bool true;
DETAILS
If mainLogging is false, application logging will be disabled, otherwise
it will be enabled. Use the
mainLoggingRuntimeControl parameter
to determine whether the state can be modified during runtime.
Together, these two configuration parameters will be used to
initialize the
xdc.runtime.Main Diags mask.
The table below shows the initial values of the
xdc.runtime.Main Diags mask settings, based on mainLogging and
mainLoggingRuntimeControl configuration. These settins only
apply to Diags masks that have not been set in the application's
configuration file. For example, this configuration code would
cause xdc.runtime.Main's USER1 Diags mask to be unaffected by
the settings of mainLogging and mainLoggingRuntimeControl:
Diags.setMaskMeta('xdc.runtime.Main', Diags.USER1, Diags.RUNTIME_ON);
Diags Mask Settings for xdc.runtime.Main
| mainLoggingRuntimeControl |
true | false |
mainLogging | true | RUNTIME_ON |
ALWAYS_ON |
false | RUNTIME_OFF | ALWAYS_OFF |
config LoggingSetup.mainLoggingRuntimeControl // module-wide |
|
Specify whether application logging can be enabled / disabled
at runtime
LoggingSetup.mainLoggingRuntimeControl = Bool true;
DETAILS
This parameter, together with
mainLogging, determine the
initial
xdc.runtime.Diags settings applied to
xdc.runtime.Main.
If 'false' and
mainLogging is true, the diags bits will
be configured as ALWAYS_ON, meaning they can't be changed at runtime.
If 'true', the bits will be configured as 'RUNTIME_ON'.
Use the
mainLogging parameter
to determine whether the event is ON or OFF. For example, the
following two lines set the xdc.runtime.Main events to
initially be 'RUNTIME_ON'.
LoggingSetup.mainLogging = true;
LoggingSetup.mainLoggingRuntimeControl = true;
config LoggingSetup.maxEventSize // module-wide |
|
For Snapshot events with loggers that support the writeMemoryRange API,
this specifies the maximum event size (in Maus) that
can be written with a single event. Must be less than or equal to
the logger's buffer size - 64
LoggingSetup.maxEventSize = SizeT 128;
DETAILS
The logger's writeMemoryRange API checks to see if the event size required to
write the block of memory is larger than maxEventSize. If so, it will
split the memory range up into a number of smaller blocks and log the
blocks using separate events with a common snapshot ID in order to
allow the events to be collated and the original memory block to be
reconstructed on the host.
config LoggingSetup.memorySectionName // module-wide |
|
Memory section name for the buffer managed by the static instance
(default is null)
LoggingSetup.memorySectionName = String null;
DETAILS
By default the local 'dataMemory' in the platform is used (typically
SRAM or L2SRAM).
The available memory section names for your device can be determined by
either looking in the MEMORY CONFIGURATION section of the .map file
that is generated when you build your application or from the Platform
file that your application is using.
config LoggingSetup.multicoreEventCorrelation // module-wide |
|
Set to true for multi-core applications
LoggingSetup.multicoreEventCorrelation = Bool false;
DETAILS
When set to true, the LoggingSetup module will automatically
include the
LogSync module. The LogSync module is
required for events from multiple CPU cores to be correlated with each other.
SEE
config LoggingSetup.numCores // module-wide |
|
Number of cores running the same image with an instance in shared
memory
LoggingSetup.numCores = Int 1;
DETAILS
A common use case is to have the same binary image (e.g. .out file)
run on multiple cores of a multi-core device. This causes a problem if
the logger's buffers are in shared memory (e.g. DDR). Since the image is
the same for all the cores, each core will attempt to write to the same
buffer in the shared memory. To avoid this, either place the logger's
buffers in non-shared memory, or set the numCores parameter to
the number of cores on the device.
Note: Use the
bufSection along with the Program.sectMap to
place a logger instance's buffer into specific memory.
Setting numCores to a value greater than 1 signals the logger to
statically set aside additional memory ((x numCores), allowing each
core to have the logger's configured buffer size amount of memory.
Warning: Setting this parameter to a value greater than one should only
be done when there is a single image used on multiple cores of a
multi-core device AND the logger instance's buffer is in shared memory.
While functionally it will still work, memory will be wasted if both
these conditions are not met.
The default is 1, which means do not reserve any additional memory
for the logger.
config LoggingSetup.profileLogging // module-wide |
|
Enable logging of function profiling events
LoggingSetup.profileLogging = Bool false;
DETAILS
If this is false, the events will be disabled. Otherwise the events
will be enabled.
config LoggingSetup.snapshotLogging // module-wide |
|
Enable logging of snapshot events
LoggingSetup.snapshotLogging = Bool false;
DETAILS
If this is false, the events will be disabled. Otherwise the events
will be enabled.
config LoggingSetup.syncLoggerSize // module-wide |
|
Size (in MAUs) of the logger used for the LogSync
modules' sync point events
config LoggingSetup.sysbiosHwiLogging // module-wide |
|
Enable the SYSBIOS Hwi and Clock modules' event logging
LoggingSetup.sysbiosHwiLogging = Bool false;
DETAILS
If false, Hwi and Clock events will be disabled, otherwise the events
will be enabled.
Use the
sysbiosHwiLoggingRuntimeControl parameter
to determine whether the state can be modified during runtime.
config LoggingSetup.sysbiosHwiLoggingRuntimeControl // module-wide |
|
Specify whether Hwi and Clock logging can be enabled / disabled at
runtime
LoggingSetup.sysbiosHwiLoggingRuntimeControl = Bool false;
DETAILS
This parameter, together with
sysbiosHwiLogging, determine the
initial
Diags settings applied to
the SYSBIOS Hwi and Clock modules. For example, the following two
lines set the Hwi and Clock modules' events to 'ALWAYS_ON'.
LoggingSetup.sysbiosHwiLogging = true;
LoggingSetup.sysbiosHwiLoggingRuntimeControl = false;
config LoggingSetup.sysbiosLogger // module-wide |
|
Logger used for SYSBIOS modules' Log events
DETAILS
Leave null to have LoggingSetup automatically create
the sysbiosLogger if required.
config LoggingSetup.sysbiosLoggerSize // module-wide |
|
Size (in MAUs) of the packet used for the TI-RTOS modules' Log events
LoggingSetup.sysbiosLoggerSize = SizeT 1024;
config LoggingSetup.sysbiosSemaphoreLogging // module-wide |
|
Enable the SYSBIOS Semaphore module's event logging
LoggingSetup.sysbiosSemaphoreLogging = Bool false;
DETAILS
If false, Semaphore events will be disabled, otherwise the events
will be enabled.
Use the
sysbiosSemaphoreLoggingRuntimeControl parameter
to determine whether the state can be modified during runtime.
config LoggingSetup.sysbiosSemaphoreLoggingRuntimeControl // module-wide |
|
Specify whether Semaphore logging can be enabled / disabled at runtime
LoggingSetup.sysbiosSemaphoreLoggingRuntimeControl = Bool false;
DETAILS
This parameter, together with
sysbiosSemaphoreLogging, determine the
initial
Diags settings applied to
the SYSBIOS Semaphore module. For example, the following code
initializes the Semaphore module's events to 'RUNTIME_OFF'.
LoggingSetup.sysbiosSemaphoreLogging= false;
LoggingSetup.sysbiosSemaphoreLoggingRuntimeControl = true;
config LoggingSetup.sysbiosSwiLogging // module-wide |
|
Enable SYSBIOS Swi module's event logging
LoggingSetup.sysbiosSwiLogging = Bool false;
DETAILS
If false, Swi events will be disabled, otherwise the events
will be enabled.
Use the
sysbiosSwiLoggingRuntimeControl parameter
to determine whether the state can be modified during runtime.
config LoggingSetup.sysbiosSwiLoggingRuntimeControl // module-wide |
|
Specify whether Swi logging can be enabled / disabled at runtime
LoggingSetup.sysbiosSwiLoggingRuntimeControl = Bool false;
DETAILS
This parameter, together with
sysbiosSwiLogging, determine the
initial
Diags settings applied to
the SYSBIOS Swi module. For example, the following two
lines initialize the Swi module's events to 'RUNTIME_OFF'.
LoggingSetup.sysbiosSwiLogging = false;
LoggingSetup.sysbiosSwiLoggingRuntimeControl = true;
config LoggingSetup.sysbiosTaskLogging // module-wide |
|
Enable the SYSBIOS Task module's event logging
LoggingSetup.sysbiosTaskLogging = Bool true;
DETAILS
If false, Task events will be disabled, otherwise the events
will be enabled.
Use the
sysbiosTaskLoggingRuntimeControl parameter
to determine whether the state can be modified during runtime.
config LoggingSetup.sysbiosTaskLoggingRuntimeControl // module-wide |
|
Specify whether Task logging can be enabled / disabled at runtime
LoggingSetup.sysbiosTaskLoggingRuntimeControl = Bool true;
DETAILS
This parameter, together with
sysbiosTaskLogging, determine the
initial
Diags settings applied to
the Task module. For example, the following two
lines initialize the Task module's events to
'ALWAYS_ON'.
LoggingSetup.sysbiosTaskLogging = true;
LoggingSetup.sysbiosTaskLoggingRuntimeControl = false;
config LoggingSetup.timestampSize // module-wide |
|
Size of the timestamps logged with the events. Set to TimestampSize_NONE
to disable timestamps