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=-8.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 CC759C433B4 for ; Thu, 8 Apr 2021 12:08:18 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 65F1361041 for ; Thu, 8 Apr 2021 12:08:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 65F1361041 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+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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc: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=oPzQQIoi+8n73dwyU9gC1bXHzHZykXC99Fw9Hjd4J7Y=; b=m3OlUlzi8zpHR+b0pA929UjOr X0xPvMr8oPsdsLfH4H1xgJ6t2gEhdy7OXzISr7U6oIcAqBvhe8p8C2x8zmO1fYioqAry24oXKkdaU 1q3Q1YMi5KxhCkP5c7S0vIyttaoQ6/r5DlnrHx76qOtzk7+HaSNIQU0U4+LEJwEjs6LjdNyNC/YM0 w711MlEzF91hY5ORg0DmjCc+fKv5hW6O6F0/eqXtgAorGvyWn+PFThpVcTHwTEgZCaLJIslqToM4w Nz/DINzqyPegkdNZKYV0EybI3DrL/oAekD2jzUeuUVCjh7U2fZQ4YPbKByMdmeAQnvYRzVxv7ANS8 1uFQoddwQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lUTR1-007vhn-An; Thu, 08 Apr 2021 12:06:55 +0000 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lUTQx-007vh8-Q4 for linux-arm-kernel@lists.infradead.org; Thu, 08 Apr 2021 12:06:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617883609; 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=C1ksmh0ZYVbZk0BfBh8hLJNAW3D6nuEpsDYgFrymK3Q=; b=bk6hZZ23ZiEj67TIBS3qZsotCSPpMzFbrnP3zRnqukHfwF2pHsP63m8rmTXXyQnkLguE47 B02AkvmbxbaZk2YGCbQxWvn5gIflXnfJPkgyiC/HB+C/3a4L8qp1rkPo91dcdVkIwL8epI 1kNSpUZkRlDkJggqJV44ELolOtjeFrc= 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-496-4oluOfOBN_qKqg-bGXcWMQ-1; Thu, 08 Apr 2021 08:06:45 -0400 X-MC-Unique: 4oluOfOBN_qKqg-bGXcWMQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B3A82189C441; Thu, 8 Apr 2021 12:06:42 +0000 (UTC) Received: from krava (unknown [10.40.195.201]) by smtp.corp.redhat.com (Postfix) with SMTP id 48DF560636; Thu, 8 Apr 2021 12:06:38 +0000 (UTC) Date: Thu, 8 Apr 2021 14:06:37 +0200 From: Jiri Olsa To: John Garry Cc: will@kernel.org, mathieu.poirier@linaro.org, leo.yan@linaro.org, peterz@infradead.org, mingo@redhat.com, acme@kernel.org, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, namhyung@kernel.org, irogers@google.com, linuxarm@huawei.com, kjain@linux.ibm.com, kan.liang@linux.intel.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, zhangshaokun@hisilicon.com, pc@us.ibm.com Subject: Re: [PATCH v3 0/6] perf arm64 metricgroup support Message-ID: References: <1617791570-165223-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1617791570-165223-1-git-send-email-john.garry@huawei.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210408_130652_121145_E063FDC9 X-CRM114-Status: GOOD ( 17.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Apr 07, 2021 at 06:32:44PM +0800, John Garry wrote: > This series contains support to get basic metricgroups working for > arm64 CPUs. > > Initial support is added for HiSilicon hip08 platform. > > Some sample usage on Huawei D06 board: > > $ ./perf list metric > > List of pre-defined events (to be used in -e): > > Metrics: > > bp_misp_flush > [BP misp flush L3 topdown metric] > branch_mispredicts > [Branch mispredicts L2 topdown metric] > core_bound > [Core bound L2 topdown metric] > divider > [Divider L3 topdown metric] > exe_ports_util > [EXE ports util L3 topdown metric] > fetch_bandwidth_bound > [Fetch bandwidth bound L2 topdown metric] > fetch_latency_bound > [Fetch latency bound L2 topdown metric] > fsu_stall > [FSU stall L3 topdown metric] > idle_by_icache_miss > > $ sudo ./perf stat -v -M core_bound sleep 1 > Using CPUID 0x00000000480fd010 > metric expr (exe_stall_cycle - (mem_stall_anyload + armv8_pmuv3_0@event\=0x7005@)) / cpu_cycles for core_bound > found event cpu_cycles > found event armv8_pmuv3_0/event=0x7005/ > found event exe_stall_cycle > found event mem_stall_anyload > adding {cpu_cycles -> armv8_pmuv3_0/event=0x7001/ > mem_stall_anyload -> armv8_pmuv3_0/event=0x7004/ > Control descriptor is not initialized > cpu_cycles: 989433 385050 385050 > armv8_pmuv3_0/event=0x7005/: 19207 385050 385050 > exe_stall_cycle: 900825 385050 385050 > mem_stall_anyload: 253516 385050 385050 > > Performance counter stats for 'sleep': > > 989,433 cpu_cycles # 0.63 core_bound > 19,207 armv8_pmuv3_0/event=0x7005/ > 900,825 exe_stall_cycle > 253,516 mem_stall_anyload > > 0.000805809 seconds time elapsed > > 0.000875000 seconds user > 0.000000000 seconds sys > > perf stat --topdown is not supported, as this requires the CPU PMU to > expose (alias) events for the TopDown L1 metrics from sysfs, which arm > does not do. To get that to work, we probably need to make perf use the > pmu-events cpumap to learn about those alias events. > > Metric reuse support is added for pmu-events parse metric testcase. > This had been broken on power9 recently: > https://lore.kernel.org/lkml/20210324015418.GC8931@li-24c3614c-2adc-11b2-a85c-85f334518bdb.ibm.com/ > > Differences to v2: > - Add TB and RB tags (Thanks!) > - Rename metricgroup__find_metric() from metricgroup_find_metric() > - Change resolve_metric_simple() to rescan after any insert Acked-by: Jiri Olsa thanks, jirka _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel