-
Notifications
You must be signed in to change notification settings - Fork 349
Enable probes on MTL #7989
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
Enable probes on MTL #7989
Conversation
0043546 to
4b12205
Compare
btian1
left a comment
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.
QB still have failed case, please check.
src/probe/probe.c
Outdated
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.
just a suggestion, use one #if from line 264 - 277, this can remove one more "#if #else #endif", overhead is duplicated err message.
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.
just a suggestion, use one #if from line 264 - 277, this can remove one more "#if #else #endif", overhead is duplicated err message.
@btian1 The difference is purely for the reader - the compilation result is the same. And in its present form the difference between the two cases is easier to see, so, I'd keep it as is. In general, however, yes, the fewer preprocessor conditionals we use, especially in .c, the better
4b12205 to
43f2b64
Compare
e891dbf to
d1098ae
Compare
This patch ports probe component to use zephyr native drivers. Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com> Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
d1098ae to
7d65955
Compare
2334def to
3fb4aed
Compare
|
The only thing I would change are commit titles. This |
kv2019i
left a comment
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.
Thanks @serhiy-katsyuba-intel , looks good. Can you update the commit prefixes to align with existing style?
|
|
||
| /* return if no bytes */ | ||
| if (!bytes) { | ||
| #if CONFIG_SOF_LOG_DBG_BUFFER |
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.
it build nothing as default with buf_dbg, if change build log level, then it will print lot of log messages, I just mean default there is no cycle cost, and enable it indeed cost too much, not sure need a config to just cover is expensive or not.
oh yeah - did not see that. ready to merge as soon as this is fixed. |
| break; | ||
| } | ||
|
|
||
| err = dma_config(dma->dc.dmac->z_dev, dma->dc.chan->index, &dma_cfg); |
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.
return dma_config(...)
src/probe/probe.c
Outdated
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.
just a suggestion, use one #if from line 264 - 277, this can remove one more "#if #else #endif", overhead is duplicated err message.
@btian1 The difference is purely for the reader - the compilation result is the same. And in its present form the difference between the two cases is easier to see, so, I'd keep it as is. In general, however, yes, the fewer preprocessor conditionals we use, especially in .c, the better
| _probe->inject_dma[j].dc.chan->index) < 0) { | ||
| #else | ||
| if (dma_start_legacy(_probe->inject_dma[j].dc.chan) < 0) { | ||
| #endif |
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.
this confuses at least some editors. They don't understand that only one of the ifs is compiled, so they interpret it as
if (x) {
if (y) {
and keep trying to "fix" alignment for a nested if and also gets confused about too few closing braces. Not something critical and not even an issue for everybody, but at least we did modify one such code fragment for this reason to read
#if X
if (a)
#else
if (b)
#endif
{
This contradicts style but at least the editor is happy about balanced braces
comp_update_buffer_consume() and comp_update_buffer_produce() generate too much log output. Usually such amount of logs results in many log messages been dropped. It is also results in significant CPU load if selected log backend formats log messages at runtime. This patch adds a separate switch to enable these logs only when necessary. Default value is 'n'. Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Probe module subscribes to buffer produce notifications in order to perform data extraction or injection. Hence this fix is required to enable probe feature. Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Both extraction and injection probes require to subscribe to buffer produce notification. Hence notification subscription logic should be enabled for both types of probes. Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Enables extraction and injection probes for MTL platform. NOTE: this commit does NOT enable probe log backend. Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
3fb4aed to
daa1231
Compare
Done. |
jsarha
left a comment
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.
I have just a minor nitpick, that can be ignored, but there were some other valid comments, however with those fixed, approved by me.
| return 0; | ||
| } | ||
|
|
||
| #if !CONFIG_ZEPHYR_NATIVE_DRIVERS |
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.
Just a nitpick, I find it slightly annoying that this in #if the condition is negated, but in all the following ones the native drivers version comes first.
First commit is borrowed from Adrian Bonislawski abonislawski@e5b45c6 -- this is to port probe component to use Zephyr DMA stuff.
Rest are fixes required for probes to work properly.
Additionally, this zephyr_ll scheduler fix is required for injection probes not to cause FW panic: #7988