Stopped the win32 and win64 ports from enabling performance metrics and event trace - #676
Conversation
if these are required they can be enabled in tx_user.h
if required they can be enabled in tx_user.h
187ab44 to
39c218a
Compare
The win32 and win64 ports were the only two that turned performance metrics on for the application, and win32 the only one that turned event trace on. Leaving those to tx_user.h is right: the symbols extend the control blocks, so a port that sets them behind the application's back changes structures the application also sees. The blocks were disabled with #if 0 rather than deleted. That is the form MISRA C:2012 Directive 4.4 is about -- sections of code should not be commented out -- and it leaves two copies of a list that now has no reader. They are removed, and a short note in their place says where the symbols belong and why the port does not set them. No behaviour change beyond what this pull request already made. Checked that the preprocessor nesting in both headers is still balanced. Worth recording for whoever looks next: with this in, no port defines either symbol. The linux port carries the same list commented out, which reads at a glance like a third case but is not one. Assisted-by: Claude Code (Opus 5) <noreply@anthropic.com>
|
Thanks @ntfreak — this is the right change, and the justification is stronger than the description gives it. Checking every port's
So this does not introduce a new convention, it removes the last exceptions to the existing one. With it in, no port defines either. That matters more than a build-size preference: the symbols extend the control blocks, so a port setting them behind the application's back changes structures the application also sees. (The linux port carries the same list, but commented out — it reads at a glance like a third case and is not one. Worth knowing before someone "finishes the job" there.) What I pushedThe disabled blocks are removed rather than No behaviour change beyond what you already had. Retargeted to
|
if tracing or performance counters are required they can be set by the user in tx_user.h
PR checklist