Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp12620558rwd; Fri, 23 Jun 2023 08:25:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ63kkKd5vYhOcPZwlFaLlL9slkXE038pmRfcbcZ3rZ1dfjXu4mbiLbQrk26NvhKMSnc9QMT X-Received: by 2002:a17:90b:17d0:b0:256:ae6c:fd1f with SMTP id me16-20020a17090b17d000b00256ae6cfd1fmr29416325pjb.20.1687533951385; Fri, 23 Jun 2023 08:25:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687533951; cv=none; d=google.com; s=arc-20160816; b=mdq1CO1Sj5L7zQkQnjJ0OQ9R5PU3uS1FXHwF3i+oWnNernmuCldiFNalm3j0zZVneD cAFotMxffQcLDgQIrAFNFFpFZvr4NIEy1fgVVRTncDGj3M7CNKP2DZu2zTlPvFUypv8X tmqE83WGOlrjbjTnDYl+lPT3FbrVa6jbeOwpu+fp8IAh9cMCRmbBRmQmf3Fhcjd3MARh 84dsR8qmcCFo28+yFWy5rRWBPVnA0bQIc1uoi4r9w9EirpmqIZM69cdXTcmukNlbRlPm Ior1FKAJPfMHImFtnrSDEjhxM0/dvYO1el9iiRBdbxrBH89TxbH5QHj7mCoOFMw9PL2F ExNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:from:subject:mime-version:message-id:date :dkim-signature; bh=FUa7aJDe332KJMbrrfq8+rXTMZSs6TUcvwlXqFrw4f4=; b=UfNVDec+o2+6emtMC0J6gB8oH3oInzSdZy937wBR3rKkkFiZn4xUdcs/HkRLCiUYUq 6RTQC6zYeCMeB33xF335JfeLp5Tc14oOavvC+lpCFrR6NHh/IQYALok2vEw4GUJYGOka RiSPuNG6ncyw2r9XMDTjE5zpptfyOHAOhovRP/CKp/3Ch0vtYrznK0c4NYedrcyvy8Zq xxzd+omcOg4rZ8sL3MD1VPA4J8bNa66l9iYdpvnd9vSOZzyRp624KTle5shcGRGNNsHG y/0DM5wZO7cHM8gWNGNzZuRyGoomvCTRbUtl/KrUM7kR4ly/hHZBR61Ll7RD7j+VXT+7 TQrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=buCQ7Aob; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x64-20020a17090a6c4600b00250331e6044si2080002pjj.25.2023.06.23.08.25.38; Fri, 23 Jun 2023 08:25:51 -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=@google.com header.s=20221208 header.b=buCQ7Aob; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232531AbjFWPLY (ORCPT + 99 others); Fri, 23 Jun 2023 11:11:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232533AbjFWPLI (ORCPT ); Fri, 23 Jun 2023 11:11:08 -0400 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA147294E for ; Fri, 23 Jun 2023 08:10:34 -0700 (PDT) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-56fffdea2d0so10658147b3.1 for ; Fri, 23 Jun 2023 08:10:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1687533034; x=1690125034; h=to:from:subject:mime-version:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=FUa7aJDe332KJMbrrfq8+rXTMZSs6TUcvwlXqFrw4f4=; b=buCQ7AobFyOfUQhTRWfnpL5MysqUQy6IqKNAwfK/A6KTWMZksdzmTFv6Wc7f4LmdTH Hg/32i9jG/ouG/ij8ApZliWIq2IEjLhPZ9jh4IjgYg3iCo8qHw2HIDw3UZ1ctk2pbLig KKqm2HoLH+6KM4YvaEiTEb+gDsBVSE7QXxgKDCpFHT92yUnlElUr1b7cGBxsLIhRwV5r WCagZ0aooyD1l6GXPaRksmmty5ExsrQQr7jZNlS7BicFZdMtYHsmO41PJInkoGWV+jPY m2OWceI6IEXMb2YYGxAmxnKTvkrsdJz2dHQQ7N4LhUyOuDagxukM30bBLFnt0JuvNepz KPdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687533034; x=1690125034; h=to:from:subject:mime-version:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=FUa7aJDe332KJMbrrfq8+rXTMZSs6TUcvwlXqFrw4f4=; b=T7x77Lx6CaIv14x/4I92a6V+lNQMFeqwkrsR31kjqxO92VR/7MoNihEA5s9ZzxSVDE rCVNdztlnz/bITNNMchRdQQbCyPaQSexXRobOnvjJxDAFZZ+Zgg01L8JMBKZX6x70HD4 0BdVgUUdz8hwtXxmJ/yF0zSvp9qRV7AOhZBgAPP8l6ef5qkH2QYVAdtlUSTcdLGF9YoC HhhduhAsM98UtLMsW6pID7hiZn1yAAgsEvimrv16EBe32EdOkHc9X4gk7165+NNK0Lnd H6y6W++7qxQr0urcZRc0Xr6bOhnU9AaFStekXfGLU94rJsCOVNv3IhQUk8DsgAfljqCR a63g== X-Gm-Message-State: AC+VfDzirkk3BLp+fH3JpiRinpwqMH1/mAK/pnux7KSHQco1rDdutFDH +fF5p+6Va/rowV/Ir1pj1aFAGWTB7OlR X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:6559:8968:cdfe:35b6]) (user=irogers job=sendgmr) by 2002:a25:748e:0:b0:bac:fd63:b567 with SMTP id p136-20020a25748e000000b00bacfd63b567mr10016177ybc.4.1687533034231; Fri, 23 Jun 2023 08:10:34 -0700 (PDT) Date: Fri, 23 Jun 2023 08:10:04 -0700 Message-Id: <20230623151016.4193660-1-irogers@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.41.0.162.gfafddb0af9-goog Subject: [PATCH v2 00/12] Add metric has_event, update intel vendor events From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , Kan Liang , Zhengjun Xing , Kajol Jain , John Garry , Andrii Nakryiko , Eduard Zingerman , Jing Zhang , Sohom Datta , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Perry Taylor , Samantha Alt , Caleb Biggers , Weilin Wang , Edward Baker Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED, USER_IN_DEF_DKIM_WL autolearn=ham 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 Add a new has_event function for metrics so that events that can be disabled by the kernel/firmware don't cause metrics to fail. Use this function for Intel transaction metrics fixing "perf all metrics test" on systems with TSX disabled. The update conversion script is posted in: https://github.com/intel/perfmon/pull/90 Re-generate Intel vendor events using: https://github.com/intel/perfmon/blob/main/scripts/create_perf_json.py Adding rocketlake support, uncore and many core events for meteorlake, and smaller updates for cascakelakex, icelake, icelakex, sapphirerapids, skylake, skylakex and tigerlake. v2. Handle failed memory allocated for evlist, John Garry. Ian Rogers (12): perf expr: Add has_event function perf jevents: Support for has_event function perf vendor metrics intel: Make transaction metrics conditional perf vendor events intel: Add rocketlake events/metrics perf vendor events intel: Update meteorlake to 1.03 perf vendor events intel: Update cascadelakex to 1.19 perf vendor events intel: Update icelake to 1.19 perf vendor events intel: Update icelakex to 1.21 perf vendor events intel: Update sapphirerapids to 1.14 perf vendor events intel: Update skylake to 57 perf vendor events intel: Update skylakex to 1.31 perf vendor events intel: Update tigerlake to 1.13 .../arch/x86/alderlake/adl-metrics.json | 8 +- .../arch/x86/cascadelakex/clx-metrics.json | 8 +- .../arch/x86/cascadelakex/frontend.json | 43 +- .../arch/x86/cascadelakex/pipeline.json | 17 +- .../x86/cascadelakex/uncore-interconnect.json | 2 +- .../arch/x86/cascadelakex/uncore-memory.json | 2 +- .../pmu-events/arch/x86/icelake/cache.json | 8 +- .../pmu-events/arch/x86/icelake/frontend.json | 32 +- .../arch/x86/icelake/icl-metrics.json | 8 +- .../pmu-events/arch/x86/icelake/pipeline.json | 6 +- .../arch/x86/icelakex/frontend.json | 32 +- .../arch/x86/icelakex/icx-metrics.json | 8 +- .../arch/x86/icelakex/pipeline.json | 4 +- .../x86/icelakex/uncore-interconnect.json | 2 +- tools/perf/pmu-events/arch/x86/mapfile.csv | 17 +- .../pmu-events/arch/x86/meteorlake/cache.json | 811 +++++++++ .../arch/x86/meteorlake/floating-point.json | 143 ++ .../arch/x86/meteorlake/frontend.json | 410 +++++ .../arch/x86/meteorlake/memory.json | 142 +- .../pmu-events/arch/x86/meteorlake/other.json | 57 +- .../arch/x86/meteorlake/pipeline.json | 1211 ++++++++++++- .../arch/x86/meteorlake/uncore-cache.json | 18 + .../x86/meteorlake/uncore-interconnect.json | 42 + .../arch/x86/meteorlake/uncore-memory.json | 126 ++ .../arch/x86/meteorlake/virtual-memory.json | 257 +++ .../pmu-events/arch/x86/rocketlake/cache.json | 894 ++++++++++ .../arch/x86/rocketlake/floating-point.json | 105 ++ .../arch/x86/rocketlake/frontend.json | 377 ++++ .../arch/x86/rocketlake/memory.json | 394 +++++ .../arch/x86/rocketlake/metricgroups.json | 113 ++ .../pmu-events/arch/x86/rocketlake/other.json | 242 +++ .../arch/x86/rocketlake/pipeline.json | 801 +++++++++ .../arch/x86/rocketlake/rkl-metrics.json | 1571 +++++++++++++++++ .../x86/rocketlake/uncore-interconnect.json | 74 + .../arch/x86/rocketlake/uncore-other.json | 9 + .../arch/x86/rocketlake/virtual-memory.json | 165 ++ .../arch/x86/sapphirerapids/pipeline.json | 2 +- .../arch/x86/sapphirerapids/spr-metrics.json | 8 +- .../arch/x86/sapphirerapids/uncore-cache.json | 308 ++++ .../sapphirerapids/uncore-interconnect.json | 2 +- .../pmu-events/arch/x86/skylake/frontend.json | 43 +- .../pmu-events/arch/x86/skylake/pipeline.json | 17 +- .../arch/x86/skylake/skl-metrics.json | 8 +- .../arch/x86/skylakex/frontend.json | 43 +- .../arch/x86/skylakex/pipeline.json | 17 +- .../arch/x86/skylakex/skx-metrics.json | 8 +- .../x86/skylakex/uncore-interconnect.json | 2 +- .../arch/x86/skylakex/uncore-memory.json | 2 +- .../arch/x86/tigerlake/frontend.json | 32 +- .../arch/x86/tigerlake/pipeline.json | 6 +- .../arch/x86/tigerlake/tgl-metrics.json | 8 +- tools/perf/pmu-events/metric.py | 8 +- tools/perf/tests/expr.c | 4 + tools/perf/util/expr.c | 21 + tools/perf/util/expr.h | 1 + tools/perf/util/expr.l | 1 + tools/perf/util/expr.y | 8 +- 57 files changed, 8506 insertions(+), 202 deletions(-) create mode 100644 tools/perf/pmu-events/arch/x86/meteorlake/floating-point.json create mode 100644 tools/perf/pmu-events/arch/x86/meteorlake/uncore-cache.json create mode 100644 tools/perf/pmu-events/arch/x86/meteorlake/uncore-interconnect.json create mode 100644 tools/perf/pmu-events/arch/x86/meteorlake/uncore-memory.json create mode 100644 tools/perf/pmu-events/arch/x86/rocketlake/cache.json create mode 100644 tools/perf/pmu-events/arch/x86/rocketlake/floating-point.json create mode 100644 tools/perf/pmu-events/arch/x86/rocketlake/frontend.json create mode 100644 tools/perf/pmu-events/arch/x86/rocketlake/memory.json create mode 100644 tools/perf/pmu-events/arch/x86/rocketlake/metricgroups.json create mode 100644 tools/perf/pmu-events/arch/x86/rocketlake/other.json create mode 100644 tools/perf/pmu-events/arch/x86/rocketlake/pipeline.json create mode 100644 tools/perf/pmu-events/arch/x86/rocketlake/rkl-metrics.json create mode 100644 tools/perf/pmu-events/arch/x86/rocketlake/uncore-interconnect.json create mode 100644 tools/perf/pmu-events/arch/x86/rocketlake/uncore-other.json create mode 100644 tools/perf/pmu-events/arch/x86/rocketlake/virtual-memory.json -- 2.41.0.162.gfafddb0af9-goog