tree: e920b8e2dfbfbfec1dcff25ca3d2e2236dba59cf [path history] [tgz]
  1. palloc_viewer/
  2. BUILD.gn
  3. compute_external_fragmentation.py
  4. compute_internal_fragmentation.py
  5. DEPS
  6. inspect_utils.cc
  7. inspect_utils.h
  8. inspect_utils_linux.cc
  9. inspect_utils_mac.cc
  10. objects_per_size.py
  11. OWNERS
  12. pa_buckets_inspect.cc
  13. pa_dump_heap.cc
  14. pa_graph_buckets.py
  15. pa_tcache_inspect.cc
  16. plot_bucket_stats.py
  17. plot_superpages.py
  18. profile_allocations.py
  19. README.md
  20. sectaskaccess_info.plist
  21. trace_utils.py
tools/memory/partition_allocator/README.md

PartitionAlloc tools

This directory contains tools useful to inspect, debug and optimize PartitionAlloc. In particular, pa_tcache_inspect is used to inspect a running Chrome instance, and report statistics on its thread caches.

pa_tcache_inspect

This tool displays data about any running Chrome process. The main constraint is that both the tool and the running instance have to be built at revisions where the allocator's layout is identical. For best results, it should be the same revision whenever possible.

It works by first identifying the address of the thread cache registry, then use it to find out all other data structures. They are then read from the remote process, and displayed live.

The tool must be able to read the remote process memory, which on some Debian configurations requires running:

sudo sh -c 'echo 0 > /proc/sys/kernel/yama/ptrace_scope