GLS Tracing: Gem5-based Low-intrusive Software Tracing

Lars Nolte, Tim Twardzik, Camille Jalier, Zhigang Huang, Jiyuan Shi, Thomas Wild, Andreas Herkersdorf

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

3 Scopus citations

Abstract

Profiling and tracing mechanisms are vital to identify performance bottlenecks for the optimization of modern multi-threaded applications [1]. While profiling generates a summary of averaged performance metrics, tracing provides a full record (trace) of timestamped events [1]. Hence, tracing is mandatory for detailed timing analysis but is usually difficult to implement. First, the generated traces can get large which usually results in a high overhead to record them. Second, lossless traces (no events get lost) with precise timestamps for correct event ordering across large multi-core systems are challenges for common tracing mechanisms. As a complementary approach to existing tracing mechanisms, we introduce GLS Tracing (Gem5-based Low-intrusive Software Tracing), which overcomes the mentioned challenges. GLS Tracing combines the flexibility and fine granular resolution of software tracepoints (TP) with the low-intrusive system analysis capabilities of the Gem5 simulator. Using new Gem5 pseudo-instructions (Trace Point Operation, TPOP), the time-consuming recording of a native TP in software tracing is offloaded to the Gem5 Full-System simulator, thus reducing the number of CPU cycles to be simulated for this tracing. This new tracing capability is integrated into the native Linux kernel software TP infrastructure TRACE_EVENT, resulting in an average overhead reduction of 93% per recorded TP (from on average 2300 clock cycles down to 160 clock cycles). In addition, a less flexible but almost non-intrusive TP is defined that adds only 5 to 10 cycles overhead per TP. This provides a lossless low-intrusive tracing solution for Gem5, which can be used in both user-space and kernel-space functions.

Original languageEnglish
Title of host publication2022 IEEE Nordic Circuits and Systems Conference, NORCAS 2022 - Proceedings
EditorsJari Nurmi, Dag T. Wisland, Snorre Aunet, Kristian Kjelgaard
PublisherInstitute of Electrical and Electronics Engineers Inc.
ISBN (Electronic)9798350345506
DOIs
StatePublished - 2022
Event8th IEEE Nordic Circuits and Systems Conference, NORCAS 2022 - Oslo, Norway
Duration: 25 Oct 202226 Oct 2022

Publication series

Name2022 IEEE Nordic Circuits and Systems Conference, NORCAS 2022 - Proceedings

Conference

Conference8th IEEE Nordic Circuits and Systems Conference, NORCAS 2022
Country/TerritoryNorway
CityOslo
Period25/10/2226/10/22

Keywords

  • Gem5
  • Linux
  • Tracing
  • kernel-space
  • user-space

Fingerprint

Dive into the research topics of 'GLS Tracing: Gem5-based Low-intrusive Software Tracing'. Together they form a unique fingerprint.

Cite this