linux icon indicating copy to clipboard operation
linux copied to clipboard

Debug stream debugfs

Open jsarha opened this issue 1 year ago • 10 comments

This commit simply maps the identified debug-stream debug window slot as a debugfs file.

jsarha avatar Aug 23 '24 09:08 jsarha

@jsarha, what I would do is: rename the ipc4-telemetry.c to ipc4-debugfs.c or something generic and use this to export the raw slots on the needed base. You can have a single exported function as entry point, you can even move here the sof_ipc4_find_debug_slot_offset_by_type() function...

I know, mtrace is also uses debug slot, but it has been special cased out...

The ipc4-telemetry.h should remain as it is.

@ujfalusi I took a shot at this. I still try make sure the zephyr tool can still read the execption file.

jsarha avatar Aug 30 '24 07:08 jsarha

@ujfalusi @kv2019i , according to my tests the exception debugfs file works just as well after this change as it did before. That is, neither version works. I have no idea where the problem is, but I am quite sure this version is equivalent to the older version, so I'd hope to get this merged.

jsarha avatar Sep 25 '24 11:09 jsarha

@jsarha @ujfalusi ping - can we unblock ?

lgirdwood avatar Oct 22 '24 14:10 lgirdwood

@jsarha @ujfalusi ping - can we unblock ?

This is not as important anymore as before, as the latest debug_stream.py is able to access its debug-window-slot directly using cavstool.py functions. However, I still think the debugfs file is a cleaner way to do this, so I still think this PR is valid.

jsarha avatar Oct 23 '24 14:10 jsarha

@jsarha @ujfalusi ping - can we unblock ?

This is not as important anymore as before, as the latest debug_stream.py is able to access its debug-window-slot directly using cavstool.py functions. However, I still think the debugfs file is a cleaner way to do this, so I still think this PR is valid.

ok, we can park now and see how well existing tools work - if slow or inconsistent we can continue here.

lgirdwood avatar Oct 23 '24 14:10 lgirdwood

@jsarha @ujfalusi ping - can we unblock ?

This is not as important anymore as before, as the latest debug_stream.py is able to access its debug-window-slot directly using cavstool.py functions. However, I still think the debugfs file is a cleaner way to do this, so I still think this PR is valid.

ok, we can park now and see how well existing tools work - if slow or inconsistent we can continue here.

I think this is useful in situations where no Python runtime is available. @ranj063 @ujfalusi @bardliao lets move forward with this. @jsarha some conflicts.

lgirdwood avatar Mar 19 '25 16:03 lgirdwood

Rephrased the first commit message a bit and resurrected ipc4-telemetry.h in the last commit (and updated the message accordingly), which is currently actually used. The code still works with debug_stream.py.

jsarha avatar Jun 25 '25 15:06 jsarha

@lgirdwood , @lyakh , the phantom commit is now removed, and there was no complaints about the other commits, so this should be good now?

Thanks @ujfalusi !

jsarha avatar Jun 27 '25 10:06 jsarha

@lyakh is this Ok now?

@bardliao , @lgirdwood only appled three last suggestions from Guennadi (Copyright 2024-2025), free in only one place sof_debug_slot_debugfs_entry_read(), and rename sof_ipc4_create_debug_slot_debugfs_node() to sof_ipc4_create_debug_slot_ro_debugfs_node() . Could you check those and reaprove if Ok.

jsarha avatar Jul 01 '25 19:07 jsarha

@lgirdwood should we still get this merged? @ujfalusi should I rebase, the PR getting old, again?

jsarha avatar Aug 13 '25 12:08 jsarha