-
Notifications
You must be signed in to change notification settings - Fork 295
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
rpmsg/rpmsg_virtio: support set trace callback to trace buffer status #632
base: main
Are you sure you want to change the base?
Conversation
@@ -139,5 +139,10 @@ if (DEFINED RPMSG_BUFFER_SIZE) | |||
endif (DEFINED RPMSG_BUFFER_SIZE) | |||
|
|||
option (WITH_DOC "Build with documentation" OFF) | |||
option (WITH_RPMSG_TRACE "Enable Rpmsg Device Trace" OFF) | |||
|
|||
if (WITH_RPMSG_TRACE) |
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.
Please explain commit mesasge in detail what this option is for.
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.
Adding this is to track the application and release of rpmsg buffer,then connect to the OS trace system
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.
Have you checked virtqueue_dump functionality? Is it not enough for above purpose?
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.
Virtqueue_dump is not enough for record historical information of buffer application and release.
it just record the info of virtqueue
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.
Look to me too complex just for some specific traces...
What about using RPMSG_DEBUG
in open-amp/lib/rpmsg/rpmsg_internal.h
?
Then you could define RPMSG_LOG macro to add debug traces in RPMSG
* @release_tx_buffer: trace callback, called when release a tx buffer | ||
*/ | ||
struct rpmsg_device_trace { | ||
void (*get_tx_buffer)(struct rpmsg_device *rvdev, void *hdr); |
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.
What these callbacks are expected to trace ?
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.
rpmsg_get_tx_payload_buffer and rpmsg_release_tx_buffer
Adding this is to track the application and release of rpmsg buffer, then connect to the OS trace system Signed-off-by: Bowen Wang <[email protected]>
123fdb6
to
2d948b9
Compare
@arnopo hi, please help me to solve this ci problem, think you very much: open-amp Heath Check / Zephyr build from latest on main (pull_request) CMake Error at /github/workspace/zephyrproject/zephyr/cmake/modules/boards.cmake:228 (message): -- Configuring incomplete, errors occurred! |
I will have a look , you can ignore it for the moment , only the required checks are mandatory |
support set trace callback to trace buffer status
Adding this is to track the application and release of rpmsg buffer,then connect to the OS trace system
users can enable RPMSG_TRACE to monitor application and release of txbuffer