linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: Jiri Olsa <jolsa@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	David Ahern <dsahern@gmail.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Jeremie Galarneau <jgalar@efficios.com>,
	Namhyung Kim <namhyung@gmail.com>,
	Paul Mackerras <paulus@samba.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Tom Zanussi <tzanussi@gmail.com>, Wang Nan <wangnan0@huawei.com>
Subject: Re: [PATCH 05/11] perf data: Add tracepoint events fields CTF conversion support
Date: Wed, 25 Feb 2015 16:23:44 -0300	[thread overview]
Message-ID: <20150225192344.GH18705@kernel.org> (raw)
In-Reply-To: <1424470628-5969-6-git-send-email-jolsa@kernel.org>

Em Fri, Feb 20, 2015 at 11:17:02PM +0100, Jiri Olsa escreveu:
> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> Adding support to convert tracepoint event fields into CTF
> event fields.
 
> We parse each tracepoint event for CTF conversion and add
> tracepoint fields as regular CTF event fields, so they
> appear in babeltrace output like:
 
>   $ babeltrace ./ctf-data/
>   ...
>   [09:02:00.950703057] (+?.?????????) sched:sched_stat_runtime: { }, { perf_ip = ... SNIP ... common_type = 298, common_flags = 1, \
>   common_preempt_count = 0, common_pid = 31813, comm = "perf", pid = 31813, runtime = 458800, vruntime = 52059858071 }
>   ...

Processed the previous patches, everything ok:

[acme@ssdandy linux]$ ls -la perf.data
ls: cannot access perf.data: No such file or directory
[acme@ssdandy linux]$ trace record usleep 1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.029 MB perf.data (88 samples) ]
[acme@ssdandy linux]$ ls -la perf.data
-rw-------. 1 acme acme 5399896 Fev 25 16:19 perf.data
[acme@ssdandy linux]$ perf evlist
raw_syscalls:sys_enter
raw_syscalls:sys_exit
[acme@ssdandy linux]$ perf evlist -v
raw_syscalls:sys_enter: sample_freq=1, type: 2, config: 75, size: 104, sample_type: IP|TID|TIME|ID|CPU|PERIOD|RAW, read_format: ID, disabled: 1, inherit: 1, mmap: 1, mmap2: 1, comm: 1, comm_exec: 1, enable_on_exec: 1, task: 1, sample_id_all: 1, exclude_guest: 1
raw_syscalls:sys_exit: sample_freq=1, type: 2, config: 74, size: 104, sample_type: IP|TID|TIME|ID|CPU|PERIOD|RAW, read_format: ID, disabled: 1, inherit: 1, enable_on_exec: 1, sample_id_all: 1, exclude_guest: 1
[acme@ssdandy linux]$ perf data convert --to-ctf=./ctf-data/
[ perf data convert: Converted 'perf.data' into CTF data './ctf-data/' ]
[ perf data convert: Converted and wrote 0.009 MB (88 samples) ]
[acme@ssdandy linux]$ babeltrace ./ctf-data/
[23:48:47.557933780] (+?.?????????) raw_syscalls:sys_exit: { }, { perf_ip = 0xFFFFFFFF81020FBA, perf_tid = 5093, perf_pid = 5093, perf_id = 1512, perf_cpu = 3, perf_period = 1 }
[23:48:47.557957461] (+0.000023681) raw_syscalls:sys_enter: { }, { perf_ip = 0xFFFFFFFF81020EA6, perf_tid = 5093, perf_pid = 5093, perf_id = 1504, perf_cpu = 3, perf_period = 1 }
[23:48:47.557958406] (+0.000000945) raw_syscalls:sys_exit: { }, { perf_ip = 0xFFFFFFFF81020FBA, perf_tid = 5093, perf_pid = 5093, perf_id = 1512, perf_cpu = 3, perf_period = 1 }
[23:48:47.557973567] (+0.000015161) raw_syscalls:sys_enter: { }, { perf_ip = 0xFFFFFFFF81020EA6, perf_tid = 5093, perf_pid = 5093, perf_id = 1504, perf_cpu = 3, perf_period = 1 }
[23:48:47.557976047] (+0.000002480) raw_syscalls:sys_exit: { }, { perf_ip = 0xFFFFFFFF81020FBA, perf_tid = 5093, perf_pid = 5093, perf_id = 1512, perf_cpu = 3, perf_period = 1 }
[23:48:47.557985774] (+0.000009727) raw_syscalls:sys_enter: { }, { perf_ip = 0xFFFFFFFF81020EA6, perf_tid = 5093, perf_pid = 5093, perf_id = 1504, perf_cpu = 3, perf_period = 1 }
[23:48:47.557990826] (+0.000005052) raw_syscalls:sys_exit: { }, { perf_ip = 0xFFFFFFFF81020FBA, perf_tid = 5093, perf_pid = 5093, perf_id = 1512, perf_cpu = 3, perf_period = 1 }
<SNIP>

But then I apply this patch (convert tracepoint events fields into CTF event fields) and:

[acme@ssdandy linux]$ perf data convert --to-ctf=./ctf-data/
[ perf data convert: Converted 'perf.data' into CTF data './ctf-data/' ]
[ perf data convert: Converted and wrote 0.009 MB (88 samples) ]
[acme@ssdandy linux]$ babeltrace ./ctf-data/
[error] Packet size (18446744073709551615 bits) is larger than remaining file size (262144 bits).
[error] Stream index creation error.
[error] Open file stream error.
[warning] [Context] Cannot open_trace of format ctf at path ./ctf-data.
[warning] [Context] cannot open trace "./ctf-data" from ./ctf-data/ for reading.
[error] Cannot open any trace for reading.

[error] opening trace "./ctf-data/" for reading.

[error] none of the specified trace paths could be opened.

[acme@ssdandy linux]$

It stops working.

[acme@ssdandy linux]$ ls -la ctf-data/
total 44
drwxrwx---.  2 acme acme    41 Fev 25 16:12 .
drwxrwxr-x. 28 acme acme  4096 Fev 25 16:19 ..
-rw-rw----.  1 acme acme  4666 Fev 25 16:21 metadata
-rw-rw----.  1 acme acme 32768 Fev 25 16:21 perf_stream_0
[acme@ssdandy linux]$

Can you try to reproduce this? The ctf-data/metadata file is below:

- Arnaldo

[acme@ssdandy linux]$ cat ctf-data/metadata 
/* CTF 1.8 */

trace {
	major = 1;
	minor = 8;
	uuid = "8b5ba0f6-f29f-4adc-bf12-1fc8e9afec5f";
	byte_order = le;
	packet.header := struct {
		integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } magic;
		integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } uuid[16];
		integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } stream_id;
	} align(8);
};

env {
	host = "ssdandy.ghostprotocols.net";
	sysname = "Linux";
	release = "3.10.0-210.el7.x86_64";
	version = "3.19.rc7.gd15174";
	machine = "x86_64";
	domain = "kernel";
	tracer_name = "perf";
};

clock {
	name = perf_clock;
	uuid = "b2bfe13f-06ed-4ef6-a3cd-fb0f28c6c608";
	description = "perf clock";
	freq = 1000000000;
	precision = 10;
	offset_s = 0;
	offset = 0;
	absolute = FALSE;
};

stream {
	id = 0;
	event.header := struct {
		integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } id;
		integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; map = clock.perf_clock.value; } timestamp;
	} align(8);

	packet.context := struct {
		integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } timestamp_begin;
		integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } timestamp_end;
		integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } content_size;
		integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } packet_size;
		integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } events_discarded;
	} align(8);
};

event {
	name = "raw_syscalls:sys_enter";
	id = 0;
	stream_id = 0;
	fields := struct {
		integer { size = 64; align = 1; signed = false; encoding = none; base = hexadecimal; byte_order = le; } perf_ip;
		integer { size = 32; align = 1; signed = true; encoding = none; base = decimal; byte_order = le; } perf_tid;
		integer { size = 32; align = 1; signed = true; encoding = none; base = decimal; byte_order = le; } perf_pid;
		integer { size = 64; align = 1; signed = false; encoding = none; base = decimal; byte_order = le; } perf_id;
		integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = le; } perf_cpu;
		integer { size = 64; align = 1; signed = false; encoding = none; base = decimal; byte_order = le; } perf_period;
		integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = le; } common_type;
		integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = le; } common_flags;
		integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = le; } common_preempt_count;
		integer { size = 32; align = 1; signed = true; encoding = none; base = decimal; byte_order = le; } common_pid;
		integer { size = 64; align = 1; signed = true; encoding = none; base = decimal; byte_order = le; } id;
		string { encoding = UTF8; } args;
	} align(8);
};

event {
	name = "raw_syscalls:sys_exit";
	id = 1;
	stream_id = 0;
	fields := struct {
		integer { size = 64; align = 1; signed = false; encoding = none; base = hexadecimal; byte_order = le; } perf_ip;
		integer { size = 32; align = 1; signed = true; encoding = none; base = decimal; byte_order = le; } perf_tid;
		integer { size = 32; align = 1; signed = true; encoding = none; base = decimal; byte_order = le; } perf_pid;
		integer { size = 64; align = 1; signed = false; encoding = none; base = decimal; byte_order = le; } perf_id;
		integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = le; } perf_cpu;
		integer { size = 64; align = 1; signed = false; encoding = none; base = decimal; byte_order = le; } perf_period;
		integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = le; } common_type;
		integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = le; } common_flags;
		integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = le; } common_preempt_count;
		integer { size = 32; align = 1; signed = true; encoding = none; base = decimal; byte_order = le; } common_pid;
		integer { size = 64; align = 1; signed = true; encoding = none; base = decimal; byte_order = le; } id;
		integer { size = 64; align = 1; signed = true; encoding = none; base = decimal; byte_order = le; } ret;
	} align(1);
};

[acme@ssdandy linux]$

  reply	other threads:[~2015-02-25 21:49 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-20 22:16 [PATCHv5 00/11] perf tools: Add perf data CTF conversion Jiri Olsa
2015-02-20 22:16 ` [PATCH 01/11] perf tools: Add feature check for libbabeltrace Jiri Olsa
2015-02-26 11:35   ` [tip:perf/core] " tip-bot for Jiri Olsa
2015-02-28  9:25     ` Ingo Molnar
2015-02-28 12:28       ` Jiri Olsa
2015-02-20 22:16 ` [PATCH 02/11] perf tools: Add new perf data command Jiri Olsa
2015-02-26 11:36   ` [tip:perf/core] perf tools: Add new 'perf data' command tip-bot for Jiri Olsa
2015-02-20 22:17 ` [PATCH 03/11] perf data: Add perf data to CTF conversion support Jiri Olsa
2015-02-26 11:36   ` [tip:perf/core] " tip-bot for Jiri Olsa
2015-02-20 22:17 ` [PATCH 04/11] perf data: Add a 'perf' prefix to the generic fields Jiri Olsa
2015-02-26 11:36   ` [tip:perf/core] " tip-bot for Sebastian Andrzej Siewior
2015-02-20 22:17 ` [PATCH 05/11] perf data: Add tracepoint events fields CTF conversion support Jiri Olsa
2015-02-25 19:23   ` Arnaldo Carvalho de Melo [this message]
2015-03-01 13:20     ` Jiri Olsa
2015-03-02 15:32       ` Arnaldo Carvalho de Melo
2015-03-09 12:12         ` Jiri Olsa
2015-03-09 21:51           ` Arnaldo Carvalho de Melo
2015-03-09 23:11             ` Arnaldo Carvalho de Melo
2015-03-09 23:28               ` Arnaldo Carvalho de Melo
2015-03-10 12:00                 ` [PATCH] perf build: Fix libbabeltrace detection Jiri Olsa
2015-03-10 14:01                   ` Arnaldo Carvalho de Melo
2015-03-10 14:11                     ` Jiri Olsa
2015-03-10 14:44                       ` Jérémie Galarneau
2015-03-10 15:01                         ` Arnaldo Carvalho de Melo
2015-03-26  9:25                         ` Jiri Olsa
2015-03-26 15:05                           ` Arnaldo Carvalho de Melo
2015-03-10 15:03                       ` Arnaldo Carvalho de Melo
2015-03-10 16:04                       ` Arnaldo Carvalho de Melo
2015-03-11  8:45                         ` Jiri Olsa
2015-03-11 13:18                           ` Arnaldo Carvalho de Melo
2015-03-14  7:03                   ` [tip:perf/core] " tip-bot for Jiri Olsa
2015-03-14  7:07   ` [tip:perf/core] perf data: Add tracepoint events fields CTF conversion support tip-bot for Sebastian Andrzej Siewior
2015-02-20 22:17 ` [PATCH 06/11] perf data: Switch to multiple cpu stream files Jiri Olsa
2015-03-12 11:37   ` Wang Nan
2015-03-12 12:34     ` Jiri Olsa
2015-03-12 13:40       ` Wang Nan
2015-03-12 19:17         ` Arnaldo Carvalho de Melo
2015-03-12 19:59           ` Jérémie Galarneau
2015-03-13  6:02             ` Wang Nan
2015-03-13 16:46           ` Jérémie Galarneau
2015-02-20 22:17 ` [PATCH 07/11] perf data: Enable stream flush within processing Jiri Olsa
2015-02-20 22:17 ` [PATCH 08/11] perf data: Add support for setting ordered_events queue size Jiri Olsa
2015-02-20 22:17 ` [PATCH 09/11] tools lib traceevent: Add alias field to struct format_field Jiri Olsa
2015-02-24 22:54   ` Steven Rostedt
2015-02-24 23:12     ` Jiri Olsa
2015-02-20 22:17 ` [PATCH 10/11] perf data: Fix duplicate field names and avoid reserved keywords Jiri Olsa
2015-02-20 22:17 ` [PATCH 11/11] perf data: Fix signess of value Jiri Olsa
  -- strict thread matches above, loose matches on Subject: below --
2015-01-30 10:42 [PATCHv4 00/11] perf tools: Add perf data CTF conversion Jiri Olsa
2015-01-30 10:42 ` [PATCH 05/11] perf data: Add tracepoint events fields CTF conversion support Jiri Olsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150225192344.GH18705@kernel.org \
    --to=acme@redhat.com \
    --cc=bigeasy@linutronix.de \
    --cc=dsahern@gmail.com \
    --cc=fweisbec@gmail.com \
    --cc=jgalar@efficios.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@gmail.com \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=tzanussi@gmail.com \
    --cc=wangnan0@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).