Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2252189ybh; Fri, 17 Jul 2020 13:04:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcQc2kPwYG5GfxPWBGGSAcIzAKWGpdLroVTb6k90xGZPSXipMvcIC5/J/3lI6se4rZOoJw X-Received: by 2002:a50:ccc7:: with SMTP id b7mr11383516edj.9.1595016278756; Fri, 17 Jul 2020 13:04:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595016278; cv=none; d=google.com; s=arc-20160816; b=0tYUUoL/a3hAYXLZC+NMhWfNQKKpY2Aw19f2r02D1cCOc3TzyWzyNQoNer3Sy4gMDQ HD6KD0DQgUzsIBzviRN66Vl+2GpWC8Drjm0eiEk7mLbRvdglWZdQoNQBmejFhLHtjg0j ScoRL3R3aI1dA58r+u8kg5XQlxmAU0pv07KW5SMBGMUYKC4246KYCUCC3an6veNQ1NIf mksr/kHUQN2myeexxDyBJQbet2V+ZGoOuhvyWhLHjZZMP6wb/9zXV46y8gRXt1x8cdsQ xN5++QiGsEBhIZZiDUEUiiUPAFDl60QS4ww0d6u/UWliDhdYbHadgSIWHOlrLfrfVptX PJYg== 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=K/RYPuO7GhkWFUAIxEWg5zqDvxxg8rWVktNICE/3II4=; b=uJInNBvrJnxHnZjTGX7AEExEhazdCpPWRwe2v0usNKlMtbkziUGYpcNKkdLfreeBhb aStwURH3KMfSPV1UzpIFPwnByR+PrFezI6SoMBsmxbFvuhBc2HcPcqV+K0TZU/kQoIwL McFh9YchoeGg7ygYo+y3C7K76dv338Bu6Bjj6VAmn1E5FlsXZlTx4IYzk80WXfoasPLY ub+6NyWMlVFvNE62yzfOn5gzhlN2L8XofNj7mG/R5ZRybHxCBvWYs9W63tJ9Sq70zVxo cld/DkV+MtFfb5KC1ASAErY1WXhV7hU4ZFp2/kPn1jI9ufpEWfRvt81pCoUfQTxtFXOp akqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=i9PQPldo; 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 zn5si6522153ejb.583.2020.07.17.13.04.15; Fri, 17 Jul 2020 13:04:38 -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=i9PQPldo; 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 S1728280AbgGQUEG (ORCPT + 99 others); Fri, 17 Jul 2020 16:04:06 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:50011 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728183AbgGQUEG (ORCPT ); Fri, 17 Jul 2020 16:04:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595016244; 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=K/RYPuO7GhkWFUAIxEWg5zqDvxxg8rWVktNICE/3II4=; b=i9PQPldoz4SQtchZEkgfMK/LqeXgZmoR9NynDeplVFwch7vwpIPJMUtky2E+dmlX8FeFlE bw85b9f251O1f2tvWHYc+LNF0VvGx+fUHh3Uzdg5Bvw4vhu1Q9MdjG2Vi7k6orO8L0QqQT zDAURm4fhCRysrNl8Y6zjK7M3HjKO8s= 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-323-i_3YedoZOfWaUC4xoVIrig-1; Fri, 17 Jul 2020 16:04:02 -0400 X-MC-Unique: i_3YedoZOfWaUC4xoVIrig-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AD62B1085; Fri, 17 Jul 2020 20:04:00 +0000 (UTC) Received: from krava (unknown [10.40.192.79]) by smtp.corp.redhat.com (Postfix) with SMTP id 622AF619C4; Fri, 17 Jul 2020 20:03:56 +0000 (UTC) Date: Fri, 17 Jul 2020 22:03:56 +0200 From: Jiri Olsa To: John Garry Cc: Jiri Olsa , Arnaldo Carvalho de Melo , lkml , Ingo Molnar , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Michael Petlan , Andi Kleen , Kajol Jain , "Paul A. Clarke" , Stephane Eranian , Ian Rogers Subject: Re: [PATCH 00/18] perf metric: Add support to reuse metric Message-ID: <20200717200356.GH528602@krava> References: <20200712132634.138901-1-jolsa@kernel.org> <20200716113200.GD391962@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200716113200.GD391962@krava> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 16, 2020 at 01:32:04PM +0200, Jiri Olsa wrote: SNIP > > > --- > > > Jiri Olsa (18): > > > perf metric: Rename expr__add_id to expr__add_val > > > perf metric: Add struct expr_id_data to keep expr value > > > perf metric: Add expr__add_id function > > > perf metric: Change expr__get_id to return struct expr_id_data > > > perf metric: Add expr__del_id function > > > perf metric: Add find_metric function > > > perf metric: Add add_metric function > > > perf metric: Rename __metricgroup__add_metric to __add_metric > > > perf metric: Collect referenced metrics in struct metric_ref_node > > > perf metric: Collect referenced metrics in struct metric_expr > > > perf metric: Add referenced metrics to hash data > > > perf metric: Compute referenced metrics > > > perf metric: Add events for the current group > > > perf metric: Add cache_miss_cycles to metric parse test > > > perf metric: Add DCache_L2 to metric parse test > > > perf metric: Add recursion check when processing nested metrics > > > perf metric: Rename struct egroup to metric > > > perf metric: Rename group_list to list > > > > I was thinking that a test metric using this reuse feature could be added in > > pmu-events/arch/test/test_cpu. But since no relevant parsing is done in > > jevents, maybe not a lot of value. Just for a bit more completeness. > > ok, I think it's a good idea actually those tests treats all IDs in metrics as events, so what will happen is that the nested metric ID will be considered as event with assigned value so I don't see too much value to add nested metrics there, I think tests/parse-metric.c will cover all metrics usage jirka