Lines Matching +full:sample +full:- +full:time +full:- +full:us

4  * SPDX-License-Identifier: Apache-2.0
8 * @file measure time for various thread operations
40 /* 3. Finish measuring time to start <alt_thread> */ in alt_thread_entry()
42 timestamp.sample = timing_timestamp_get(); in alt_thread_entry()
44 /* 4. Let <start_thread> process the time measurement. */ in alt_thread_entry()
48 /* 7. Begin measuring time to suspend active thread (self/alt_thread) */ in alt_thread_entry()
50 timestamp.sample = timing_timestamp_get(); in alt_thread_entry()
53 /* 10. Finish measuring time to resume <alt_thread> (self) */ in alt_thread_entry()
55 timestamp.sample = timing_timestamp_get(); in alt_thread_entry()
57 /* 11. Lower the priority so <start_thread> can terminate us. */ in alt_thread_entry()
82 /* 1. Measure time to create, but not start <alt_thread> */ in start_thread_entry()
118 /* 2. Begin measuring time to start <alt_thread> */ in start_thread_entry()
123 /* 5. Process the time to start <alt_thread> */ in start_thread_entry()
125 finish = timestamp.sample; in start_thread_entry()
132 /* 8. Finish measuring time to suspend <alt_thread> */ in start_thread_entry()
134 start = timestamp.sample; in start_thread_entry()
138 /* 9. Being measuring time to resume <alt_thread> */ in start_thread_entry()
143 /* 12. Process the time it took to resume <alt_thread> */ in start_thread_entry()
145 finish = timestamp.sample; in start_thread_entry()
148 /* 13. Process the time to terminate <alt_thread> */ in start_thread_entry()
204 priority - 1, start_options, K_FOREVER); in thread_ops()
226 priority - 1, alt_options, K_FOREVER); in thread_ops()
228 /* Give <pause_sem> sends us back to <start_thread> */ in thread_ops()
239 k_thread_priority_set(&alt_thread, priority - 2); in thread_ops()
244 cycles -= timestamp_overhead_adjustment(start_options, alt_options); in thread_ops()
256 "%-40s - Create thread", tag); in thread_ops()
263 cycles -= timestamp_overhead_adjustment(start_options, alt_options); in thread_ops()
271 "%-40s - Start thread", tag); in thread_ops()
277 cycles -= timestamp_overhead_adjustment(start_options, alt_options); in thread_ops()
285 "%-40s - Suspend thread", tag); in thread_ops()
291 cycles -= timestamp_overhead_adjustment(start_options, alt_options); in thread_ops()
299 "%-40s - Resume thread", tag); in thread_ops()
305 cycles -= timestamp_overhead_adjustment(start_options, alt_options); in thread_ops()
313 "%-40s - Abort thread", tag); in thread_ops()