Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1023820iob; Thu, 12 May 2022 09:27:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9hpXSLtfbxTchiKlyw2lcckNFOkUipoSyntyB/LK5gfMeVIw+lfKVtXCJSWLrj7Zl+HWR X-Received: by 2002:a05:6402:1d51:b0:41f:cf6c:35a5 with SMTP id dz17-20020a0564021d5100b0041fcf6c35a5mr36190527edb.25.1652372859157; Thu, 12 May 2022 09:27:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652372859; cv=none; d=google.com; s=arc-20160816; b=yj1byg4sQ6l2RxrGSDhGOeRWeb4/aiANhIpF4RSKWT3A9GG7FvjJgQf0DNWndQdDUE mejjHlZzGzu2TGna5bach4D+ktGSJpgB9jsuguuNYI1iQ4T3xAo/CUactm9CW5DYXZAn JSCy2pPLo7KBWZT+qalA34HvFCBgJQ/Ph6dtodaL4RAPV/4UgouU9UbvHFRzS1EpNseV wBQv7FKwZPhj0OrqOAq2Z62iapqKtDL+NKX36m4n6lH3XUPYlKYTER9Pa+/Q2AjhoFfZ U4bxiL4s+BBfjSIRiVXkz+z391RBal6/Y2sp86S4YcFQ7i0WVKCUelCM3kOUGSoLFQS2 XGzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=PP4n1NdHg9QHiLkwHMI2DKYBSLICDPjo1UeB4YFK0mk=; b=UxGc8k3IwHJqXOnaB5+tsGJbEiKxMOvgW2ppe8WvIyuonFS6iLtaXg3g7ou9EzZ6Bq IFmm2HWYkyi1e2gv0hY3jwJSuMKL323tn+UZOGZIADZL5phQoCn355nGK/58nd3TTvxI afW9cYDm5FiFYy9HVqUcYWVtYztxwK1nRopDNwGlxdy2WyQEHWKqDPwC2vzjacRBt6ww PwKFsnHZbb3MVsheHdPx9LYJv6HDFhKTy5/+XTNbvCtlZHpwmEtMWSkTIDmYr3GbQdFz wm7S8UimDSAGWwOnU4CNKRnxanzg902cxAIOBzR4kingGvqZwgVk+pw+sdW9XLfIq04n PkHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=RGNbqfeC; 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 y11-20020aa7cccb000000b00425e1de3c34si5628323edt.308.2022.05.12.09.27.13; Thu, 12 May 2022 09:27:39 -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=20210112 header.b=RGNbqfeC; 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 S244308AbiEKOBE (ORCPT + 99 others); Wed, 11 May 2022 10:01:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244303AbiEKOAz (ORCPT ); Wed, 11 May 2022 10:00:55 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEC0F13D6B for ; Wed, 11 May 2022 07:00:52 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id m1so3125418wrb.8 for ; Wed, 11 May 2022 07:00:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PP4n1NdHg9QHiLkwHMI2DKYBSLICDPjo1UeB4YFK0mk=; b=RGNbqfeCmMq8/GNn84N/gizYPcA6O+qs/CXjLRVFfORFtL57JhKm/rqDxHgwa7Kxev 09VAjndF+7UPP9e3k/hqmnpF9kwYKmRrWFrfptFOZJMsyNBnu8laZwLsR28TNYB2CkSk R/Qru62yOUTw4XuILJO2xSuo06HcqnBb+9oVCdXajAwh2W656pVovIXTBYgcuUJFm9uH /UzzBmkUamX9E+sUL9CL64I0rXt5bk9Bxp1ZFAx6N+ZnZpzhWE7IPifPRcG0JNyqXZCF ww0csyq3V81VY3ytIW52dcmrckU/lbLMPq+odPBqYfNvdHpy1lBW7tKgQFHNT8Znd4JT XR8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PP4n1NdHg9QHiLkwHMI2DKYBSLICDPjo1UeB4YFK0mk=; b=XjZn/j08nRkt83CHiU0+cjfxj47lDje5d9gZq74llgu5t8u6JVYOJe64eDF9OWdBqQ LNd/6YpMSnInoYJiJKXSWunrazziq2fm8kq001YTF+k+RTbwtn+1e6CAxOGpmK7GoMVY J7vULdvYHllZS0TWaW6KNs11B1y2umCGugcrcuBBn1sB9lzceIXVrTor6Fo+Tsm7bfsf J9t3Tgxgpt3Q+Rw+IJryTty1seR44vGcnYqlbC4u02oW5ZtRAuZdez+EIYgNmgYN7AcS 6024XcURKn9tjzXl1mE7zUvOsZf7RSA6RomgvPkmpR/Ua4UNp2kZY6kZvTP7tE70Q/QD 1j9g== X-Gm-Message-State: AOAM532eIwJJnDrqmvkULqnLWOveuB7YOdq0p5dDsLsZekaXPKqdoPmZ NcHe+7SUVxkl0XNS9VKXe0u0B1VXJbToRA5B7CpgxA== X-Received: by 2002:a5d:598f:0:b0:20c:83c9:b05b with SMTP id n15-20020a5d598f000000b0020c83c9b05bmr22757965wri.343.1652277651154; Wed, 11 May 2022 07:00:51 -0700 (PDT) MIME-Version: 1.0 References: <20220511070133.710721-1-irogers@google.com> <20220511073501.GW76023@worktop.programming.kicks-ass.net> <20220511135605.GA76023@worktop.programming.kicks-ass.net> In-Reply-To: <20220511135605.GA76023@worktop.programming.kicks-ass.net> From: Ian Rogers Date: Wed, 11 May 2022 07:00:35 -0700 Message-ID: Subject: Re: [PATCH 0/7] Rewrite jevents program in python To: Peter Zijlstra Cc: Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED,USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL 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 On Wed, May 11, 2022 at 6:56 AM Peter Zijlstra wrote: > > On Wed, May 11, 2022 at 06:50:59AM -0700, Ian Rogers wrote: > > On Wed, May 11, 2022 at 12:35 AM Peter Zijlstra wrote: > > > > > > On Wed, May 11, 2022 at 12:01:26AM -0700, Ian Rogers wrote: > > > > > > > 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). > > > > > > You mean just building perf (not the docs) will now require snake stuff? > > > > > > That's very tedious :/ I don't typically have snakes on my machines. > > > > Hi Peter, > > > > You're right that after these changes python is a build requirement > > for jevents. We could keep the C code around for the case that python > > isn't there, but I want to do things like remove the string > > relocations, sort the events by name so we don't linearly search, etc. > > which would be a massive chore to keep alive on the C side. An > > alternative would be to have an empty pmu-events.c file that is used > > for this case. If you wanted to keep things in C and have jevents like > > event names, you could use the empty version and link in libpfm4. > > I'm not normally linking to libpfm4. All I really care about is that I > can still build a bare cli perf (not even tui). If all the snake stuff > is purely optional and it just disables some features, but I do get a > perf out at the end, then I'm all good. > Great! I'll add a conditional "empty" file version for this case. Thanks, Ian