From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0FD45C55189 for ; Wed, 22 Apr 2020 11:44:56 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BCE1C2077D for ; Wed, 22 Apr 2020 11:44:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="DgbjGOI8"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="guEBXDyA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BCE1C2077D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HK9ztsr84jaVnOvZ0lhVcuy40xmd/5fTGIOB8TvgwhM=; b=DgbjGOI8/7YU91 WSsI3ADOQQoSXBRuOgMuDvrlOTpi7Vr8P0e2hYF/fbnWAECIM2/Nv08zwzMbOBLrRa5wTDgu2ZZyS rBlDwu0jw4s24OnH/dvTA/0DvoVedOvU+PLO5n7jRL1OyAvFKt2L8maFw36xs5f4XkEaSvSR58X7O 0tFCk82acAcdQjrR0QJurcohQsoa8gGU6AmobOPB9W/ZQO/J14WoIdRL6Iax6KuuoLcNASTKNpfHD 3rHW3H+MHnnWXhVZizh/oqC7CrKEWZi0zJGex+gZSCOD1QYhqUz2KNYqMXIdplXT4sa0jYPMgEMoz Z0UoE5zlyMSVzk8GWasQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jRDoB-0006oT-N2; Wed, 22 Apr 2020 11:44:51 +0000 Received: from us-smtp-1.mimecast.com ([207.211.31.81] helo=us-smtp-delivery-1.mimecast.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jRDo9-0006n0-56 for linux-arm-kernel@lists.infradead.org; Wed, 22 Apr 2020 11:44:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587555887; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xYjsgPTBbEllvea9H8SobRIIj2A4KdZWTwT6pRyZnis=; b=guEBXDyAw8r58vc6D46YXpsEiBZYE6RrfxEBm2LGZRug1Y4xt+VG4WgE2EwJcQdnKFV50q 2NL4ldb5YYB9fa9qaqpHDR2HlPdIIoUhdzrMo7ZHnBCmXSV7KJkgsDJjhH9XhUeYwIr9/i o4n/MNyiftD4ii311lwLVS+oKdex3Lk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-261-aTGTmnOjNNKKlr6hVs-fwg-1; Wed, 22 Apr 2020 07:44:45 -0400 X-MC-Unique: aTGTmnOjNNKKlr6hVs-fwg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9C8D910139AC; Wed, 22 Apr 2020 11:44:42 +0000 (UTC) Received: from krava (unknown [10.40.196.43]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 67234101E58A; Wed, 22 Apr 2020 11:44:39 +0000 (UTC) Date: Wed, 22 Apr 2020 13:44:32 +0200 From: Jiri Olsa To: John Garry Subject: Re: [RFC PATCH v2 10/13] perf metricgroup: Split up metricgroup__add_metric() Message-ID: <20200422114432.GH962614@krava> References: <1587120084-18990-1-git-send-email-john.garry@huawei.com> <1587120084-18990-11-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1587120084-18990-11-git-send-email-john.garry@huawei.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200422_044449_270550_307C0109 X-CRM114-Status: GOOD ( 11.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, irogers@google.com, ak@linux.intel.com, qiangqing.zhang@nxp.com, peterz@infradead.org, robin.murphy@arm.com, linuxarm@huawei.com, acme@kernel.org, linux-kernel@vger.kernel.org, zhangshaokun@hisilicon.com, alexander.shishkin@linux.intel.com, mingo@redhat.com, namhyung@kernel.org, will@kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Apr 17, 2020 at 06:41:21PM +0800, John Garry wrote: SNIP > static int metricgroup__add_metric(const char *metric, struct strbuf *events, > struct list_head *group_list) > { > @@ -502,37 +542,12 @@ static int metricgroup__add_metric(const char *metric, struct strbuf *events, > break; > if (!pe->metric_expr) > continue; > - if (match_metric(pe->metric_group, metric) || > - match_metric(pe->metric_name, metric)) { > - const char **ids; > - int idnum; > - struct egroup *eg; > - > - pr_debug("metric expr %s for %s\n", pe->metric_expr, pe->metric_name); > > - if (expr__find_other(pe->metric_expr, > - NULL, &ids, &idnum) < 0) > - continue; > - if (events->len > 0) > - strbuf_addf(events, ","); > - > - if (metricgroup__has_constraint(pe)) > - metricgroup__add_metric_non_group(events, ids, idnum); > - else > - metricgroup__add_metric_weak_group(events, ids, idnum); > - > - eg = malloc(sizeof(struct egroup)); > - if (!eg) { > - ret = -ENOMEM; > - break; > - } > - eg->ids = ids; > - eg->idnum = idnum; > - eg->metric_name = pe->metric_name; > - eg->metric_expr = pe->metric_expr; > - eg->metric_unit = pe->unit; > - list_add_tail(&eg->nd, group_list); > - ret = 0; also this place got changed just recently a lot, so you might want to rebase to the Arnaldo's latest perf/core jirka > + if (match_pe_metric(pe, metric)) { > + ret = metricgroup__add_metric_pmu_event(pe, events, > + group_list); > + if (ret) > + return ret; > } > } > return ret; > -- > 2.16.4 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel