module ti.uia.events.UIASWICtx |
 |
 |
 |
UIA Software Interrupt Context Instrumentation
The UIASWICtx module defines context change events
and methods that allow tooling to identify software interrupt context
switches and to enable SWI-aware filtering, trace and
analysis.
[
more ... ]
#include <ti/uia/events/UIASWICtx.h>
Functions common to all target modules |
|
|
Typedefs |
typedef Bool | |
Constants |
extern const Bits16 | |
| |
| |
| |
extern const Bits16 | |
DETAILS
The UIASWICtx module defines context change events
and methods that allow tooling to identify software interrupt context
switches and to enable SWI-aware filtering, trace and
analysis.
Note: in order to reduce overhead, UIASWICtx does not support context-aware filtering
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.
EXAMPLES
Example 1: This is part of the XDC configuration file for the application:
var LogCtxChg = xdc.useModule('ti.uia.runtime.LogCtxChg');
var Diags = xdc.useModule('xdc.runtime.Diags');
var LoggerSys = xdc.useModule('xdc.runtime.LoggerSys');
var Defaults = xdc.useModule('xdc.runtime.Defaults');
var logger = LoggerSys.create();
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_ON;
Defaults.common$.logger = logger;
// BIOS specific configuration:
var Swi = xdc.useModule('ti.sysbios.hal.Swi');
Swi.addHookSet({
beginFxn: '&swiBeginHook',
endFxn: '&swiEndHook'
});
Example 2: The following example configures a module to support logging
of ANALYSIS events, but defers the actual activation and deactivation of the
logging until runtime. See the
Diags_setMask()
function for details on specifying the control string.
This is a part of the XDC configuration file for the application:
var LogCtxChg = xdc.useModule('ti.uia.runtime.LogCtxChg');
var Diags = xdc.useModule('xdc.runtime.Diags');
var Mod = xdc.useModule('my.pkg.Mod');
Mod.common$.diags_ANALYSIS = Diags.RUNTIME_OFF;
This is a part of the C code for the application:
// turn on logging of ANALYSIS events in the module
Diags_setMask("my.pkg.Mod+Z");
// turn off logging of ANALYSIS events in the module
Diags_setMask("my.pkg.Mod-Z");
typedef UIASWICtx_IsLoggingEnabledFxn |
 |
typedef Bool (*UIASWICtx_IsLoggingEnabledFxn)(Int);
config UIASWICtx_ENABLEMASK // module-wide |
 |
Ctx Filter Enable Mask
extern const Bits16 UIASWICtx_ENABLEMASK;
DETAILS
configures which bit of the ti_uia_runtime_CtxFilter_gFlags
is assigned to control context aware filtering for
frame context changes. Must be configured with a
value that is 2**SYNCID.
config UIASWICtx_SYNCID // module-wide |
 |
Trace Synchronization ID
extern const Bits16 UIASWICtx_SYNCID;
DETAILS
configures the value to be written into the
4 bit context change type field used by the
UIASync trace synchronization
config UIASWICtx_isLoggingEnabledFxn // module-wide |
 |
config UIASWICtx_start // module-wide |
 |
Software Interrupt start event
VALUES
fmt
a constant string that describes the SWI and provides a format specifier for the SWI handle
handle
an integer which uniquely identifies the SWI
DETAILS
Used to log the start of a Software Interrupt service routine
EXAMPLE
The following C code shows how to log a Context Change
event that identifies the start of a SWI. It implements
a BIOS hook function. Alternatively, the LogCtxChg_swiStart
API can be called directly from the SWI service routine.
#include <ti/uia/runtime/LogCtxChg.h>
...
Void swiBeginHook(Swi_Handle handle) {
LogCtxChg_swiStart("Swi_Handle:0x%x",handle);
}
This event has an associated format string (%$S)
which is recursively formatted with any addition arguments.
The following text is an example of what will be displayed for the event:
"SWI start: Swi_Handle:0x80001200"
config UIASWICtx_stop // module-wide |
 |
