Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2305201ybt; Sun, 28 Jun 2020 15:07:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRW0PMY6dZySQSFoIhx6ZnE5b6U0GD/wucnL8mvtGDdPRvz9h+Z9mr/LKQdtn+/pmgmyhd X-Received: by 2002:a17:906:2b52:: with SMTP id b18mr11761833ejg.158.1593382057275; Sun, 28 Jun 2020 15:07:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593382057; cv=none; d=google.com; s=arc-20160816; b=M2G+Hh6Hh0y/AIV/pm3zFZKwF30QaXLJOdp3fZcdCft5ZBlpIXi5Xhy/IgYEqTchxd 7lgwU1dA2bhP3ezrHjBPHLc44slLPgh57HTxNpqBroLJr6483LqpXKK4pkQwsCpEo6aB P2lg3D0OplzN2X1pKzf0jCEeqrN9ropfsJGLjn4e8F07o9Prm3DaCMJSHKYFzch4Woj5 R2uPO7jxxE/Zr9pjc0aK6c2eMWTOQjZYuBrQjxCsN/vOmZxx5J6ygO2byJF1PJkmDmXE OltGd5swXdheiXLKHbV7GQY7Ak52P+L3B9UU1qPJLL5bdo4KrHQVFzuPwpWTC+iDvUlh WN2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=SpuS39ZHyysAFTXqQFaKXgrz4rR7/fTFWJI3d8tjYg4=; b=J1+Bb5VZDLJiv+oJhygBllIze6eWtGzNaX34mnmqkFvGljE0a9bEhvsyoFqz+MvP5s 7Owlv+/FO+aVfQHIC7voSX61LeThGhLz86itmsner4lhFyYe9V4uwi2NHD3RVSuWkPe4 kbuhk7zeAHBTL19dL6l9HaB7HR8/xJ7JLZFavxaUlGx1u/8lMTME1qdXr6iDDBoNu3LL +ANb8xuuTO+7Hb73t2jx5tjVoOKdyzM85Ln0y8yq2pEh4hC42dlZuOisZXGa7PkgOFoy vd4o7ZUfFLEe1RB0KLi3xZjkLgqwcWYyHMVylJhX3YMf45CZlId7Lw7a/bNhBKew1Gj/ IBAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JofmlLCl; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i19si20963549ejd.479.2020.06.28.15.07.14; Sun, 28 Jun 2020 15:07:37 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JofmlLCl; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726443AbgF1WEQ (ORCPT + 99 others); Sun, 28 Jun 2020 18:04:16 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:52687 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726080AbgF1WEQ (ORCPT ); Sun, 28 Jun 2020 18:04:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593381854; 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=SpuS39ZHyysAFTXqQFaKXgrz4rR7/fTFWJI3d8tjYg4=; b=JofmlLCl37WXPo1SgcFHNlrLbT/drLcALD2etIPbvnkgJ1qbUZn6DbRQtgrV5Oy6RaUWPc DQnFV9w45raGjRytOb/P0042xVxyim3yQvlhW1Jp/KFpluGVrS+ZXcjyWzJmj5yYKBkpDo VhxBfED3SWjIOLPRLaJKSlmE/YbUH1Y= 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-313-y_UC1SkyOOqW8X_3a75xOg-1; Sun, 28 Jun 2020 18:04:12 -0400 X-MC-Unique: y_UC1SkyOOqW8X_3a75xOg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C5F368015CB; Sun, 28 Jun 2020 22:04:10 +0000 (UTC) Received: from krava (unknown [10.40.192.56]) by smtp.corp.redhat.com (Postfix) with SMTP id 03067121B6B; Sun, 28 Jun 2020 22:04:07 +0000 (UTC) Date: Mon, 29 Jun 2020 00:04:07 +0200 From: Jiri Olsa To: Ian Rogers Cc: Jiri Olsa , Arnaldo Carvalho de Melo , lkml , Ingo Molnar , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Michael Petlan , Andi Kleen , Kajol Jain , John Garry , "Paul A. Clarke" , Stephane Eranian Subject: Re: [PATCH 06/10] perf tools: Collect other metrics in struct egroup Message-ID: <20200628220407.GQ2988321@krava> References: <20200626194720.2915044-1-jolsa@kernel.org> <20200626194720.2915044-7-jolsa@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 26, 2020 at 02:06:47PM -0700, Ian Rogers wrote: SNIP > > diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c > > index 85e7fa2e2707..f88fd667cc78 100644 > > --- a/tools/perf/util/metricgroup.c > > +++ b/tools/perf/util/metricgroup.c > > @@ -102,12 +102,20 @@ void metricgroup__rblist_exit(struct rblist *metric_events) > > rblist__exit(metric_events); > > } > > > > +struct eother { > > + const char *metric_name; > > + const char *metric_expr; > > + struct list_head list; > > +}; > > + > > struct egroup { > > struct list_head nd; > > struct expr_parse_ctx pctx; > > const char *metric_name; > > const char *metric_expr; > > const char *metric_unit; > > + struct list_head other; > > + int other_cnt; > > int runtime; > > bool has_constraint; > > }; > > Nit, could we do better than egroup and eother for struct names? > egroup are nodes within the metric group with their associated values, > so would metric_group_node be more intention revealing? eother and > other are metrics referred to by the metric_group_node. Presumably the > metrics are on the same list as egroup? Perhaps eother could be > referenced_metrics? ok, how about: struct metric_group_node struct metric_ref jirka