From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751505AbcFXM3M (ORCPT ); Fri, 24 Jun 2016 08:29:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40140 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751089AbcFXM3K (ORCPT ); Fri, 24 Jun 2016 08:29:10 -0400 Date: Fri, 24 Jun 2016 14:29:07 +0200 From: Jiri Olsa To: Wang Nan Cc: acme@kernel.org, linux-kernel@vger.kernel.org, pi3orama@163.com, lizefan@huawei.com Subject: Re: [PATCH v2 0/7] perf ctf: Convert comm, fork and exit events to CTF Message-ID: <20160624122907.GF10142@krava> References: <1466767332-114472-1-git-send-email-wangnan0@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1466767332-114472-1-git-send-email-wangnan0@huawei.com> User-Agent: Mutt/1.6.1 (2016-04-27) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 24 Jun 2016 12:29:10 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 24, 2016 at 11:22:05AM +0000, Wang Nan wrote: > After converting perf.data to CTF, we lost pid-tid-comm mapping. Which > makes inconvience. For example, in perf script output we know which > process issue an event like this: > > compiz 19361 [001] 3275709.313929: raw_syscalls:sys_exit: NR 7 = 0 > > After converting to CTF, we only get this: > > [3275709.313929985] (+0.110646118) raw_syscalls:sys_exit: { cpu_id = 1 }, { perf_ip = 0xFFFFFFFF8107B2E8, perf_tid = 19361, perf_pid = 19361, perf_id = 18920, perf_period = 1, common_type = 16, common_flags = 0, common_preempt_count = 1, common_pid = 19361, id = 7, ret = 0 } > > Currently, if we want to find the name and parent of a process, we > have to collect 'sched:sched_switch' event. > > This patch set adds a '--all' option to 'perf convert', converts comm, > fork and exit events to CTF output. CTF user now can track the mapping > by their own. > > v1 -> v2: Report number of sample and non-sample events when finish. > rename opts.non_sample to opts.all. > > Wang Nan (7): > perf ctf: Add value_set_string() helper > perf ctf: Pass convert options through opts structure > perf ctf: Add 'all' option > perf ctf: Prepare collect non-sample events > perf ctf: Generate comm event to CTF output > perf ctf: Add '--all' option for 'perf data convert' > perf ctf: Generate fork and exit events to CTF output I can't compile unless I can include config.h [jolsa@krava perf]$ make LIBBABELTRACE_DIR=/opt/libbabeltrace/ LIBBABELTRACE=1 BUILD: Doing 'make -j4' parallel build CC util/data-convert-bt.o util/data-convert-bt.c: In function ‘convert__config’: util/data-convert-bt.c:1299:19: error: implicit declaration of function ‘perf_config_u64’ [-Werror=implicit-function-declaration] c->queue_size = perf_config_u64(var, value); ^ util/data-convert-bt.c:1299:3: error: nested extern declaration of ‘perf_config_u64’ [-Werror=nested-externs] c->queue_size = perf_config_u64(var, value); ^ util/data-convert-bt.c: In function ‘bt_convert__perf2ctf’: util/data-convert-bt.c:1332:2: error: implicit declaration of function ‘perf_config’ [-Werror=implicit-function-declaration] perf_config(convert__config, &c); ^ util/data-convert-bt.c:1332:2: error: nested extern declaration of ‘perf_config’ [-Werror=nested-externs] cc1: all warnings being treated as errors your compiler's not that strict I guess ;-) I'll post it shortly jirka --- diff --git a/tools/perf/util/data-convert-bt.c b/tools/perf/util/data-convert-bt.c index 79082782e7d2..4b68e7b9ee0c 100644 --- a/tools/perf/util/data-convert-bt.c +++ b/tools/perf/util/data-convert-bt.c @@ -26,6 +26,7 @@ #include "evlist.h" #include "evsel.h" #include "machine.h" +#include "config.h" #define pr_N(n, fmt, ...) \ eprintf(n, debug_data_convert, fmt, ##__VA_ARGS__)