zephyr/subsys/tracing
Keith Packard 7ec1fb632b subsys/tracing: Use z_current_get for thread tracing
The thread switching hooks are invoked in the middle of thread
switching, after the out-going thread registers are saved, but before
the in-coming thread registers are restored, and also before
z_thread_entry is called if the thread is just starting.

When the core is first starting, the TLS base register won't be set at
all, so accessing variables will fault. When switching threads, the
in-coming thread TLS base register will not have been restored, so the
z_tls_current value will end up getting the out-going thread instead.

To fix this, switch from k_current_get() to z_current_get().

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-04-28 11:09:01 +09:00
..
ctf kernel: pipes: add pipe flush routines 2022-01-10 12:17:14 -05:00
include everywhere: fix typos 2022-03-18 13:24:08 -04:00
sysview everywhere: fix typos 2022-03-18 13:24:08 -04:00
test tracing: add missing macros needed for k_thread_foreach 2022-04-12 11:39:11 -04:00
user subsys/tracing: Use z_current_get for thread tracing 2022-04-28 11:09:01 +09:00
CMakeLists.txt kernel: Bring back object tracking 2021-12-14 07:42:31 -05:00
Kconfig tracing: remove superfluous default n for boolean 2022-04-19 11:49:27 +02:00
tracing_backend_posix.c
tracing_backend_ram.c
tracing_backend_uart.c tracing: Automatic syscall tracing 2021-10-23 20:45:17 -04:00
tracing_backend_usb.c everywhere: fix typos 2022-03-18 13:24:08 -04:00
tracing_buffer.c
tracing_core.c tracing: Automatic syscall tracing 2021-10-23 20:45:17 -04:00
tracing_format_async.c tracing: Automatic syscall tracing 2021-10-23 20:45:17 -04:00
tracing_format_common.c
tracing_format_sync.c
tracing_none.c
tracing_tracking.c kernel: Bring back object tracking 2021-12-14 07:42:31 -05:00