All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] perf tools: Add callchain to ctf conversion
@ 2017-07-27 18:12 Geneviève Bastien
  2017-07-27 18:12 ` [PATCH 2/3] perf tools: Add mmap[2] events " Geneviève Bastien
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Geneviève Bastien @ 2017-07-27 18:12 UTC (permalink / raw)
  To: linux-kernel
  Cc: Geneviève Bastien, Peter Zijlstra, Ingo Molnar,
	Arnaldo Carvalho de Melo, Alexander Shishkin, Mathieu Desnoyers,
	Julien Desfossez, Francis Deslauriers, Jiri Olsa

The field perf_callchain, if available, is added to the sampling
events during the CTF conversion. It is an array of u64 values.
The perf_callchain_size field contains the size of the array.

It will allow the analysis of sampling data in trace visualization tools
like Trace Compass. Possible analyses with those data: dynamic
flamegraphs, correlation with other tracing data like a userspace trace.

Here follows a babeltrace CTF output of a trace with callchain:

 $ babeltrace ./myctftrace
 [17:38:45.672760285] (+?.?????????) cycles:ppp: { cpu_id = 0 }, { perf_ip = 0xFFFFFFFF81063EE4, perf_tid = 25841, perf_pid = 25774, perf_period = 1, perf_callchain_size = 7, perf_callchain = [ [0] = 0xFFFFFFFFFFFFFF80, [1] = 0xFFFFFFFF81063EE4, [2] = 0xFFFFFFFF8100C770, [3] = 0xFFFFFFFF81006EC6, [4] = 0xFFFFFFFF8118245E, [5] = 0xFFFFFFFF810A9224, [6] = 0xFFFFFFFF8164A4C6 ] }
 [17:38:45.672777672] (+0.000017387) cycles:ppp: { cpu_id = 0 }, { perf_ip = 0xFFFFFFFF81063EE4, perf_tid = 25841, perf_pid = 25774, perf_period = 1, perf_callchain_size = 8, perf_callchain = [ [0] = 0xFFFFFFFFFFFFFF80, [1] = 0xFFFFFFFF81063EE4, [2] = 0xFFFFFFFF8100C770, [3] = 0xFFFFFFFF81006EC6, [4] = 0xFFFFFFFF8118245E, [5] = 0xFFFFFFFF810A9224, [6] = 0xFFFFFFFF8164A4C6, [7] = 0xFFFFFFFF8164ABAD ] }
 [17:38:45.672786700] (+0.000009028) cycles:ppp: { cpu_id = 0 }, { perf_ip = 0xFFFFFFFF81063EE4, perf_tid = 25841, perf_pid = 25774, perf_period = 70, perf_callchain_size = 3, perf_callchain = [ [0] = 0xFFFFFFFFFFFFFF80, [1] = 0xFFFFFFFF81063EE4, [2] = 0xFFFFFFFF8100C770 ] }

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Julien Desfossez <jdesfossez@efficios.com>
Cc: Francis Deslauriers <francis.deslauriers@efficios.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Geneviève Bastien <gbastien@versatic.net>
Signed-off-by: Geneviève Bastien <gbastien@versatic.net>
---
 tools/perf/util/data-convert-bt.c | 91 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 91 insertions(+)

diff --git a/tools/perf/util/data-convert-bt.c b/tools/perf/util/data-convert-bt.c
index 3149b70799fd..e99bccdb898d 100644
--- a/tools/perf/util/data-convert-bt.c
+++ b/tools/perf/util/data-convert-bt.c
@@ -506,6 +506,81 @@ add_bpf_output_values(struct bt_ctf_event_class *event_class,
 	return ret;
 }
 
+static int
+add_callchain_output_values(struct bt_ctf_event_class *event_class,
+		      struct bt_ctf_event *event,
+		      struct ip_callchain *callchain)
+{
+	struct bt_ctf_field_type *len_type, *seq_type;
+	struct bt_ctf_field *len_field, *seq_field;
+	unsigned int nr_elements = callchain->nr;
+	unsigned int i;
+	int ret;
+
+	len_type = bt_ctf_event_class_get_field_by_name(
+			event_class, "perf_callchain_size");
+	len_field = bt_ctf_field_create(len_type);
+	if (!len_field) {
+		pr_err("failed to create 'perf_callchain_size' for callchain output event\n");
+		ret = -1;
+		goto put_len_type;
+	}
+
+	ret = bt_ctf_field_unsigned_integer_set_value(len_field, nr_elements);
+	if (ret) {
+		pr_err("failed to set field value for perf_callchain_size\n");
+		goto put_len_field;
+	}
+	ret = bt_ctf_event_set_payload(event, "perf_callchain_size", len_field);
+	if (ret) {
+		pr_err("failed to set payload to perf_callchain_size\n");
+		goto put_len_field;
+	}
+
+	seq_type = bt_ctf_event_class_get_field_by_name(
+			event_class, "perf_callchain");
+	seq_field = bt_ctf_field_create(seq_type);
+	if (!seq_field) {
+		pr_err("failed to create 'perf_callchain' for callchain output event\n");
+		ret = -1;
+		goto put_seq_type;
+	}
+
+	ret = bt_ctf_field_sequence_set_length(seq_field, len_field);
+	if (ret) {
+		pr_err("failed to set length of 'perf_callchain'\n");
+		goto put_seq_field;
+	}
+
+	for (i = 0; i < nr_elements; i++) {
+		struct bt_ctf_field *elem_field =
+			bt_ctf_field_sequence_get_field(seq_field, i);
+
+		ret = bt_ctf_field_unsigned_integer_set_value(elem_field,
+				((u64 *)(callchain->ips))[i]);
+
+		bt_ctf_field_put(elem_field);
+		if (ret) {
+			pr_err("failed to set callchain[%d]\n", i);
+			goto put_seq_field;
+		}
+	}
+
+	ret = bt_ctf_event_set_payload(event, "perf_callchain", seq_field);
+	if (ret)
+		pr_err("failed to set payload for raw_data\n");
+
+put_seq_field:
+	bt_ctf_field_put(seq_field);
+put_seq_type:
+	bt_ctf_field_type_put(seq_type);
+put_len_field:
+	bt_ctf_field_put(len_field);
+put_len_type:
+	bt_ctf_field_type_put(len_type);
+	return ret;
+}
+
 static int add_generic_values(struct ctf_writer *cw,
 			      struct bt_ctf_event *event,
 			      struct perf_evsel *evsel,
@@ -720,6 +795,7 @@ static int process_sample_event(struct perf_tool *tool,
 	struct bt_ctf_event_class *event_class;
 	struct bt_ctf_event *event;
 	int ret;
+	unsigned long type = evsel->attr.sample_type;
 
 	if (WARN_ONCE(!priv, "Failed to setup all events.\n"))
 		return 0;
@@ -751,6 +827,13 @@ static int process_sample_event(struct perf_tool *tool,
 			return -1;
 	}
 
+	if (type & PERF_SAMPLE_CALLCHAIN) {
+		ret = add_callchain_output_values(event_class,
+				event, sample->callchain);
+		if (ret)
+			return -1;
+	}
+
 	if (perf_evsel__is_bpf_output(evsel)) {
 		ret = add_bpf_output_values(event_class, event, sample);
 		if (ret)
@@ -1043,6 +1126,14 @@ static int add_generic_types(struct ctf_writer *cw, struct perf_evsel *evsel,
 	if (type & PERF_SAMPLE_TRANSACTION)
 		ADD_FIELD(event_class, cw->data.u64, "perf_transaction");
 
+	if (type & PERF_SAMPLE_CALLCHAIN) {
+		ADD_FIELD(event_class, cw->data.u32, "perf_callchain_size");
+		ADD_FIELD(event_class,
+			bt_ctf_field_type_sequence_create(
+				cw->data.u64_hex, "perf_callchain_size"),
+			"perf_callchain");
+	}
+
 #undef ADD_FIELD
 	return 0;
 }
-- 
2.13.3

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/3] perf tools: Add mmap[2] events to ctf conversion
  2017-07-27 18:12 [PATCH 1/3] perf tools: Add callchain to ctf conversion Geneviève Bastien
@ 2017-07-27 18:12 ` Geneviève Bastien
  2017-07-30  9:42   ` [tip:perf/core] perf data: Add mmap[2] events to CTF conversion tip-bot for Geneviève Bastien
  2017-07-27 18:12 ` [PATCH 3/3] perf: Add doc when no conversion support compiled Geneviève Bastien
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Geneviève Bastien @ 2017-07-27 18:12 UTC (permalink / raw)
  To: linux-kernel
  Cc: Geneviève Bastien, Peter Zijlstra, Ingo Molnar,
	Arnaldo Carvalho de Melo, Alexander Shishkin, Mathieu Desnoyers,
	Julien Desfossez, Francis Deslauriers, Jiri Olsa

This adds the mmap and mmap2 events to the CTF trace obtained from perf
data.

These events will allow CTF trace visualization tools like Trace
Compass to automatically resolve the symbols of the callchain to the
corresponding function or origin library.

To include those events, one needs to convert with the --all option.
Here follows an output of babeltrace:

 $ sudo perf data convert --all --to-ctf myctftrace
 $ babeltrace ./myctftrace
 [19:00:00.000000000] (+0.000000000) perf_mmap2: { cpu_id = 0 },
{ pid = 638, tid = 638, start = 0x7F54AE39E000, filename =
"/usr/lib/ld-2.25.so" }
 [19:00:00.000000000] (+0.000000000) perf_mmap2: { cpu_id = 0 }, { pid =
638, tid = 638, start = 0x7F54AE565000, filename =
"/usr/lib/libudev.so.1.6.6" }
 [19:00:00.000000000] (+0.000000000) perf_mmap2: { cpu_id = 0 }, { pid =
638, tid = 638, start = 0x7FFC093EA000, filename = "[vdso]" }

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Julien Desfossez <jdesfossez@efficios.com>
Cc: Francis Deslauriers <francis.deslauriers@efficios.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Geneviève Bastien <gbastien@versatic.net>
Signed-off-by: Geneviève Bastien <gbastien@versatic.net>
---
 tools/perf/util/data-convert-bt.c | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/tools/perf/util/data-convert-bt.c b/tools/perf/util/data-convert-bt.c
