module ti.uia.events.UIAHWICtx |
 |
 |
 |
UIA Hardware Interrupt Context Instrumentation
The UIAHWICtx module defines context change events
and methods that allow tooling to identify hardware interrupt context
switches and to enable HWI-aware filtering, trace and
analysis.
[
more ... ]
#include <ti/uia/events/UIAHWICtx.h>
Functions common to all target modules |
|
|
Typedefs |
typedef Bool | |
Constants |
extern const Bits16 | |
| |
| |
| |
extern const Bits16 | |
DETAILS
The UIAHWICtx module defines context change events
and methods that allow tooling to identify hardware interrupt context
switches and to enable HWI-aware filtering, trace and
analysis.
Note: in order to reduce overhead, UIAHWICtx 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 Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
Hwi.addHookSet({
beginFxn: '&hwiBeginHook',
endFxn: '&hwiEndHook'
});
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 UIAHWICtx_IsLoggingEnabledFxn |
 |
typedef Bool (*UIAHWICtx_IsLoggingEnabledFxn)(Int);
config UIAHWICtx_ENABLEMASK // module-wide |
 |
Ctx Filter Enable Mask
extern const Bits16 UIAHWICtx_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 UIAHWICtx_SYNCID // module-wide |
 |
Trace Synchronization ID
extern const Bits16 UIAHWICtx_SYNCID;
DETAILS
configures the value to be written into the
4 bit context change type field used by the
UIASync trace synchronization
config UIAHWICtx_isLoggingEnabledFxn // module-wide |
 |
config UIAHWICtx_start // module-wide |
 |
Hardware Interrupt start 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 start of a hardware interrupt service routine
EXAMPLE
The following C code shows how to log a Context Change
event that identifies the start of a HWI. It implements
a BIOS hook function. Alternatively, the LogCtxChg_hwiStart
API can be called directly from the HWI service routine.
#include <ti/uia/runtime/LogCtxChg.h>
...
Void hwiBeginHook(Hwi_Handle handle) {
LogCtxChg_hwiStart("Hwi_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:
"HWI start: Hwi_Handle:0x80001200"
config UIAHWICtx_stop // module-wide |
 |
Hardware Interrupt exit 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 hardware interrupt service routine
EXAMPLE
The following C code shows how to log a Context Change
event that identifies the end of a HWI. It implements
a BIOS hook function. Alternatively, the LogCtxChg_hwiStop
API can be called directly from the HWI service routine.
#include <ti/uia/runtime/LogCtxChg.h>
...
Void hwiEndHook(Hwi_Handle handle) {
LogCtxChg_hwiStop("Hwi_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:
"HWI stop: Hwi_Handle:0x80001200"
Module-Wide Built-Ins |
 |
// Get this module's unique id
Bool UIAHWICtx_Module_startupDone();
// Test if this module has completed startup
// The heap from which this module allocates memory
Bool UIAHWICtx_Module_hasMask();
// Test whether this module has a diagnostics mask
Bits16 UIAHWICtx_Module_getMask();
// Returns the diagnostics mask for this module
Void UIAHWICtx_Module_setMask(Bits16 mask);
// Set the diagnostics mask for this module
var UIAHWICtx = xdc.useModule('ti.uia.events.UIAHWICtx');
module-wide config parameters
msg: "HWI start: %$S"
};
msg: "HWI stop: %$S"
};
config UIAHWICtx.ENABLEMASK // module-wide |
 |
Ctx Filter Enable Mask
UIAHWICtx.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 UIAHWICtx.SYNCID // module-wide |
 |
Trace Synchronization ID
UIAHWICtx.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 UIAHWICtx.isLoggingEnabledFxn // module-wide |
 |
UIAHWICtx.isLoggingEnabledFxn = Bool(*)(Int) null;
C SYNOPSIS
config UIAHWICtx.start // module-wide |
 |
Hardware Interrupt start 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 start of a hardware interrupt service routine
EXAMPLE
The following C code shows how to log a Context Change
event that identifies the start of a HWI. It implements
a BIOS hook function. Alternatively, the LogCtxChg_hwiStart
API can be called directly from the HWI service routine.
#include <ti/uia/runtime/LogCtxChg.h>
...
Void hwiBeginHook(Hwi_Handle handle) {
LogCtxChg_hwiStart("Hwi_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:
"HWI start: Hwi_Handle:0x80001200"
C SYNOPSIS
config UIAHWICtx.stop // module-wide |
 |
Hardware Interrupt exit 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 hardware interrupt service routine
EXAMPLE
The following C code shows how to log a Context Change
event that identifies the end of a HWI. It implements
a BIOS hook function. Alternatively, the LogCtxChg_hwiStop
API can be called directly from the HWI service routine.
#include <ti/uia/runtime/LogCtxChg.h>
...
Void hwiEndHook(Hwi_Handle handle) {
LogCtxChg_hwiStop("Hwi_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:
"HWI stop: Hwi_Handle:0x80001200"
C SYNOPSIS
metaonly config UIAHWICtx.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