-
Notifications
You must be signed in to change notification settings - Fork 367
Trace - make clear that trace context is unused with Zephyr #11102
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,6 +41,7 @@ | |
| LOG_MODULE_REGISTER(basefw, CONFIG_SOF_LOG_LEVEL); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "srop trace context"? |
||
|
|
||
| SOF_DEFINE_REG_UUID(basefw); | ||
| /* unused with Zephyr, generates no output */ | ||
| DECLARE_TR_CTX(basefw_comp_tr, SOF_UUID(basefw_uuid), LOG_LEVEL_INFO); | ||
|
|
||
| static struct ipc4_system_time_info global_system_time_info; | ||
|
|
@@ -850,7 +851,9 @@ __cold static int basefw_set_large_config(struct comp_dev *dev, uint32_t param_i | |
|
|
||
| static const struct comp_driver comp_basefw = { | ||
| .uid = SOF_RT_UUID(basefw_uuid), | ||
| #ifndef __ZEPHYR__ | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could this be reversed? I mean these are only needed in LIBRARY builds now (or are they even needed there)? Or maybe that's not accurate enough, but maybe "#ifdef CONFIG_TRACE" (i.e. a build really using sof-logger with dictionaries). And for Zephyr, this doesn't cover the case where you build with Zephyr but disable CONFIG_ZEPHYR_LOG. I think these cases should be prevented somehow. |
||
| .tctx = &basefw_comp_tr, | ||
| #endif | ||
| .ops = { | ||
| .get_large_config = basefw_get_large_config, | ||
| .set_large_config = basefw_set_large_config, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,6 +35,7 @@ LOG_MODULE_REGISTER(pipe, CONFIG_SOF_LOG_LEVEL); | |
|
|
||
| SOF_DEFINE_REG_UUID(pipe); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's with the "!CONFIG_SOF_USERSPACE_LL" in the commit message? |
||
|
|
||
| /* unused with Zephyr, generates no output */ | ||
| DECLARE_TR_CTX(pipe_tr, SOF_UUID(pipe_uuid), LOG_LEVEL_INFO); | ||
|
|
||
| /* number of pipeline stream metadata objects we export in mailbox */ | ||
|
|
@@ -140,12 +141,15 @@ struct pipeline *pipeline_new(struct k_heap *heap, uint32_t pipeline_id, uint32_ | |
| p->pipeline_id = pipeline_id; | ||
| p->status = COMP_STATE_INIT; | ||
| p->trigger.cmd = COMP_TRIGGER_NO_ACTION; | ||
| #ifndef __ZEPHYR__ | ||
| /* Zephyr's tr_*() macros ignore the trace context, no need to copy it */ | ||
| ret = memcpy_s(&p->tctx, sizeof(struct tr_ctx), &pipe_tr, | ||
| sizeof(struct tr_ctx)); | ||
| if (ret < 0) { | ||
| pipe_err(p, "failed to copy trace settings"); | ||
| goto free; | ||
| } | ||
| #endif | ||
|
|
||
| ret = pipeline_posn_offset_get(&p->posn_offset); | ||
| if (ret < 0) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused if not CONFIG_TRACE, not really related to Zephyr...