clayborg added a comment.

Looks great, maybe fix the pass by value in the callback and this is good?



================
Comment at: 
lldb/source/Plugins/InstrumentationRuntime/TSan/InstrumentationRuntimeTSan.cpp:230
+    std::function<void(ValueObjectSP o,
+                       StructuredData::DictionarySP dict)> const &callback) {
+  auto array_sp = std::make_shared<StructuredData::Array>();
----------------
Pass by reference to avoid an increment and decrement in the shared pointer due 
to a copy


================
Comment at: 
lldb/source/Plugins/InstrumentationRuntime/TSan/InstrumentationRuntimeTSan.cpp:347-348
                            ->GetValueAsUnsigned(0));
-  dict->AddItem("sleep_trace", StructuredData::ObjectSP(CreateStackTrace(
-                                   main_value, ".sleep_trace")));
+  dict->AddItem("sleep_trace", CreateStackTrace(
+                                   main_value, ".sleep_trace"));
 
----------------
combine this line


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131900

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to