Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp4556691iog; Wed, 22 Jun 2022 00:50:33 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sVQ/2n5dfEzzTg9Bz/i+MulgZhX3jZtK6FR2nIrBatu/8OTyO/lD/815UvXT3WwbotDZD0 X-Received: by 2002:a17:90b:3b84:b0:1ec:e86c:3c34 with SMTP id pc4-20020a17090b3b8400b001ece86c3c34mr1701165pjb.174.1655884233228; Wed, 22 Jun 2022 00:50:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655884233; cv=none; d=google.com; s=arc-20160816; b=CSrCDq6JkZhyxelGdICwJ0r5zOU2I8DobXb4E930Vg9vtvv6GL8DstW4Zb1myH2WKs PJ1y29M3KIhniRRPcSoGus5WpRxUcUaHp5CdYyL035oRtxqm/GJ6lIcaqK6OS+Fs1+ui YxrQOWzVBAPvqKjnjLNGJStp7wCH6k1XO1gtxxOLhzWVVweIK0d6lZpmBP2BHf447veh 6iQpNS9GI7e04tuVYV4x0NbleTUL4nze5YvI/6Ms0b6XilKeaImk9o3SoJfuyn23DFC/ bGAWo04e3XLoA1vJAxOep2O64jJ6S06qDd9lFcmyR21jg6mWJBPYPfO019o9D4GAio6x oMfA== 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-disposition:mime-version :references:message-id:subject:cc:to:date:from:dkim-signature; bh=Wi0CQ/UGQQa8acXiq8dwtuqTzl9sInEfXQBc7BMoppw=; b=01NsF0/pnMJ/D4eV8VxauENKVUX20TnxMXckd0gcEDYzi/vjUmZEiAlS67ZOg0TRQ4 5fVeAvdKSgL6QVBNg38Qu7hHSaAWhnzwvvozswbP4Zm4jtUCACzUgiY6FEai59Fll1T1 zwwmXogJ+CLVXBWN4SvXH2gU5b85ZbIBSua0XhbAhPkKfUQb4EExCcmVfOieEcztELA0 XiKptq6oI9CXSHTwOyWp6XoT73v2qtnmg/yZJd8wn1TgeRU52z/fOS8tEAO9A8rXqYYF Rg6ZCdzw3Al+uXDC1S/UKfVnWVIHNT771vq0pWGTRa+/YJhwsDW+NA41LUN76Xyvqekh tBaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=DqrcfCmB; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o10-20020a170902d4ca00b0016759c39ce7si10070547plg.204.2022.06.22.00.50.21; Wed, 22 Jun 2022 00:50:33 -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=@gmail.com header.s=20210112 header.b=DqrcfCmB; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352942AbiFVHg5 (ORCPT + 99 others); Wed, 22 Jun 2022 03:36:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352299AbiFVHg4 (ORCPT ); Wed, 22 Jun 2022 03:36:56 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBB7937038; Wed, 22 Jun 2022 00:36:54 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id v1so32254331ejg.13; Wed, 22 Jun 2022 00:36:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Wi0CQ/UGQQa8acXiq8dwtuqTzl9sInEfXQBc7BMoppw=; b=DqrcfCmBLC0Ke+WEOWgvjXumJE7blXqIJgqHBH7e5uC+iHuDPSQ8kp4nc9Zzs9Qfi5 ZHLdvM9PgZhyokyuvQk6EBFjQmHmGd98Bl6xErf0j+rND/uiYkFZydxiU0cZE/9HpGLp nbajezoUf1Xsm1IE403wDXnok7ijrF8mbm+dhRrgs0/l616YocyoD4PdHkHSxRVigO4J pbJQV1bYzrutFyMk63IvBaA0tynoD2ci/OQebj3MLS9nsQykGglRSWcK/STDxb8SX929 Q+/BUfS0cc/uoU1nPjZJEQyxStbdfpzzGrosDR00Qkn94giNUUq4ZK1oT9dDVE1PO3BI 12iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Wi0CQ/UGQQa8acXiq8dwtuqTzl9sInEfXQBc7BMoppw=; b=oSTCUI8t0/pUJY1S3C6ncid/lm6JcFOK6bughEldpMDYi805rxPawQUop8FO6a/aCP 44pS4XpTC/HHv6Xpyq58FvNj2VLIKjpS80KENgUFmZVz1g1dqaCHhLZbcfIV7pZUTHai pIPB10sCKfcdKM+u0PQpUiBWaFdeeWsw4nGQ+0qAH6rqjfXqgCiccjzsOZSLzS4QOLWd GV67aOSIefu8B1HFb3CF+AywVN9oW1+SbE0OlMNJ01d1Gt20cHHz43BkCMBUYN5851+P qE3MAY9yqUbx/uuDTsMAf7aWUuyp0PMuvtIgdIzdl3lD04EJhRR6HJHoAQEeawxhwws+ u8Dg== X-Gm-Message-State: AJIora/SYUIHB6tO4EPsuoFE2pJczmCJayTn9nj849rlH22UTRCGQybW iLi+gB89Hgf1Y5gopCosQAM= X-Received: by 2002:a17:906:5187:b0:712:477:df9b with SMTP id y7-20020a170906518700b007120477df9bmr1847867ejk.424.1655883413335; Wed, 22 Jun 2022 00:36:53 -0700 (PDT) Received: from krava ([83.240.60.54]) by smtp.gmail.com with ESMTPSA id qn25-20020a170907211900b00722e49c06e8sm2238289ejb.216.2022.06.22.00.36.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jun 2022 00:36:53 -0700 (PDT) From: Jiri Olsa X-Google-Original-From: Jiri Olsa Date: Wed, 22 Jun 2022 09:36:50 +0200 To: Ian Rogers Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Namhyung Kim , John Garry , Kan Liang , Andi Kleen , Zhengjun Xing , Felix Fietkau , Qi Liu , Like Xu , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Nick Forrington , Kajol Jain , James Clark , Andrew Kilroy , "Paul A . Clarke" , Will Deacon , Mathieu Poirier , ananth.narayan@amd.com, ravi.bangoria@amd.com, santosh.shukla@amd.com, sandipan.das@amd.com, Caleb Biggers , Perry Taylor , Kshipra Bopardikar , Stephane Eranian Subject: Re: [PATCH v6 0/4] Rewrite jevents program in python Message-ID: References: <20220618000907.433350-1-irogers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On Wed, Jun 22, 2022 at 09:12:40AM +0200, Jiri Olsa wrote: > On Fri, Jun 17, 2022 at 05:09:03PM -0700, Ian Rogers wrote: > > New architectures bring new complexity, such as Intel's hybrid > > models. jevents provides an alternative to specifying events in the > > kernel and exposing them through sysfs, however, it is difficult to > > work with. For example, an error in the json input would yield an > > error message but no json file or location. It is also a challenge to > > update jsmn.c given its forked nature. > > > > The changes here switch from jevents.c to a rewrite in python called > > jevents.py. This means there is a build time dependency on python, but > > such a dependency already exists for asciidoc (used to generate perf's > > man pages). If the build detects that python isn't present or is older > > than version 3.6 (released Dec. 2016) then an empty file is > > substituted for the generated one. > > > > A challenge with this code is in avoiding regressions. For this reason > > the jevents.py produces identical output to jevents.c, validated with a > > test script and build target. > > > > v6. Fixes an annotation and use of removesuffix that aren't present in > > Python 3.6. Linter issues are also fixed.The code was tested on > > Python 3.6 and 3.8 with docker. > > hi, > I'm getting test failures with this: > > 10: PMU events : > 10.1: PMU event table sanity : FAILED! > 10.2: PMU event map aliases : FAILED! > 10.3: Parsing of PMU event table metrics : Ok > 10.4: Parsing of PMU event table metrics with fake PMUs : Ok > > I can see that pass without the patchset, verbose run shows: > > [jolsa@krava perf]$ sudo ./perf test -vv 'PMU event map aliases' > 10: PMU events : > 10.2: PMU event map aliases : > --- start --- > test child forked, pid 272763 > Using CPUID GenuineIntel-6-8C-1 > intel_pt default config: tsc,mtc,mtc_period=3,psb_period=3,pt,branch > could not find test events map > testing core PMU cpu aliases: failed > test child finished with -1 > ---- end ---- > PMU events subtest 2: FAILED! > [jolsa@krava perf]$ sudo ./perf test -vv 'PMU event table sanity' > 10: PMU events : > 10.1: PMU event table sanity : > --- start --- > test child forked, pid 272771 > could not find test events map > test child finished with -1 > ---- end ---- > PMU events subtest 1: FAILED! ah, ok I did not notice: Makefile.config:909: Python interpreter too old (older than 3.6) disabling jevent generation I installed python3-devel and it's ok should we make above tests SKIP in case there's empty pmu-events.c ? thanks, jirka