index e99bccdb898d..c47b0943ef88 100644
--- a/tools/perf/util/data-convert-bt.c
+++ b/tools/perf/util/data-convert-bt.c
@@ -76,6 +76,8 @@ struct ctf_writer {
 	struct bt_ctf_event_class	*comm_class;
 	struct bt_ctf_event_class	*exit_class;
 	struct bt_ctf_event_class	*fork_class;
+	struct bt_ctf_event_class	*mmap_class;
+	struct bt_ctf_event_class	*mmap2_class;
 };
 
 struct convert {
@@ -916,6 +918,18 @@ __FUNC_PROCESS_NON_SAMPLE(exit,
 	__NON_SAMPLE_SET_FIELD(fork, u32, ptid);
 	__NON_SAMPLE_SET_FIELD(fork, u64, time);
 )
+__FUNC_PROCESS_NON_SAMPLE(mmap,
+	__NON_SAMPLE_SET_FIELD(mmap, u32, pid);
+	__NON_SAMPLE_SET_FIELD(mmap, u32, tid);
+	__NON_SAMPLE_SET_FIELD(mmap, u64_hex, start);
+	__NON_SAMPLE_SET_FIELD(mmap, string, filename);
+)
+__FUNC_PROCESS_NON_SAMPLE(mmap2,
+	__NON_SAMPLE_SET_FIELD(mmap2, u32, pid);
+	__NON_SAMPLE_SET_FIELD(mmap2, u32, tid);
+	__NON_SAMPLE_SET_FIELD(mmap2, u64_hex, start);
+	__NON_SAMPLE_SET_FIELD(mmap2, string, filename);
+)
 #undef __NON_SAMPLE_SET_FIELD
 #undef __FUNC_PROCESS_NON_SAMPLE
 
@@ -1255,6 +1269,19 @@ __FUNC_ADD_NON_SAMPLE_EVENT_CLASS(exit,
 	__NON_SAMPLE_ADD_FIELD(u64, time);
 )
 
+__FUNC_ADD_NON_SAMPLE_EVENT_CLASS(mmap,
+	__NON_SAMPLE_ADD_FIELD(u32, pid);
+	__NON_SAMPLE_ADD_FIELD(u32, tid);
+	__NON_SAMPLE_ADD_FIELD(u64_hex, start);
+	__NON_SAMPLE_ADD_FIELD(string, filename);
+)
+
+__FUNC_ADD_NON_SAMPLE_EVENT_CLASS(mmap2,
+	__NON_SAMPLE_ADD_FIELD(u32, pid);
+	__NON_SAMPLE_ADD_FIELD(u32, tid);
+	__NON_SAMPLE_ADD_FIELD(u64_hex, start);
+	__NON_SAMPLE_ADD_FIELD(string, filename);
+)
 #undef __NON_SAMPLE_ADD_FIELD
 #undef __FUNC_ADD_NON_SAMPLE_EVENT_CLASS
 
@@ -1272,6 +1299,12 @@ static int setup_non_sample_events(struct ctf_writer *cw,
 	ret = add_fork_event(cw);
 	if (ret)
 		return ret;
+	ret = add_mmap_event(cw);
+	if (ret)
+		return ret;
+	ret = add_mmap2_event(cw);
+	if (ret)
+		return ret;
 	return 0;
 }
 
@@ -1573,6 +1606,8 @@ int bt_convert__perf2ctf(const char *input, const char *path,
 		c.tool.comm = process_comm_event;
 		c.tool.exit = process_exit_event;
 		c.tool.fork = process_fork_event;
+		c.tool.mmap = process_mmap_event;
+		c.tool.mmap2 = process_mmap2_event;
 	}
 
 	err = perf_config(convert__config, &c);
-- 
2.13.3

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/3] perf: Add doc when no conversion support compiled
  2017-07-27 18:12 [PATCH 1/3] perf tools: Add callchain to ctf conversion Geneviève Bastien
  2017-07-27 18:12 ` [PATCH 2/3] perf tools: Add mmap[2] events " Geneviève Bastien
@ 2017-07-27 18:12 ` Geneviève Bastien
  2017-07-30  9:43   ` [tip:perf/core] perf data: " tip-bot for Geneviève Bastien
  2017-07-28  9:25 ` [PATCH 1/3] perf tools: Add callchain to ctf conversion Jiri Olsa
  2017-07-30  9:42 ` [tip:perf/core] perf data: Add callchain to CTF conversion tip-bot for Geneviève Bastien
  3 siblings, 1 reply; 9+ messages in thread
From: Geneviève Bastien @ 2017-07-27 18:12 UTC (permalink / raw)
  To: linux-kernel
  Cc: Geneviève Bastien, Peter Zijlstra, Ingo Molnar,
	Arnaldo Carvalho de Melo, Alexander Shishkin, Mathieu Desnoyers,
	Julien Desfossez, Francis Deslauriers, Jiri Olsa

This adds documentation on the environment variables needed to the
message telling that no conversion support is compiled in.

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Julien Desfossez <jdesfossez@efficios.com>
Cc: Francis Deslauriers <francis.deslauriers@efficios.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Geneviève Bastien <gbastien@versatic.net>
Signed-off-by: Geneviève Bastien <gbastien@versatic.net>
---
 tools/perf/builtin-data.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/builtin-data.c b/tools/perf/builtin-data.c
index 0adb5f82335a..46cd8490baf4 100644
--- a/tools/perf/builtin-data.c
+++ b/tools/perf/builtin-data.c
@@ -69,7 +69,7 @@ static int cmd_data_convert(int argc, const char **argv)
 	};
 
 #ifndef HAVE_LIBBABELTRACE_SUPPORT
-	pr_err("No conversion support compiled in.\n");
+	pr_err("No conversion support compiled in. perf should be compiled with environment variables LIBBABELTRACE=1 and LIBBABELTRACE_DIR=/path/to/libbabeltrace/\n");
 	return -1;
 #endif
 
-- 
2.13.3

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/3] perf tools: Add callchain to ctf conversion
  2017-07-27 18:12 [PATCH 1/3] perf tools: Add callchain to ctf conversion Geneviève Bastien
  2017-07-27 18:12 ` [PATCH 2/3] perf tools: Add mmap[2] events " Geneviève Bastien
  2017-07-27 18:12 ` [PATCH 3/3] perf: Add doc when no conversion support compiled Geneviève Bastien
@ 2017-07-28  9:25 ` Jiri Olsa
  2017-07-28 13:30   ` Genevieve Bastien
  2017-07-28 14:58   ` Arnaldo Carvalho de Melo
  2017-07-30  9:42 ` [tip:perf/core] perf data: Add callchain to CTF conversion tip-bot for Geneviève Bastien
  3 siblings, 2 replies; 9+ messages in thread
From: Jiri Olsa @ 2017-07-28  9:25 UTC (permalink / raw)
  To: Geneviève Bastien
  Cc: linux-kernel, Peter Zijlstra, Ingo Molnar,
	Arnaldo Carvalho de Melo, Alexander Shishkin, Mathieu Desnoyers,
	Julien Desfossez, Francis Deslauriers, Jiri Olsa

On Thu, Jul 27, 2017 at 02:12:03PM -0400, Geneviève Bastien wrote:
> The field perf_callchain, if available, is added to the sampling
> events during the CTF conversion. It is an array of u64 values.
> The perf_callchain_size field contains the size of the array.
> 
> It will allow the analysis of sampling data in trace visualization tools
> like Trace Compass. Possible analyses with those data: dynamic
> flamegraphs, correlation with other tracing data like a userspace trace.
> 
> Here follows a babeltrace CTF output of a trace with callchain:
> 
>  $ babeltrace ./myctftrace
>  [17:38:45.672760285] (+?.?????????) cycles:ppp: { cpu_id = 0 }, { perf_ip = 0xFFFFFFFF81063EE4, perf_tid = 25841, perf_pid = 25774, perf_period = 1, perf_callchain_size = 7, perf_callchain = [ [0] = 0xFFFFFFFFFFFFFF80, [1] = 0xFFFFFFFF81063EE4, [2] = 0xFFFFFFFF8100C770, [3] = 0xFFFFFFFF81006EC6, [4] = 0xFFFFFFFF8118245E, [5] = 0xFFFFFFFF810A9224, [6] = 0xFFFFFFFF8164A4C6 ] }
>  [17:38:45.672777672] (+0.000017387) cycles:ppp: { cpu_id = 0 }, { perf_ip = 0xFFFFFFFF81063EE4, perf_tid = 25841, perf_pid = 25774, perf_period = 1, perf_callchain_size = 8, perf_callchain = [ [0] = 0xFFFFFFFFFFFFFF80, [1] = 0xFFFFFFFF81063EE4, [2] = 0xFFFFFFFF8100C770, [3] = 0xFFFFFFFF81006EC6, [4] = 0xFFFFFFFF8118245E, [5] = 0xFFFFFFFF810A9224, [6] = 0xFFFFFFFF8164A4C6, [7] = 0xFFFFFFFF8164ABAD ] }
>  [17:38:45.672786700] (+0.000009028) cycles:ppp: { cpu_id = 0 }, { perf_ip = 0xFFFFFFFF81063EE4, perf_tid = 25841, perf_pid = 25774, perf_period = 70, perf_callchain_size = 3, perf_callchain = [ [0] = 0xFFFFFFFFFFFFFF80, [1] = 0xFFFFFFFF81063EE4, [2] = 0xFFFFFFFF8100C770 ] }

missing one more hunk (attached) ;-)

I guess there's no need to resend, Arnaldo could remove it,
anyway for patchset:

Acked-by: Jiri Olsa <jolsa@kernel.org>

Is there already tracecompas change to display callchains and mmaps?

thanks,
jirka


---
diff --git a/tools/perf/util/data-convert-bt.c b/tools/perf/util/data-convert-bt.c
index c47b0943ef88..2346cecb8ea2 100644
--- a/tools/perf/util/data-convert-bt.c
+++ b/tools/perf/util/data-convert-bt.c
@@ -596,7 +596,6 @@ static int add_generic_values(struct ctf_writer *cw,
 	 *   PERF_SAMPLE_TIME         - not needed as we have it in
 	 *                              ctf event header
 	 *   PERF_SAMPLE_READ         - TODO
-	 *   PERF_SAMPLE_CALLCHAIN    - TODO
 	 *   PERF_SAMPLE_RAW          - tracepoint fields are handled separately
 	 *   PERF_SAMPLE_BRANCH_STACK - TODO
 	 *   PERF_SAMPLE_REGS_USER    - TODO

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/3] perf tools: Add callchain to ctf conversion
  2017-07-28  9:25 ` [PATCH 1/3] perf tools: Add callchain to ctf conversion Jiri Olsa
@ 2017-07-28 13:30   ` Genevieve Bastien
  2017-07-28 14:58   ` Arnaldo Carvalho de Melo
  1 sibling, 0 replies; 9+ messages in thread
From: Genevieve Bastien @ 2017-07-28 13:30 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: linux-kernel, Peter Zijlstra, Ingo Molnar,
	Arnaldo Carvalho de Melo, Alexander Shishkin, Mathieu Desnoyers,
	Julien Desfossez, Francis Deslauriers, Jiri Olsa


On 07/28/2017 05:25 AM, Jiri Olsa wrote:
> On Thu, Jul 27, 2017 at 02:12:03PM -0400, Geneviève Bastien wrote:
>> The field perf_callchain, if available, is added to the sampling
>> events during the CTF conversion. It is an array of u64 values.
>> The perf_callchain_size field contains the size of the array.
>>
>> It will allow the analysis of sampling data in trace visualization tools
>> like Trace Compass. Possible analyses with those data: dynamic
>> flamegraphs, correlation with other tracing data like a userspace trace.
>>
>> Here follows a babeltrace CTF output of a trace with callchain:
>>
>>  $ babeltrace ./myctftrace
>>  [17:38:45.672760285] (+?.?????????) cycles:ppp: { cpu_id = 0 }, { perf_ip = 0xFFFFFFFF81063EE4, perf_tid = 25841, perf_pid = 25774, perf_period = 1, perf_callchain_size = 7, perf_callchain = [ [0] = 0xFFFFFFFFFFFFFF80, [1] = 0xFFFFFFFF81063EE4, [2] = 0xFFFFFFFF8100C770, [3] = 0xFFFFFFFF81006EC6, [4] = 0xFFFFFFFF8118245E, [5] = 0xFFFFFFFF810A9224, [6] = 0xFFFFFFFF8164A4C6 ] }
>>  [17:38:45.672777672] (+0.000017387) cycles:ppp: { cpu_id = 0 }, { perf_ip = 0xFFFFFFFF81063EE4, perf_tid = 25841, perf_pid = 25774, perf_period = 1, perf_callchain_size = 8, perf_callchain = [ [0] = 0xFFFFFFFFFFFFFF80, [1] = 0xFFFFFFFF81063EE4, [2] = 0xFFFFFFFF8100C770, [3] = 0xFFFFFFFF81006EC6, [4] = 0xFFFFFFFF8118245E, [5] = 0xFFFFFFFF810A9224, [6] = 0xFFFFFFFF8164A4C6, [7] = 0xFFFFFFFF8164ABAD ] }
>>  [17:38:45.672786700] (+0.000009028) cycles:ppp: { cpu_id = 0 }, { perf_ip = 0xFFFFFFFF81063EE4, perf_tid = 25841, perf_pid = 25774, perf_period = 70, perf_callchain_size = 3, perf_callchain = [ [0] = 0xFFFFFFFFFFFFFF80, [1] = 0xFFFFFFFF81063EE4, [2] = 0xFFFFFFFF8100C770 ] }
> missing one more hunk (attached) ;-)
>
> I guess there's no need to resend, Arnaldo could remove it,
> anyway for patchset:
>
> Acked-by: Jiri Olsa <jolsa@kernel.org>
Thanks Jiri,
> Is there already tracecompas change to display callchains and mmaps?
Almost, it is still a patch on gerrit [1] and missing a few features,
like symbol resolution, but we plan to have it released in the coming weeks.

