Commit Graph

13 Commits

Author SHA1 Message Date
Torbjörn Leksell 86d8b36955 Tracing: k_free tracing hook heap reference added
Added heap reference parameter to k_free tracing
hook to allow tracing of the pointer which was
passed as a parameter to a k_free call.
As part of this update the defines
(for this hook) in the various tracing formats
was also updated.

Signed-off-by: Torbjörn Leksell <torbjorn.leksell@percepio.com>
2021-11-16 09:45:01 -05:00
Gerard Marull-Paretas 64aea4d57e tracing: fix PM system tracing
System PM tracing was broken for SEGGER SystemView, and was missing
proper documentation.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-03 16:37:33 -04:00
Gerard Marull-Paretas 866b88fd2c tracing: update pm device runtime
Update the tracing definitions used by the device runtime API.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-03 16:37:33 -04:00
Tom Burdick 97dc88bb6d tracing: Automatic syscall tracing
When generating syscall wrappers, call a tracing macro with the id,
name, and all parameters of the syscall as params when entering and
leaving the syscall. This can be disabled in certain call sites
by defining DISABLE_SYSCALL_TRACING which is useful for certain
tracing implementations which require syscalls themselves to work.

Notably some syscalls *cannot* be automatically traced this way and
headers where exclusions are set are in the gen_syscall.py as notracing.

Includes a systemview and test format implementation.

Tested with systemview, usb, and uart backends with the string
formatter using the tracing sample app.

Debugging the trace wrapper can be aided by setting the TRACE_DIAGNOSTIC
env var and rebuilding from scratch, a warning is issued for every
instance a syscall is traced.

Automatically generating a name mapping for SYSVIEW_Zephyr.txt is a
future item as is documenting how to capture and use the tracing data
generated.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2021-10-23 20:45:17 -04:00
Peter Mitsis ae394bff7c kernel: add support for event objects
Threads may wait on an event object such that any events posted to
that event object may wake a waiting thread if the posting satisfies
the waiting threads' event conditions.

The configuration option CONFIG_EVENTS is used to control the inclusion
of events in a system as their use increases the size of
'struct k_thread'.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2021-10-16 06:27:10 -04:00
Lixin Guo d39410a217 tests: subsys: fixed the samples/tracing code can not generate coverage
Add some tracing functions to fix that the samples/tracing code
cannot generate coverage by twister.

Fixed #38323

Signed-off-by: Lixin Guo <lixinx.guo@intel.com>
2021-09-08 10:28:10 -04:00
Flavio Ceolin 3c0e7ade99 tracing: Add k_work_queue_init info
Add tracing information for k_work_queue_init

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-08-25 22:07:04 -04:00
Anas Nashif 3b82c388f6 pm: trace pm_device_enable/disable
Trace both pm_device_enable and pm_device_disable.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-17 18:45:57 -04:00
Anas Nashif eccda68418 power: trace power events
Trace PM transition sequence and events.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-17 18:45:57 -04:00
Anas Nashif b865c85ef4 tracing: fix test format
Add missing defines causing build errors in some scenarios.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-17 18:45:57 -04:00
Anas Nashif 7c582f4b7c tracing: systemview: rework IDs and make them match APIs
New version of Systemview has Zephyr API description that did not match
what we had, align with what the tools provides and expand hooks to
support additional APIs. We now cover most kernel APIs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-11 12:59:03 -05:00
Anas Nashif 72c830c3ee tracing: test format: print more details
Print timeouts and other details.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-11 12:59:03 -05:00
Anas Nashif fe14c23852 tracing: move test format into its own directory
Minor cleanup keep format location uniform.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-11 12:59:03 -05:00