zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.95k stars 6.66k forks source link

Enhancement: Support out-of-tree tracing backends #37912

Open mullr opened 3 years ago

mullr commented 3 years ago

Is your enhancement proposal related to a problem? Please describe. I'm hooking up a custom tracing system to Zephyr. The macro-based tracing hooks are almost a really good place to hook in to this. Unfortunately, the source structure only accommodates in-tree definitions of the sys_port_trace_* macros.

Describe the solution you'd like I'd like a way to provide my own include file, like tracing_sysview.h, from outside the zephyr source tree.

Describe alternatives you've considered I've been able to work around this by providing my own tracing/tracing.h file, and putting it on the front of the include path. This mostly works, but there appear to be some source files (subsys/net/buf.c is one) that don't actually include tracing/tracing.h; to work around these cases, I had to add -include 'tracing/tracing.h' to my CFLAGS as well.

I also looked at the existing tracing backend hook in tracing_backend.h, but it's too high-level for my application.

zephyrbot commented 9 months ago

Hi @nashif,

This issue, marked as an Enhancement, was opened a while ago and did not get any traction. Please confirm the issue is correctly assigned and re-assign it otherwise.

Please take a moment to review if the issue is still relevant to the project. If it is, please provide feedback and direction on how to move forward. If it is not, has already been addressed, is a duplicate, or is no longer relevant, please close it with a short comment explaining the reason.

@mullr you are also encouraged to help moving this issue forward by providing additional information and confirming this request/issue is still relevant to you.

Thanks!