aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Host/common/NativeProcessProtocol.cpp
diff options
context:
space:
mode:
authorWalter Erquinigo <wallace@fb.com>2022-05-18 08:01:01 -0700
committerWalter Erquinigo <wallace@fb.com>2022-06-15 12:07:59 -0700
commita758205951d3a1eb60bdb65146ab23e8567f30a7 (patch)
tree7cd2fa8a9cfb6c16bceda98f2e28476ea747acb0 /lldb/source/Host/common/NativeProcessProtocol.cpp
parent5a92632dc477fcd42d912b2c781cc406e6d073f6 (diff)
downloadllvm-a758205951d3a1eb60bdb65146ab23e8567f30a7.zip
llvm-a758205951d3a1eb60bdb65146ab23e8567f30a7.tar.gz
llvm-a758205951d3a1eb60bdb65146ab23e8567f30a7.tar.bz2
[trace][intelpt] Support system-wide tracing [9] - Collect and return context switch traces
- Add collection of context switches per cpu grouped with the per-cpu intel pt traces. - Move the state handling from the interl pt trace class to the PerfEvent one. - Add support for stopping and enabling perf event groups. - Return context switch entries as part of the jLLDBTraceGetState response. - Move the triggers of whenever the process stopped or resumed. Now the will-resume notification is in a better location, which will ensure that we'll capture the instructions that will be executed. - Remove IntelPTSingleBufferTraceUP. The unique pointer was useless. - Add unit tests Differential Revision: https://reviews.llvm.org/D125897
Diffstat (limited to 'lldb/source/Host/common/NativeProcessProtocol.cpp')
-rw-r--r--lldb/source/Host/common/NativeProcessProtocol.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/lldb/source/Host/common/NativeProcessProtocol.cpp b/lldb/source/Host/common/NativeProcessProtocol.cpp
index 31fc005..be521a3 100644
--- a/lldb/source/Host/common/NativeProcessProtocol.cpp
+++ b/lldb/source/Host/common/NativeProcessProtocol.cpp
@@ -312,7 +312,16 @@ void NativeProcessProtocol::SynchronouslyNotifyProcessStateChanged(
Log *log = GetLog(LLDBLog::Process);
m_delegate.ProcessStateChanged(this, state);
- NotifyTracersProcessStateChanged(state);
+
+ switch (state) {
+ case eStateStopped:
+ case eStateExited:
+ case eStateCrashed:
+ NotifyTracersProcessDidStop();
+ break;
+ default:
+ break;
+ }
LLDB_LOG(log, "sent state notification [{0}] from process {1}", state,
GetID());