• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 23066837214

13 Mar 2026 07:18PM UTC coverage: 92.932% (-0.006%) from 92.938%
23066837214

push

github

web-flow
linux `perf` support for pants itself (#23147)

When Pants itself executes we are running a mix of C, Rust, and Python
code. Those languages historically all have their own performance
tooling and ecosystems. (Well C/Rust overlap, but that is the gist.) The
Linux perf tooling ecosystem is able to unify all that to give a unified
view into what is on and off cpu at a given time. This allows holistic
performance analysis across languages.

Concretely this change does two things:
* Rust code is always compiled with [frame
pointers](https://www.brendangregg.com/blog/2024-03-17/the-return-of-the-frame-pointers.html).
We don't support any idiosyncratic 32-bit or otherwise registry starved
cpu architectures, so the overhead should be de minimis. (Fedora and
Ubuntu have them near-globally enabled.)
* For Python, a global option acts as a wrapper around toggling
<https://docs.python.org/3/howto/perf_profiling.html>. Obviously there
are various other ways to twiddle this, but I want it to be easy and not
have everyone repeat "oops I enabled it for the client but not the
daemon". The dream is that eventually when someone in slack says "Pants
is slow but I can't show my corporate repository", they can share useful
tracing information.

This should be useful enough to glean at least some information for
everyone out of the box. For best results developers need to compile
Python and its native dependencies frame pointers as well. The last
barrier to "the dream" above for endusers is PythonBuildStandalone
including frame pointers, but this should be useful for Pants
development (in this repo, or plugins) today.

Zoomed in screenshot showing C/Rust/Python:
<img width="2557" height="1473" alt="image"
src="https://github.com/user-attachments/assets/5ea56f11-bd87-4a6a-9483-0fa88d13a9c2"
/>

5 of 11 new or added lines in 3 files covered. (45.45%)

91172 of 98106 relevant lines covered (92.93%)

4.05 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

43.14
/src/python/pants/pantsd/pants_daemon.py


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc