Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1290826
| From | Josh Poimboeuf <jpoimboe@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v3 00/17] perf tools: Move perf subcommand framework to a library |
| Date | 2015-12-14 05:20 +0100 |
| Message-ID | <qFsMa-14g-3@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Ingo suggested that I factor out the perf subcommand functionality
(originally copied from git) into tools/lib so that it can be used by
stacktool[*] and possibly others.
All the subcommand option handling files have been moved into a new
library named libsubcmd.a, including parse-options.c, run-command.c,
exec_cmd.c, help.c, usage.c, and pager.c.
Patches 1-6 are some assorted cleanups I discovered in the process of
making the patch set. They're completely separate from the rest of the
patches and can be merged independently.
Patches 7-15 are some cleanups and splitting up of the code related to
the creation of the new library.
Patch 16 does the actual moving of the files and creation of the new
libsubcmd.a library in tools/lib/subcmd.
Patch 17 updates the header guards for the moved .h files.
Based on acme/perf/core.
These patches can also be found in the 'perf-subcmd-v3' branch in the
following repo:
https://github.com/jpoimboe/linux
[*] https://lkml.kernel.org/r/cover.1445443144.git.jpoimboe@redhat.com
v3:
- Remove dependencies on util.h, cache.h, abspath, ctype, strbuf, term,
usage, wrapper
- Move to a new 'libsubcmd' library in tools/lib/subcmd
- Rebase onto Namhyung's patches which remove the browser dependency
from parse-options.c
- Get rid of the util_cfg struct in favor of file-specific init
functions
- Split up the patches better
- Document the fact that parse_options*() can exit
- Convert parse-options.c internal functions to static
- Rename exec_cmd.* to exec-cmd.*
- Add new astrcat() and astrcatf() functions to replace strbuf
- Add some more fixes related to 'make O=' and 'make clean' (though
a 'make clean' is no longer required and these patches are now
unrelated to libsubcmd)
v2:
- Fix 'make clean' to remove tests/llvm-src-*.c and other leftover
files
- Fix description for second-to-last patch
Josh Poimboeuf (17):
perf build: Remove unnecessary line in Makefile.feature
tools build: Fix feature Makefile dependencies for 'O='
perf test: Add Build file to dependencies for llvm-src-*.c
perf test: remove tarpkg at end of test
perf build: Fix 'make clean'
perf build: Rename LIB_PATH -> API_PATH
perf: Create pager.h
perf: Remove check for unused PERF_PAGER_IN_USE
perf: Move help_unknown_cmd() to its own file
perf: Provide subcmd configuration at runtime
perf: Remove 'perf' from subcmd function and variable names
perf: Convert parse-options.c internal functions to static
perf: Document the fact that parse_options*() may exit
perf: Remove subcmd dependencies on strbuf
perf: Finalize subcmd independence
perf subcmd: Create subcmd library
tools subcmd: Rename subcmd header include guards
tools/build/Makefile.feature | 3 +-
tools/build/feature/Makefile | 95 +++++-----
tools/lib/subcmd/Build | 6 +
tools/lib/subcmd/Makefile | 48 +++++
tools/lib/subcmd/exec-cmd.c | 227 ++++++++++++++++++++++++
tools/lib/subcmd/exec-cmd.h | 16 ++
tools/{perf/util => lib/subcmd}/help.c | 170 ++++++------------
tools/{perf/util => lib/subcmd}/help.h | 13 +-
tools/{perf/util => lib/subcmd}/pager.c | 24 ++-
tools/lib/subcmd/pager.h | 9 +
tools/{perf/util => lib/subcmd}/parse-options.c | 134 ++++++++------
tools/{perf/util => lib/subcmd}/parse-options.h | 23 ++-
tools/{perf/util => lib/subcmd}/run-command.c | 24 ++-
tools/{perf/util => lib/subcmd}/run-command.h | 12 +-
tools/{perf/util => lib/subcmd}/sigchain.c | 3 +-
tools/{perf/util => lib/subcmd}/sigchain.h | 6 +-
tools/lib/subcmd/subcmd-util.h | 91 ++++++++++
tools/perf/Build | 5 +-
tools/perf/MANIFEST | 1 +
tools/perf/Makefile.perf | 35 ++--
tools/perf/arch/x86/util/intel-pt.c | 2 +-
tools/perf/bench/futex-hash.c | 2 +-
tools/perf/bench/futex-lock-pi.c | 2 +-
tools/perf/bench/futex-requeue.c | 2 +-
tools/perf/bench/futex-wake-parallel.c | 2 +-
tools/perf/bench/futex-wake.c | 2 +-
tools/perf/bench/mem-functions.c | 2 +-
tools/perf/bench/numa.c | 2 +-
tools/perf/bench/sched-messaging.c | 2 +-
tools/perf/bench/sched-pipe.c | 2 +-
tools/perf/builtin-annotate.c | 2 +-
tools/perf/builtin-bench.c | 2 +-
tools/perf/builtin-buildid-cache.c | 2 +-
tools/perf/builtin-buildid-list.c | 2 +-
tools/perf/builtin-config.c | 2 +-
tools/perf/builtin-data.c | 2 +-
tools/perf/builtin-evlist.c | 2 +-
tools/perf/builtin-help.c | 10 +-
tools/perf/builtin-inject.c | 2 +-
tools/perf/builtin-kmem.c | 2 +-
tools/perf/builtin-kvm.c | 2 +-
tools/perf/builtin-list.c | 2 +-
tools/perf/builtin-lock.c | 2 +-
tools/perf/builtin-mem.c | 2 +-
tools/perf/builtin-probe.c | 2 +-
tools/perf/builtin-record.c | 2 +-
tools/perf/builtin-report.c | 2 +-
tools/perf/builtin-sched.c | 2 +-
tools/perf/builtin-script.c | 12 +-
tools/perf/builtin-stat.c | 2 +-
tools/perf/builtin-timechart.c | 2 +-
tools/perf/builtin-top.c | 2 +-
tools/perf/builtin-trace.c | 4 +-
tools/perf/perf.c | 19 +-
tools/perf/tests/Build | 6 +-
tools/perf/tests/attr.c | 4 +-
tools/perf/tests/builtin-test.c | 2 +-
tools/perf/tests/make | 3 +-
tools/perf/util/Build | 8 +-
tools/perf/util/auxtrace.c | 2 +-
tools/perf/util/cache.h | 6 +-
tools/perf/util/cgroup.c | 2 +-
tools/perf/util/config.c | 2 +-
tools/perf/util/evlist.c | 2 +-
tools/perf/util/exec_cmd.c | 149 ----------------
tools/perf/util/exec_cmd.h | 13 --
tools/perf/util/help-unknown-cmd.c | 103 +++++++++++
tools/perf/util/help-unknown-cmd.h | 0
tools/perf/util/parse-branch-options.c | 2 +-
tools/perf/util/parse-events.c | 4 +-
tools/perf/util/parse-regs-options.c | 2 +-
tools/perf/util/sort.h | 2 +-
tools/perf/util/util.h | 14 --
73 files changed, 848 insertions(+), 528 deletions(-)
create mode 100644 tools/lib/subcmd/Build
create mode 100644 tools/lib/subcmd/Makefile
create mode 100644 tools/lib/subcmd/exec-cmd.c
create mode 100644 tools/lib/subcmd/exec-cmd.h
rename tools/{perf/util => lib/subcmd}/help.c (58%)
rename tools/{perf/util => lib/subcmd}/help.h (73%)
rename tools/{perf/util => lib/subcmd}/pager.c (84%)
create mode 100644 tools/lib/subcmd/pager.h
rename tools/{perf/util => lib/subcmd}/parse-options.c (87%)
rename tools/{perf/util => lib/subcmd}/parse-options.h (95%)
rename tools/{perf/util => lib/subcmd}/run-command.c (90%)
rename tools/{perf/util => lib/subcmd}/run-command.h (86%)
rename tools/{perf/util => lib/subcmd}/sigchain.c (95%)
rename tools/{perf/util => lib/subcmd}/sigchain.h (55%)
create mode 100644 tools/lib/subcmd/subcmd-util.h
delete mode 100644 tools/perf/util/exec_cmd.c
delete mode 100644 tools/perf/util/exec_cmd.h
create mode 100644 tools/perf/util/help-unknown-cmd.c
create mode 100644 tools/perf/util/help-unknown-cmd.h
--
2.4.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH v3 00/17] perf tools: Move perf subcommand framework to a library Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 05:20 +0100
[PATCH v3 06/17] perf build: Rename LIB_PATH -> API_PATH Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 05:20 +0100
Re: [PATCH v3 06/17] perf build: Rename LIB_PATH -> API_PATH Jiri Olsa <jolsa@redhat.com> - 2015-12-14 11:40 +0100
Re: [PATCH v3 06/17] perf build: Rename LIB_PATH -> API_PATH Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-14 16:20 +0100
[tip:perf/core] perf build: Rename LIB_PATH -> API_PATH tip-bot for Josh Poimboeuf <tipbot@zytor.com> - 2015-12-18 09:50 +0100
[PATCH v3 02/17] tools build: Fix feature Makefile dependencies for 'O=' Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 05:20 +0100
Re: [PATCH v3 02/17] tools build: Fix feature Makefile dependencies for 'O=' Jiri Olsa <jolsa@redhat.com> - 2015-12-14 11:10 +0100
Re: [PATCH v3 02/17] tools build: Fix feature Makefile dependencies for 'O=' Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 15:10 +0100
[PATCH v3.1 02/17] tools build: Fix feature Makefile dependencies for 'O=' Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 15:30 +0100
Re: [PATCH v3.1 02/17] tools build: Fix feature Makefile dependencies for 'O=' Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-14 16:20 +0100
Re: [PATCH v3.1 02/17] tools build: Fix feature Makefile dependencies for 'O=' Jiri Olsa <jolsa@redhat.com> - 2015-12-14 16:30 +0100
Re: [PATCH v3.1 02/17] tools build: Fix feature Makefile dependencies for 'O=' Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 16:40 +0100
Re: [PATCH v3.1 02/17] tools build: Fix feature Makefile dependencies for 'O=' Jiri Olsa <jolsa@redhat.com> - 2015-12-14 17:00 +0100
Re: [PATCH v3.1 02/17] tools build: Fix feature Makefile dependencies for 'O=' Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 17:10 +0100
[PATCH v3.2] tools build: Fix feature Makefile issues with 'O=' Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 19:40 +0100
[PATCH v3 08/17] perf: Remove check for unused PERF_PAGER_IN_USE Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 05:20 +0100
[tip:perf/core] perf tools: Remove check for unused PERF_PAGER_IN_USE tip-bot for Josh Poimboeuf <tipbot@zytor.com> - 2015-12-18 10:00 +0100
[PATCH v3 05/17] perf build: Fix 'make clean' Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 05:30 +0100
Re: [PATCH v3 05/17] perf build: Fix 'make clean' Jiri Olsa <jolsa@redhat.com> - 2015-12-14 11:20 +0100
Re: [PATCH v3 05/17] perf build: Fix 'make clean' Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-14 16:20 +0100
[tip:perf/core] perf build: Fix 'make clean' tip-bot for Josh Poimboeuf <tipbot@zytor.com> - 2015-12-18 09:50 +0100
[PATCH v3 13/17] perf: Document the fact that parse_options*() may exit Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 05:30 +0100
[PATCH v3 09/17] perf: Move help_unknown_cmd() to its own file Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 05:30 +0100
[tip:perf/core] perf tools: Move help_unknown_cmd() to its own file tip-bot for Josh Poimboeuf <tipbot@zytor.com> - 2015-12-18 10:00 +0100
[PATCH v3 12/17] perf: Convert parse-options.c internal functions to static Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 05:30 +0100
[tip:perf/core] perf tools: Convert parse-options.c internal functions to static tip-bot for Josh Poimboeuf <tipbot@zytor.com> - 2015-12-18 10:00 +0100
[PATCH v3 01/17] perf build: Remove unnecessary line in Makefile.feature Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 05:30 +0100
Re: [PATCH v3 01/17] perf build: Remove unnecessary line in Makefile.feature Jiri Olsa <jolsa@redhat.com> - 2015-12-14 11:10 +0100
Re: [PATCH v3 01/17] perf build: Remove unnecessary line in Makefile.feature Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-14 16:20 +0100
[tip:perf/core] perf build: Remove unnecessary line in Makefile.feature tip-bot for Josh Poimboeuf <tipbot@zytor.com> - 2015-12-18 09:50 +0100
[PATCH v3 17/17] tools subcmd: Rename subcmd header include guards Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 05:30 +0100
[PATCH v3 15/17] perf: Finalize subcmd independence Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 05:30 +0100
Re: [PATCH v3 15/17] perf: Finalize subcmd independence Jiri Olsa <jolsa@redhat.com> - 2015-12-14 11:40 +0100
Re: [PATCH v3 15/17] perf: Finalize subcmd independence Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 15:20 +0100
Re: [PATCH v3 15/17] perf: Finalize subcmd independence Jiri Olsa <jolsa@redhat.com> - 2015-12-14 16:30 +0100
Re: [PATCH v3 15/17] perf: Finalize subcmd independence Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-14 17:00 +0100
[PATCH v3 11/17] perf: Remove 'perf' from subcmd function and variable names Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 05:30 +0100
[PATCH v3 16/17] perf subcmd: Create subcmd library Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 05:30 +0100
[PATCH v3 04/17] perf test: remove tarpkg at end of test Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 05:30 +0100
[tip:perf/core] perf test: Remove tarpkg at end of test tip-bot for Josh Poimboeuf <tipbot@zytor.com> - 2015-12-18 09:50 +0100
[PATCH v3 14/17] perf: Remove subcmd dependencies on strbuf Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 05:30 +0100
Re: [PATCH v3 14/17] perf: Remove subcmd dependencies on strbuf Jiri Olsa <jolsa@redhat.com> - 2015-12-14 11:30 +0100
Re: [PATCH v3 14/17] perf: Remove subcmd dependencies on strbuf Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 15:20 +0100
Re: [PATCH v3 14/17] perf: Remove subcmd dependencies on strbuf Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-14 16:50 +0100
Re: [PATCH v3 14/17] perf: Remove subcmd dependencies on strbuf Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 17:10 +0100
Re: [PATCH v3 14/17] perf: Remove subcmd dependencies on strbuf Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-14 19:00 +0100
Re: [PATCH v3 14/17] perf: Remove subcmd dependencies on strbuf Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-14 19:10 +0100
csiph-web