diff options
author | Jakob Johnson <jakobjohnson@fb.com> | 2022-03-15 06:06:55 -0700 |
---|---|---|
committer | Jakob Johnson <jakobjohnson@fb.com> | 2022-03-16 15:35:36 -0700 |
commit | 22077627ae20d5a6e50f43337e8ad2e23f1fa3ff (patch) | |
tree | 86853f403c1f44f466309f9ac1f08350fcfa9801 /lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp | |
parent | 5aab45f430669d7d2af51386819d071b26c3c89c (diff) | |
download | llvm-22077627ae20d5a6e50f43337e8ad2e23f1fa3ff.zip llvm-22077627ae20d5a6e50f43337e8ad2e23f1fa3ff.tar.gz llvm-22077627ae20d5a6e50f43337e8ad2e23f1fa3ff.tar.bz2 |
Minor refactor and renaming:
- Rename IntelPTManager class and files to IntelPTCollector
- Change GetTimestampCounter API to general trace counter API,
GetCounter
Differential Revision: https://reviews.llvm.org/D121711
Diffstat (limited to 'lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp index 1930af6..4bc5711 100644 --- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp +++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp @@ -312,7 +312,7 @@ NativeProcessLinux::NativeProcessLinux(::pid_t pid, int terminal_fd, const ArchSpec &arch, MainLoop &mainloop, llvm::ArrayRef<::pid_t> tids) : NativeProcessELF(pid, terminal_fd, delegate), m_arch(arch), - m_main_loop(mainloop), m_intel_pt_manager(pid) { + m_main_loop(mainloop), m_intel_pt_collector(pid) { if (m_terminal_fd != -1) { Status status = EnsureFDFlags(m_terminal_fd, O_NONBLOCK); assert(status.Success()); @@ -983,7 +983,7 @@ Status NativeProcessLinux::Detach() { e; // Save the error, but still attempt to detach from other threads. } - m_intel_pt_manager.Clear(); + m_intel_pt_collector.Clear(); return error; } @@ -1666,7 +1666,7 @@ void NativeProcessLinux::StopTrackingThread(NativeThreadLinux &thread) { Status NativeProcessLinux::NotifyTracersOfNewThread(lldb::tid_t tid) { Log *log = GetLog(POSIXLog::Thread); - Status error(m_intel_pt_manager.OnThreadCreated(tid)); + Status error(m_intel_pt_collector.OnThreadCreated(tid)); if (error.Fail()) LLDB_LOG(log, "Failed to trace a new thread with intel-pt, tid = {0}. {1}", tid, error.AsCString()); @@ -1675,7 +1675,7 @@ Status NativeProcessLinux::NotifyTracersOfNewThread(lldb::tid_t tid) { Status NativeProcessLinux::NotifyTracersOfThreadDestroyed(lldb::tid_t tid) { Log *log = GetLog(POSIXLog::Thread); - Status error(m_intel_pt_manager.OnThreadDestroyed(tid)); + Status error(m_intel_pt_collector.OnThreadDestroyed(tid)); if (error.Fail()) LLDB_LOG(log, "Failed to stop a destroyed thread with intel-pt, tid = {0}. {1}", @@ -1938,7 +1938,7 @@ Status NativeProcessLinux::PtraceWrapper(int req, lldb::pid_t pid, void *addr, } llvm::Expected<TraceSupportedResponse> NativeProcessLinux::TraceSupported() { - if (IntelPTManager::IsSupported()) + if (IntelPTCollector::IsSupported()) return TraceSupportedResponse{"intel-pt", "Intel Processor Trace"}; return NativeProcessProtocol::TraceSupported(); } @@ -1951,7 +1951,7 @@ Error NativeProcessLinux::TraceStart(StringRef json_request, StringRef type) { std::vector<lldb::tid_t> process_threads; for (auto &thread : m_threads) process_threads.push_back(thread->GetID()); - return m_intel_pt_manager.TraceStart(*request, process_threads); + return m_intel_pt_collector.TraceStart(*request, process_threads); } else return request.takeError(); } @@ -1961,19 +1961,19 @@ Error NativeProcessLinux::TraceStart(StringRef json_request, StringRef type) { Error NativeProcessLinux::TraceStop(const TraceStopRequest &request) { if (request.type == "intel-pt") - return m_intel_pt_manager.TraceStop(request); + return m_intel_pt_collector.TraceStop(request); return NativeProcessProtocol::TraceStop(request); } Expected<json::Value> NativeProcessLinux::TraceGetState(StringRef type) { if (type == "intel-pt") - return m_intel_pt_manager.GetState(); + return m_intel_pt_collector.GetState(); return NativeProcessProtocol::TraceGetState(type); } Expected<std::vector<uint8_t>> NativeProcessLinux::TraceGetBinaryData( const TraceGetBinaryDataRequest &request) { if (request.type == "intel-pt") - return m_intel_pt_manager.GetBinaryData(request); + return m_intel_pt_collector.GetBinaryData(request); return NativeProcessProtocol::TraceGetBinaryData(request); } |