po 23. 3. 2026 v 15:26 odesílatel Tomas Glozar <[email protected]> napsal:
> > --no-irq clashes with auto-negation of --irq
> >
> >  File: src/cli.c:1042
> >  Cause: libsubcmd auto-generates --no-X negations for every option.
> > --no-irq (histogram boolean) collides with the auto-negation of --irq
> > (stop threshold). The first match wins, so --irq was matched first and
> > its negation intercepted the call.
> >  Fix: Moved HIST_OPT_NO_IRQ before RTLA_OPT_STOP('i', "irq", ...) in
> > the options array so the explicit --no-irq boolean is found first.
> >
> ...
> Reshuffling the RTLA option array could work, too, but is
> unintuitive from the developer's point of view, and will also force
> histogram options to be before threshold options in the help message,
> which is not what I wanted.
>

Actually, it doesn't. Just as defining --irq implicitly defines
--no-irq, defining --no-irq implicitly defines --irq, so the long
option --irq stops working when putting HIST_OPT_NO_IRQ before
RTLA_OPT_STOP('i', "irq", "irq latency").

So the only solution appears to be to add a flag to libsubcmd that can
disable this behavior (auto-parsing the counterpart of --opt/--no-opt)
in a new patch in v2. Since this patchset already has a change to
libsubcmd and CC to linux-perf-users, that should work.

Tomas


Reply via email to