Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6830317rwb; Mon, 12 Dec 2022 07:00:14 -0800 (PST) X-Google-Smtp-Source: AA0mqf7m+uvORqkGMH8rcH11hnXFXX9M+WYPrl+EQTa/lIGhAM+xVeHpWR/lGXBLeV7vXdJZP5sk X-Received: by 2002:a17:903:32d0:b0:185:441e:2334 with SMTP id i16-20020a17090332d000b00185441e2334mr22423948plr.42.1670857214593; Mon, 12 Dec 2022 07:00:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670857214; cv=none; d=google.com; s=arc-20160816; b=V1Cb3FFczxVziAUQC2qeD+Y5pushm1qIn3wzERJxvnt8CpHwTpD2dAlFIzykY2xwfV dCKsBCErVtu4JoahAuqILy8ZgYmUIXPQYpKFPsXU0FOlF6Pn/WVvjScPr4PS3/bsYq2U BoNUraGk7AHH42ekO+CUgrB2MQQTB62XsIiulVSQ/jAOrGmLmGX0DUllQ7Khb1gOkq1K 3FYxbHqEkA/Y2zPk/bC0iVsSpLvcEVRIOSa6sl4vH8xHVyExDgKUUej59QbJO6kXhfus 4mcoSdt29fo5QJJSCiaY8M5VwFBgDBjRZlLRL7pWu0uhJa/rLvWuo0pSZv2dBu6ZUlHv Mhkw== 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=igJXgDdL/F1SqfdFYIalNy7YiOG7X57FB3h7VdVP8k4=; b=sDvuGKt6NR5e6EX1ezN+fr1zjqOnYVIzh7U4QHaPP67LNBjO+qNUw+bapIlpArF7wn cz0xq3xT+L/tGmYEibaLEqn5kEA1cpqy+vBmLEG64RQk1jynk87RU5xPtATOPQi8EVuv KRI1P92Z75IM0pKhLS06caem8Va2CJ3ddc5xY8KhS2hfgLM7plIuu9a+JBaEX0aijmOe N/T1gdMV21MoXDjN2Wiyf7fJE2vOAQhu7JhtmerbLcHSxNJZ1BjGqHqA+PVSz8h1+nPA zmCADg+QVkBrW6PhnbOHJx38aiLOPgCv4zHP4xwKZBrkOl2HOvDmnXlfsX/RrAQYWRrp wSOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="jGzPsR/b"; 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 p7-20020a170902ebc700b001755d722578si9515946plg.524.2022.12.12.07.00.03; Mon, 12 Dec 2022 07:00:14 -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="jGzPsR/b"; 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 S232317AbiLLOpU (ORCPT + 76 others); Mon, 12 Dec 2022 09:45:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232277AbiLLOpR (ORCPT ); Mon, 12 Dec 2022 09:45:17 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B36765C0; Mon, 12 Dec 2022 06:45:16 -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 ams.source.kernel.org (Postfix) with ESMTPS id 13E09B80D86; Mon, 12 Dec 2022 14:45:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F53EC433F0; Mon, 12 Dec 2022 14:45:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670856313; bh=Ug5zleVyjK5U5aBjLmguiGbM1OJF0MNqWNvW2lrwe8Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jGzPsR/b+I8XH9KBzwEYpFHj100FY7XmWbDSRknmz1lvMfK32MxmJV4vcbcNMLZ0E adIeyV5tJgSWWDYIf2KgZ3QPCD22IiMatS4+nnm3Pajb/SdTzP1E93s2Jzma6+ki4b JU/1VwpUxGMz4D1skUhVWx2shjd68or3Hv6YtDPNaoQCCuySTgQ5YNn47nMyzqtrH+ yIQLmYlng6cwBy6aTAZY2W5A1QdwcCwxy9ECJOywWZsuTmkwTzGc0L65TRjQOHRMgX VLL1g8xOvRdxSbMIDJVueRv+ufOrFLFknux1YcQQMI8oKui13/ytGuNzfOcwynavZ7 9NQdiQLnbu1Sg== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 29D5340638; Mon, 12 Dec 2022 11:13:41 -0300 (-03) Date: Mon, 12 Dec 2022 11:13:41 -0300 From: Arnaldo Carvalho de Melo To: Ian Rogers Cc: Athira Rajeev , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Nick Desaulniers , LKML , linux-perf-users@vger.kernel.org, bpf@vger.kernel.org, Stephane Eranian Subject: Re: [PATCH 2/3] perf build: Use libtraceevent from the system Message-ID: References: <36CD1041-0CAE-41C1-8086-C17854531B3E@linux.vnet.ibm.com> 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 Thu, Dec 08, 2022 at 03:05:29PM -0800, Ian Rogers escreveu: > On Thu, Dec 8, 2022 at 3:00 PM Ian Rogers wrote: > > On Thu, Dec 8, 2022 at 2:32 PM Arnaldo Carvalho de Melo wrote: > > > commit a0ec3ef4590e7e82339b6f318e671a6b69fd94e8 > > > Author: Arnaldo Carvalho de Melo > > > Date: Thu Dec 8 19:28:58 2022 -0300 > > > perf tools: Add test to check if libtracevent has TEP_FIELD_IS_RELATIVE > > Could HAVE_LIBTRACEEVENT_TEP_FIELD_IS_RELATIVE be a version rather > > than feature check, something like: > > #define MAKE_LIBTRACEEVENT_VERSION(maj, mid, min) (maj * 255 *255 + > > mid * 255 + min) > > #define HAVE_LIBTRACEEVENT_TEP_FIELD_IS_RELATIVE > > (LIBTRACEEVENT_VERSION >= MAKE_LIBTRACEEVENT_VERSION(1, 5, 0) > > Note, we have LIBTRACEEVENT_VERSION computed in Makefile.config by way > > of pkg-config. > LIBTRACEEVENT_VERSION had a workaround if pkg-config wasn't present to > default to 1.1.0 for its use in: > https://lore.kernel.org/linux-perf-users/20210923001024.550263-4-irogers@google.com/ > We should un-revert that change now the -Itools/lib issue is resolved > (1.1 traceevent headers compiled against newer system libtraceevent > library). Can you please send that un-revert as a proper patch? Meanwhile, I came up with this quick hack on top of what I had, seems to be enough, will test it with systems with libtraceevent <= 1.5.0, where TEP_FIELD_IS_RELATIVE was introduced. Will do it after removing the tools/build/feature/ TEP_FIELD_IS_RELATIVE big hammer check. - Arnaldo diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index e29975664f06bd61..52a4dc029111c1e2 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -1197,8 +1197,8 @@ ifneq ($(NO_LIBTRACEEVENT),1) LIBTRACEEVENT_VERSION_CPP := $(shell expr $(LIBTRACEEVENT_VERSION_1) \* 255 \* 255 + $(LIBTRACEEVENT_VERSION_2) \* 255 + $(LIBTRACEEVENT_VERSION_3)) CFLAGS += -DLIBTRACEEVENT_VERSION=$(LIBTRACEEVENT_VERSION_CPP) $(call detected,CONFIG_LIBTRACEEVENT) - $(call feature_check,libtraceevent-tep_field_is_relative) - ifeq ($(feature-libtraceevent-tep_field_is_relative), 1) + LIBTRACEEVENT_VERSION_WITH_TEP_FIELD_IS_RELATIVE := $(shell expr 1 \* 255 \* 255 + 5 \* 255 + 0) # 1.5.0 + ifeq ($(shell test $(LIBTRACEEVENT_VERSION_CPP) -gt $(LIBTRACEEVENT_VERSION_WITH_TEP_FIELD_IS_RELATIVE); echo $$?),0) CFLAGS += -DHAVE_LIBTRACEEVENT_TEP_FIELD_IS_RELATIVE endif else