Skip to content

Commit 01ba923

Browse files
fg-cfhcfriedt
authored andcommitted
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 <[email protected]>
1 parent 781b6d7 commit 01ba923

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

subsys/tracing/sysview/SYSVIEW_Zephyr.txt

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ TaskState 0xBF 1=dummy, 2=Waiting, 4=New, 8=Terminated, 16=Suspended, 32=Termina
9191
86 k_mem_slab_free slab=%I, mem=%p
9292

9393
87 k_timer_init timer=%I, expiry_fn=%I, stop_fn=%I
94-
88 k_timer_start timer=%I, duration=%TimeOut, period=%u Ticks
94+
88 k_timer_start timer=%I, duration=%TimeOut , period=%u ticks
9595
89 k_timer_stop timer=%I
9696
90 k_timer_status_sync timer=%I
9797
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
162162
154 k_lifo_alloc_put lifo=%I, data=%I
163163

164164

165-
155 pm_system_suspend ticks=%u | Returns %Bool
166-
156 pm_device_runtime_get dev=%I | Returns %u
167-
157 pm_device_runtime_put dev=%I | Returns %u
168-
158 pm_device_runtime_put_async dev=%I | Returns %u
169-
159 pm_device_runtime_enable dev=%I | Returns %u
170-
160 pm_device_runtime_disable dev=%I | Returns %u
165+
156 pm_system_suspend ticks=%u | Returns %Bool
166+
157 pm_device_runtime_get dev=%I | Returns %u
167+
158 pm_device_runtime_put dev=%I | Returns %u
168+
159 pm_device_runtime_put_async dev=%I | Returns %u
169+
160 pm_device_runtime_enable dev=%I | Returns %u
170+
161 pm_device_runtime_disable dev=%I | Returns %u
171+
172+
162 syscall name=%s

subsys/tracing/sysview/tracing_sysview.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -606,10 +606,10 @@ void sys_trace_thread_info(struct k_thread *thread);
606606
SEGGER_SYSVIEW_RecordEndCallU32(TID_TIMER_STATUS_SYNC, (uint32_t)result)
607607

608608
#define sys_port_trace_syscall_enter(id, name, ...) \
609-
SEGGER_SYSVIEW_RecordU32(TID_SYSCALL, (uint32_t)id)
609+
SEGGER_SYSVIEW_RecordString(TID_SYSCALL, (const char *)#name)
610610

611611
#define sys_port_trace_syscall_exit(id, name, ...) \
612-
SEGGER_SYSVIEW_RecordEndCallU32(TID_SYSCALL, (uint32_t)id)
612+
SEGGER_SYSVIEW_RecordEndCall(TID_SYSCALL)
613613

614614
void sys_trace_idle(void);
615615

subsys/tracing/sysview/tracing_sysview_syscall.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
#include <SEGGER_SYSVIEW.h>
1111
#include <tracing_sysview_ids.h>
1212

13-
#define sys_port_trace_syscall_enter(id, name, ...) \
14-
SEGGER_SYSVIEW_RecordU32(TID_SYSCALL, (uint32_t)id)
13+
#define sys_port_trace_syscall_enter(id, name, ...) \
14+
SEGGER_SYSVIEW_RecordString(TID_SYSCALL, (const char *)#name)
1515

16-
#define sys_port_trace_syscall_exit(id, name, ...) \
17-
SEGGER_SYSVIEW_RecordEndCallU32(TID_SYSCALL, (uint32_t)id)
16+
#define sys_port_trace_syscall_exit(id, name, ...) \
17+
SEGGER_SYSVIEW_RecordEndCall(TID_SYSCALL)
1818

1919
#endif /* ZEPHYR_TRACING_SYSVIEW_SYSCALL_H_ */

0 commit comments

Comments
 (0)