[all-commits] [llvm/llvm-project] 785b14: [lldb/crashlog] Enforce image loading policy (#91109)

Med Ismail Bennani via All-commits all-commits at lists.llvm.org
Thu May 9 10:13:41 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 785b143a402a282822c3d5e30bb4e2b1980c0b1e
      https://github.com/llvm/llvm-project/commit/785b143a402a282822c3d5e30bb4e2b1980c0b1e
  Author: Med Ismail Bennani <ismail at bennani.ma>
  Date:   2024-05-09 (Thu, 09 May 2024)

  Changed paths:
    M lldb/examples/python/crashlog.py
    M lldb/examples/python/crashlog_scripted_process.py

  Log Message:
  -----------
  [lldb/crashlog] Enforce image loading policy (#91109)

In `27f27d1`, we changed the image loading logic to conform to the
various options (`-a|--load-all` & `-c|--crashed-only`) and loaded them
concurrently.

However, instead of the subset of images that matched the user option,
the thread pool would always run on all the crashlog images, causing
them to be all loaded in the target everytime.

This matches the `-a|--load-all` option behaviour but depending on the
report, it can cause lldb to load thousands of images, which can take a
very long time if the images are downloaded over the network.

This patch fixes that issue by keeping a list of `images_to_load` based
of
the user-provided option. This list will be used with our executor
thread pool to load the images according to the user selection, and
reinstates
the expected default behaviour, by only loading the crashed thread
images and
skipping all the others.

This patch also unifies the way we load images into a single method
that's shared by both the batch mode & the interactive scripted process.

rdar://123694062

Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list