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
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions zephyr/wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,29 +167,8 @@ unsigned int _xtos_ints_off(unsigned int mask)
return 0;
}

/* Zephyr redefines log_message() and mtrace_printf() which leaves
* 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 :(

static inline const void *smex_placeholder_f(void)
{
_DECLARE_LOG_ENTRY(LOG_LEVEL_DEBUG,
"placeholder so .static_log.X are not all empty",
_TRACE_INV_CLASS, 0);

return &log_entry;
}

/* Need to actually use the function and export something otherwise the
* compiler optimizes everything away.
*/
const void *_smex_placeholder;

int task_main_start(struct sof *sof)
{
_smex_placeholder = smex_placeholder_f();

/* init default audio components */
sys_comp_init(sof);

Expand Down