From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757082AbcBXLVW (ORCPT ); Wed, 24 Feb 2016 06:21:22 -0500 Received: from szxga01-in.huawei.com ([58.251.152.64]:18384 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752527AbcBXLVT (ORCPT ); Wed, 24 Feb 2016 06:21:19 -0500 From: Wang Nan To: , CC: , Wang Nan , "Arnaldo Carvalho de Melo" , Brendan Gregg , Masami Hiramatsu , Namhyung Kim , "Li Zefan" , Subject: [RFC PATCH 0/2] perf tools: Print bpf-output events in 'perf script' Date: Wed, 24 Feb 2016 11:20:43 +0000 Message-ID: <1456312845-111583-1-git-send-email-wangnan0@huawei.com> X-Mailer: git-send-email 1.8.3.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.107.193.248] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A010204.56CD921E.002C,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 7f4ea7e8da7f52eb16bb631c61a5d037 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnaldo and Jiri, Glad to see the progress we made today. Before you trying libbaleltrace, please consider these two patches, which allows print BPF output data directly through 'perf script'. I think it would be useful for people don't have libbabeltrace ready. With these two patch they can write scripts by their own: # ./perf script usleep 4882 21384.532523: evt: ffffffff810e97d1 sys_nanosleep ([kernel.kallsyms]) BPF output: 0000: 52 61 69 73 65 20 61 20 Raise a 0008: 42 50 46 20 65 76 65 6e BPF even 0010: 74 21 00 00 t!.. BPF string: "Raise a BPF event!" usleep 4882 21384.632606: evt: ffffffff8105c609 kretprobe_trampoline_holder ([kernel.kallsyms BPF output: 0000: 52 61 69 73 65 20 61 20 Raise a 0008: 42 50 46 20 65 76 65 6e BPF even 0010: 74 21 00 00 t!.. BPF string: "Raise a BPF event!" Thank you. Wang Nan (2): perf tools: Make binary data printer code in trace_event public available perf script: Print bpf-output events in 'perf script' tools/perf/builtin-script.c | 93 ++++++++++++++++++++++++++++++++++++++++++--- tools/perf/util/debug.c | 75 +++++++++++++++++++++++------------- tools/perf/util/util.c | 37 ++++++++++++++++++ tools/perf/util/util.h | 20 ++++++++++ 4 files changed, 193 insertions(+), 32 deletions(-) Signed-off-by: Wang Nan Cc: Arnaldo Carvalho de Melo Cc: Brendan Gregg Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Li Zefan Cc: pi3orama@163.com -- 1.8.3.4