Skip to content
  • Jan Kiszka's avatar
    cobalt: Introduce xnftrace_printf · b8311643
    Jan Kiszka authored and Philippe Gerum's avatar Philippe Gerum committed
    
    
    This allows to inject a user-defined string into the system's ftrace
    without leaving RT mode (because of using a standard write on
    /sys/kernel/debug/tracing/trace_marker).
    
    As the signature of this function is different from the existing trace
    syscall, create as dedicated one.
    
    For simplicity reasons, the maximum string length that can be passed
    down to the kernel is limited to 255 characters (+1 for termination).
    
    We call directly into the internal __trace_puts to avoid both the
    unneeded strlen call of the trace_puts wrapper and the false warning
    that kernel code uses trace_printk.
    
    Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
    b8311643