Skip to content

Tracing hooks problem on POSIX #13357

@MarekPieta

Description

@MarekPieta

Describe the bug
Tracing hook do not work properly on POSIX (native) architecture.

To Reproduce
Steps to reproduce (using philosophers example):

  1. mkdir build; cd build
  2. cmake .. -DBOARD=native_posix
  3. In menuconfig add "Tracing via Common Trace Format Support"
  4. make run
  5. See the log (for example with babeltrace)

Expected behavior
Thread swtiching in and out should match (we shouldn't have multiple logs from thread switching in in a row without thread switching out). Similar problem occurs for isr_enter (there is no matching isr_exit).

Impact
Current tracing hooks are not going to work properly for debug purposes on POSIX architecture.

Screenshots or console output

[01:00:00.018720000] (+0.000000000) 0 thread_pending: { thread_id = 134560504 }
[01:00:00.018720000] (+0.000000000) 0 thread_switched_out: { thread_id = 134560504 }
[01:00:00.018720000] (+0.000000000) 0 thread_switched_in: { thread_id = 134560504 }
[01:00:00.018720000] (+0.000000000) 0 thread_switched_in: { thread_id = 134560416 }
[01:00:00.018720000] (+0.000000000) 0 thread_switched_out: { thread_id = 134560416 }
[01:00:00.018720000] (+0.000000000) 0 thread_switched_in: { thread_id = 134560416 }
[01:00:00.018720000] (+0.000000000) 0 thread_switched_in: { thread_id = 134562080 }
[01:00:00.018720000] (+0.000000000) 0 idle:
[01:00:00.018730000] (+0.000010000) 0 isr_enter:
[01:00:00.018730000] (+0.000000000) 0 idle:
[01:00:00.018740000] (+0.000010000) 0 isr_enter:
[01:00:00.018740000] (+0.000000000) 0 idle:
[01:00:00.018750000] (+0.000010000) 0 isr_enter:
[01:00:00.018750000] (+0.000000000) 0 idle:
[01:00:00.018760000] (+0.000010000) 0 isr_enter:
[01:00:00.018760000] (+0.000000000) 0 idle:

Environment:

  • OS: Ubuntu 16.04 LTS
  • Toolchain: Zephyr SDK 0.9.5

Metadata

Metadata

Assignees

Labels

area: native portHost native arch port (native_sim)bugThe issue is a bug, or the PR is fixing a bugpriority: mediumMedium impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions