Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1429631

[PATCH 3/6] perf ctf: Add non_sample option

From Wang Nan <wangnan0@huawei.com>
Newsgroups linux.kernel
Subject [PATCH 3/6] perf ctf: Add non_sample option
Date 2016-06-23 11:20 +0200
Message-ID <rN8XM-7PN-39@gated-at.bofh.it> (permalink)
References <rN8XL-7PN-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


If non_sample option is selected, 'perf data convert' should convert
not only samples, but non-sample events such as comm and fork. Add this
option in perf_data_convert_opts. Following commits will add cmdline
option to select it.

Signed-off-by: Wang Nan <wangnan0@huawei.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
---
 tools/perf/builtin-data.c      | 1 +
 tools/perf/util/data-convert.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/tools/perf/builtin-data.c b/tools/perf/builtin-data.c
index 38111a9..a011a56 100644
--- a/tools/perf/builtin-data.c
+++ b/tools/perf/builtin-data.c
@@ -56,6 +56,7 @@ static int cmd_data_convert(int argc, const char **argv,
 	const char *to_ctf     = NULL;
 	struct perf_data_convert_opts opts = {
 		.force = false,
+		.non_sample = false,
 	};
 	const struct option options[] = {
 		OPT_INCR('v', "verbose", &verbose, "be more verbose"),
diff --git a/tools/perf/util/data-convert.h b/tools/perf/util/data-convert.h
index 97cfd36..66f2b2a 100644
--- a/tools/perf/util/data-convert.h
+++ b/tools/perf/util/data-convert.h
@@ -3,6 +3,7 @@
 
 struct perf_data_convert_opts {
 	bool force;
+	bool non_sample;
 };
 
 #endif /* __DATA_CONVERT_H */
-- 
1.8.3.4

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/6] perf ctf: Convert comm, fork and exit events to CTF Wang Nan <wangnan0@huawei.com> - 2016-06-23 11:20 +0200
  [PATCH 3/6] perf ctf: Add non_sample option Wang Nan <wangnan0@huawei.com> - 2016-06-23 11:20 +0200
  [PATCH 6/6] perf ctf: Generate fork and exit events to CTF output Wang Nan <wangnan0@huawei.com> - 2016-06-23 11:30 +0200

csiph-web