* [diamon-discuss] [BUG] perf-convert-to-ctf fails to dealing with syscalls tracepoints.
@ 2015-01-19 12:12 Wang Nan
2015-01-19 12:59 ` Jiri Olsa
0 siblings, 1 reply; 3+ messages in thread
From: Wang Nan @ 2015-01-19 12:12 UTC (permalink / raw)
To: Jiri Olsa, Jiri Olsa, diamon-discuss@lists.linuxfoundation.org
Hi Jiri,
I found a problem when trying to convert syscalls:* records into ctf:
root@arma15el:~# perf record -a -e syscalls:* sleep 5
[ perf record: Woken up 0 times to write data ]
[ perf record: Captured and wrote 4.571 MB perf.data (~199696 samples) ]
Warning:
Processed 64994 events and lost 1 chunks!
Check IO/CPU overload!
root@arma15el:~# perf data convert --to-ctf ./out.ctf
Failed to add field 'nr
Failed to add event 'syscalls:sys_enter_io_submit'.
root@arma15el:~#
Do you have time to have a look at it?
Moreover, is there (diamon-discuss) right place to discuss things related
your perf-convert-to-ctf patches?
Thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [diamon-discuss] [BUG] perf-convert-to-ctf fails to dealing with syscalls tracepoints.
2015-01-19 12:12 [diamon-discuss] [BUG] perf-convert-to-ctf fails to dealing with syscalls tracepoints Wang Nan
@ 2015-01-19 12:59 ` Jiri Olsa
2015-01-19 15:18 ` Jérémie Galarneau
0 siblings, 1 reply; 3+ messages in thread
From: Jiri Olsa @ 2015-01-19 12:59 UTC (permalink / raw)
To: Wang Nan
Cc: diamon-discuss@lists.linuxfoundation.org,
Sebastian Andrzej Siewior
On Mon, Jan 19, 2015 at 08:12:04PM +0800, Wang Nan wrote:
> Hi Jiri,
>
> I found a problem when trying to convert syscalls:* records into ctf:
>
> root@arma15el:~# perf record -a -e syscalls:* sleep 5
>
> [ perf record: Woken up 0 times to write data ]
> [ perf record: Captured and wrote 4.571 MB perf.data (~199696 samples) ]
> Warning:
> Processed 64994 events and lost 1 chunks!
>
> Check IO/CPU overload!
>
> root@arma15el:~# perf data convert --to-ctf ./out.ctf
> Failed to add field 'nr
> Failed to add event 'syscalls:sys_enter_io_submit'.
> root@arma15el:~#
>
> Do you have time to have a look at it?
>
yea, looks like libbabeltrace do not allow field of same name
in the structure:
---
static
int add_structure_field(GPtrArray *fields,
GHashTable *field_name_to_index,
struct bt_ctf_field_type *field_type,
const char *field_name)
{
int ret = 0;
GQuark name_quark = g_quark_from_string(field_name);
struct structure_field *field;
/* Make sure structure does not contain a field of the same name */
if (g_hash_table_lookup_extended(field_name_to_index,
---
and syscalls:sys_enter_io_submit trcaepoint actually has 'nr' field duplicates:
---
[root@krava events]# cat /sys/kernel/debug/tracing/events/syscalls/sys_enter_io_submit/format
name: sys_enter_io_submit
ID: 720
format:
field:unsigned short common_type; offset:0; size:2; signed:0;
field:unsigned char common_flags; offset:2; size:1; signed:0;
field:unsigned char common_preempt_count; offset:3; size:1; signed:0;
field:int common_pid; offset:4; size:4; signed:1;
field:int nr; offset:8; size:4; signed:1;
field:aio_context_t ctx_id; offset:16; size:8; signed:0;
field:long nr; offset:24; size:8; signed:0;
field:struct iocb * * iocbpp; offset:32; size:8; signed:0;
print fmt: "ctx_id: 0x%08lx, nr: 0x%08lx, iocbpp: 0x%08lx", ((unsigned long)(REC->ctx_id)), ((unsigned long)(REC->nr)), ((unsigned long)(REC->iocbpp))
---
which is PITA ;-)
seems like reasonable request to keep names unique in the structure,
so I think we'll change it on our end (perf data convert) and maybe
add some suffix to duplicates like nr_dupl_X.. (where X = 1,2..)
thoughts?
> Moreover, is there (diamon-discuss) right place to discuss things related
> your perf-convert-to-ctf patches?
lkml is fine (maybe also add linux-perf-users list),
but please add also Sebaastian so he's not missing any fun ;-)
and Jérémie for babeltrace side.. I CC-ed both of them now
thanks,
jirka
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [diamon-discuss] [BUG] perf-convert-to-ctf fails to dealing with syscalls tracepoints.
2015-01-19 12:59 ` Jiri Olsa
@ 2015-01-19 15:18 ` Jérémie Galarneau
0 siblings, 0 replies; 3+ messages in thread
From: Jérémie Galarneau @ 2015-01-19 15:18 UTC (permalink / raw)
To: Jiri Olsa
Cc: Sebastian Andrzej Siewior,
diamon-discuss@lists.linuxfoundation.org
On Mon, Jan 19, 2015 at 7:59 AM, Jiri Olsa <jolsa@redhat.com> wrote:
> On Mon, Jan 19, 2015 at 08:12:04PM +0800, Wang Nan wrote:
>> Hi Jiri,
>>
>> I found a problem when trying to convert syscalls:* records into ctf:
>>
>> root@arma15el:~# perf record -a -e syscalls:* sleep 5
>>
>> [ perf record: Woken up 0 times to write data ]
>> [ perf record: Captured and wrote 4.571 MB perf.data (~199696 samples) ]
>> Warning:
>> Processed 64994 events and lost 1 chunks!
>>
>> Check IO/CPU overload!
>>
>> root@arma15el:~# perf data convert --to-ctf ./out.ctf
>> Failed to add field 'nr
>> Failed to add event 'syscalls:sys_enter_io_submit'.
>> root@arma15el:~#
>>
>> Do you have time to have a look at it?
>>
>
> yea, looks like libbabeltrace do not allow field of same name
> in the structure:
>
> ---
> static
> int add_structure_field(GPtrArray *fields,
> GHashTable *field_name_to_index,
> struct bt_ctf_field_type *field_type,
> const char *field_name)
> {
> int ret = 0;
> GQuark name_quark = g_quark_from_string(field_name);
> struct structure_field *field;
>
> /* Make sure structure does not contain a field of the same name */
> if (g_hash_table_lookup_extended(field_name_to_index,
> ---
>
> and syscalls:sys_enter_io_submit trcaepoint actually has 'nr' field duplicates:
>
> ---
> [root@krava events]# cat /sys/kernel/debug/tracing/events/syscalls/sys_enter_io_submit/format
> name: sys_enter_io_submit
> ID: 720
> format:
> field:unsigned short common_type; offset:0; size:2; signed:0;
> field:unsigned char common_flags; offset:2; size:1; signed:0;
> field:unsigned char common_preempt_count; offset:3; size:1; signed:0;
> field:int common_pid; offset:4; size:4; signed:1;
>
> field:int nr; offset:8; size:4; signed:1;
> field:aio_context_t ctx_id; offset:16; size:8; signed:0;
> field:long nr; offset:24; size:8; signed:0;
> field:struct iocb * * iocbpp; offset:32; size:8; signed:0;
>
> print fmt: "ctx_id: 0x%08lx, nr: 0x%08lx, iocbpp: 0x%08lx", ((unsigned long)(REC->ctx_id)), ((unsigned long)(REC->nr)), ((unsigned long)(REC->iocbpp))
> ---
>
> which is PITA ;-)
>
> seems like reasonable request to keep names unique in the structure,
> so I think we'll change it on our end (perf data convert) and maybe
> add some suffix to duplicates like nr_dupl_X.. (where X = 1,2..)
>
> thoughts?
Just confirming that this is, indeed, the intended behavior.
Regards,
Jérémie
>
>> Moreover, is there (diamon-discuss) right place to discuss things related
>> your perf-convert-to-ctf patches?
>
> lkml is fine (maybe also add linux-perf-users list),
> but please add also Sebaastian so he's not missing any fun ;-)
>
> and Jérémie for babeltrace side.. I CC-ed both of them now
>
> thanks,
> jirka
--
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-01-19 15:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-19 12:12 [diamon-discuss] [BUG] perf-convert-to-ctf fails to dealing with syscalls tracepoints Wang Nan
2015-01-19 12:59 ` Jiri Olsa
2015-01-19 15:18 ` Jérémie Galarneau
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.