Skip to content

Stopped the win32 and win64 ports from enabling performance metrics and event trace - #676

Merged
fdesbiens merged 4 commits into
eclipse-threadx:devfrom
ntfreak:win32_trace_disable
Sep 9, 2026
Merged

fdesbiens merged 4 commits into
eclipse-threadx:devfrom
ntfreak:win32_trace_disable

Conversation

@ntfreak

@ntfreak ntfreak commented Aug 28, 2026

Copy link
Copy Markdown

if tracing or performance counters are required they can be set by the user in tx_user.h

PR checklist

  • Updated function header with a short description and version number
  • Added test case for bug fix or new feature
  • Validated on real hardware

ntfreak and others added 2 commits September 3, 2026 17:21
if these are required they can be enabled in tx_user.h
if required they can be enabled in tx_user.h
@ntfreak
ntfreak force-pushed the win32_trace_disable branch from 187ab44 to 39c218a Compare September 3, 2026 16:28
r and others added 2 commits September 9, 2026 13:19
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>
@fdesbiens
fdesbiens changed the base branch from master to dev September 9, 2026 17:21
@fdesbiens

Copy link
Copy Markdown
Contributor

Thanks @ntfreak — this is the right change, and the justification is stronger than the description gives it.

Checking every port's tx_port.h with comments stripped, these two were the only ports that forced the symbols on:

Symbol Ports defining it before this PR
TX_*_ENABLE_PERFORMANCE_INFO 2 — win32, win64
TX_ENABLE_EVENT_TRACE 1 — win32

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 pushed

The disabled blocks are removed rather than #if 0-ed. #if 0 is the form MISRA C:2012 Directive 4.4 is about — sections of code should not be commented out — and it left two copies of a list with no reader. A short note in their place records where the symbols belong and why the port does not set them. Preprocessor nesting in both headers re-checked as balanced.

No behaviour change beyond what you already had.

Retargeted to dev

The base was master. Beyond the branching convention, it has a concrete cost: clang_check and gcc_check exist only on dev, and a pull request runs the workflows from its base branch, so targeting master skipped both. dev is where this work belongs and where the checks live. The two files are byte-identical on the two branches, so the retarget was clean.

On the CI that did not run

For the record, since it looked like a gap: the runs were not missing, they were held at action_required awaiting maintainer approval, which is standard for an outside contributor. A maintainer approving them releases ports_arch_check and regression_test.

It is worth being honest that approving them proves little here. There is no Windows CI in this repository — no workflow references win32, win64, MSVC or a Windows runner — so nothing in CI compiles either file, before or after this change. That is not something to solve in this pull request, but it is why this one is being read carefully rather than waved through on a green tick.

@fdesbiens fdesbiens changed the title win32: do not set TX_ENABLE_EVENT_TRACE in tx_port.h Stopped the win32 and win64 ports from enabling performance metrics and event trace Sep 9, 2026
@fdesbiens
fdesbiens merged commit 4d90a0c into eclipse-threadx:dev Sep 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants