Simulation-Based Tracing and Profiling for System Software Development Anselm Busse , Reinhardt Karnapke, and Helge Parzyjegla | SYSTOR 2017 | Haifa 2017-05-22
Motivation Tracing and profiling is crucial to system software development – State of the art is in-system tracing (e.g. Perf) – Shortcomings regarding precision and bias • Tracing overhead • Data collection and storage – Results may not be deterministic – Not everything is traceable Simulation-Based Tracing and Profiling for System Software Development Anselm Busse, Reinhardt Karnapke, Helge Parzyjegla | SYSTOR 2017 | Haifa 2017-05-22 Slide 2
Motivation Tracing and profiling is crucial to system software development – State of the art is in-system tracing (e.g. Perf) – Shortcomings regarding precision and bias • Tracing overhead • Data collection and storage – Results may not be deterministic – Not everything is traceable An outside view might have better and more precise results! Simulation-Based Tracing and Profiling for System Software Development Anselm Busse, Reinhardt Karnapke, Helge Parzyjegla | SYSTOR 2017 | Haifa 2017-05-22 Slide 3
Simulation Based Tracing Setup Trace Core 1 Simulation Host Timestamp: Function (Duration) 3499669678000: __schedule (16500) gem5 Simulator 3499669694500: rcu_note_context_switch (12500) 3499669707000: __schedule (8500) 3499669715500: _raw_spin_lock_irq (9000) Trace I/O CPU Mem. 3499669724500: __schedule (25500) Core 1 Trace 3499669750000: fw_notify (9500) 3499669759500: _raw_read_lock (8000) Core 2 3499669767500: fw_notify (13500) 3499669781000: __fw_block (6500) 3499669787500: _raw_spin_lock (8000) 3499669795500: __fw_block (7000) 3499669802500: fw_notify (14500) Traced 3499669817000: __schedule (15000) Trace 3499669832000: fw_schedule (9500) Kernel Trace 3499669841500: topo_get_termination (9000) Core 4 3499669850500: fw_schedule (4500) Core 3 3499669855000: _raw_spin_lock (8000) 3499669863000: fw_schedule (3000) 3499669866000: fw_pipe_clean (29000) 3499669895000: fw_schedule (3000) 3499669898000: fw_list_empty (7500) 3499669905500: fw_schedule (14000) • • • Simulation-Based Tracing and Profiling for System Software Development Anselm Busse, Reinhardt Karnapke, Helge Parzyjegla | SYSTOR 2017 | Haifa 2017-05-22 Slide 4
Annotated Call Tree __schedule activate_task Calls: 41616 Calls: 26991 Time: 197934 . 54 · 10 6 Time: 131445 . 41 · 10 6 4756 . 21 · 10 3 4869 . 97 · 10 3 Avg.: Avg.: High Load Medium Load Low Load [5.22%] [81.97%] [99.65%] [2.33%] Calls: 4004 Calls: 71302 Calls: 26991 Calls: 41616 Time: 10333 . 03 · 10 6 Time: 162253 . 01 · 10 6 Time: 130986 . 57 · 10 6 Time: 4605 . 88 · 10 6 2580 . 67 · 10 3 2275 . 57 · 10 3 4852 . 97 · 10 3 Avg.: Avg.: Avg.: 110 . 67 · 10 3 Avg.: fw_task_free fw_notify Calls: 4004 Calls: 106301 Time: 10333 . 03 · 10 6 Time: 293761 . 66 · 10 6 2580 . 67 · 10 3 2763 . 48 · 10 3 Avg.: Avg.: [31.31%] [6.54%] [37.78%] [14.23%] [0.16%] [0.09%] [40.09%] Calls: 4004 Calls: 4003 Calls: 22988 Calls: 8660 Calls: 22987 Calls: 8006 Calls: 35651 Time: 3235 . 43 · 10 6 Time: 19209 . 41 · 10 6 Time: 110980 . 92 · 10 6 Time: 41812 . 41 · 10 6 Time: 471 . 23 · 10 6 Time: 260 . 19 · 10 6 Time: 117777 . 54 · 10 6 808 . 04 · 10 3 4798 . 75 · 10 3 4827 . 77 · 10 3 4828 . 22 · 10 3 20 . 50 · 10 3 32 . 50 · 10 3 3303 . 62 · 10 3 Avg.: Avg.: Avg.: Avg.: Avg.: Avg.: Avg.: __fw_admit __fw_unblock __fw_relinquish __fw_block af_set_affinity __fw_dispatch Calls: 4003 Calls: 22988 Calls: 8660 Calls: 22987 Calls: 8006 Calls: Time: 19209 . 41 · 10 6 Time: 110980 . 92 · 10 6 Time: 41812 . 41 · 10 6 Time: 471 . 23 · 10 6 Time: 260 . 19 · 10 6 Time: 117777 4798 . 75 · 10 3 4827 . 77 · 10 3 4828 . 22 · 10 3 20 . 50 · 10 3 32 . 50 · 10 3 Avg.: Avg.: Avg.: Avg.: Avg.: Avg.: 3303 40%] [96.72%] [96.94%] [97.07%] [94.80%] 4004 Calls: 4003 Calls: 22988 Calls: 8660 Calls: 35651 12 · 10 6 Time: 18578 . 93 · 10 6 Time: 107583 . 01 · 10 6 Time: 40585 . 89 · 10 6 Time: 111655 . 07 · 10 6 86 · 10 3 4641 . 25 · 10 3 4679 . 96 · 10 3 4686 . 59 · 10 3 3131 . 89 · 10 3 Avg.: Avg.: Avg.: Avg.: lb_task_destroy burn_pipe_update 4004 Calls: 71302 · 10 6 Time: 278402 . 91 · 10 6 · 10 3 3904 . 55 · 10 3 Avg.: Simulation-Based Tracing and Profiling for System Software Development Anselm Busse, Reinhardt Karnapke, Helge Parzyjegla | SYSTOR 2017 | Haifa 2017-05-22 Slide 5
Annotated Call Tree [81.97%] [99.65%] Calls: 71302 Calls: 26991 Time: 162253 . 01 · 10 6 Time: 130986 . 57 · 10 6 2275 . 57 · 10 3 4852 . 97 · 10 3 Avg.: Avg.: fw_notify Calls: 106301 Time: 293761 . 66 · 10 6 2763 . 48 · 10 3 Avg.: [37.78%] [14.23%] [0.16%] Calls: 22988 Calls: 8660 Calls: 22987 Time: 110980 . 92 · 10 6 Time: 41812 . 41 · 10 6 Time: 471 . 23 · 10 6 4827 . 77 · 10 3 4828 . 22 · 10 3 20 . 50 · 10 3 Avg.: Avg.: Avg.: Simulation-Based Tracing and Profiling for System Software Development Anselm Busse, Reinhardt Karnapke, Helge Parzyjegla | SYSTOR 2017 | Haifa 2017-05-22 Slide 6
Measurement Precision Perf Simulation Based 80 200 Time in µ s Time in µ s 40 100 20 50 10 25 Runqueue Contention Runqueue Contention Simulation-Based Tracing and Profiling for System Software Development Anselm Busse, Reinhardt Karnapke, Helge Parzyjegla | SYSTOR 2017 | Haifa 2017-05-22 Slide 7
Conclusions and Future Work Simulation-based tracing and profiling has several advantages – Little to no measurement bias – Deterministic execution – No in-code tracing facilities necessary Future work may include – Further performance characteristics (e.g. cache-misses) – Improved data post-processing – Extension to a complete tracing and profiling framework Simulation-Based Tracing and Profiling for System Software Development Anselm Busse, Reinhardt Karnapke, Helge Parzyjegla | SYSTOR 2017 | Haifa 2017-05-22 Slide 8
Recommend
More recommend