Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2992528ybk; Mon, 18 May 2020 13:03:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0XoHcE2QRH6NVZoAlLk0CZ3q1t97L6kZtBafziwBPzgViNjHs0FgfI9vbCUZsynd23YA7 X-Received: by 2002:a17:906:5795:: with SMTP id k21mr16120484ejq.374.1589832180849; Mon, 18 May 2020 13:03:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589832180; cv=none; d=google.com; s=arc-20160816; b=giqWJzWt1SZk5E+CyI2t87bKGHo+6LPqw502gKl82nBqaU5J9hHS3gVvNOGpVwxCTz ka1dGQVn3SBZgTy8PAHoGHbXeH0RvNwiuhbcclPKRiSkzUDzOzNiXZvyQ87pu05negjY gCm3SXYxTtJtr4lzZXG8Inx5nee21EfzniSx7/7Vm/dUl40BvNnXV/soUUqyUW3Wb44j 8teHMsobjbPIY3GbDyvFpT6srmwyUJ7A8bKdPK1dFvWhIcuyvea2VubSAKp6N5Pkq/jz UnV32OaserTK/9Hdv/yhuY4iEBK9evyCElm6/v1DxiSFHjUL2gEfydFngSFkV8AIi2rT Oulg== 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=aSbxTSPrzIp3VDezJFwJiz6MVH3rgu048cSWIkAJasI=; b=synffdRyQp4cZJW8goWL5+xFxUDR/8w3ZDPsL4c6PkBha55rhuLgo+ePfHOGoIWrGs rOU5bypXp7/91cr+e/tc1JfOFRrcok1u1YlyweE0DKeJb9kyAZgf1aHAxWBRppz4kOLQ h7Eg/e0A7RLHYGUXYeFpgMAdHTMWzTMXWJhzLHkeTRQ5VoKOf4K+iNtjaZzA4zlL2pC9 qYay/J7m/boJXZEj0WdQ1avEsPx4RmdhThqC4AzBQsBa6w79mlk7LFQvJO6Dkak+9ywB AhziT+aMzvA+RL+PUJH+JNhDy8GUVKJazgw7jMbMvlSYCjSKzvIGOvgY9Ia4p/cHN3Cy 61sA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=adk8l2ex; 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 n20si4426967edb.207.2020.05.18.13.02.37; Mon, 18 May 2020 13:03:00 -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=adk8l2ex; 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 S1727939AbgERTVN (ORCPT + 99 others); Mon, 18 May 2020 15:21:13 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:22595 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727066AbgERTVL (ORCPT ); Mon, 18 May 2020 15:21:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589829670; 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=aSbxTSPrzIp3VDezJFwJiz6MVH3rgu048cSWIkAJasI=; b=adk8l2exnkAH5MHyccLDxhPFX/sXNEBoXgE+fmiWXVl6QCudLjw7tX7zU9Q4fquqG5SG39 MDTCqIABGx+k1//3Wbx9lPflK+Zaei5BrelZEPlLxsnQWz1uf7h0RPovOO+zPujZiJOAJi gIiD6jTqPn5zr4wQarQRwATxz4+juk0= 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-190-oqZbrwZPOpKG5KnhHnpyFQ-1; Mon, 18 May 2020 15:21:03 -0400 X-MC-Unique: oqZbrwZPOpKG5KnhHnpyFQ-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 368EF1800D42; Mon, 18 May 2020 19:21:00 +0000 (UTC) Received: from krava (unknown [10.40.192.87]) by smtp.corp.redhat.com (Postfix) with SMTP id 0F45B60BE1; Mon, 18 May 2020 19:20:52 +0000 (UTC) Date: Mon, 18 May 2020 21:20:51 +0200 From: Jiri Olsa To: "Paul A. Clarke" Cc: Ian Rogers , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Namhyung Kim , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , John Fastabend , KP Singh , Kajol Jain , Andi Kleen , John Garry , Jin Yao , Kan Liang , Cong Wang , Kim Phillips , Adrian Hunter , Leo Yan , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, Stephane Eranian , Arnaldo Carvalho de Melo Subject: Re: metric expressions including metrics? Message-ID: <20200518192051.GE11620@krava> References: <20200518191242.GA27634@oc3272150783.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200518191242.GA27634@oc3272150783.ibm.com> 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 Mon, May 18, 2020 at 02:12:42PM -0500, Paul A. Clarke wrote: > I'm curious how hard it would be to define metrics using other metrics, > in the metrics definition files. > > Currently, to my understanding, every metric definition must be an > expresssion based solely on arithmetic combinations of hardware events. > > Some metrics are hierarchical in nature such that a higher-level metric > can be defined as an arithmetic expression of two other metrics, e.g. > > cache_miss_cycles_per_instruction = > data_cache_miss_cycles_per_instruction + > instruction_cache_miss_cycles_per_instruction > > This would need to be defined something like: > dcache_miss_cpi = "dcache_miss_cycles / instructions" > icache_miss_cpi = "icache_miss_cycles / instructions" > cache_miss_cpi = "(dcache_miss_cycles + icache_miss_cycles) / instructions" > > Could the latter definition be simplified to: > cache_miss_cpi = "dcache_miss_cpi + icache_miss_cpi" > > With multi-level caches and NUMA hierarchies, some of these higher-level > metrics can involve a lot of hardware events. > > Given the recent activity in this area, I'm curious if this has been > considered and already on a wish/to-do list, or found onerous. hi, actually we were discussing this with Ian and Stephane and I plan on checking on that.. should be doable, I'll keep you in the loop jirka > > Regards, > Paul Clarke >