Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

smex and trace sections cleanup #9491

Merged
merged 2 commits into from
Sep 20, 2024

Conversation

LaurentiuM1234
Copy link
Contributor

This series removes the need to add ".trace_ctx" and ".static_log_entries" linker sections for Zephyr platforms not using trace.

As of commit 0868b1f ("zephyr: Remove legacy logging artifacts")
smex is no longer included in Zephyr builds. As such, there's no need to
include a ".static_log_entries" ELF section in the Zephyr ELFs.

This was originally added via commit ca6e3c3 ("zephyr: add
smex_placeholder()").

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
If trace is disabled (i.e: CONFIG_TRACE=n) there's no need
to place the trace context inside a special linker section
(i.e: .trace_ctx). This spares platforms that don't use trace
from having to include the .trace_ctx section inside their
linker scripts.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
@LaurentiuM1234 LaurentiuM1234 changed the title smex and trace cleanup smex and trace sections cleanup Sep 18, 2024
@LaurentiuM1234 LaurentiuM1234 marked this pull request as ready for review September 18, 2024 19:36
Copy link
Collaborator

@marc-hb marc-hb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrapper.c change makes sense to me, approved.

trace.h change not reviewed.

* totally empty the .static_log_entries ELF sections for the
* sof-logger. This makes smex fail. Define at least one such section to
* fix the build when sof-logger is not used.
*/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should sof-logger -l support also be removed?

Copy link
Contributor Author

@LaurentiuM1234 LaurentiuM1234 Sep 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure that's a good idea. As far as I can tell there's still some AMD (?) platforms and imx8m using XTOS. I don't have the toolchain right now to test but smex should still be included in those builds. AFAICT removing -l from the logger would break the only way of logging for those platforms (as you need the ldc file for it to work).

CC: @marc-hb please do correct me if I'm wrong here. Haven't really used sof-logger in a while :(

LE: just noticed #9421, sorry for any unnecessary recent tags/review requests :(

Copy link
Collaborator

@kv2019i kv2019i left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent, thanks @LaurentiuM1234 ! There's indeed no need for this, we have a rich toolset to log with Zephyr (including dictionary and mipi syst), so need to go back when Zephyr is used.

@kv2019i kv2019i merged commit 42c03ac into thesofproject:main Sep 20, 2024
44 of 47 checks 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.

5 participants