Add thin wrapper for perf_event_open API
authorJakob Johnson <johnsonjakob99@gmail.com>
Tue, 15 Mar 2022 19:22:17 +0000 (12:22 -0700)
committerJakob Johnson <johnsonjakob99@gmail.com>
Mon, 21 Mar 2022 20:38:52 +0000 (13:38 -0700)
commite6c84f82b87576a57d1fa1c7e8c289d3d4fa7ab1
tree8e65261340eb52ec771b96d2b16b68515141c655
parent9b1fa6f89f5f9576b2c64c70a3b1156568ff93b3
Add thin wrapper for perf_event_open API
  - Add PerfEvent class to handle creating ring buffers and handle the resources associated with a perf_event
  - Refactor IntelPT collection code to use this new API
  - Add TSC to timestamp conversion logic with unittest

Differential Revision: https://reviews.llvm.org/D121734
lldb/source/Plugins/Process/Linux/CMakeLists.txt
lldb/source/Plugins/Process/Linux/IntelPTCollector.cpp
lldb/source/Plugins/Process/Linux/IntelPTCollector.h
lldb/source/Plugins/Process/Linux/Perf.cpp [new file with mode: 0644]
lldb/source/Plugins/Process/Linux/Perf.h [new file with mode: 0644]
lldb/unittests/Process/Linux/CMakeLists.txt
lldb/unittests/Process/Linux/IntelPTCollectorTests.cpp
lldb/unittests/Process/Linux/PerfTests.cpp [new file with mode: 0644]