Hi,
With many tasks - my event log is swamped and at least half the events are lost if task logging is just 'on':
LoggingSetup.sysbiosTaskLogging = true;
To overcome this - I have attempted to just switch task logging on in at runtime:
a)
Diags_setMask("ti.sysbios.knl.Task+1");
Diags_setMask("ti.sysbios.knl.Task+2");
...
Diags_setMask("ti.sysbios.knl.Task-1");
Diags_setMask("ti.sysbios.knl.Task-2");
b)
Diags_setMask("ti.sysbios.knl.Task=0");
Nothing I do at runtime has any impact on task logging. Its either on via static config - or off.
This
Task.common$.diags_USER1 = Diags.ALWAYS_OFF;Task.common$.diags_USER2 = Diags.ALWAYS_OFF;
Turns it off
But this
Task.common$.diags_USER1 = Diags.RUNTIME_OFF;Task.common$.diags_USER2 = Diags.RUNTIME_OFF;
Turns it on - and no run time attempt turns it off.
I have turned semaphore logging off which helps (a little bit)
How can I control task logging (execution graph) programatically between code points?
Thanks
Ian
Hi Ian,
which version of SYS/BIOS and XDCtools are you using? Are you using UIA?
If so, you can add:
var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');LoggingSetup.sysbiosTaskLoggingRuntimeControl = true;
to your .cfg file. That should enable the run-time controls for Task (Swi's and Hwi's can also be controlled).
Thanks,
Tom
Hi Tom,
Thanks for your reply.
I'm using:
bios_6_33_04_39
xdctools_3_23_03_53
uia_1_01_00_04
Setting:
LoggingSetup.sysbiosTaskLoggingRuntimeControl = true;
has no effect (probably it's default value).
I note that stepping over these lines (with static config set to RUNTIME_ON)
has ti_sysbios_knl_Task_Module__root__V.mask go from 0x300 -> 0x200 -> 0x0
But still the task logging events continue.
The odd thing is this. With static config set to this
The task events are off at main and no events are seen for our first task create. And when the runtime calls are made to Diags_setMask - the global mask is already set to 0. But later on they seem to get enabled and the events flood in. Even though the mask remains at 0.
I'm baffled at why task events seem to get enabled later and ignore any runtime Diags_setMask calls?
Hi Ian
What device are you using? Can you post your .cfg file?
I can't replicate the problem you're seeing just yet.
The device is C6670 - but...
I went back to the stair step example (which I had running on our target) and got runtime task logging control going here. That highlighted my mistake in our app and all is now working.
The salient points for future reference:
In the .cfg
LoggingSetup.sysbiosTaskLogging = true;LoggingSetup.sysbiosTaskLoggingRuntimeControl = true;Task.common$.diags_USER1 = Diags.RUNTIME_OFF;Task.common$.diags_USER2 = Diags.RUNTIME_OFF;
Code: To start logging: (I had this in a timer task)
Diags_setMask("ti.sysbios.knl.Task+1"); Diags_setMask("ti.sysbios.knl.Task+2");
To stop logging: (I had this in a low priority task. BP just after)
Diags_setMask("ti.sysbios.knl.Task-1"); Diags_setMask("ti.sysbios.knl.Task-2");
I also added these log statements to add an event to the execution graph:
Log_write1(UIABenchmark_start, (xdc_IArg)"late");Log_write1(UIABenchmark_stop, (xdc_IArg)"late");
Thanks for you help and Best regards.