Skip to content

Commit ad1e211

Browse files
committed
Log when memory pressure is detected
1 parent f427808 commit ad1e211

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lldb/tools/lldb-dap/lldb-dap.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,8 +509,11 @@ int main(int argc, char *argv[]) {
509509
// Create a memory monitor. This can return nullptr if the host platform is
510510
// not supported.
511511
std::unique_ptr<lldb_private::MemoryMonitor> memory_monitor =
512-
lldb_private::MemoryMonitor::Create(
513-
[]() { lldb::SBDebugger::MemoryPressureDetected(); });
512+
lldb_private::MemoryMonitor::Create([&]() {
513+
if (log)
514+
*log << "memory pressure detected\n";
515+
lldb::SBDebugger::MemoryPressureDetected();
516+
});
514517

515518
if (memory_monitor)
516519
memory_monitor->Start();

0 commit comments

Comments
 (0)