#include "IntelPTCollector.h"
#include "Perf.h"
#include "Plugins/Process/POSIX/ProcessPOSIXLog.h"
#include "Procfs.h"
#include "lldb/Host/linux/Support.h"
#include "lldb/Utility/StreamString.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/MathExtras.h"
#include <algorithm>
#include <cstddef>
#include <fcntl.h>
#include <fstream>
#include <linux/perf_event.h>
#include <optional>
#include <sstream>
#include <sys/ioctl.h>
#include <sys/syscall.h>
usingnamespacelldb;
usingnamespacelldb_private;
usingnamespaceprocess_linux;
usingnamespacellvm;
IntelPTCollector::IntelPTCollector(NativeProcessProtocol &process)
: … { … }
llvm::Expected<LinuxPerfZeroTscConversion &>
IntelPTCollector::FetchPerfTscConversionParameters() { … }
Error IntelPTCollector::TraceStop(lldb::tid_t tid) { … }
Error IntelPTCollector::TraceStop(const TraceStopRequest &request) { … }
static std::optional<int> GetCGroupFileDescriptor(lldb::pid_t pid) { … }
Error IntelPTCollector::TraceStart(const TraceIntelPTStartRequest &request) { … }
void IntelPTCollector::ProcessWillResume() { … }
void IntelPTCollector::ProcessDidStop() { … }
Error IntelPTCollector::OnThreadCreated(lldb::tid_t tid) { … }
Error IntelPTCollector::OnThreadDestroyed(lldb::tid_t tid) { … }
Expected<json::Value> IntelPTCollector::GetState() { … }
Expected<std::vector<uint8_t>>
IntelPTCollector::GetBinaryData(const TraceGetBinaryDataRequest &request) { … }
bool IntelPTCollector::IsSupported() { … }
void IntelPTCollector::Clear() { … }