BUPT-OS / RROS

RROS is a dual-kernel OS for satellites or other scenarios that need both real-time and general-purpose abilities. RROS = RTOS (Rust) + Linux (C).
https://bupt-os.github.io/website/
Other
570 stars 40 forks source link

rust: trace: add trace subsystem support #31

Closed shannmu closed 1 month ago

shannmu commented 8 months ago

The Linux kernel provides tools for profiling, such as TRACE_EVENT, kprobe, ftrace, and perf. I have implemented some tracepoints for the RROS system in C, utilizing the TRACE_EVENT provided by Linux, and added them to the export symbol table for use in Rust code within the RROS system.

https://github.com/BUPT-OS/RROS/issues/30

Richardhongyu commented 8 months ago

@shannmu The CI fails.

Lukeehoojet commented 8 months ago

Does c_trace.c have to be placed in the kernel/rros directory? Are there any other options?

shannmu commented 8 months ago

Does c_trace.c have to be placed in the kernel/rros directory? Are there any other options?

c_trace.c is similar to helpers.c in rust tree, but it couldn't be placed in helpers.c, because functions in helpers.c are all general functions in Linux. If you want the code in the rros directory to be all Rust code, you need to find a directory related to RROS that is all C code.