Return-Path: Date: Fri, 16 Jan 2015 09:14:28 +0100 From: Jiri Olsa Message-ID: <20150116081428.GA22505@krava.brq.redhat.com> References: <54B8A03D.3050508@huawei.com> <54B8C3D5.9010809@voxpopuli.im> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <54B8C3D5.9010809@voxpopuli.im> Subject: Re: [diamon-discuss] [BUG] perf data convert to ctf fail. List-Id: DiaMon diagnostic and monitoring workgroup general discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexandre Montplaisir Cc: "diamon-discuss@lists.linuxfoundation.org" , Li Zefan , Jiri Olsa On Fri, Jan 16, 2015 at 02:55:01AM -0500, Alexandre Montplaisir wrote: > Hi Wang, >=20 > I can reproduce your issue, using Babeltrace commit 36336d933 (from Jan > 6th). I had it working at some point before, so there must have been some > changes to the Babeltrace API since then. >=20 > If I update to Babeltrace master (9f476966), I then hit > https://bugs.lttng.org/issues/874 . Fixing it manually I can get it > building, but then the "perf data convert" command now fails with a new > error: >=20 > perf data convert --to-ctf=3D./ctf > perf: event.c:292: bt_ctf_event_create: Assertion > `event_class->stream_class->event_header_type' failed. > Aborted hum, haven't seen this one before.. I'll check with latest babeltrace >=20 > I've CC'ed Mathieu and J=E9r=E9mie, perhaps they can give us some pointer= s as to > what should be updated in the perf patch set? >=20 > Cheers, > Alex >=20 >=20 > On 2015-01-16 12:23 AM, Wang Nan wrote: > >Hi Jiri Olsa, > > > >We are working on your perf convert to ctf patches and trying to > >convert perf.data into CTF trace. By introducing 8 patches from your > >repository (the last 8 patches of branch perf/core_ctf_convert) we can > >use 'perf data convert --to-ctf' command. However, it doesn't work prope= rly: > > > > $ perf record ls > > $ perf data convert --to-ctf ./out.ctf > >close: Bad file descriptor > >Failed to create CTF stream > >[ perf data convert: Converted 'perf.data' into CTF data './out.ctf' ] > >[ perf data convert: Converted and wrote 0.000 MB (1 samples) ] Any chance you're not using proper library? I'm always lazy to properly install that and need to run perf with LD_LIBRARY_PATH set, like: LD_LIBRARY_PATH=3D/opt/libbabeltrace/lib ./perf .... > > > >After some debug we found that the problem raises from libbaleltrace: > >in bt_ctf_writer_create_stream() --> bt_ctf_trace_create_stream(), it tr= ies > >to create a stream from stream_class, but doesn't provide a stream_id. W= hen > >bt_ctf_trace_create_stream() tries to allocate an id for it, the stream_= class > >has been freezed. probably it's some issue wrt the babeltrace changes Alexandre mentioned.. I'll check thanks, jirka