tracing: segger-sysview: fix display formatting

Fixes several minor display errors in the Segger SystemView output:
* Off-by-one error in some trace ids.
* Add missing syscall trace id.
* Displays easier to read syscall function names.
* Fixes syntax error in k_timer_start output.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
This commit is contained in:
Florian Grandel 2023-08-03 01:18:20 +02:00 committed by Chris Friedt
parent 781b6d7b0a
commit 01ba923bb2
3 changed files with 15 additions and 13 deletions

View file

@ -91,7 +91,7 @@ TaskState 0xBF 1=dummy, 2=Waiting, 4=New, 8=Terminated, 16=Suspended, 32=Termina
86 k_mem_slab_free slab=%I, mem=%p
87 k_timer_init timer=%I, expiry_fn=%I, stop_fn=%I
88 k_timer_start timer=%I, duration=%TimeOut, period=%u Ticks
88 k_timer_start timer=%I, duration=%TimeOut , period=%u ticks
89 k_timer_stop timer=%I
90 k_timer_status_sync timer=%I
91 k_timer_user_data_set timer=%I, user_data=%p
@ -162,9 +162,11 @@ TaskState 0xBF 1=dummy, 2=Waiting, 4=New, 8=Terminated, 16=Suspended, 32=Termina
154 k_lifo_alloc_put lifo=%I, data=%I
155 pm_system_suspend ticks=%u | Returns %Bool
156 pm_device_runtime_get dev=%I | Returns %u
157 pm_device_runtime_put dev=%I | Returns %u
158 pm_device_runtime_put_async dev=%I | Returns %u
159 pm_device_runtime_enable dev=%I | Returns %u
160 pm_device_runtime_disable dev=%I | Returns %u
156 pm_system_suspend ticks=%u | Returns %Bool
157 pm_device_runtime_get dev=%I | Returns %u
158 pm_device_runtime_put dev=%I | Returns %u
159 pm_device_runtime_put_async dev=%I | Returns %u
160 pm_device_runtime_enable dev=%I | Returns %u
161 pm_device_runtime_disable dev=%I | Returns %u
162 syscall name=%s

View file

@ -606,10 +606,10 @@ void sys_trace_thread_info(struct k_thread *thread);
SEGGER_SYSVIEW_RecordEndCallU32(TID_TIMER_STATUS_SYNC, (uint32_t)result)
#define sys_port_trace_syscall_enter(id, name, ...) \
SEGGER_SYSVIEW_RecordU32(TID_SYSCALL, (uint32_t)id)
SEGGER_SYSVIEW_RecordString(TID_SYSCALL, (const char *)#name)
#define sys_port_trace_syscall_exit(id, name, ...) \
SEGGER_SYSVIEW_RecordEndCallU32(TID_SYSCALL, (uint32_t)id)
SEGGER_SYSVIEW_RecordEndCall(TID_SYSCALL)
void sys_trace_idle(void);

View file

@ -10,10 +10,10 @@
#include <SEGGER_SYSVIEW.h>
#include <tracing_sysview_ids.h>
#define sys_port_trace_syscall_enter(id, name, ...) \
SEGGER_SYSVIEW_RecordU32(TID_SYSCALL, (uint32_t)id)
#define sys_port_trace_syscall_enter(id, name, ...) \
SEGGER_SYSVIEW_RecordString(TID_SYSCALL, (const char *)#name)
#define sys_port_trace_syscall_exit(id, name, ...) \
SEGGER_SYSVIEW_RecordEndCallU32(TID_SYSCALL, (uint32_t)id)
#define sys_port_trace_syscall_exit(id, name, ...) \
SEGGER_SYSVIEW_RecordEndCall(TID_SYSCALL)
#endif /* ZEPHYR_TRACING_SYSVIEW_SYSCALL_H_ */