Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1287650 > unrolled thread
| Started by | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| First post | 2015-12-09 18:00 +0100 |
| Last post | 2015-12-10 09:20 +0100 |
| Articles | 5 — 2 participants |
Back to article view | Back to linux.kernel
[GIT PULL 00/11] perf/core improvements and fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-09 18:00 +0100
[PATCH 11/11] perf tools: Move cmd_version() to builtin-version.c Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-09 18:00 +0100
[PATCH 10/11] perf tools: Save cmdline arguments earlier Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-09 18:00 +0100
[PATCH 07/11] perf tools: Fix write_numa_topology to put cpu_map instead of free Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-09 18:00 +0100
Re: [GIT PULL 00/11] perf/core improvements and fixes Ingo Molnar <mingo@kernel.org> - 2015-12-10 09:20 +0100
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2015-12-09 18:00 +0100 |
| Subject | [GIT PULL 00/11] perf/core improvements and fixes |
| Message-ID | <qDQfU-2uA-3@gated-at.bofh.it> |
Hi Ingo,
Please consider pulling,
- Arnaldo
The following changes since commit a30c99a0beb3030ba42dab38cad6273cd090805d:
Merge branch 'perf/urgent' into perf/core, to pick up fixes (2015-12-08 06:06:20 +0100)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo
for you to fetch changes up to 0a4bb5da957b83ece8b4723c5bac7a5d29fbfb33:
perf tools: Move cmd_version() to builtin-version.c (2015-12-09 13:42:03 -0300)
----------------------------------------------------------------
perf/core improvements and fixes:
User visible:
- Change default selection TUI background color to yellow (Ingo Molnar)
Infrastructure:
- Start paving the way to reuse some cmdline functions with other tools/
living utilities (Josh Poimboeuf)
- Reference count fixes using the refcount debugger, unleaking some objects
(Masami Hiramatsu)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
----------------------------------------------------------------
Ingo Molnar (1):
perf tui: Change default selection background color to yellow
Josh Poimboeuf (4):
perf tools: Remove unused pager_use_color variable
perf tools: Move term functions out of util.c
perf tools: Save cmdline arguments earlier
perf tools: Move cmd_version() to builtin-version.c
Masami Hiramatsu (6):
perf tools: Fix map_groups__clone to put cloned map
perf stat: Fix cmd_stat to release cpu_map
perf hists: Fix hists_evsel to release hists
perf tools: Fix maps__fixup_overlappings to put used maps
perf machine: Fix machine.vmlinux_maps to make sure to clear the old one
perf tools: Fix write_numa_topology to put cpu_map instead of free
tools/perf/Build | 1 +
tools/perf/builtin-stat.c | 9 +++++++++
tools/perf/builtin-version.c | 10 ++++++++++
tools/perf/perf.c | 1 +
tools/perf/ui/browser.c | 2 +-
tools/perf/util/Build | 2 +-
tools/perf/util/cache.h | 1 -
tools/perf/util/color.c | 2 +-
tools/perf/util/env.c | 9 ---------
tools/perf/util/environment.c | 8 --------
tools/perf/util/header.c | 2 +-
tools/perf/util/help.c | 7 -------
tools/perf/util/hist.c | 10 +++++++++-
tools/perf/util/machine.c | 5 +++++
tools/perf/util/map.c | 3 +++
tools/perf/util/parse-options.c | 2 --
tools/perf/util/term.c | 35 +++++++++++++++++++++++++++++++++++
tools/perf/util/term.h | 10 ++++++++++
tools/perf/util/util.c | 34 ----------------------------------
tools/perf/util/util.h | 4 +---
20 files changed, 88 insertions(+), 69 deletions(-)
create mode 100644 tools/perf/builtin-version.c
delete mode 100644 tools/perf/util/environment.c
create mode 100644 tools/perf/util/term.c
create mode 100644 tools/perf/util/term.h
--
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/
[toc] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2015-12-09 18:00 +0100 |
| Subject | [PATCH 11/11] perf tools: Move cmd_version() to builtin-version.c |
| Message-ID | <qDQfW-2uA-45@gated-at.bofh.it> |
| In reply to | #1287650 |
From: Josh Poimboeuf <jpoimboe@redhat.com>
Move cmd_version() to its own file so that help.c can be moved to a
library.
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/e908b1b68f20ab6d8d33941d5571c23110622e60.1449548395.git.jpoimboe@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/Build | 1 +
tools/perf/builtin-version.c | 10 ++++++++++
tools/perf/util/help.c | 7 -------
3 files changed, 11 insertions(+), 7 deletions(-)
create mode 100644 tools/perf/builtin-version.c
diff --git a/tools/perf/Build b/tools/perf/Build
index 2c7aaf2ba119..2a41217e9d88 100644
--- a/tools/perf/Build
+++ b/tools/perf/Build
@@ -20,6 +20,7 @@ perf-y += builtin-kvm.o
perf-y += builtin-inject.o
perf-y += builtin-mem.o
perf-y += builtin-data.o
+perf-y += builtin-version.o
perf-$(CONFIG_AUDIT) += builtin-trace.o
perf-$(CONFIG_LIBELF) += builtin-probe.o
diff --git a/tools/perf/builtin-version.c b/tools/perf/builtin-version.c
new file mode 100644
index 000000000000..9b10cda6b6dc
--- /dev/null
+++ b/tools/perf/builtin-version.c
@@ -0,0 +1,10 @@
+#include "util/util.h"
+#include "builtin.h"
+#include "perf.h"
+
+int cmd_version(int argc __maybe_unused, const char **argv __maybe_unused,
+ const char *prefix __maybe_unused)
+{
+ printf("perf version %s\n", perf_version_string);
+ return 0;
+}
diff --git a/tools/perf/util/help.c b/tools/perf/util/help.c
index fa1fc4acb8a4..929c93f2c333 100644
--- a/tools/perf/util/help.c
+++ b/tools/perf/util/help.c
@@ -332,10 +332,3 @@ const char *help_unknown_cmd(const char *cmd)
exit(1);
}
-
-int cmd_version(int argc __maybe_unused, const char **argv __maybe_unused,
- const char *prefix __maybe_unused)
-{
- printf("perf version %s\n", perf_version_string);
- return 0;
-}
--
2.1.0
--
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/
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2015-12-09 18:00 +0100 |
| Subject | [PATCH 10/11] perf tools: Save cmdline arguments earlier |
| Message-ID | <qDQfW-2uA-61@gated-at.bofh.it> |
| In reply to | #1287650 |
From: Josh Poimboeuf <jpoimboe@redhat.com>
perf_env__set_cmdline() only saves the arguments the first time it's
called. It doesn't need to be called every time the options and
suboptions are parsed. Instead it can just be called once.
This also has the advantage of making the option parsing code less
perf-specific so it can be moved out to a library.
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/19b76a5aa1b688bd635bd65d80bbc103a978d75e.1449548395.git.jpoimboe@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/perf.c | 1 +
tools/perf/util/env.c | 9 ---------
tools/perf/util/parse-options.c | 2 --
3 files changed, 1 insertion(+), 11 deletions(-)
diff --git a/tools/perf/perf.c b/tools/perf/perf.c
index 4bee53c3f796..59ea48c7e26c 100644
--- a/tools/perf/perf.c
+++ b/tools/perf/perf.c
@@ -384,6 +384,7 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
use_pager = 1;
commit_pager_choice();
+ perf_env__set_cmdline(&perf_env, argc, argv);
status = p->fn(argc, argv, prefix);
exit_browser(status);
perf_env__exit(&perf_env);
diff --git a/tools/perf/util/env.c b/tools/perf/util/env.c
index 6af4f7c36820..7dd5939dea2e 100644
--- a/tools/perf/util/env.c
+++ b/tools/perf/util/env.c
@@ -25,15 +25,6 @@ int perf_env__set_cmdline(struct perf_env *env, int argc, const char *argv[])
{
int i;
- /*
- * If env->cmdline_argv has already been set, do not override it. This allows
- * a command to set the cmdline, parse args and then call another
- * builtin function that implements a command -- e.g, cmd_kvm calling
- * cmd_record.
- */
- if (env->cmdline_argv != NULL)
- return 0;
-
/* do not include NULL termination */
env->cmdline_argv = calloc(argc, sizeof(char *));
if (env->cmdline_argv == NULL)
diff --git a/tools/perf/util/parse-options.c b/tools/perf/util/parse-options.c
index 9fca09296eb3..d09aff983581 100644
--- a/tools/perf/util/parse-options.c
+++ b/tools/perf/util/parse-options.c
@@ -501,8 +501,6 @@ int parse_options_subcommand(int argc, const char **argv, const struct option *o
{
struct parse_opt_ctx_t ctx;
- perf_env__set_cmdline(&perf_env, argc, argv);
-
/* build usage string if it's not provided */
if (subcommands && !usagestr[0]) {
struct strbuf buf = STRBUF_INIT;
--
2.1.0
--
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/
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2015-12-09 18:00 +0100 |
| Subject | [PATCH 07/11] perf tools: Fix write_numa_topology to put cpu_map instead of free |
| Message-ID | <qDQfX-2uA-65@gated-at.bofh.it> |
| In reply to | #1287650 |
From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Fix write_numa_topology to put cpu_map instead of free because cpu_map is managed based on refcnt. Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/20151209021135.10245.79046.stgit@localhost.localdomain Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/perf/util/header.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index 43838003c1a1..5ac7bdb0dff7 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c @@ -724,7 +724,7 @@ static int write_numa_topology(int fd, struct perf_header *h __maybe_unused, done: free(buf); fclose(fp); - free(node_map); + cpu_map__put(node_map); return ret; } -- 2.1.0 -- 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/
[toc] | [prev] | [next] | [standalone]
| From | Ingo Molnar <mingo@kernel.org> |
|---|---|
| Date | 2015-12-10 09:20 +0100 |
| Message-ID | <qE4Cf-3wi-29@gated-at.bofh.it> |
| In reply to | #1287650 |
* Arnaldo Carvalho de Melo <acme@kernel.org> wrote: > Hi Ingo, > > Please consider pulling, > > - Arnaldo > > The following changes since commit a30c99a0beb3030ba42dab38cad6273cd090805d: > > Merge branch 'perf/urgent' into perf/core, to pick up fixes (2015-12-08 06:06:20 +0100) > > are available in the git repository at: > > git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo > > for you to fetch changes up to 0a4bb5da957b83ece8b4723c5bac7a5d29fbfb33: > > perf tools: Move cmd_version() to builtin-version.c (2015-12-09 13:42:03 -0300) > > ---------------------------------------------------------------- > perf/core improvements and fixes: > > User visible: > > - Change default selection TUI background color to yellow (Ingo Molnar) > > Infrastructure: > > - Start paving the way to reuse some cmdline functions with other tools/ > living utilities (Josh Poimboeuf) > > - Reference count fixes using the refcount debugger, unleaking some objects > (Masami Hiramatsu) > > Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> > > ---------------------------------------------------------------- > Ingo Molnar (1): > perf tui: Change default selection background color to yellow > > Josh Poimboeuf (4): > perf tools: Remove unused pager_use_color variable > perf tools: Move term functions out of util.c > perf tools: Save cmdline arguments earlier > perf tools: Move cmd_version() to builtin-version.c > > Masami Hiramatsu (6): > perf tools: Fix map_groups__clone to put cloned map > perf stat: Fix cmd_stat to release cpu_map > perf hists: Fix hists_evsel to release hists > perf tools: Fix maps__fixup_overlappings to put used maps > perf machine: Fix machine.vmlinux_maps to make sure to clear the old one > perf tools: Fix write_numa_topology to put cpu_map instead of free > > tools/perf/Build | 1 + > tools/perf/builtin-stat.c | 9 +++++++++ > tools/perf/builtin-version.c | 10 ++++++++++ > tools/perf/perf.c | 1 + > tools/perf/ui/browser.c | 2 +- > tools/perf/util/Build | 2 +- > tools/perf/util/cache.h | 1 - > tools/perf/util/color.c | 2 +- > tools/perf/util/env.c | 9 --------- > tools/perf/util/environment.c | 8 -------- > tools/perf/util/header.c | 2 +- > tools/perf/util/help.c | 7 ------- > tools/perf/util/hist.c | 10 +++++++++- > tools/perf/util/machine.c | 5 +++++ > tools/perf/util/map.c | 3 +++ > tools/perf/util/parse-options.c | 2 -- > tools/perf/util/term.c | 35 +++++++++++++++++++++++++++++++++++ > tools/perf/util/term.h | 10 ++++++++++ > tools/perf/util/util.c | 34 ---------------------------------- > tools/perf/util/util.h | 4 +--- > 20 files changed, 88 insertions(+), 69 deletions(-) > create mode 100644 tools/perf/builtin-version.c > delete mode 100644 tools/perf/util/environment.c > create mode 100644 tools/perf/util/term.c > create mode 100644 tools/perf/util/term.h Pulled, thanks a lot Arnaldo! Ingo -- 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/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web