[Lldb-commits] [PATCH] D129239: [trace] Add an option to save a compact trace bundle

Jakob Johnson via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 13 08:37:32 PDT 2022


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

lgtm, two minor comments



================
Comment at: lldb/source/Plugins/Trace/intel-pt/PerfContextSwitchDecoder.cpp:318
+        should_copy = true;
+    } else if (perf_record.IsErrorRecord()) {
+      should_copy = true;
----------------
why do we want the error record?


================
Comment at: lldb/source/Plugins/Trace/intel-pt/PerfContextSwitchDecoder.cpp:323-325
+      for (size_t i = 0; i < perf_record.size; i++) {
+        out_data.push_back(data[offset + i]);
+      }
----------------
consider using `std::copy` or `.insert` here instead?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129239



More information about the lldb-commits mailing list