module ti.uia.runtime.LogSync

SyncPoint Event logging module for logging sync point events. Allows sync point events to use a different logger instance than used for other events

SyncPoint events are used to log timestamp values for two timebases: the local CPU timestamp that is used to timestamp events from this CPU, and a 'global' timestamp value that can be accessed by two or more CPUs. By logging the current timestamp values from these two timebase sources, the sync point events provide correlation points between the two timebases. [ more ... ]
C synopsis target-domain sourced in ti/uia/runtime/LogSync.xdc
#include <ti/uia/runtime/LogSync.h>
Functions
Bool 
Bool 
Void 
Bool 
Void
Void 
Void 
macro Void 
Void 
Functions common to all target instances
Functions common to all target modules
Typedefs
typedef LogSync_Object *
typedef struct
typedef struct
typedef struct
Constants
extern const UInt32 
extern const UInt32 
extern const Types_FreqHz 
 
DETAILS
SyncPoint events are used to log timestamp values for two timebases: the local CPU timestamp that is used to timestamp events from this CPU, and a 'global' timestamp value that can be accessed by two or more CPUs. By logging the current timestamp values from these two timebase sources, the sync point events provide correlation points between the two timebases.
In order to allow sync point information to be injected into hardware trace streams, the LogSync module supports a configuration parameter named injectIntoTraceFxn that allows the user to hook in a function pointer to a function that handles the (ISA specific) details of injecting whatever information is required into the trace stream. For C64X+ full gem devices, the address of the ti.uia.family.c64p.GemTraceSync module's GemTraceSync_injectIntoTrace function should be used.
The sync point events are defined in the ti.uia.events.UIASync module (@see ti.uia.events.UIASync#syncPoint)
A unique 'serial number' is assigned to each sync point event that is logged. The same serial number is logged as a parameter for all UIASync events that are used to log information related to the sync point, allowing host-side tooling to treat these separate events coherently. The serial number can optionally be injected into device-specific trace streams (e.g. CPU trace, System Trace, etc.) in order to enable host-side tooling to correlate these separate streams with the CPU and global timestamp information logged with the sync point events.
EXAMPLES
Example 1: This is part of the XDC configuration file for the application that demonstrates a standard configuration using default settings. In this example, the Rta module internally handles the logging of the sync point events. A timestamp module that implements the IUIATimestampProvider interface is used for the global timestamp. Default values are used for the CPU maxCpuClockFreq (700 MHz).
 // By including Rta, Log records will be collected and sent to the
 // instrumentation host (once it is connected and started).  The Rta module
 // logs sync point events upon receiving either the start or stop command,
 // and prior to sending up a new event packet if
 // LogSync_isSyncPointEventRequired() returns true.
 var Rta  = xdc.useModule('ti.uia.services.Rta');

 // By default, the sync point events will be logged to a dedicated
 // LoggerCircBuf buffer named 'SyncLog' that is assigned to the LogSync
 // module.  Using a dedicated event logger buffer is recommended
 // in order to ensure that sufficient timing information
 // is captured to enable accurate multicore event correlation.
 // Configure LogSync.defaultSyncLoggerSize to specify a custom buffer size.
 var LogSync = xdc.useModule('ti.uia.runtime.LogSync');

 // For C64X+ and C66X devices that provide CPU trace hardware capabilities,
 // the following line will enable injection of correlation information into
 // the GEM CPU trace, enabling correlation of software events with the CPU
 // trace events.
 var GemTraceSync = xdc.useModule('ti.uia.family.c64p.GemTraceSync');

 // Configure a shared timer to act as a global time reference to enable
 // multicore correlation.  The TimestampC6472Timer module implements the
 // IUIATimestampProvider interface, so assigning this timer to
 // LogSync.GlobalTimestampProxy will configure the LogSync module's global
 // clock parameters automatically.  Exmaple 2 shows how to use other
 // types of timers.
 var TimestampC6472Timer =
    xdc.useModule('ti.uia.family.c64p.TimestampC6472Timer');
 LogSync.GlobalTimestampProxy = TimestampC6472Timer;

Example 2: Using a timer that does not implement the IUIATimestampProvider interface as the global timestamp timer. This example shows how to use, for example, timers that are provided by DSP/BIOS as the global timer source for event correlation 'sync point' timestamps.
 var LogSync = xdc.useModule('ti.uia.runtime.LogSync');
 var BiosTimer = xdc.useModule('ti.sysbios.family.c64p.TimestampProvider');
 LogSync.GlobalTimestampProxy = BiosTimer;

 // The following additional configuration code is required to use
 // a timer that does not implement the IUIATimeestampProvider interface
 // as the global timer for the LogSync module.  If the maxGlobalClockFreq
 // config option is not initialized, the following warning message will be displayed
 // at build time: "Warning: UIA Event correlation disabled.  Please
 // configure LogSync.globalClkFreq (.lo,.hi) to a non-zero value to enable."
 LogSync.maxGlobalClockFreq.lo = 700000000; // frequency in Hz - lower 32b
 LogSync.maxGlobalClockFreq.hi = 0;         // frequency in Hz - upper 32b

 // Configure the LogSync module with CPU timestamp clock frequency info
 // for clock frequencies other than the default (700MHz).
 LogSync.maxCpuClockFreq.lo = 1000000000; // 1GHz CPU freq. - lower 32b
 LogSync.maxCpuClockFreq.hi = 0;         // 1GHz CPU freq.- upper 32b

 // The globalTimestampCpuCyclesPerTick config option is optional.
 // It is used to convert global timestamp tick counts into CPU cycle counts
 // for devices where there is a fixed relationship between the global timer
 // frequency and the CPU clock.
 LogSync.globalTimestampCpuCyclesPerTick = 6;

Example 3: Disabling LogSync module at configuation time The logging of sync point events can be disabled by adding the following to the configuration script:
 LogSync.isEnabled = false;

Example 4: This is a part of the C code for an application that does not use the Rta module, and so needs to log the sync point events itself:
  #include <ti/uia/runtime/LogSync.h>
  ...

 // If the target has been suspended or halted
 // since the last time an event packet was sent to the
 // host, or the event transport has received a 'start' or
 // 'stop' command from the host, log a new sync point event to record
 // the current correlation info between the local
 // timestamp and the global timestamp.
 if ((LogSync_isSyncEventRequired())||([starting/stopping event transport])){
    LogSync_writeSyncPoint();
 }
<hr />
Example 5: The following configuration script snippet shows how to periodically log a sync point event. This allows System Analyzer to properly correlate UIA software instrumentation events with C6X CPU trace and STM (System Trace) events.
 //Configure a Timer to interrupt every 100ms and call the LogSync_timerHook
 // function to log a sync point event
 var Timer = xdc.useModule('ti.sysbios.hal.Timer');
 var timerParams = new Timer.Params();
 timerParams.startMode = Timer.StartMode_AUTO;
 timerParams.period = 100000;        // 100,000 uSecs = 100ms
 var timer0 = Timer.create(Timer.ANY, '&ti_uia_runtime_LogSync_timerHook', timerParams);
 
config LogSync_cpuTimestampCyclesPerTick  // module-wide

The number of CPU cycles each tick of the global timestamp corresponds to. 0 if no relation between clocks

C synopsis target-domain
extern const UInt32 LogSync_cpuTimestampCyclesPerTick;
 
DETAILS
If the module configured as the CpuTimestampProxy implements ti.uia.runtime.IUIATimestampProvider, the default value of this config option is derived at configuration time from that module's config data. Otherwise it is initialized to 0 to signify that there is no way to convert a number of global timestamp tick counts into an equivalent number of CPU cycles.
 
config LogSync_globalTimestampCpuCyclesPerTick  // module-wide

The number of CPU cycles each tick of the global timestamp corresponds to. 0 if no relation between clocks

C synopsis target-domain
extern const UInt32 LogSync_globalTimestampCpuCyclesPerTick;
 
DETAILS
A value of 0 signifies that there is no way to convert a number of global timestamp tick counts into an equivalent number of CPU cycles. Note that this value will be automatically copied from the GlobalTimestampProxy.cpuCyclesPerTick configuration value at configuration time if GlobalTimestampProxy.cpuCyclesPerTick > 0.
 
config LogSync_injectIntoTraceFxn  // module-wide

Callback function that handles injection of info such as serial numbers of sync point events, context change events or snapshot events into a hardware trace stream. (e.g. GEM CPU Trace, System Trace, etc.)

C synopsis target-domain
extern const LoggerTypes_InjectIntoTraceFxn LogSync_injectIntoTraceFxn;
 
DETAILS
Users can provide their own custom injectIntoTraceFxn to log whatever additional information they wish to record when the hook function is called. For example, event serial numbers can be injected into the CPU trace stream and / or STM trace stream in order to enable correlation of information logged in these streams with UIA software events.
EXAMPLES
Example 1: Correlating events with C64X+ and C66 CPU Trace
The following is an example of the configuration script used to inject serial numbers of sync point events or context change events or snapshot Ids associated with snapshot events.
Note that the GemTraceSync module's .xs script takes care of finding all modules that implement the IUIATraceSyncClient and assigning the GemTraceSync_injectIntoTrace function pointer to those modules' injectIntoTraceFxn config option.
 //The following 3 modules all implement the IUIATraceSyncClient interface
 var LogSnapshot   = xdc.useModule('ti.uia.runtime.LogSnapshot');
 var LogCtxChg   = xdc.useModule('ti.uia.runtime.LogCtxChg');
 var LogSync   = xdc.useModule('ti.uia.runtime.LogSync');
 //For C66 devices, replace the following line with
 // var GemTraceSync = xdc.useModule('ti.uia.family.c66.GemTraceSync');
 var GemTraceSync = xdc.useModule('ti.uia.family.c64p.GemTraceSync');

Example 2: How to create a custom hook function and assign it to the LogSnapshot module
The following is an example of a 'C' code program that implements a hook function that prints out the snapshot ID that is passed in as the serialNumber
 #include <xdc/std.h>
 #include <xdc/runtime/Gate.h>
 #include <ti/uia/runtime/IUIATraceSyncProvider.h>
 #include <ti/uia/runtime/LogSnapshot.h>
 #include <stdio.h>
 #include <string.h>
 extern Void myHookFxn(UInt32 serialNumber, IUIATraceSyncProvider_ContextType ctxType);
 Void Test();
 char name[32]={"Bob"};
 UInt32 newAppId = 0;
 Void myHookFxn(UInt32 serialNumber, IUIATraceSyncProvider_ContextType ctxType){
      volatile UInt32 syncWord;
      IArg key = Gate_enterSystem();
      printf("newAppId written with serialNumber %d and ctxType = %d\n",serialNumber,ctxType);
      Gate_leaveSystem(key);
 }
 Void Test(){
     // note that the hook function is triggered by calling LogSnapshot_getSnapshotId()
     // since that is where the unique snapshot ID that is passed to the
     // hook function is generated.
     Int snapshotId = LogSnapshot_getSnapshotId();
     LogSnapshot_writeString(snapshotId,"User-defined name=%s.",name, strlen(name));
 }

 Void main(){
     while(TRUE){  Test();  }
  }
In order to have the above user-defined function called by the LogSnapshot module whenever it writes an event, the following configuration script is needed:
 var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
 var LogSnapshot   = xdc.useModule('ti.uia.runtime.LogSnapshot');
 var IUIATraceSyncClient = xdc.useModule('ti.uia.runtime.IUIATraceSyncClient');
 LogSnapshot.injectIntoTraceFxn = $externFxn('myHookFxn');

SEE
 
config LogSync_maxGlobalClockFreq  // module-wide

The highest bus clock frequency used to drive the timer used for the global timestamp

C synopsis target-domain
extern const Types_FreqHz LogSync_maxGlobalClockFreq;
 
DETAILS
The default ticks per second rate of the timer is calculated by dividing the timer's bus clock frequency by the globalTimestampCpuCyclesPerTick config parameter.
Defines the highest bus clock frequency used to drive the shared timer used for the global timestamp.
 
LogSync_disable()  // module-wide

Disable logging of sync point events

C synopsis target-domain
Bool LogSync_disable();
 
RETURNS
The function returns the state of the module-level enable (TRUE if enabled,FALSE if disabled) before the call. This return value allows clients to restore the previous state. Note: not thread safe.
 
LogSync_enable()  // module-wide

Enables logging of sync point events

C synopsis target-domain
Bool LogSync_enable();
 
RETURNS
The function returns the state of the module-level enable (TRUE if enabled,FALSE if disabled) before the call. This return value allows clients to restore the previous state. Note: not thread safe.
 
LogSync_idleHook()  // module-wide

Hook function that can be called by SysBios when the Idle function. Logs a sync point event if required in order to enable multicore event correlation. Allows multicore event correlation to be re-established after the target has been halted and then resumed execution. (e.g. after CIO operation or breakpoint)

C synopsis target-domain
Void LogSync_idleHook();
 
 
LogSync_isSyncEventRequired()  // module-wide

Is Sync Event Required

C synopsis target-domain
Bool LogSync_isSyncEventRequired();
 
DETAILS
Checks whether the target has been halted since the last sync point event and returns true if it has.
RETURN
true if a synchronization event should be logged
 
LogSync_putSyncPoint()  // module-wide

Unconditionally put the specified Types event

C synopsis target-domain
Void LogSync_putSyncPoint();
 
DETAILS
This method unconditionally logs a sync point event. It is used internally by the writeSyncPoint() macro and typically should not be called directly.
 
LogSync_timerHook()  // module-wide

Hook function that can be called periodically by SysBios to enable correlation of CPU trace, STM trace and software instrumentation events

C synopsis target-domain
Void LogSync_timerHook(UArg arg);
 
 
LogSync_writeSyncPoint()  // module-wide

Log a sync point event along with global timestamp, local CPU frequency and sync point serial number

C synopsis target-domain
macro Void LogSync_writeSyncPoint();
 
ARGUMENTS
fmt — a constant string that describes why the sync point was logged.
DETAILS
This method logs a synchronization point event, local CPU timestamp and global timestamp into the log along with the fmt string a sync point serial number
 
LogSync_writeSyncPointRaw()  // module-wide
C synopsis target-domain
Void LogSync_writeSyncPointRaw(Types_Timestamp64 *cpuTS, Types_Timestamp64 *globalTS, Types_FreqHz *globalTickFreq);
 
Module-Wide Built-Ins

C synopsis target-domain
Types_ModuleId LogSync_Module_id();
// Get this module's unique id
 
Bool LogSync_Module_startupDone();
// Test if this module has completed startup
 
IHeap_Handle LogSync_Module_heap();
// The heap from which this module allocates memory
 
Bool LogSync_Module_hasMask();
// Test whether this module has a diagnostics mask
 
Bits16 LogSync_Module_getMask();
// Returns the diagnostics mask for this module
 
Void LogSync_Module_setMask(Bits16 mask);
// Set the diagnostics mask for this module
Instance Object Types

C synopsis target-domain
typedef struct LogSync_Object LogSync_Object;
// Opaque internal representation of an instance object
 
typedef LogSync_Object *LogSync_Handle;
// Client reference to an instance object
 
typedef struct LogSync_Struct LogSync_Struct;
// Opaque client structure large enough to hold an instance object
 
LogSync_Handle LogSync_handle(LogSync_Struct *structP);
// Convert this instance structure pointer into an instance handle
 
LogSync_Struct *LogSync_struct(LogSync_Handle handle);
// Convert this instance handle into an instance structure pointer
Instance Config Parameters

C synopsis target-domain
typedef struct LogSync_Params {
// Instance config-params structure
    IInstance_Params *instance;
    // Common per-instance configs
} LogSync_Params;
 
Void LogSync_Params_init(LogSync_Params *params);
// Initialize this config-params structure with supplier-specified defaults before instance creation
Instance Built-Ins

C synopsis target-domain
Int LogSync_Object_count();
// The number of statically-created instance objects
 
LogSync_Handle LogSync_Object_get(LogSync_Object *array, Int i);
// The handle of the i-th statically-created instance object (array == NULL)
 
LogSync_Handle LogSync_Object_first();
// The handle of the first dynamically-created instance object, or NULL
 
LogSync_Handle LogSync_Object_next(LogSync_Handle handle);
// The handle of the next dynamically-created instance object, or NULL
 
IHeap_Handle LogSync_Object_heap();
// The heap used to allocate dynamically-created instance objects
 
Types_Label *LogSync_Handle_label(LogSync_Handle handle, Types_Label *buf);
// The label associated with this instance object
 
String LogSync_Handle_name(LogSync_Handle handle);
// The name of this instance object
 
Configuration settings sourced in ti/uia/runtime/LogSync.xdc
var LogSync = xdc.useModule('ti.uia.runtime.LogSync');
local proxy modules
        LogSync.CpuTimestampProxy.delegate$ = ITimestampClient.Module null
 
        LogSync.GlobalTimestampProxy.delegate$ = ITimestampClient.Module null
module-wide config parameters
 
per-instance config parameters
    var params = new LogSync.Params// Instance config-params object;
 
 
proxy LogSync.CpuTimestampProxy

CPU Timestamp Proxy

Configuration settings
LogSync.CpuTimestampProxy = ITimestampClient.Module null
// some delegate module inheriting the ITimestampClient interface
    LogSync.CpuTimestampProxy.delegate$ = ITimestampClient.Module null
    // explicit access to the currently bound delegate module
 
DETAILS
This proxy provides a timestamp server that can be different from the one provided by xdc.runtime.Timestamp. However, if not supplied by a user, this proxy defaults to whichever timestamp server is provided by xdc.runtime.Timestamp.
Configuring the CpuTimestampProxy with a local timestamp module allows applications that change the CPU frequency to report this information to System Analyzer so that event timestamps can be adjusted to accommodate the change in frequency.
EXAMPLES
Example: the following configuration script shows how to configure a C66X Local Timestamp module for use as the CpuTimestampProxy
 var TimestampC66Local = xdc.useModule('ti.uia.family.c66.TimestampC66Local');
 TimestampC66Local.maxTimerClockFreq = {lo:1200000000,hi:0};
 var LogSync = xdc.useModule('ti.uia.runtime.LogSync');
 LogSync.CpuTimestampProxy = TimestampC66Local;
 
proxy LogSync.GlobalTimestampProxy

Global Timestamp Proxy

Configuration settings
LogSync.GlobalTimestampProxy = ITimestampClient.Module null
// some delegate module inheriting the ITimestampClient interface
    LogSync.GlobalTimestampProxy.delegate$ = ITimestampClient.Module null
    // explicit access to the currently bound delegate module
 
DETAILS
This proxy provides a timestamp server that can be different from the server provided by xdc.runtime.Timestamp. This must be configured in order to use this module.
 
config LogSync.cpuTimestampCyclesPerTick  // module-wide

The number of CPU cycles each tick of the global timestamp corresponds to. 0 if no relation between clocks

Configuration settings
LogSync.cpuTimestampCyclesPerTick = UInt32 1;
 
DETAILS
If the module configured as the CpuTimestampProxy implements ti.uia.runtime.IUIATimestampProvider, the default value of this config option is derived at configuration time from that module's config data. Otherwise it is initialized to 0 to signify that there is no way to convert a number of global timestamp tick counts into an equivalent number of CPU cycles.
C SYNOPSIS
 
config LogSync.globalTimestampCpuCyclesPerTick  // module-wide

The number of CPU cycles each tick of the global timestamp corresponds to. 0 if no relation between clocks

Configuration settings
LogSync.globalTimestampCpuCyclesPerTick = UInt32 0;
 
DETAILS
A value of 0 signifies that there is no way to convert a number of global timestamp tick counts into an equivalent number of CPU cycles. Note that this value will be automatically copied from the GlobalTimestampProxy.cpuCyclesPerTick configuration value at configuration time if GlobalTimestampProxy.cpuCyclesPerTick > 0.
C SYNOPSIS
 
config LogSync.injectIntoTraceFxn  // module-wide

Callback function that handles injection of info such as serial numbers of sync point events, context change events or snapshot events into a hardware trace stream. (e.g. GEM CPU Trace, System Trace, etc.)

Configuration settings
LogSync.injectIntoTraceFxn = Void(*)(UInt32,IUIATraceSyncProvider.ContextType) null;
 
DETAILS
Users can provide their own custom injectIntoTraceFxn to log whatever additional information they wish to record when the hook function is called. For example, event serial numbers can be injected into the CPU trace stream and / or STM trace stream in order to enable correlation of information logged in these streams with UIA software events.
EXAMPLES
Example 1: Correlating events with C64X+ and C66 CPU Trace
The following is an example of the configuration script used to inject serial numbers of sync point events or context change events or snapshot Ids associated with snapshot events.
Note that the GemTraceSync module's .xs script takes care of finding all modules that implement the IUIATraceSyncClient and assigning the GemTraceSync_injectIntoTrace function pointer to those modules' injectIntoTraceFxn config option.
 //The following 3 modules all implement the IUIATraceSyncClient interface
 var LogSnapshot   = xdc.useModule('ti.uia.runtime.LogSnapshot');
 var LogCtxChg   = xdc.useModule('ti.uia.runtime.LogCtxChg');
 var LogSync   = xdc.useModule('ti.uia.runtime.LogSync');
 //For C66 devices, replace the following line with
 // var GemTraceSync = xdc.useModule('ti.uia.family.c66.GemTraceSync');
 var GemTraceSync = xdc.useModule('ti.uia.family.c64p.GemTraceSync');

Example 2: How to create a custom hook function and assign it to the LogSnapshot module
The following is an example of a 'C' code program that implements a hook function that prints out the snapshot ID that is passed in as the serialNumber
 #include <xdc/std.h>
 #include <xdc/runtime/Gate.h>
 #include <ti/uia/runtime/IUIATraceSyncProvider.h>
 #include <ti/uia/runtime/LogSnapshot.h>
 #include <stdio.h>
 #include <string.h>
 extern Void myHookFxn(UInt32 serialNumber, IUIATraceSyncProvider_ContextType ctxType);
 Void Test();
 char name[32]={"Bob"};
 UInt32 newAppId = 0;
 Void myHookFxn(UInt32 serialNumber, IUIATraceSyncProvider_ContextType ctxType){
      volatile UInt32 syncWord;
      IArg key = Gate_enterSystem();
      printf("newAppId written with serialNumber %d and ctxType = %d\n",serialNumber,ctxType);
      Gate_leaveSystem(key);
 }
 Void Test(){
     // note that the hook function is triggered by calling LogSnapshot_getSnapshotId()
     // since that is where the unique snapshot ID that is passed to the
     // hook function is generated.
     Int snapshotId = LogSnapshot_getSnapshotId();
     LogSnapshot_writeString(snapshotId,"User-defined name=%s.",name, strlen(name));
 }

 Void main(){
     while(TRUE){  Test();  }
  }
In order to have the above user-defined function called by the LogSnapshot module whenever it writes an event, the following configuration script is needed:
 var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
 var LogSnapshot   = xdc.useModule('ti.uia.runtime.LogSnapshot');
 var IUIATraceSyncClient = xdc.useModule('ti.uia.runtime.IUIATraceSyncClient');
 LogSnapshot.injectIntoTraceFxn = $externFxn('myHookFxn');

SEE
C SYNOPSIS
 
config LogSync.maxGlobalClockFreq  // module-wide

The highest bus clock frequency used to drive the timer used for the global timestamp

Configuration settings
LogSync.maxGlobalClockFreq = Types.FreqHz undefined;
 
DETAILS
The default ticks per second rate of the timer is calculated by dividing the timer's bus clock frequency by the globalTimestampCpuCyclesPerTick config parameter.
Defines the highest bus clock frequency used to drive the shared timer used for the global timestamp.
C SYNOPSIS
 
metaonly config LogSync.canCpuCyclesPerTickBeChanged  // module-wide

Indicates whether the CPU timer's cycles per tick divide down ratio can be changed or not

Configuration settings
LogSync.canCpuCyclesPerTickBeChanged = Bool false;
 
DETAILS
Set to true if the timer's CPU cycles per tick can be changed
 
metaonly config LogSync.canCpuFrequencyBeChanged  // module-wide

Indicates whether the timer frequency can be changed or not

Configuration settings
LogSync.canCpuFrequencyBeChanged = Bool false;
 
DETAILS
Set to true if the timer's clock frequency can be changed
 
metaonly config LogSync.common$  // module-wide

Common module configuration parameters

Configuration settings
LogSync.common$ = Types.Common$ undefined;
 
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.
 
metaonly config LogSync.defaultSyncLoggerSize  // module-wide

Configures the size of the default syncLogger created by LogSync

Configuration settings
LogSync.defaultSyncLoggerSize = SizeT 256;
 
DETAILS
Only used if syncLogger is null.
 
metaonly config LogSync.enableEventCorrelationForJTAG  // module-wide

Enable event correlation for JTAG Transports (deprecated)

Configuration settings
LogSync.enableEventCorrelationForJTAG = Bool true;
 
DETAILS
By default, event correlation is enabled for JTAG transports. In order for event correlation to work with JTAG transports, it is necessary for the target program to periodically execute LogSync_idleHook in order to log enough synchronization information to reestablish event correlation after a breakpoint has been hit. The following .cfg script snippet shows how to configure the ti.uia.sysbios.LoggingSetup module to enable this:
 .cfg script:
 var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
Since most JTAG debugging sessions start with a breakpoint being hit at main, event correlation will only be possible once a sync point event has been logged after running from main. Calling the following code snippet as part of the code that is run by main is highly recommended in order to establish synchronization information as early in the program's execution as possible.
 C code:
 #include <xdc/std.h>
 #include <ti/uia/runtime/LogSync.h>
 ...

    if (LogSync_isSyncEventRequired()){
       LogSync_writeSyncPoint();
    }
 
metaonly config LogSync.isEnabled  // module-wide

Configures whether sync logging is enabled (true) or disabled (false)

Configuration settings
LogSync.isEnabled = Bool true;
 
 
metaonly config LogSync.isInjectIntoTraceEnabled  // module-wide

set false to turn off injection of sync point info into trace even if a module that implements IUIATraceSyncProvider is configured

Configuration settings
LogSync.isInjectIntoTraceEnabled = Bool true;
 
DETAILS
The XDCScript associated with a module that implements IUIATraceSyncProvider is responsible for checking this config option for all IUIATraceSyncClient modules before automatically configuring the client callback function. This allows users to control which features have sync points injected into the trace stream. For example, a user may wish to configure LogSync.isInjectIntoTraceEnabled = true and LogCtxChg.isInjectIntoTraceEnabled = false in order to reduce the number of sync point events injected into the trace stream.
 
metaonly config LogSync.maxCpuClockFreq  // module-wide

The highest bus clock frequency used to drive the timer

Configuration settings
LogSync.maxCpuClockFreq = Types.FreqHz undefined;
 
DETAILS
The default ticks per second rate of the timer is calculated by dividing the timer's bus clock frequency by the cpuTimestampCyclesPerTick config parameter.
Defines the 32 MSBs of the highest bus clock frequency used to drive the timer.
 
metaonly config LogSync.syncLogger  // module-wide

Configures the logger instance to use to log sync point events

Configuration settings
LogSync.syncLogger = ILogger.Handle undefined;
 
DETAILS
If left null, an instance of LoggerStopMode will be created for dedicated use by the LogSync module in order to log sync point events. (The ti.uia.services.Rta and ti.uia.sysbios.LoggerSetup modules can specify that the LoggerCircBuf module be used as the default if the user has specified a non-JTAG transport for event upload.)
Instance Config Parameters

Configuration settings
var params = new LogSync.Params;
// Instance config-params object
generated on Tue, 14 Feb 2017 00:15:16 GMT