Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752341AbbDTT7I (ORCPT ); Mon, 20 Apr 2015 15:59:08 -0400 Received: from mail.kernel.org ([198.145.29.136]:35983 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750998AbbDTT7F (ORCPT ); Mon, 20 Apr 2015 15:59:05 -0400 Date: Mon, 20 Apr 2015 16:58:54 -0300 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: David Ahern , Frederic Weisbecker , He Kuang , Ingo Molnar , Jeremie Galarneau , Namhyung Kim , Paul Mackerras , Peter Zijlstra , Sebastian Andrzej Siewior , Tom Zanussi , Wang Nan , lkml Subject: Re: [PATCH 2/7] perf data: Switch to multiple cpu stream files Message-ID: <20150420195854.GJ11111@kernel.org> References: <1429372220-6406-1-git-send-email-jolsa@kernel.org> <1429372220-6406-3-git-send-email-jolsa@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1429372220-6406-3-git-send-email-jolsa@kernel.org> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6486 Lines: 110 Em Sat, Apr 18, 2015 at 05:50:15PM +0200, Jiri Olsa escreveu: > From: Sebastian Andrzej Siewior > > Currently we store the data into single data strea/file. The cpu > if data is stored within the event sample. The lttng puts the CPU > number that belongs to the event into the packet context instead > into the event. > > This patch makes sure that the trace produce by perf does look the > same way. We now use one stream per-CPU. Having it all in one stream > increased the total size of the resulting file. The test went from > 416KiB (with perf_cpu event member) to 24MiB due to the required > (and pointless) flush. With the per-cpu streams the total size went > up to 588KiB. > > Signed-off-by: Sebastian Andrzej Siewior > Link: http://lkml.kernel.org/n/tip-fco07vxi6yx4m9et2aimm4u0@git.kernel.org > Signed-off-by: Jiri Olsa With latest babeltrace.git: [acme@zoo babeltrace]$ git log --oneline | head -1 48d711a204f6 Fix: Missing stdint.h in stream-class.h But I noticed I have this installed, as well: [acme@zoo babeltrace]$ rpm -qa | grep babeltr libbabeltrace-1.2.1-1.fc20.x86_64 [acme@zoo babeltrace]$ But: [acme@zoo babeltrace]$ ldd ~/bin/perf | grep babeltrace libbabeltrace-ctf.so.1 => /opt/libbabeltrace/lib/libbabeltrace-ctf.so.1 (0x00007fb52713b000) libbabeltrace.so.1 => /opt/libbabeltrace/lib/libbabeltrace.so.1 (0x00007fb526889000) [acme@zoo babeltrace]$ Will try removing the rpm as well... [acme@zoo linux]$ perf data convert --to-ctf=ctf perf: event-types.c:1855: bt_ctf_field_type_set_native_byte_order: Assertion `byte_order == 1234 || byte_order == 4321' failed. Aborted (core dumped) [acme@zoo linux]$ Core was generated by `perf data convert --to-ctf=ctf'. Program terminated with signal SIGABRT, Aborted. #0 0x00007f843378a877 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 56 return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig); Missing separate debuginfos, use: debuginfo-install bzip2-libs-1.0.6-9.fc20.x86_64 libunwind-1.1-3.fc20.x86_64 libuuid-2.24.2-2.fc20.x86_64 nss-softokn-freebl-3.18.0-1.fc20.x86_64 numactl-libs-2.0.9-2.fc20.x86_64 popt-1.16-2.fc20.x86_64 python-libs-2.7.5-15.fc20.x86_64 slang-2.2.4-11.fc20.x86_64 xz-libs-5.1.2-12alpha.fc20.x86_64 (gdb) bt #0 0x00007f843378a877 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #1 0x00007f843378bf68 in __GI_abort () at abort.c:89 #2 0x00007f84337837d6 in __assert_fail_base (fmt=0x7f84338d0ce8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x7f8432b3f510 "byte_order == 1234 || byte_order == 4321", file=file@entry=0x7f8432b3f3ba "event-types.c", line=line@entry=1855, function=function@entry=0x7f8432b3f540 <__PRETTY_FUNCTION__.12860> "bt_ctf_field_type_set_native_byte_order") at assert.c:92 #3 0x00007f8433783882 in __GI___assert_fail (assertion=assertion@entry=0x7f8432b3f510 "byte_order == 1234 || byte_order == 4321", file=file@entry=0x7f8432b3f3ba "event-types.c", line=line@entry=1855, function=function@entry=0x7f8432b3f540 <__PRETTY_FUNCTION__.12860> "bt_ctf_field_type_set_native_byte_order") at assert.c:101 #4 0x00007f8432b313fa in bt_ctf_field_type_set_native_byte_order (type=, byte_order=) at event-types.c:1855 #5 0x00007f8432b32c09 in bt_ctf_stream_class_freeze (stream_class=0x23a5b50) at stream-class.c:478 #6 0x00007f8432b2ce75 in bt_ctf_event_create (event_class=event_class@entry=0x23aabc0) at event.c:324 #7 0x00000000004e71bd in process_sample_event (tool=0x7ffe2413eaa0, _event=, sample=0x7ffe2413e650, evsel=0x23a9eb0, machine=) at util/data-convert-bt.c:518 #8 0x00000000004b0b35 in perf_evlist__deliver_sample (machine=0x23a92e0, evsel=0x23a9eb0, sample=0x7ffe2413e650, event=0x7f84360962b0, tool=0x7ffe2413eaa0, evlist=0x23a94d0) at util/session.c:883 #9 machines__deliver_event (file_offset=, tool=, sample=0x7ffe2413e650, event=, evlist=, machines=) at util/session.c:920 #10 ordered_events__deliver_event (oe=, event=) at util/session.c:108 #11 0x00000000004b4e54 in __ordered_events__flush (oe=0x23a9410) at util/ordered-events.c:207 #12 ordered_events__flush (oe=oe@entry=0x23a9410, how=how@entry=OE_FLUSH__FINAL) at util/ordered-events.c:271 #13 0x00000000004b3ad8 in __perf_session__process_events (file_size=18224, data_size=, data_offset=, session=0x23a9220) at util/session.c:1404 #14 perf_session__process_events (session=session@entry=0x23a9220) at util/session.c:1422 #15 0x00000000004e81db in bt_convert__perf2ctf (input=, path=0x7ffe241402ff "ctf", force=) at util/data-convert-bt.c:995 #16 0x00000000004497c5 in cmd_data_convert (argc=, argv=, prefix=) at builtin-data.c:81 #17 0x0000000000472165 in run_builtin (p=p@entry=0x838640 , argc=argc@entry=3, argv=argv@entry=0x7ffe2413f190) at perf.c:370 #18 0x000000000041e660 in handle_internal_command (argv=0x7ffe2413f190, argc=3) at perf.c:429 #19 run_argv (argv=0x7ffe2413ef10, argcp=0x7ffe2413ef1c) at perf.c:473 #20 main (argc=3, argv=0x7ffe2413f190) at perf.c:588 (gdb) [acme@zoo linux]$ ls -la ctf total 60 drwxrwx---. 2 acme acme 4096 Abr 20 11:57 . drwxrwxr-x. 30 acme acme 20480 Abr 20 16:54 .. -rw-rw----. 1 acme acme 0 Abr 20 16:54 metadata -rw-rw----. 1 acme acme 32768 Abr 20 16:49 perf_stream_0 [acme@zoo linux]$ babeltrace ctf [warning] Ill-shapen or missing "/* CTF x.y" header for text-only metadata. [warning] Unsupported CTF specification version 32547.6313276. Trying anyway. [error] at line 1: token "": syntax error, unexpected $end [error] Error creating AST [warning] Unable to open trace metadata for path "ctf". [warning] [Context] Cannot open_trace of format ctf at path ctf. [warning] [Context] cannot open trace "ctf" from ctf for reading. [error] Cannot open any trace for reading. [error] opening trace "ctf" for reading. [error] none of the specified trace paths could be opened. [acme@zoo linux]$ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/