Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp6676108rwl; Wed, 22 Mar 2023 14:00:23 -0700 (PDT) X-Google-Smtp-Source: AK7set+obMlJdC3wxPy8WshOZqy2ajtMQ9Tv9zltDcpufMKyWILRVkfL+y6aHH88nSu26rvG2L67 X-Received: by 2002:a17:906:7b96:b0:925:5549:f81c with SMTP id s22-20020a1709067b9600b009255549f81cmr9742817ejo.6.1679518822910; Wed, 22 Mar 2023 14:00:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679518822; cv=none; d=google.com; s=arc-20160816; b=mEF43/xYr5cOagV1Q8aADKNqwQoK83AD+uw3elUF6F0I76/0KztLn7ul1bXSne361p LQdcuUy3f5bkTty6PwlmW47cgkIdeUUmFLuVhtokQVxjmqWh8cO5lsKBaFE1qDtwI7Qp IeO+hZlc1TnysTH+SFFhH7kGclD5jHwD5TEk+6qH0xcwQe1SIc7JCUytKSw6i6pWYzrm QwMK/xI/PLdDrOVx8UawwVCgwhmomU2VFapFVRH0OKsla1dbc5cuHxWpQ6n0/YgvIbPA HBPGNTh6BcGevXOm+EGH0DcfhB4Ru+cQxYJqV5G9wUf5b293mBRGOssN4Yt6WxvPHbGS wXLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=4wNNT4ymjpl+OssZc2WZr+Lkbp7y6ESGhG5b0HgmHGQ=; b=d29Aay4iuTtjQgp+Ja4Jv/xXa53Jm+eEInS8MONmQCCco0pt4KdtLVWbh1Wgdd6F8D 10VQHlGpn+YkCsvkYd82I/QW92ucNhEUa9wEf/uJw2kP+HKJcF0k/bsD9U9w+P1V+9VP 8WZX0v6wT6oHLMl3BlYd0gqeEgKPjydN6zcYkybcfHfPRmIZ/mOjZOV4zPt3tDRJFRIs w7WDd7GXBov6eKKJ3MsS3267P6KB1Xjp8Im/fIRkDFkNTfujzVHa6c+NQThIDJKplGpV M0L+UzS+WGn1GlxUhLpY9rQx7cOWkSJd5Co7+kjX7K/Yhm6NwZyk4sho0wuTh7Z2/6Ol ze9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qCH6pq7L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g16-20020aa7d1d0000000b004fcbc158671si1720282edp.378.2023.03.22.13.59.57; Wed, 22 Mar 2023 14:00:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qCH6pq7L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231345AbjCVU7k (ORCPT + 99 others); Wed, 22 Mar 2023 16:59:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230478AbjCVU7j (ORCPT ); Wed, 22 Mar 2023 16:59:39 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9203131; Wed, 22 Mar 2023 13:59:37 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 788A262276; Wed, 22 Mar 2023 20:59:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 749F1C433D2; Wed, 22 Mar 2023 20:59:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679518776; bh=87Afl5HnFSF4WgZ+2E0ys+G1g6P6k7cj2A7K/QdCgHY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qCH6pq7L+vFr2CaPWw+ssQd9utvA8fc/5RhttZ0oFWqVntcHd2RlMDRte+CowoGRn O+Y4qSrVHd86VutZAXzZlQWlV0I25bg71lIPH0W6lxqXsKaN3E7SYLgSFZwNAeTABZ V30UbRlxh+JQ7Fw+CB3GM02cul2GVaaw4K+SF4yA6U6Z9kMa4nC1MIsf24HmIK5HUH 8LMGsXJxAMxlEyQCqgEpHQUav9w2RTHTjWe9bpTCzR1Ga2JEQ9yjyezKg7VszN4c7e B8d5r1EiRmGtV90ec96YCs6T9tPbvJfVURw2Hw2cIcbN8y2r8VLMTWB4Oxn7fsJh2G WYN+b92cmLuBg== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 82B164052D; Wed, 22 Mar 2023 17:59:33 -0300 (-03) Date: Wed, 22 Mar 2023 17:59:33 -0300 From: Arnaldo Carvalho de Melo To: Ian Rogers Cc: Thomas Richter , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, sumanthk@linux.ibm.com, svens@linux.ibm.com, gor@linux.ibm.com, hca@linux.ibm.com Subject: Re: [PATCH 2/6] tools/perf/json: Add cache metrics for s390 z16 Message-ID: References: <20230313080201.2440201-1-tmricht@linux.ibm.com> <20230313080201.2440201-2-tmricht@linux.ibm.com> <1ee6884a-2d92-68d9-0917-3ae4f5390714@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, Mar 14, 2023 at 06:36:24PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Tue, Mar 14, 2023 at 09:34:46AM -0700, Ian Rogers escreveu: > > On Tue, Mar 14, 2023 at 1:20 AM Thomas Richter wrote: > > > > > > On 3/13/23 19:33, Arnaldo Carvalho de Melo wrote: > > > > Em Mon, Mar 13, 2023 at 08:22:44AM -0700, Ian Rogers escreveu: > > > >> On Mon, Mar 13, 2023 at 1:30 AM Thomas Richter wrote: > > > >>> > > > >>> Add metrics for s390 z16 > > > >>> - Percentage sourced from Level 2 cache > > > >>> - Percentage sourced from Level 3 on same chip cache > > > >>> - Percentage sourced from Level 4 Local cache on same book > > > >>> - Percentage sourced from Level 4 Remote cache on different book > > > >>> - Percentage sourced from memory > > > >>> > > > >>> For details about the formulas see this documentation: > > > >>> https://www.ibm.com/support/pages/system/files/inline-files/CPU%20MF%20Formulas%20including%20z16%20-%20May%202022_1.pdf > > > >>> > > > >>> Outpuf after: > > > >>> # ./perf stat -M l4rp -- dd if=/dev/zero of=/dev/null bs=10M count=10K > > > >>> .... dd output deleted > > > >>> > > > >>> Performance counter stats for 'dd if=/dev/zero of=/dev/null bs=10M count=10K': > > > >>> > > > >>> 0 IDCW_OFF_DRAWER_CHIP_HIT # 0.00 l4rp > > > >>> 431,866 L1I_DIR_WRITES > > > >>> 2,395 IDCW_OFF_DRAWER_IV > > > >>> 0 ICW_OFF_DRAWER > > > >>> 0 IDCW_OFF_DRAWER_DRAWER_HIT > > > >>> 1,437 DCW_OFF_DRAWER > > > >>> 425,960,793 L1D_DIR_WRITES > > > >>> > > > >>> 12.165030699 seconds time elapsed > > > >>> > > > >>> 0.001037000 seconds user > > > >>> 12.162140000 seconds sys > > > >>> > > > >>> # > > > >>> > > > >>> Signed-off-by: Thomas Richter > > > >>> Acked-By: Sumanth Korikkar > > > >> > > > >> Acked-by: Ian Rogers > > > > > > > > Thanks, applied the first two patches, please address the review > > > > suggestions for patches 3-6 and resubmit only those. > > > > > > > > The patches will be in the public perf-tools-next branch later today. > > > > > > > > - Arnaldo > > > > > > > > > > I would really prefer the current implementation without using "ScaleUnit": "100%" > > > The reason is that these formulars are given to me from the s390 Performance team. > > > They want to use the exact same formulars on all platforms running on s390 > > > which includes z/OS and z/VM. This way they are sure to get the same numbers. > > > > > > Hope this background info helps. > > > > For the series: > > Acked-by: Ian Rogers > > Thanks, applied. > > - Arnaldo While trying to cross build to s390 on: ubuntu:18.04 using python3 CC /tmp/build/perf/tests/parse-events.o Exception processing pmu-events/arch/s390/cf_z16/extended.json Traceback (most recent call last): File "pmu-events/jevents.py", line 997, in main() File "pmu-events/jevents.py", line 979, in main ftw(arch_path, [], preprocess_one_file) File "pmu-events/jevents.py", line 935, in ftw ftw(item.path, parents + [item.name], action) File "pmu-events/jevents.py", line 933, in ftw action(parents, item) File "pmu-events/jevents.py", line 514, in preprocess_one_file for event in read_json_events(item.path, topic): File "pmu-events/jevents.py", line 388, in read_json_events events = json.load(open(path), object_hook=JsonEvent) File "/usr/lib/python3.6/json/__init__.py", line 296, in load return loads(fp.read(), File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 4271: ordinal not in range(128) > > > Using ScaleUnit won't change the result. A ScaleUnit of "100%" means > > scale the result up by multiplying by 100 and then apply the % after > > the value. Another nit is having metrics that place their units in the > > name, like _percent, is usually a sign the name can be better. Perhaps > > we can follow up with some clean up. > > > > Thanks, > > Ian > > > > > Thanks a lot. > > > -- > > > Thomas Richter, Dept 3303, IBM s390 Linux Development, Boeblingen, Germany > > > -- > > > Vorsitzender des Aufsichtsrats: Gregor Pillen > > > Geschäftsführung: David Faller > > > Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294 > > > > > -- > > - Arnaldo -- - Arnaldo