Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1405791pxk; Mon, 31 Aug 2020 19:31:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6g54ArbJCkyPSxXLbIdFdWxXNP5hy2WAsdfA+CG6RHOopjFsg1KtGDhpQvOhx0z+dVXOn X-Received: by 2002:a17:906:bb0e:: with SMTP id jz14mr3692594ejb.525.1598927482961; Mon, 31 Aug 2020 19:31:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598927482; cv=none; d=google.com; s=arc-20160816; b=YvwM70yrRnGLTSowauBOlpOmTiPs6VjlzjSKN8nBmpxqNkHpaO4bq/dYKkXWmN9yM/ N2xiGB2pRLzPZL3eTWk062qPfX/JS+kBGpj+H6qO2Eu+GtwpIrbmL9efVaeqDotYUF3o 86ntW8/Dm1Vxw8Ur8e8YRc4d37YwPTN0NDu+s3kT0qohGZ7609V/Z2ebbZchKYVNF4nn sosag9rTuU615B6tst/UsuL1fUH8VXfb2CjUOHXLYL6a0z5RpQuzfh0Cv0j0bKmpQZYu 0dDyG+xhH/ApPkJ1pRd+kkSdpxI/pzVmS2biOLDcq5XEX0R3bVyyfyzjn2hX/zbt8sXN zrHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:ironport-sdr:ironport-sdr; bh=H+7mTU8Ns8VdQ2mVNHBHUR+Soa85LThDS/xPAOYcpIM=; b=rVDmCPdYuklQc3++35Wd8iNgzrG/3eHpebe1FomFwLbiF9TZOELJMPWnuRFyflzS9Q UaneMs+z5eBfOroPjZn5t5U8Yn1QqpPYV4ohM/Trc4ebg5iRkCB+K7TY6bTZUZtxDcRi myKLiIVw4u4Xwj4/Xn8eBG1bYaPmpUMzeNNHoX0TNrV1Eph2vu0m5+dZNahuzxfSCh5b sLzFNbunzaqMGBPdAuaCK5UTyQ+DtgDR/TkEfzIt0ELEFnVTtzaJatZfIEE1BvBnYtqv Y95KTmefvEZEIXeIRNvRQwkH3ble6n+TPBeMtlYXOS1TNcUwkQnM5aXXw2pG39h/YZyw Hy9Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u16si5661788edb.359.2020.08.31.19.30.59; Mon, 31 Aug 2020 19:31:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726174AbgIAC0h (ORCPT + 99 others); Mon, 31 Aug 2020 22:26:37 -0400 Received: from mga18.intel.com ([134.134.136.126]:14968 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725993AbgIAC0h (ORCPT ); Mon, 31 Aug 2020 22:26:37 -0400 IronPort-SDR: rCxMbNQSKXAYSO6A8y0VWI8xbxZF9IcB99nfpyYObpkfObFkBfdUU67mZua9z7FAw57I/uzZls AtshgANks/2A== X-IronPort-AV: E=McAfee;i="6000,8403,9730"; a="144781558" X-IronPort-AV: E=Sophos;i="5.76,377,1592895600"; d="scan'208";a="144781558" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Aug 2020 19:26:36 -0700 IronPort-SDR: qRLDdz7C3t/RrFrPYeGs77BpNajKE8YmXvKlHIqFfXgwP68IvAjfdLNI/2xzAaGDf7k4vHzAyD HWOBmLI40p5Q== X-IronPort-AV: E=Sophos;i="5.76,377,1592895600"; d="scan'208";a="476999946" Received: from yjin15-mobl1.ccr.corp.intel.com (HELO [10.238.5.239]) ([10.238.5.239]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Aug 2020 19:26:31 -0700 Subject: Re: [PATCH v4 1/7] perf util: Create streams To: Jiri Olsa Cc: acme@kernel.org, jolsa@kernel.org, peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, Linux-kernel@vger.kernel.org, ak@linux.intel.com, kan.liang@intel.com, yao.jin@intel.com References: <20200824233513.16930-1-yao.jin@linux.intel.com> <20200824233513.16930-2-yao.jin@linux.intel.com> <20200831135609.GE406859@krava> From: "Jin, Yao" Message-ID: <4cef1f08-e1c1-3227-24f2-be3108ea4d99@linux.intel.com> Date: Tue, 1 Sep 2020 10:26:25 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20200831135609.GE406859@krava> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jiri, On 8/31/2020 9:56 PM, Jiri Olsa wrote: > On Tue, Aug 25, 2020 at 07:35:07AM +0800, Jin Yao wrote: > > SNIP > >> + int nr_streams_max, >> + enum stream_type type) >> +{ >> + struct evsel_streams *es; >> + int nr_evsel = evlist->core.nr_entries, ret = -1; >> + >> + es = create_evsel_streams(nr_evsel, nr_streams_max); >> + if (!es) >> + return NULL; >> + >> + if (type == STREAM_CALLCHAIN) >> + ret = evlist_init_callchain_streams(evlist, es, nr_evsel); >> + >> + if (ret) { >> + free_evsel_streams(es, nr_evsel); >> + return NULL; >> + } >> + >> + return es; >> +} >> diff --git a/tools/perf/util/stream.h b/tools/perf/util/stream.h >> new file mode 100644 >> index 000000000000..a8a0172b4d13 >> --- /dev/null >> +++ b/tools/perf/util/stream.h >> @@ -0,0 +1,30 @@ >> +/* SPDX-License-Identifier: GPL-2.0 */ >> +#ifndef __PERF_STREAM_H >> +#define __PERF_STREAM_H >> + >> +#include "callchain.h" >> + >> +enum stream_type { >> + STREAM_NONE = 0, >> + STREAM_CALLCHAIN > > do you plan to add more types? > > jirka > Thanks for looking at this patch series. So far, no more types in plan. :) Thanks Jin Yao