diff options
| author | Ravitheja Addepally <ravitheja.addepally@intel.com> | 2017-06-28 07:58:31 +0000 |
|---|---|---|
| committer | Ravitheja Addepally <ravitheja.addepally@intel.com> | 2017-06-28 07:58:31 +0000 |
| commit | 99e376956d6fd12641f8515fb019e9220a2e477f (patch) | |
| tree | 8a32df6c60408b749b136bab4e0ad149758e872f /lldb/include | |
| parent | eecb353d0e25bae018bad815f9169c73666af5bd (diff) | |
| download | bcm5719-llvm-99e376956d6fd12641f8515fb019e9220a2e477f.tar.gz bcm5719-llvm-99e376956d6fd12641f8515fb019e9220a2e477f.zip | |
Implementation of Intel(R) Processor Trace support for Linux
Summary:
This patch implements support for Intel(R) Processor Trace
in lldb server. The changes have support for
starting/stopping and reading the trace data. The code
is only available on Linux versions where the perf
attributes for aux buffers are available.
The patch also consists of Unit tests for testing the
core buffer reading function.
Reviewers: lldb-commits, labath, clayborg, zturner, tberghammer
Reviewed By: labath, clayborg
Subscribers: mgorny
Differential Revision: https://reviews.llvm.org/D33674
llvm-svn: 306516
Diffstat (limited to 'lldb/include')
| -rw-r--r-- | lldb/include/lldb/Host/common/NativeProcessProtocol.h | 16 | ||||
| -rw-r--r-- | lldb/include/lldb/Host/linux/Support.h | 3 |
2 files changed, 11 insertions, 8 deletions
diff --git a/lldb/include/lldb/Host/common/NativeProcessProtocol.h b/lldb/include/lldb/Host/common/NativeProcessProtocol.h index c43299a1df3..a1d5bb252f5 100644 --- a/lldb/include/lldb/Host/common/NativeProcessProtocol.h +++ b/lldb/include/lldb/Host/common/NativeProcessProtocol.h @@ -333,7 +333,7 @@ public: //------------------------------------------------------------------ /// StopTracing API as the name suggests stops a tracing instance. /// - /// @param[in] uid + /// @param[in] traceid /// The user id of the trace intended to be stopped. Now a /// user_id may map to multiple threads in which case this API /// could be used to stop the tracing for a specific thread by @@ -346,7 +346,7 @@ public: /// @return /// Status indicating what went wrong. //------------------------------------------------------------------ - virtual Status StopTrace(lldb::user_id_t uid, + virtual Status StopTrace(lldb::user_id_t traceid, lldb::tid_t thread = LLDB_INVALID_THREAD_ID) { return Status("Not implemented"); } @@ -355,8 +355,8 @@ public: /// This API provides the trace data collected in the form of raw /// data. /// - /// @param[in] uid thread - /// The uid and thread provide the context for the trace + /// @param[in] traceid thread + /// The traceid and thread provide the context for the trace /// instance. /// /// @param[in] buffer @@ -372,7 +372,7 @@ public: /// @return /// The size of the data actually read. //------------------------------------------------------------------ - virtual Status GetData(lldb::user_id_t uid, lldb::tid_t thread, + virtual Status GetData(lldb::user_id_t traceid, lldb::tid_t thread, llvm::MutableArrayRef<uint8_t> &buffer, size_t offset = 0) { return Status("Not implemented"); @@ -382,7 +382,7 @@ public: /// Similar API as above except it aims to provide any extra data /// useful for decoding the actual trace data. //------------------------------------------------------------------ - virtual Status GetMetaData(lldb::user_id_t uid, lldb::tid_t thread, + virtual Status GetMetaData(lldb::user_id_t traceid, lldb::tid_t thread, llvm::MutableArrayRef<uint8_t> &buffer, size_t offset = 0) { return Status("Not implemented"); @@ -391,7 +391,7 @@ public: //------------------------------------------------------------------ /// API to query the TraceOptions for a given user id /// - /// @param[in] uid + /// @param[in] traceid /// The user id of the tracing instance. /// /// @param[in] config @@ -405,7 +405,7 @@ public: /// @param[out] config /// The actual configuration being used for tracing. //------------------------------------------------------------------ - virtual Status GetTraceConfig(lldb::user_id_t uid, TraceOptions &config) { + virtual Status GetTraceConfig(lldb::user_id_t traceid, TraceOptions &config) { return Status("Not implemented"); } diff --git a/lldb/include/lldb/Host/linux/Support.h b/lldb/include/lldb/Host/linux/Support.h index dae76c78fb4..8415aa6c432 100644 --- a/lldb/include/lldb/Host/linux/Support.h +++ b/lldb/include/lldb/Host/linux/Support.h @@ -22,6 +22,9 @@ getProcFile(::pid_t pid, ::pid_t tid, const llvm::Twine &file); llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> getProcFile(::pid_t pid, const llvm::Twine &file); +llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> +getProcFile(const llvm::Twine &file); + } // namespace lldb_private #endif // #ifndef LLDB_HOST_LINUX_SUPPORT_H |