Software Interrupt Stop event
VALUES
fmt
a constant string that describes the HWI and provides a format specifier for the HWI handle
handle
an integer which uniquely identifies the HWI
DETAILS
Used to log the end of a Software Interrupt service routine
EXAMPLE
The following C code shows how to log a Context Change
event that identifies the end of a SWI. It implements
a BIOS hook function. Alternatively, the LogCtxChg_swiStop
API can be called directly from the SWI service routine.
#include <ti/uia/runtime/LogCtxChg.h>
...
Void swiEndHook(Swi_Handle handle) {
LogCtxChg_swiStop("Swi_Handle:0x%x",handle);
}
This event has an associated format string (%$S)
which is recursively formatted with any addition arguments.
The following text is an example of what will be displayed for the event:
"SWI stop: Swi_Handle:0x80001200"
Module-Wide Built-Ins |
 |
// Get this module's unique id
Bool UIASWICtx_Module_startupDone();
// Test if this module has completed startup
// The heap from which this module allocates memory
Bool UIASWICtx_Module_hasMask();
// Test whether this module has a diagnostics mask
Bits16 UIASWICtx_Module_getMask();
// Returns the diagnostics mask for this module
Void UIASWICtx_Module_setMask(Bits16 mask);
// Set the diagnostics mask for this module
var UIASWICtx = xdc.useModule('ti.uia.events.UIASWICtx');
module-wide config parameters
msg: "SWI start: %$S"
};
msg: "SWI stop: %$S"
};
config UIASWICtx.ENABLEMASK // module-wide |
 |
Ctx Filter Enable Mask
UIASWICtx.ENABLEMASK = Bits16 undefined;
DETAILS
configures which bit of the ti_uia_runtime_CtxFilter_gFlags
is assigned to control context aware filtering for
frame context changes. Must be configured with a
value that is 2**SYNCID.
C SYNOPSIS
config UIASWICtx.SYNCID // module-wide |
 |
Trace Synchronization ID
UIASWICtx.SYNCID = Bits16 undefined;
DETAILS
configures the value to be written into the
4 bit context change type field used by the
UIASync trace synchronization
C SYNOPSIS
config UIASWICtx.isLoggingEnabledFxn // module-wide |
 |
UIASWICtx.isLoggingEnabledFxn = Bool(*)(Int) null;
C SYNOPSIS
config UIASWICtx.start // module-wide |
 |
Software Interrupt start event
VALUES
fmt
a constant string that describes the SWI and provides a format specifier for the SWI handle
handle
an integer which uniquely identifies the SWI
DETAILS
Used to log the start of a Software Interrupt service routine
EXAMPLE
The following C code shows how to log a Context Change
event that identifies the start of a SWI. It implements
a BIOS hook function. Alternatively, the LogCtxChg_swiStart
API can be called directly from the SWI service routine.
#include <ti/uia/runtime/LogCtxChg.h>
...
Void swiBeginHook(Swi_Handle handle) {
LogCtxChg_swiStart("Swi_Handle:0x%x",handle);
}
This event has an associated format string (%$S)
which is recursively formatted with any addition arguments.
The following text is an example of what will be displayed for the event:
"SWI start: Swi_Handle:0x80001200"
C SYNOPSIS
config UIASWICtx.stop // module-wide |
 |
Software Interrupt Stop event
VALUES
fmt
a constant string that describes the HWI and provides a format specifier for the HWI handle
handle
an integer which uniquely identifies the HWI
DETAILS
Used to log the end of a Software Interrupt service routine
EXAMPLE
The following C code shows how to log a Context Change
event that identifies the end of a SWI. It implements
a BIOS hook function. Alternatively, the LogCtxChg_swiStop
API can be called directly from the SWI service routine.
#include <ti/uia/runtime/LogCtxChg.h>
...
Void swiEndHook(Swi_Handle handle) {
LogCtxChg_swiStop("Swi_Handle:0x%x",handle);
}
This event has an associated format string (%$S)
which is recursively formatted with any addition arguments.
The following text is an example of what will be displayed for the event:
"SWI stop: Swi_Handle:0x80001200"
C SYNOPSIS
metaonly config UIASWICtx.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.
generated on Tue, 14 Feb 2017 00:15:09 GMT