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

rpmsg/rpmsg_virtio: support set trace callback to trace buffer status #632

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

luckyyaojin
Copy link

@luckyyaojin luckyyaojin commented Dec 20, 2024

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

@@ -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)
Copy link
Collaborator

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.

Copy link
Author

@luckyyaojin luckyyaojin Dec 23, 2024

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

Copy link
Collaborator

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?

Copy link
Author

@luckyyaojin luckyyaojin Dec 24, 2024

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

Copy link
Collaborator

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);
Copy link
Collaborator

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 ?

Copy link
Author

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]>
@luckyyaojin
Copy link
Author

luckyyaojin commented Dec 23, 2024

@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):
Invalid BOARD; see above.
Call Stack (most recent call first):
cmake/modules/sysbuild_default.cmake:15 (include)
/github/workspace/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
/github/workspace/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
/github/workspace/zephyrproject/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
template/CMakeLists.txt:10 (find_package)

-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: /github/workspace/.venv/bin/cmake -DWEST_PYTHON=/github/workspace/.venv/bin/python3 -B/github/workspace/zephyrproject/zephyr/build -GNinja -DBOARD=lpcxpresso54114_m4 -S/github/workspace/zephyrproject/zephyr/share/sysbuild -DAPP_DIR:PATH=/github/workspace/zephyrproject/zephyr/samples/subsys/ipc/openamp

@luckyyaojin luckyyaojin requested a review from tnmysh December 25, 2024 11:58
@arnopo
Copy link
Collaborator

arnopo commented Jan 2, 2025

@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): Invalid BOARD; see above. Call Stack (most recent call first): cmake/modules/sysbuild_default.cmake:15 (include) /github/workspace/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include) /github/workspace/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate) /github/workspace/zephyrproject/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include) template/CMakeLists.txt:10 (find_package)

-- Configuring incomplete, errors occurred! FATAL ERROR: command exited with status 1: /github/workspace/.venv/bin/cmake -DWEST_PYTHON=/github/workspace/.venv/bin/python3 -B/github/workspace/zephyrproject/zephyr/build -GNinja -DBOARD=lpcxpresso54114_m4 -S/github/workspace/zephyrproject/zephyr/share/sysbuild -DAPP_DIR:PATH=/github/workspace/zephyrproject/zephyr/samples/subsys/ipc/openamp

I will have a look , you can ignore it for the moment , only the required checks are mandatory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants