Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933147AbbLPL3k (ORCPT ); Wed, 16 Dec 2015 06:29:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37461 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932279AbbLPL3j (ORCPT ); Wed, 16 Dec 2015 06:29:39 -0500 Date: Wed, 16 Dec 2015 12:29:35 +0100 From: Jiri Olsa To: Wang Nan Cc: acme@kernel.org, masami.hiramatsu.pt@hitachi.com, jolsa@kernel.org, linux-kernel@vger.kernel.org, pi3orama@163.com, lizefan@huawei.com, Alexei Starovoitov , Arnaldo Carvalho de Melo , Brendan Gregg , "David S. Miller" , Namhyung Kim Subject: Re: [PATCH v5 12/14] perf data: Support converting data from bpf_perf_event_output() Message-ID: <20151216112935.GB6882@krava.brq.redhat.com> References: <1450089563-122430-1-git-send-email-wangnan0@huawei.com> <1450089563-122430-13-git-send-email-wangnan0@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1450089563-122430-13-git-send-email-wangnan0@huawei.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1179 Lines: 42 On Mon, Dec 14, 2015 at 10:39:21AM +0000, Wang Nan wrote: SNIP > + } > + > + ret = bt_ctf_event_set_payload(event, "raw_data", seq_field); > + if (ret) > + pr_err("failed to set payload for raw_data\n"); > + > +put_seq_field: > + bt_ctf_field_put(seq_field); > +put_seq_type: > + bt_ctf_field_type_put(seq_type); > +put_len_field: > + bt_ctf_field_put(len_field); > +put_len_type: > + bt_ctf_field_type_put(len_type); > + return ret; > +} > + > static int add_generic_values(struct ctf_writer *cw, > struct bt_ctf_event *event, > struct perf_evsel *evsel, > @@ -597,6 +675,13 @@ static int process_sample_event(struct perf_tool *tool, > return -1; > } > > + if ((evsel->attr.type == PERF_TYPE_SOFTWARE) && > + (evsel->attr.config == PERF_COUNT_SW_BPF_OUTPUT)) { seen this condition at least on 3 places, maybe we could add it in: bool perf_evsel__is_bpf_output(struct perf_evsel *evsel); jirka -- 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/