Skip to content

perf tools: option parsing improvement

Namhyung Kim lkml 1 version Applied

Status from this message: Thanks, applied the series.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 6 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/5perf tools: Add PARSE_OPT_DISABLED flagtools/perf/util/parse-options.c tools/perf/util/parse-options.h+19 -00 replies
2/5perf tools: Export usage string and option table of perf recordtools/perf/builtin-record.c tools/perf/builtin-script.c tools/perf/builtin-timechart.c +1 more+12 -60 replies
3/5perf kvm: Print kvm specific --help outputtools/perf/builtin-kvm.c+25 -00 replies
4/5perf tools: Add support for exclusive optiontools/perf/util/parse-options.c tools/perf/util/parse-options.h+50 -113 replies
5/5perf probe: Use PARSE_OPT_EXCLUSIVE flagtools/perf/builtin-probe.c+9 -451 reply

Reviews trailers per patch

2 of 5 patches have a Reviewed-by or Acked-by.

PatchMasami Hiramatsu
1/5
2/5
3/5
4/5R-b
5/5A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCHSET 0/5] perf tools: option parsing improvement

Hello,

This patchset tries to enhance option parser a bit. Patch 1-3 are to reuse existing perf record options for other commands like perf kvm stat record. Patch 4-5 are to support exclusive options that cannot be used at the same time. The perf probe has such options and upcoming sdt-cache command also.

You can get it from 'perf/option-share-v2' branch on my tree:

git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git

Any comments are welcome, thanks
Namhyung

Cc Masami Hiramatsu <[email protected]>
Cc Hemant Kumar <[email protected]>
Cc Alexander Yarygin <[email protected]>

Namhyung Kim (5):
perf tools: Add PARSE_OPT_DISABLED flag
perf tools: Export usage string and option table of perf record perf kvm: Print kvm specific --help output
perf tools: Add support for exclusive option
perf probe: Use PARSE_OPT_EXCLUSIVE flag

 tools/perf/builtin-kvm.c        | 25 +++++++++++++
 tools/perf/builtin-probe.c      | 54 +++++-----------------------
 tools/perf/builtin-record.c     |  7 ++--
 tools/perf/builtin-script.c     |  1 -
 tools/perf/builtin-timechart.c  |  7 ++--
 tools/perf/perf.h               |  3 ++
 tools/perf/util/parse-options.c | 78 ++++++++++++++++++++++++++++++++++-------
 tools/perf/util/parse-options.h |  4 +++
 8 files changed, 116 insertions(+), 63 deletions(-)
Signature · 1 line
2.0.0