[Lldb-commits] [lldb] [lldb] Realpath symlinks for breakpoints (PR #102223)

via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 7 14:18:34 PDT 2024


================
@@ -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


More information about the lldb-commits mailing list