[Lldb-commits] [PATCH] D89600: [lldb] Move copying of reproducer out of process

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 23 01:48:45 PDT 2020


labath accepted this revision.
labath added a comment.
This revision is now accepted and ready to land.

Looks good.



================
Comment at: lldb/source/Utility/Reproducer.cpp:371
+
+  SmallVector<StringRef, 20> paths;
+  (*buffer)->getBuffer().split(paths, '\0');
----------------
I'd expect this to contain more than 20 paths in a typical session, so maybe just use zero?


================
Comment at: lldb/source/Utility/ReproducerProvider.cpp:67
+    *m_files_os << file << '\0';
+    m_files_os->flush();
+  }
----------------
Flushing also makes things slower, so there's a tradeoff between speed an accuracy to consider. Theoretically we could play with the size of the stream buffer to fine tune that...


================
Comment at: lldb/test/Shell/Reproducer/TestFinalize.test:5-6
+# RUN: touch %t.repro/index.yaml
+# RUN: printf "%t.known.file" > %t.repro/files.txt
+# RUN: printf "%t.known.dir" > %t.repro/dirs.txt
+
----------------
s/printf/echo. printf is not needed here, and I'm not sure it would work on windows.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89600/new/

https://reviews.llvm.org/D89600



More information about the lldb-commits mailing list