Regards,
Geneviève

[1] https://git.eclipse.org/r/#/c/102015/
>
> thanks,
> jirka
>
>
> ---
> diff --git a/tools/perf/util/data-convert-bt.c b/tools/perf/util/data-convert-bt.c
> index c47b0943ef88..2346cecb8ea2 100644
> --- a/tools/perf/util/data-convert-bt.c
> +++ b/tools/perf/util/data-convert-bt.c
> @@ -596,7 +596,6 @@ static int add_generic_values(struct ctf_writer *cw,
>  	 *   PERF_SAMPLE_TIME         - not needed as we have it in
>  	 *                              ctf event header
>  	 *   PERF_SAMPLE_READ         - TODO
> -	 *   PERF_SAMPLE_CALLCHAIN    - TODO
>  	 *   PERF_SAMPLE_RAW          - tracepoint fields are handled separately
>  	 *   PERF_SAMPLE_BRANCH_STACK - TODO
>  	 *   PERF_SAMPLE_REGS_USER    - TODO

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/3] perf tools: Add callchain to ctf conversion
  2017-07-28  9:25 ` [PATCH 1/3] perf tools: Add callchain to ctf conversion Jiri Olsa
  2017-07-28 13:30   ` Genevieve Bastien
@ 2017-07-28 14:58   ` Arnaldo Carvalho de Melo
  1 sibling, 0 replies; 9+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-07-28 14:58 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: Geneviève Bastien, linux-kernel, Peter Zijlstra,
	Ingo Molnar, Alexander Shishkin, Mathieu Desnoyers,
	Julien Desfossez, Francis Deslauriers, Jiri Olsa

Em Fri, Jul 28, 2017 at 11:25:50AM +0200, Jiri Olsa escreveu:
> On Thu, Jul 27, 2017 at 02:12:03PM -0400, Geneviève Bastien wrote:
> > The field perf_callchain, if available, is added to the sampling
> > events during the CTF conversion. It is an array of u64 values.
> > The perf_callchain_size field contains the size of the array.
> > 
> > It will allow the analysis of sampling data in trace visualization tools
> > like Trace Compass. Possible analyses with those data: dynamic
> > flamegraphs, correlation with other tracing data like a userspace trace.
> > 
> > Here follows a babeltrace CTF output of a trace with callchain:
> > 
> >  $ babeltrace ./myctftrace
> >  [17:38:45.672760285] (+?.?????????) cycles:ppp: { cpu_id = 0 }, { perf_ip = 0xFFFFFFFF81063EE4, perf_tid = 25841, perf_pid = 25774, perf_period = 1, perf_callchain_size = 7, perf_callchain = [ [0] = 0xFFFFFFFFFFFFFF80, [1] = 0xFFFFFFFF81063EE4, [2] = 0xFFFFFFFF8100C770, [3] = 0xFFFFFFFF81006EC6, [4] = 0xFFFFFFFF8118245E, [5] = 0xFFFFFFFF810A9224, [6] = 0xFFFFFFFF8164A4C6 ] }
> >  [17:38:45.672777672] (+0.000017387) cycles:ppp: { cpu_id = 0 }, { perf_ip = 0xFFFFFFFF81063EE4, perf_tid = 25841, perf_pid = 25774, perf_period = 1, perf_callchain_size = 8, perf_callchain = [ [0] = 0xFFFFFFFFFFFFFF80, [1] = 0xFFFFFFFF81063EE4, [2] = 0xFFFFFFFF8100C770, [3] = 0xFFFFFFFF81006EC6, [4] = 0xFFFFFFFF8118245E, [5] = 0xFFFFFFFF810A9224, [6] = 0xFFFFFFFF8164A4C6, [7] = 0xFFFFFFFF8164ABAD ] }
> >  [17:38:45.672786700] (+0.000009028) cycles:ppp: { cpu_id = 0 }, { perf_ip = 0xFFFFFFFF81063EE4, perf_tid = 25841, perf_pid = 25774, perf_period = 70, perf_callchain_size = 3, perf_callchain = [ [0] = 0xFFFFFFFFFFFFFF80, [1] = 0xFFFFFFFF81063EE4, [2] = 0xFFFFFFFF8100C770 ] }
> 
> missing one more hunk (attached) ;-)
> 
> I guess there's no need to resend, Arnaldo could remove it,

yeah, will do

> anyway for patchset:
> 
> Acked-by: Jiri Olsa <jolsa@kernel.org>

Thanks!

- Arnaldo
 
> Is there already tracecompas change to display callchains and mmaps?
> 
> thanks,
> jirka
> 
> 
> ---
> diff --git a/tools/perf/util/data-convert-bt.c b/tools/perf/util/data-convert-bt.c
> index c47b0943ef88..2346cecb8ea2 100644
> --- a/tools/perf/util/data-convert-bt.c
> +++ b/tools/perf/util/data-convert-bt.c
> @@ -596,7 +596,6 @@ static int add_generic_values(struct ctf_writer *cw,
>  	 *   PERF_SAMPLE_TIME         - not needed as we have it in
>  	 *                              ctf event header
>  	 *   PERF_SAMPLE_READ         - TODO
> -	 *   PERF_SAMPLE_CALLCHAIN    - TODO
>  	 *   PERF_SAMPLE_RAW          - tracepoint fields are handled separately
>  	 *   PERF_SAMPLE_BRANCH_STACK - TODO
>  	 *   PERF_SAMPLE_REGS_USER    - TODO

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [tip:perf/core] perf data: Add callchain to CTF conversion
  2017-07-27 18:12 [PATCH 1/3] perf tools: Add callchain to ctf conversion Geneviève Bastien
                   ` (2 preceding siblings ...)
  2017-07-28  9:25 ` [PATCH 1/3] perf tools: Add callchain to ctf conversion Jiri Olsa
@ 2017-07-30  9:42 ` tip-bot for Geneviève Bastien
  3 siblings, 0 replies; 9+ messages in thread
From: tip-bot for Geneviève Bastien @ 2017-07-30  9:42 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, acme, mathieu.desnoyers, gbastien, jdesfossez,
	francis.deslauriers, peterz, jolsa, tglx, alexander.shishkin,
	mingo, hpa

Commit-ID:  a3073c8e590d7baa5a6cb01438cb945c92bfcd91
Gitweb:     http://git.kernel.org/tip/a3073c8e590d7baa5a6cb01438cb945c92bfcd91
Author:     Geneviève Bastien <gbastien@versatic.net>
AuthorDate: Thu, 27 Jul 2017 14:12:03 -0400
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 28 Jul 2017 16:25:07 -0300

perf data: Add callchain to CTF conversion

The field perf_callchain, if available, is added to the sampling events
during the CTF conversion. It is an array of u64 values.  The
perf_callchain_size field contains the size of the array.

It will allow the analysis of sampling data in trace visualization tools
like Trace Compass. Possible analyses with those data: dynamic
flamegraphs, correlation with other tracing data like a userspace trace.

Here follows a babeltrace CTF output of a trace with callchain:

  $ babeltrace ./myctftrace
  [17:38:45.672760285] (+?.?????????) cycles:ppp: { cpu_id = 0 }, { perf_ip = 0xFFFFFFFF81063EE4, perf_tid = 25841, perf_pid = 25774, perf_period = 1, perf_callchain_size = 7, perf_callchain = [ [0] = 0xFFFFFFFFFFFFFF80, [1] = 0xFFFFFFFF81063EE4, [2] = 0xFFFFFFFF8100C770, [3] = 0xFFFFFFFF81006EC6, [4] = 0xFFFFFFFF8118245E, [5] = 0xFFFFFFFF810A9224, [6] = 0xFFFFFFFF8164A4C6 ] }
  [17:38:45.672777672] (+0.000017387) cycles:ppp: { cpu_id = 0 }, { perf_ip = 0xFFFFFFFF81063EE4, perf_tid = 25841, perf_pid = 25774, perf_period = 1, perf_callchain_size = 8, perf_callchain = [ [0] = 0xFFFFFFFFFFFFFF80, [1] = 0xFFFFFFFF81063EE4, [2] = 0xFFFFFFFF8100C770, [3] = 0xFFFFFFFF81006EC6, [4] = 0xFFFFFFFF8118245E, [5] = 0xFFFFFFFF810A9224, [6] = 0xFFFFFFFF8164A4C6, [7] = 0xFFFFFFFF8164ABAD ] }
  [17:38:45.672786700] (+0.000009028) cycles:ppp: { cpu_id = 0 }, { perf_ip = 0xFFFFFFFF81063EE4, perf_tid = 25841, perf_pid = 25774, perf_period = 70, perf_callchain_size = 3, perf_callchain = [ [0] = 0xFFFFFFFFFFFFFF80, [1] = 0xFFFFFFFF81063EE4, [2] = 0xFFFFFFFF8100C770 ] }

Signed-off-by: Geneviève Bastien <gbastien@versatic.net>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Francis Deslauriers <francis.deslauriers@efficios.com>
Cc: Julien Desfossez <jdesfossez@efficios.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20170727181205.24843-1-gbastien@versatic.net
[ Removed PERF_SAMPLE_CALLCHAIN from the TODO list, jolsa ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/data-convert-bt.c | 92 ++++++++++++++++++++++++++++++++++++++-
 1 file changed, 91 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/data-convert-bt.c b/tools/perf/util/data-convert-bt.c
index 3149b70..eeb2590 100644
--- a/tools/perf/util/data-convert-bt.c
+++ b/tools/perf/util/data-convert-bt.c
@@ -506,6 +506,81 @@ put_len_type:
 	return ret;
 }
 
