Skip to content

Conversation

@maflcko
Copy link
Member

@maflcko maflcko commented Jan 6, 2026

The option was added in #26158, when the project was using an autotools-based build system. However, in the meantime this option is unused:

Finally, after commit 0ad4376, I don't see a single reason to keep this option, so remove it.

Also, there is a commit to turn a silent ignore of duplicate bench names into an error.

@DrahtBot DrahtBot changed the title bench: Remove -priority-level= option bench: Remove -priority-level= option Jan 6, 2026
@DrahtBot DrahtBot added the Tests label Jan 6, 2026
@DrahtBot
Copy link
Contributor

DrahtBot commented Jan 6, 2026

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage & Benchmarks

For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/34210.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK l0rinc, hebasto
Concept ACK fanquake
Stale ACK bensig

If your review is incorrectly listed, please copy-paste <!--meta-tag:bot-skip--> into the comment that the bot should ignore.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #34208 (bench: add fluent API for untimed setup steps in nanobench by l0rinc)
  • #33740 (RFC: bench: Add multi thread benchmarking by fjahr)
  • #32729 (test,refactor: extract script template helpers & widen sigop count coverage by l0rinc)
  • #31682 ([IBD] specialize CheckBlock's input & coinbase checks by l0rinc)

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.

@hebasto
Copy link
Member

hebasto commented Jan 6, 2026

Concept ACK.

@maflcko maflcko force-pushed the 2601-bench-less-prio branch from fa25dbb to faa2eab Compare January 6, 2026 17:06
@DrahtBot
Copy link
Contributor

DrahtBot commented Jan 6, 2026

🚧 At least one of the CI tasks failed.
Task tidy: https://github.com/bitcoin/bitcoin/actions/runs/20755188728/job/59595176823
LLM reason (✨ experimental): clang-tidy failed due to unused using declarations (e.g., Join/SplitString).

Hints

Try to run the tests locally, according to the documentation. However, a CI failure may still
happen due to a number of reasons, for example:

  • Possibly due to a silent merge conflict (the changes in this pull request being
    incompatible with the current code in the target branch). If so, make sure to rebase on the latest
    commit of the target branch.

  • A sanitizer issue, which can only be found by compiling with the sanitizer and running the
    affected test.

  • An intermittent issue.

Leave a comment here, if you need help tracking down a confusing failure.

@bensig
Copy link
Contributor

bensig commented Jan 7, 2026

ACK faa2eab

Tested:

  • -priority-level option removed from help
  • Benchmarks list and run correctly
  • Sanity check passes

@DrahtBot DrahtBot requested a review from hebasto January 7, 2026 21:35
Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK faa2eab, I have reviewed the code and it looks OK.

I attempted to create duplicate benchmark names but was unable to, which is intended.

@hebasto
Copy link
Member

hebasto commented Jan 12, 2026

cc @furszy

Copy link
Contributor

@l0rinc l0rinc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK - please see a few remaining suggestions that I would prefer we still did if we're already touching these lines.

MarcoFalke added 4 commits January 13, 2026 08:33
-BEGIN VERIFY SCRIPT-

 sed --in-place --regexp-extended 's/BENCHMARK\(([^,]+), benchmark::PriorityLevel::(HIGH|LOW)\)/BENCHMARK(\1)/g' $( git grep -l PriorityLevel )
 sed --in-place                   's/#define BENCHMARK(n, priority_level)/#define BENCHMARK(n)/g'                ./src/bench/bench.h

-END VERIFY SCRIPT-
Duplicate benchmarks with the same name are not supported. Expanding the
name with __LINE__ is confusing and brittle, because it makes duplication
bugs silent.

Fix this twofold:

* By enforcing unique benchmarks at compile-time and link-time. For
  example, a link failure may now look like:
  "mold: error: duplicate symbol: bench_runner_AddrManAdd"
* By enforcing unique benchmarks at run-time. This should never happen,
  due to the build-failure, but a failure may look like:
  "Assertion `benchmarks().try_emplace(std::move(name), std::move(func)).second' failed."
This makes the code more consistent.

Also, use "using BenchFunction = ..." while touching the header.

Also, fixup the whitespace after and earlier scripted-diff.
@maflcko maflcko force-pushed the 2601-bench-less-prio branch from faa2eab to fa3df52 Compare January 13, 2026 07:40
@maflcko
Copy link
Member Author

maflcko commented Jan 13, 2026

Should be trivial to re-review the nits with git range-diff

Copy link
Contributor

@l0rinc l0rinc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK fa3df52

In a follow-up we could remove all semicolons with the mentioned scripted diff - I have tested it locally and they're redundant.

@DrahtBot DrahtBot requested a review from hebasto January 13, 2026 10:16
@maflcko
Copy link
Member Author

maflcko commented Jan 13, 2026

In a follow-up we could remove all semicolons with the mentioned scripted diff - I have tested it locally and they're redundant.

I don't think they are redundant. There is only one semicolon after macro expansion. In fact, including the semicolon in the macro itself may lead to redundant semicolons. Generally, macros should not include a trailing semicolon, because it is confusing, and inconsistent. Also, tools (such as clang-format) may get confused.

Edit: To find other places where the semicolon could be removed from the macro:

git ls-files | xargs perl -0777 -ne 'print "$ARGV: $&\n" while /#define\s*\S*\(([^\\\n]|\\\n)*?;\n/sg'

@fanquake
Copy link
Member

Concept ACK - these were introduced to be able to skip running benchmarks that were very slow. This ultimately just led to nobody running the benchmarks, even when changing the code, so they were silently broken (#32277).

Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-ACK fa3df52, only suggested changes since my recent review.

@DrahtBot DrahtBot requested a review from fanquake January 13, 2026 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants