Nothing Special   »   [go: up one dir, main page]

skip to main content
10.5555/3130379.3130454guideproceedingsArticle/Chapter ViewAbstractPublication PagesConference Proceedingsacm-pubtype
research-article
Free access

A non-intrusive, operating system independent spinlock profiler for embedded multicore systems

Published: 27 March 2017 Publication History

Abstract

Locks are widely used as a synchronization method to guarantee the mutual exclusion for accesses to shared resources in multi-core embedded systems. They have been studied for years to improve performance, fairness, predictability etc. and a variety of lock implementations optimized for different scenarios have been proposed. In practice, applying an appropriate lock type to a specific scenario is usually based on the developer's hypothesis, which could mismatch the actual situation. A wrong lock type applied may result in lower performance and unfairness. Thus, a lock profiling tool is needed to increase the system transparency and guarantee the proper lock usage. In this paper, an operating-system-independent lock profiling approach is proposed as there are many different operating systems in the embedded field. This approach detects lock acquisition and lock releasing using hardware tracing based on hardware-level spinlock characteristics instead of specific libraries or APIs. The spinlocks are identified automatically; lock profiling statistics can be measured and performance-harmful lock behaviors are detected. With this information, the lock usage can be improved by the software developer. A prototype as a Java tool was implemented to conduct hardware tracing and analyze locks inside applications running on the Infineon AURIX microcontrollers.

References

[1]
T. E. Anderson, "The performance of spin lock alternatives for shared-money multiprocessors," IEEE Transactions on Parallel and Distributed Systems, vol. 1, no. 1, pp. 6--16, 1990.
[2]
L. Rudolph and Z. Segall, Dynamic decentralized cache schemes for MIMD parallel processors. ACM, 1984, vol. 12, no. 3.
[3]
J. M. Mellor-Crummey and M. L. Scott, "Algorithms for scalable synchronization on shared-memory multiprocessors," ACM Transactions on Computer Systems (TOCS), vol. 9, no. 1, pp. 21--65, 1991.
[4]
H. Guiroux and R. Lachaize, "Multicore locks: The case is not closed yet," in 2016 USENIX Annual Technical Conference (USENIX ATC 16). USENIX Association, 2016, pp. 649--662.
[5]
"AUTOSAR Release 4.2.2," http://www.autosar.org/, {Online; accessed 14-Nov-2016}.
[6]
ERIKA Enterprise Manual, Evidence S.r.l.
[7]
P. H. Ha, M. Papatriantafilou, and P. Tsigas, "Reactive spin-locks: A self-tuning approach," in 8th International Symposium on Parallel Architectures, Algorithms and Networks (ISPAN'05). IEEE, 2005, pp. 6-pp.
[8]
H. Shojania, "Hardware-based performance monitoring with vtune performance analyzer under linux."
[9]
L. Adhianto, S. Banerjee, M. Fagan, M. Krentel, G. Marin, J. Mellor-Crummey, and N. R. Tallent, "Hpctoolkit: Tools for performance analysis of optimized parallel programs," Concurrency and Computation: Practice and Experience, vol. 22, no. 6, pp. 685--701, 2010.
[10]
J. Mellor-Crummey, L. Adhianto, M. Fagan, M. Krentel, and N. Tallent, "Hpctoolkit user's manual."
[11]
J. Demme and S. Sethumadhavan, "Rapid identification of architectural bottlenecks via precise event counting," in ACM SIGARCH Computer Architecture News, vol. 39, no. 3. ACM, 2011, pp. 353--364.
[12]
Y. Huang, Z. Cui, L. Chen, W. Zhang, Y. Bao, and M. Chen, "Halock: hardware-assisted lock contention detection in multithreaded applications," in Proceedings of the 21st international conference on Parallel architectures and compilation techniques. ACM, 2012, pp. 253--262.
[13]
R. Bryant and J. Hawkes, "Lockmeter: Highly-informative instrumentation for spin locks in the linux kernel," in Proc. Fourth Annual Linux Showcase and Conference, Atlanta, 2000.
[14]
Z. Benavides, R. Gupta, and X. Zhang, "Parallel execution profiles," in Proceedings of the 25th ACM International Symposium on High-Performance Parallel and Distributed Computing. ACM, 2016, pp. 215--218.
[15]
J. Zhang, Y. Dong, and J. Duan, "Anole: a profiling-driven adaptive lock waiter detection scheme for efficient mp-guest scheduling," in 2012 IEEE International Conference on Cluster Computing. IEEE, 2012, pp. 504--513.
[16]
F. David, G. Thomas, J. Lawall, and G. Muller, "Continuously measuring critical section pressure with the free-lunch profiler," in ACM SIGPLAN Notices, vol. 49, no. 10. ACM, 2014, pp. 291--307.
[17]
"Profiling java.util.concurrent locks," https://www.infoq.com/articles/jucprofiler, 2010, {Online; accessed 31-July-2016}.
[18]
A. Mayer, H. Siebert, and K. D. McDonald-Maier, "Debug support, calibration and emulation for multiple processor and powertrain control socs," in Proceedings of the conference on Design, Automation and Test in Europe-Volume 3. IEEE Computer Society, 2005, pp. 148--152.
[19]
S. Savage, M. Burrows, G. Nelson, P. Sobalvarro, and T. Anderson, "Eraser: A dynamic data race detector for multithreaded programs," ACM Transactions on Computer Systems (TOCS), vol. 15, no. 4, pp. 391--411, 1997.
[20]
C. Flanagan and S. N. Freund, "Atomizer: a dynamic atomicity checker for multithreaded programs," ACM SIGPLAN Notices, vol. 39, no. 1, pp. 256--267, 2004.

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image Guide Proceedings
DATE '17: Proceedings of the Conference on Design, Automation & Test in Europe
March 2017
1814 pages

Publisher

European Design and Automation Association

Leuven, Belgium

Publication History

Published: 27 March 2017

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 139
    Total Downloads
  • Downloads (Last 12 months)80
  • Downloads (Last 6 weeks)15
Reflects downloads up to 25 Nov 2024

Other Metrics

Citations

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media