[roll] Roll fuchsia [elf-search] Add class that allows callers to reuse buffers.

From analyzing traces, it seems that a significant portion of time
collecting mappings from processes with many mappings comes simply
from the kernel needing to fault in a large number of pages in the
zx_object_get_info call.

Anecdotally, many Starnix processes have close to 20k zx_info_maps
available, which requires nearly 2MB of buffer space. This syscall
can take as much as 900ms on a VIM3, seemingly due to the paging and
lock re-acquisition the kernel must perform.

By reusing the buffers across calls, we can cut that time to as little
as 20ms once the buffer has been fully resized and the pages
populated.

This change removes the explicit initial check of the size of buffer
needed because it should be equivalent to calling the ForEachModule
method with an initially constructed Searcher instance.
unique_ptr::get() returns nullptr for a default constructed object,
and we set capacity_ to 0 to begin with.

Original-Bug: 360463575
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1144839
Original-Revision: f75cf4f085eea22fb0b3b32c0d6861fc0f1b5f13
GitOrigin-RevId: 5e3402c7fa2a9aff6243128eb7abfdb6e69b2fcf
Change-Id: I8cf88ee185984c51b1445d14a1696898a61d3518
1 file changed
tree: 48e7b2c45b9ac8334a0436f43c95c0c0d8988ac3
  1. ctf/
  2. git-hooks/
  3. infra/
  4. third_party/
  5. cts
  6. firmware
  7. flower
  8. jiri.lock
  9. MILESTONE
  10. minimal
  11. prebuilts
  12. README.md
  13. stem
  14. test_durations
  15. toolchain
README.md

Integration

This repository contains Fuchsia's Global Integration manifest files.

Making changes

All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.

Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance in one of the communication channels documented at get involved.

Obtaining the source

First install Jiri.

Next run:

$ jiri init
$ jiri import minimal https://fuchsia.googlesource.com/integration
$ jiri update

Third party

Third party projects should have their own subdirectory in ./third_party.