[all-commits] [llvm/llvm-project] 972817: Change `image list -r` so that it actually shows t...

jimingham via All-commits all-commits at lists.llvm.org
Wed Feb 28 16:14:31 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 97281708ac176e0464b770686ee314af4da0a3d5
      https://github.com/llvm/llvm-project/commit/97281708ac176e0464b770686ee314af4da0a3d5
  Author: jimingham <jingham at apple.com>
  Date:   2024-02-28 (Wed, 28 Feb 2024)

  Changed paths:
    M lldb/source/Commands/CommandObjectTarget.cpp
    M lldb/source/Commands/Options.td

  Log Message:
  -----------
  Change `image list -r` so that it actually shows the ref count and whether the image is in the shared cache. (#83341)

The help for the `-r` option to `image list` says:

       -r[<width>] ( --ref-count=[<width>] )
Display the reference count if the module is still in the shared module
cache.

but that's not what it actually does. It unconditionally shows the
use_count for all Module shared pointers, regardless of whether they are
still in the shared module cache or whether they are just in the
ModuleCollection and other entities are keeping them alive. That seems
like a more useful behavior, but then it is also useful to know what's
in the shared cache, so I changed this to:

       -r[<width>] ( --ref-count=[<width>] )
Display whether the module is still in the the shared module cache
(Y/N), and its shared pointer use_count.

So instead of just `{5}` you will see `{Y 5}` if it is in the shared
cache and `{N 5}` if not.

I didn't add tests for this because I'm not sure how much we want to fix
shared cache behavior in the testsuite.



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