================
@@ -192,6 +192,10 @@ TargetStats::ToJSON(Target &target,
   }
   target_metrics_json.try_emplace("sourceMapDeduceCount",
                                   m_source_map_deduce_count);
+  target_metrics_json.try_emplace("sourceRealpathAttemptCount",
----------------
jimingham wrote:

I think I was being more simple-minded.  In 99% of the uses of lldb, this 
function will get a nullptr for the realpathprefixes array, and will be doing 
no realpath work here.  It would be good if those clients didn't suffer any 
penalty for this facility they aren't using.  But as it stands they going to 
pay the cost of sticking a 0 value into some JSON array regardless.  Why do you 
need to add these two fields?  They can't be required, since if I never set a 
file and line breakpoint in a session, I'll never enter this code, yet the 
target statistics still have to work.
I have no problem with adding the fields when they represent work that is being 
attempted.  But for the most part this is going to be work that's never 
attempted.

https://github.com/llvm/llvm-project/pull/102223
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to