+static int
+add_callchain_output_values(struct bt_ctf_event_class *event_class,
+		      struct bt_ctf_event *event,
+		      struct ip_callchain *callchain)
+{
+	struct bt_ctf_field_type *len_type, *seq_type;
+	struct bt_ctf_field *len_field, *seq_field;
+	unsigned int nr_elements = callchain->nr;
+	unsigned int i;
+	int ret;
+
+	len_type = bt_ctf_event_class_get_field_by_name(
+			event_class, "perf_callchain_size");
+	len_field = bt_ctf_field_create(len_type);
+	if (!len_field) {
+		pr_err("failed to create 'perf_callchain_size' for callchain output event\n");
+		ret = -1;
+		goto put_len_type;
+	}
+
+	ret = bt_ctf_field_unsigned_integer_set_value(len_field, nr_elements);
+	if (ret) {
+		pr_err("failed to set field value for perf_callchain_size\n");
+		goto put_len_field;
+	}
+	ret = bt_ctf_event_set_payload(event, "perf_callchain_size", len_field);
+	if (ret) {
+		pr_err("failed to set payload to perf_callchain_size\n");
+		goto put_len_field;
+	}
+
+	seq_type = bt_ctf_event_class_get_field_by_name(
+			event_class, "perf_callchain");
+	seq_field = bt_ctf_field_create(seq_type);
+	if (!seq_field) {
+		pr_err("failed to create 'perf_callchain' for callchain output event\n");
+		ret = -1;
+		goto put_seq_type;
+	}
+
+	ret = bt_ctf_field_sequence_set_length(seq_field, len_field);
+	if (ret) {
+		pr_err("failed to set length of 'perf_callchain'\n");
+		goto put_seq_field;
+	}
+
+	for (i = 0; i < nr_elements; i++) {
+		struct bt_ctf_field *elem_field =
+			bt_ctf_field_sequence_get_field(seq_field, i);
+
+		ret = bt_ctf_field_unsigned_integer_set_value(elem_field,
+				((u64 *)(callchain->ips))[i]);
+
+		bt_ctf_field_put(elem_field);
+		if (ret) {
+			pr_err("failed to set callchain[%d]\n", i);
+			goto put_seq_field;
+		}
+	}
+
+	ret = bt_ctf_event_set_payload(event, "perf_callchain", seq_field);
+	if (ret)
+		pr_err("failed to set payload for raw_data\n");
+
+put_seq_field:
+	bt_ctf_field_put(seq_field);
+put_seq_type:
+	bt_ctf_field_type_put(seq_type);
+put_len_field:
+	bt_ctf_field_put(len_field);
+put_len_type:
+	bt_ctf_field_type_put(len_type);
+	return ret;
+}
+
 static int add_generic_values(struct ctf_writer *cw,
 			      struct bt_ctf_event *event,
 			      struct perf_evsel *evsel,
@@ -519,7 +594,6 @@ static int add_generic_values(struct ctf_writer *cw,
 	 *   PERF_SAMPLE_TIME         - not needed as we have it in
 	 *                              ctf event header
 	 *   PERF_SAMPLE_READ         - TODO
-	 *   PERF_SAMPLE_CALLCHAIN    - TODO
 	 *   PERF_SAMPLE_RAW          - tracepoint fields are handled separately
 	 *   PERF_SAMPLE_BRANCH_STACK - TODO
 	 *   PERF_SAMPLE_REGS_USER    - TODO
@@ -720,6 +794,7 @@ static int process_sample_event(struct perf_tool *tool,
 	struct bt_ctf_event_class *event_class;
 	struct bt_ctf_event *event;
 	int ret;
+	unsigned long type = evsel->attr.sample_type;
 
 	if (WARN_ONCE(!priv, "Failed to setup all events.\n"))
 		return 0;
@@ -751,6 +826,13 @@ static int process_sample_event(struct perf_tool *tool,
 			return -1;
 	}
 
+	if (type & PERF_SAMPLE_CALLCHAIN) {
+		ret = add_callchain_output_values(event_class,
+				event, sample->callchain);
+		if (ret)
+			return -1;
+	}
+
 	if (perf_evsel__is_bpf_output(evsel)) {
 		ret = add_bpf_output_values(event_class, event, sample);
 		if (ret)
@@ -1043,6 +1125,14 @@ static int add_generic_types(struct ctf_writer *cw, struct perf_evsel *evsel,
 	if (type & PERF_SAMPLE_TRANSACTION)
 		ADD_FIELD(event_class, cw->data.u64, "perf_transaction");
 
+	if (type & PERF_SAMPLE_CALLCHAIN) {
+		ADD_FIELD(event_class, cw->data.u32, "perf_callchain_size");
+		ADD_FIELD(event_class,
+			bt_ctf_field_type_sequence_create(
+				cw->data.u64_hex, "perf_callchain_size"),
+			"perf_callchain");
+	}
+
 #undef ADD_FIELD
 	return 0;
 }

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [tip:perf/core] perf data: Add mmap[2] events to CTF conversion
  2017-07-27 18:12 ` [PATCH 2/3] perf tools: Add mmap[2] events " Geneviève Bastien
@ 2017-07-30  9:42   ` tip-bot for Geneviève Bastien
  0 siblings, 0 replies; 9+ messages in thread
From: tip-bot for Geneviève Bastien @ 2017-07-30  9:42 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: francis.deslauriers, tglx, linux-kernel, gbastien, hpa, acme,
	peterz, mingo, jdesfossez, alexander.shishkin, jolsa,
	mathieu.desnoyers

Commit-ID:  f9f6f2a90343c5be3294d1336da055a99c28897d
Gitweb:     http://git.kernel.org/tip/f9f6f2a90343c5be3294d1336da055a99c28897d
Author:     Geneviève Bastien <gbastien@versatic.net>
AuthorDate: Thu, 27 Jul 2017 14:12:04 -0400
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 28 Jul 2017 16:26:06 -0300

perf data: Add mmap[2] events to CTF conversion

This adds the mmap and mmap2 events to the CTF trace obtained from perf
data.

These events will allow CTF trace visualization tools like Trace Compass
to automatically resolve the symbols of the callchain to the
corresponding function or origin library.

To include those events, one needs to convert with the --all option.
Here follows an output of babeltrace:

  $ sudo perf data convert --all --to-ctf myctftrace
  $ babeltrace ./myctftrace
  [19:00:00.000000000] (+0.000000000) perf_mmap2: { cpu_id = 0 },
 { pid = 638, tid = 638, start = 0x7F54AE39E000, filename =
 "/usr/lib/ld-2.25.so" }
  [19:00:00.000000000] (+0.000000000) perf_mmap2: { cpu_id = 0 }, { pid =
 638, tid = 638, start = 0x7F54AE565000, filename =
 "/usr/lib/libudev.so.1.6.6" }
  [19:00:00.000000000] (+0.000000000) perf_mmap2: { cpu_id = 0 }, { pid =
 638, tid = 638, start = 0x7FFC093EA000, filename = "[vdso]" }

Signed-off-by: Geneviève Bastien <gbastien@versatic.net>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Francis Deslauriers <francis.deslauriers@efficios.com>
Cc: Julien Desfossez <jdesfossez@efficios.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20170727181205.24843-2-gbastien@versatic.net
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/data-convert-bt.c | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/tools/perf/util/data-convert-bt.c b/tools/perf/util/data-convert-bt.c
index eeb2590..2346cec 100644
--- a/tools/perf/util/data-convert-bt.c
+++ b/tools/perf/util/data-convert-bt.c
@@ -76,6 +76,8 @@ struct ctf_writer {
 	struct bt_ctf_event_class	*comm_class;
 	struct bt_ctf_event_class	*exit_class;
 	struct bt_ctf_event_class	*fork_class;
+	struct bt_ctf_event_class	*mmap_class;
+	struct bt_ctf_event_class	*mmap2_class;
 };
 
 struct convert {
@@ -915,6 +917,18 @@ __FUNC_PROCESS_NON_SAMPLE(exit,
 	__NON_SAMPLE_SET_FIELD(fork, u32, ptid);
 	__NON_SAMPLE_SET_FIELD(fork, u64, time);
 )
+__FUNC_PROCESS_NON_SAMPLE(mmap,
+	__NON_SAMPLE_SET_FIELD(mmap, u32, pid);
+	__NON_SAMPLE_SET_FIELD(mmap, u32, tid);
+	__NON_SAMPLE_SET_FIELD(mmap, u64_hex, start);
+	__NON_SAMPLE_SET_FIELD(mmap, string, filename);
+)
+__FUNC_PROCESS_NON_SAMPLE(mmap2,
+	__NON_SAMPLE_SET_FIELD(mmap2, u32, pid);
+	__NON_SAMPLE_SET_FIELD(mmap2, u32, tid);
+	__NON_SAMPLE_SET_FIELD(mmap2, u64_hex, start);
+	__NON_SAMPLE_SET_FIELD(mmap2, string, filename);
+)
 #undef __NON_SAMPLE_SET_FIELD
 #undef __FUNC_PROCESS_NON_SAMPLE
 
@@ -1254,6 +1268,19 @@ __FUNC_ADD_NON_SAMPLE_EVENT_CLASS(exit,
 	__NON_SAMPLE_ADD_FIELD(u64, time);
 )
 
+__FUNC_ADD_NON_SAMPLE_EVENT_CLASS(mmap,
+	__NON_SAMPLE_ADD_FIELD(u32, pid);
+	__NON_SAMPLE_ADD_FIELD(u32, tid);
+	__NON_SAMPLE_ADD_FIELD(u64_hex, start);
+	__NON_SAMPLE_ADD_FIELD(string, filename);
+)
+
+__FUNC_ADD_NON_SAMPLE_EVENT_CLASS(mmap2,
+	__NON_SAMPLE_ADD_FIELD(u32, pid);
+	__NON_SAMPLE_ADD_FIELD(u32, tid);
+	__NON_SAMPLE_ADD_FIELD(u64_hex, start);
+	__NON_SAMPLE_ADD_FIELD(string, filename);
+)
 #undef __NON_SAMPLE_ADD_FIELD
 #undef __FUNC_ADD_NON_SAMPLE_EVENT_CLASS
 
@@ -1271,6 +1298,12 @@ static int setup_non_sample_events(struct ctf_writer *cw,
 	ret = add_fork_event(cw);
 	if (ret)
 		return ret;
+	ret = add_mmap_event(cw);
+	if (ret)
+		return ret;
+	ret = add_mmap2_event(cw);
+	if (ret)
+		return ret;
 	return 0;
 }
 
@@ -1572,6 +1605,8 @@ int bt_convert__perf2ctf(const char *input, const char *path,
 		c.tool.comm = process_comm_event;
 		c.tool.exit = process_exit_event;
 		c.tool.fork = process_fork_event;
+		c.tool.mmap = process_mmap_event;
+		c.tool.mmap2 = process_mmap2_event;
 	}
 
 	err = perf_config(convert__config, &c);

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [tip:perf/core] perf data: Add doc when no conversion support compiled
  2017-07-27 18:12 ` [PATCH 3/3] perf: Add doc when no conversion support compiled Geneviève Bastien
@ 2017-07-30  9:43   ` tip-bot for Geneviève Bastien
  0 siblings, 0 replies; 9+ messages in thread
From: tip-bot for Geneviève Bastien @ 2017-07-30  9:43 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: peterz, linux-kernel, mathieu.desnoyers, acme,
	alexander.shishkin, jolsa, mingo, gbastien, hpa,
	francis.deslauriers, tglx, jdesfossez

Commit-ID:  6b7007af728df7258bb60ed73099be3b59b3030e
Gitweb:     http://git.kernel.org/tip/6b7007af728df7258bb60ed73099be3b59b3030e
Author:     Geneviève Bastien <gbastien@versatic.net>
AuthorDate: Thu, 27 Jul 2017 14:12:05 -0400
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 28 Jul 2017 16:30:45 -0300

perf data: Add doc when no conversion support compiled

This adds documentation on the environment variables needed to the
message telling that no conversion support is compiled in.

Committer testing:

  $ make -C tools/perf install
  $ perf data convert --all --to-ctf myctftrace
  No conversion support compiled in. perf should be compiled with environment variables LIBBABELTRACE=1 and LIBBABELTRACE_DIR=/path/to/libbabeltrace/
  $

Signed-off-by: Geneviève Bastien <gbastien@versatic.net>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Francis Deslauriers <francis.deslauriers@efficios.com>
Cc: Julien Desfossez <jdesfossez@efficios.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20170727181205.24843-3-gbastien@versatic.net
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-data.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/builtin-data.c b/tools/perf/builtin-data.c
index 0adb5f8..46cd849 100644
--- a/tools/perf/builtin-data.c
+++ b/tools/perf/builtin-data.c
@@ -69,7 +69,7 @@ static int cmd_data_convert(int argc, const char **argv)
 	};
 
 #ifndef HAVE_LIBBABELTRACE_SUPPORT
-	pr_err("No conversion support compiled in.\n");
+	pr_err("No conversion support compiled in. perf should be compiled with environment variables LIBBABELTRACE=1 and LIBBABELTRACE_DIR=/path/to/libbabeltrace/\n");
 	return -1;
 #endif
 

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-07-30  9:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-27 18:12 [PATCH 1/3] perf tools: Add callchain to ctf conversion Geneviève Bastien
2017-07-27 18:12 ` [PATCH 2/3] perf tools: Add mmap[2] events " Geneviève Bastien
2017-07-30  9:42   ` [tip:perf/core] perf data: Add mmap[2] events to CTF conversion tip-bot for Geneviève Bastien
2017-07-27 18:12 ` [PATCH 3/3] perf: Add doc when no conversion support compiled Geneviève Bastien
2017-07-30  9:43   ` [tip:perf/core] perf data: " tip-bot for Geneviève Bastien
2017-07-28  9:25 ` [PATCH 1/3] perf tools: Add callchain to ctf conversion Jiri Olsa
2017-07-28 13:30   ` Genevieve Bastien
2017-07-28 14:58   ` Arnaldo Carvalho de Melo
2017-07-30  9:42 ` [tip:perf/core] perf data: Add callchain to CTF conversion tip-bot for Geneviève Bastien

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.