[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-7aef3bf3daa182f31d197e1a4f789797cc3cc561@git.kernel.org>
Date: Sat, 22 Oct 2016 01:32:10 -0700
From: tip-bot for Jiri Olsa <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: mingo@...nel.org, tglx@...utronix.de, a.p.zijlstra@...llo.nl,
jmario@...hat.com, hpa@...or.com, dzickus@...hat.com,
andi@...stfloor.org, linux-kernel@...r.kernel.org,
dsahern@...il.com, acme@...hat.com, namhyung@...nel.org,
jolsa@...nel.org
Subject: [tip:perf/core] perf c2c: Add c2c command
Commit-ID: 7aef3bf3daa182f31d197e1a4f789797cc3cc561
Gitweb: http://git.kernel.org/tip/7aef3bf3daa182f31d197e1a4f789797cc3cc561
Author: Jiri Olsa <jolsa@...nel.org>
AuthorDate: Thu, 22 Sep 2016 17:36:38 +0200
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Wed, 19 Oct 2016 13:18:31 -0300
perf c2c: Add c2c command
Adding c2c command base wirings. Its implementation is going to be added
gradually in following patches.
Signed-off-by: Jiri Olsa <jolsa@...nel.org>
Cc: Andi Kleen <andi@...stfloor.org>
Cc: David Ahern <dsahern@...il.com>
Cc: Don Zickus <dzickus@...hat.com>
Cc: Joe Mario <jmario@...hat.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Link: http://lkml.kernel.org/r/1474558645-19956-11-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/Build | 1 +
tools/perf/builtin-c2c.c | 23 +++++++++++++++++++++++
tools/perf/builtin.h | 1 +
tools/perf/perf.c | 1 +
4 files changed, 26 insertions(+)
diff --git a/tools/perf/Build b/tools/perf/Build
index a43fae7..b12d5d1 100644
--- a/tools/perf/Build
+++ b/tools/perf/Build
@@ -21,6 +21,7 @@ perf-y += builtin-inject.o
perf-y += builtin-mem.o
perf-y += builtin-data.o
perf-y += builtin-version.o
+perf-y += builtin-c2c.o
perf-$(CONFIG_AUDIT) += builtin-trace.o
perf-$(CONFIG_LIBELF) += builtin-probe.o
diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
new file mode 100644
index 0000000..8252ed0
--- /dev/null
+++ b/tools/perf/builtin-c2c.c
@@ -0,0 +1,23 @@
+#include <linux/compiler.h>
+#include <linux/kernel.h>
+#include "util.h"
+#include "debug.h"
+#include "builtin.h"
+#include <subcmd/parse-options.h>
+
+static const char * const c2c_usage[] = {
+ "perf c2c",
+ NULL
+};
+
+int cmd_c2c(int argc, const char **argv, const char *prefix __maybe_unused)
+{
+ const struct option c2c_options[] = {
+ OPT_INCR('v', "verbose", &verbose, "be more verbose"),
+ OPT_END()
+ };
+
+ argc = parse_options(argc, argv, c2c_options, c2c_usage,
+ PARSE_OPT_STOP_AT_NON_OPTION);
+ return 0;
+}
diff --git a/tools/perf/builtin.h b/tools/perf/builtin.h
index 41c24010..0bcf68e 100644
--- a/tools/perf/builtin.h
+++ b/tools/perf/builtin.h
@@ -18,6 +18,7 @@ int cmd_bench(int argc, const char **argv, const char *prefix);
int cmd_buildid_cache(int argc, const char **argv, const char *prefix);
int cmd_buildid_list(int argc, const char **argv, const char *prefix);
int cmd_config(int argc, const char **argv, const char *prefix);
+int cmd_c2c(int argc, const char **argv, const char *prefix);
int cmd_diff(int argc, const char **argv, const char *prefix);
int cmd_evlist(int argc, const char **argv, const char *prefix);
int cmd_help(int argc, const char **argv, const char *prefix);
diff --git a/tools/perf/perf.c b/tools/perf/perf.c
index 64c0696..aa23b33 100644
--- a/tools/perf/perf.c
+++ b/tools/perf/perf.c
@@ -43,6 +43,7 @@ static struct cmd_struct commands[] = {
{ "buildid-cache", cmd_buildid_cache, 0 },
{ "buildid-list", cmd_buildid_list, 0 },
{ "config", cmd_config, 0 },
+ { "c2c", cmd_c2c, 0 },
{ "diff", cmd_diff, 0 },
{ "evlist", cmd_evlist, 0 },
{ "help", cmd_help, 0 },
Powered by blists - more mailing lists