Repository navigation
Conversation
Functional test profiling with `--perf` (introduced in bitcoin#14519) is currently broken, as `TestNode._start_perf` accesses the `self.binary` attribute which doesn't exist anymore since commit 0d2eefc / PR bitcoin#31866. Fix that by using the proper field `self.binaries.paths.bitcoind`. Also, perf's error output for missing kernel permissions changed slightly (s/tweaking/adjusting) [1], so adapt our matching string as well in order to show the "couldn't collect data" warning if necessary. [1] see torvalds/linux@c1034eb
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code Coverage & BenchmarksFor details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35509. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please copy-paste ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
|
Concept ACK |
|
Yeah, I think it can be removed (or moved to be doc-only), as it requires a manual diff anyway to make use of it, so that manual diff might as well just be a dedicated new functional test file with the test code, and a diff to test_node.py to force-inject perf. The hints about compiling with debug symbols, the hint about dwarf/frame-pointers and the hint about perf_event_paranoid can be added to the docs instead. Let's recall that we already have a micro-benchmark suite, so this is only meant for end-to-end performance testing that needs and expensive setup (like a specific blockchain, or txs generated with test utils). For end-to-end perf testing that only needs a trivial setup (like calling the |
|
@maflcko: Thanks for weighing in. I'm not opposed to removing it at all, but can you elaborate more on the "needing a manual diff" part? Is that referring to the usage with the I'll keep the PR open for a few more days in any case, in the (seemingly unlikely?) case that anyone is strongly in favor of keeping it. |
Ah, thx for correcting me. I've never used this feature and forgot. |
…st framework 9fae7e9 test: doc: remove `--perf` profiling from functional test framework (Sebastian Falbesoner) Pull request description: This PR is an alternative to #35509. Rather than fixing, it removes the `--perf` option / `profile_with_perf` context manager features (both introduced in #14519) from the functional test framework. Given that no developer apparently even noticed that it's been broken for more than a year, we can conclude that it's largely unused and getting rid of it to reduce maintenance burden seems a reasonable choice. So far, neither in #35509 nor [on IRC](https://bitcoin-irc.chaincode.com/bitcoin-core-dev/2026-06-12#1227556;) anyone has signaled strong interest to use or wanting to keep this feature. The corresponding test documentation is removed as well, though the mentioning of `perf` profiling is still kept in the general developer docs -- only the reference to functional test framework integration is removed there. ACKs for top commit: l0rinc: lightweight code review ACK 9fae7e9 maflcko: lgtm ACK 9fae7e9 While this seems useful, no one using it is a good reason to remove it. If a user comes after this is merged, it should be trivial to revert. Tree-SHA512: cf7bdce72aed877c7dfa52a230840e0729e74b00f0c40c6ceecf04957707f4699f123c2cde5fc1c4ee21f4b1b14319c74acc78cd8066eab2b9a4d6efb4d11539
|
Closing, since #35528 was merged. |
Functional test profiling with
--perf(introduced in #14519) is currently broken, asTestNode._start_perfaccesses theself.binaryattribute which doesn't exist anymore since commit 0d2eefc / PR #31866. Fix that by using the proper fieldself.binaries.paths.bitcoind.Also, perf's error output for missing kernel permissions changed slightly in 2020 (s/tweaking/adjusting) (see torvalds/linux@c1034eb), so adapt our matching string as well in order to show the "couldn't collect data" warning if necessary. Relying on a certain output string is obviously brittle, so we might want to do something smarter there.
This is a minimum-diff-fix that works on my machine (arm64, Ubuntu 25.04, Kernel 6.17.0-8-qcom-x1e, perf 6.1.174). I think the feature is useful in principle, but considering that no one noticed for more than a year that it's broken, it seems that no one really uses it, and an alternative might also be to remove it. Curious to hear opinions.