Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp903699rwb; Wed, 7 Dec 2022 06:27:28 -0800 (PST) X-Google-Smtp-Source: AA0mqf4kcbubRSbhQeSoiNEVC0VvTogXRtfUM2inod5ioyIwMvmThnO58FlG3PLivLvTiFOGOSpa X-Received: by 2002:a17:907:591:b0:7c0:a997:2298 with SMTP id vw17-20020a170907059100b007c0a9972298mr25064112ejb.430.1670423247843; Wed, 07 Dec 2022 06:27:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670423247; cv=none; d=google.com; s=arc-20160816; b=fXmifR8eOAL5WSSi3jD2d2TTSwRJ77+RRBfPcDOxthAxMSYY/hwnEGqpLdE06TJhVI GT/ezyfqBqyk4AnOLKuYtXZSoDdZxXBTD56s5PwaJ1zFxYIHDREmyrkt4inlnbnZsC3s 8BlbNS0NQ8+sSi66teR2fpGVNBn0fnk6RBl6dSFBO5n23GRrF7aczZfvRvtGhrbepnib 9bFY8D39p6oGzBYXTgYK5FWqJVjnpakIFoNeXxkqrwbEDf3o5YFljddArRDLV/Sod4jk RL994ZF1bksOiFZD2/3dhyiAGLkZFAMxCbPTqOZTgr/HWQVgFOPQ/Z3csuwQtRQEGLsU AJ/Q== 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:from:date:dkim-signature; bh=Vq+1zbnALAVR/bXbiL4kGEpeHaDup7n5+bWnDGI/Z/g=; b=ZobbTC7JWGkKCVJUTCeopRkm2SxSeWeCHyxYrUkLeM8exWscod+jbnVh8LNFdEGisf 5w+Xw/K72TlP76ubn6KADhD5NQoOOjGmSmdA4/A4UXfcNBbc/resjWo+sMO0zUeLlI8g jeK+eBgoQov3XAi5y0k7QKg7stXiKkb/ZOnlrTwdrPPT8t3q+D5l8gcmxEEse7BrJZSy 8L9ydgZnl3lC0SFHt7F76ShKvDKvmG8UhnD+Wq8SNCIokIgkbVYT9WfXvCwqS8HDKnHR OwzHREh1jh/h62T/bGZtdvbV04YSABVxXDeAlJOHS+Y7vXJ6wTMiQoQaq1d4r8b/Pxeh rwUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VQIgC9mE; 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 be8-20020a1709070a4800b007b27aecaf82si16181182ejc.274.2022.12.07.06.27.09; Wed, 07 Dec 2022 06:27:27 -0800 (PST) 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=VQIgC9mE; 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 S230330AbiLGOWj (ORCPT + 76 others); Wed, 7 Dec 2022 09:22:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230478AbiLGOWU (ORCPT ); Wed, 7 Dec 2022 09:22:20 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 960E75E9F1; Wed, 7 Dec 2022 06:21:27 -0800 (PST) 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 2E917617A9; Wed, 7 Dec 2022 14:21:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E0B2C43470; Wed, 7 Dec 2022 14:21:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670422886; bh=Vq+1zbnALAVR/bXbiL4kGEpeHaDup7n5+bWnDGI/Z/g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VQIgC9mEDoliWZoPRKeGCGk9NjFirB5OLWbV34iYAEeBg6hlA+dnWdT/wrRbAMFjs IH2o9om063+5xJNLlgTChMqjUjiIiRw3k1eIxhGNqE1VQEi4alBmAn2mMzCgIuSx8/ Ck/ULY3vQR3rzY+Xjd/ZrNL7wBM/BoxXeSWuYXQuzZ3cHs+IYZVEMD7PJ40LR02r4I KJUsHKqeQje/d278d14XoMmKHcyo9Ak0LxZnqQgffWJ4O7CMje7CSksjRpOb+HE5M3 QusnLPHQ3O5rKmU1r/LlDwNqsNGizc7b/A17Ba852BlrlVIB9Q2CW62ASMJs5DkriQ fPrmWr8NUY+eg== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id CF83640404; Wed, 7 Dec 2022 11:21:18 -0300 (-03) Date: Wed, 7 Dec 2022 11:21:18 -0300 From: Arnaldo Carvalho de Melo To: Ian Rogers , Steven Rostedt Cc: Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Nick Desaulniers , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, bpf@vger.kernel.org, Stephane Eranian Subject: [ALMOST ready] Re: [PATCH 2/3] perf build: Use libtraceevent from the system Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 Em Tue, Dec 06, 2022 at 02:22:15PM -0800, Ian Rogers escreveu: > On Tue, Dec 6, 2022 at 9:31 AM Arnaldo Carvalho de Melo wrote: > > Em Tue, Dec 06, 2022 at 02:13:48PM -0300, Arnaldo Carvalho de Melo escreveu: > > I'm missing some detail, this isn't working, util/trace-event.c is still > > being built and linked. > > The python binding should be usable without tracepoints, in fact its > > first usage was just to have access to the perf metaevents, see > > tools/perf/python/twatch.py. > You're right. I'd assumed that if you were disabling libtraceevent > then you'd also disable python. To fix the issue above you can do: > --- a/tools/perf/util/python-ext-sources > +++ b/tools/perf/util/python-ext-sources > @@ -30,7 +30,6 @@ util/rblist.c > util/counts.c > util/print_binary.c > util/strlist.c > -util/trace-event.c > ../lib/rbtree.c > util/string.c > util/symbol_fprintf.c > but this needs making conditional (possibly in setup.py) on whether > libtraceevent is present or not. Ok, I fixed this by removing the util/trace-event.c file at setup.py time, and removing it from the list of dependencies for python.so build, etc. With what I have at tmp.perf/core I'm being able to build with combinations of: - Having or not libtraceevent-devel installed - Using NO_LIBTRACEEVENT=1 - The default build All mixed up, but I wasn't so judicious so far, we need to add an entry with NO_LIBTRACEVENT=1 to tools/perf/tests/, etc. One thing I'm doing now is testing with the container builds, and I'm afraid we have to delay deleting the in-kernel old copy of tools/lib/traceevent till distros that don't ship libtraceevent as a separate package are EOLed. We need in those cases to fallback to tools/lib/traceevent/, with a warning probably. I'm now updating my container build recipes to install libtraceevent-devel, when available, which isn't the case, for instance, for almalinux:8, the first I tried updating. Please take a look at: https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/commit/?h=tmp.perf/core The HEAD for that branch has the list of changes I made to get this going. Also I have the feeling the warning about libtraceevent not being available should be made more proeminent and detailed in what gets removed if this new, important dependency isn't met... I agree removing libtraceevent and adding yet another dependency to building perf is important since the libtraceevent maintainers took the decision of having it moved away from the kernel sources, but since this has been a no-brainer for so long, the fallout of this decision may be noticeable. At least by now we have clear markings of where libtraceevent is used. Thanks, - Arnaldo