From patchwork Sat Oct 5 19:55:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13823468 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 54E01CFB42C for ; Sat, 5 Oct 2024 20:03:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:To:From:Subject :References:Mime-Version:Message-Id:In-Reply-To:Date:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=jKCAAT8Yq0zCoRQSEuvmwmrXtedkR549ZkEZtq8vZwU=; b=qo74ZaQrjvxSjwypDpDG7NxqEe YQKO+CeFZfblIoz+Iif5ZIpyVl9KzBglWjDTza/slLFDVF+Rbue33nczj18NQ3xl9+QDRK72eMawu laTWWhQHkcDk3gyi5VY/61TxP5preY1F/CaPBGGsSqKSbOD7tsBQB092ZUgDbvssAJEYBIBbUygPt q5/anRdzr0Kbd8RIyljD6PHl0dITFtoDdErqtdYl61BAV3lpBRkxM8m2lAwTZ0bpWw5NHECTboScv J/kDzSLdlTBFe9fmI3x5qqe07ukix+UDVB+T1SdBeZRAnSrAgUohTdSua4gexVTul3z7BWgWYyWBu hvr7vKcg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sxAzL-0000000Frwg-2yB2; Sat, 05 Oct 2024 20:02:51 +0000 Received: from mail-yb1-xb49.google.com ([2607:f8b0:4864:20::b49]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sxAsq-0000000Fprl-3kyQ for linux-arm-kernel@lists.infradead.org; Sat, 05 Oct 2024 19:56:11 +0000 Received: by mail-yb1-xb49.google.com with SMTP id 3f1490d57ef6-e25e3d7f514so4754116276.0 for ; Sat, 05 Oct 2024 12:56:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1728158167; x=1728762967; darn=lists.infradead.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=jKCAAT8Yq0zCoRQSEuvmwmrXtedkR549ZkEZtq8vZwU=; b=xiyZE7kzEKMulduHCIjWIqVRW1uTrF4IqfnyCUORgFhbM1NP7UW2gkNZSJH8wPNO7A qV2zsepxHSd/WYwrCE9O5sp5rE8MzwS4LxoBaaw/E47TkvOif+7PYO80plCMYOYhbaRJ zNW0aEwCkZQHwmwf5gYCMGKiyUAynuhMqaaMnqRzMBwaeni+FHDhx1zacY6BAKYJgoY7 Ja/l4taCnNjszf5JraVOi93J9lOQMxbGeUy5MCZNp5USmr5VJDoR3/FceN5eDdB0/7iy mjwEj86Mx2gxqwqm7SVLDMjA76EeAbHrO7BoMzwNnaaM+4kXKTdtTdfnP/hNYYeG938c tkvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728158167; x=1728762967; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=jKCAAT8Yq0zCoRQSEuvmwmrXtedkR549ZkEZtq8vZwU=; b=HQ2QWyOE9U6mQ57vOhrutlmHm6GiyiRNQL4cbX89QVLNxpw7/CPUk+NcFZcwOpNu5q WxXmuCPLAZDLgSrUl6slw/2d1qQT4wqEIGdc9q+FRJFN8BLJIYQVSfncdQAmfuZCg7Jz aHMJk9Pu2NZva0vMyyTDkaHv9qJg6QlyEyj+ihnAi4cIE/FmDj/C4nwlVUB29ZC0/lVB GeMZu9BujuA0Wbu8chuL55Z7/94yoRJ/dD559FcWVdBZHrHCRsfIUpzrOpPF4qKWMdqw i36/3ZdFF6YVeYy20Qi9INfRE8zFAUcAArZJ5moFLpCvJqlRgsfHQVF0qfHhlpM1fZsF wV9A== X-Forwarded-Encrypted: i=1; AJvYcCWcVHgXz9WEts6E/JAIMYfOhljbwYQ/AjCgLiq15Zws7P+JZKxcqagzvx/56BoqVZplOFXr979NVpn55+fkInsn@lists.infradead.org X-Gm-Message-State: AOJu0Yw+qwgfKEtFilrDB6Kto5rc+u3WjStBpCJAJBtK3MoVQ5m4qwT/ YGv1HDgHHaJHplygdinTLpEvD5yaaNPn0FdE9qytcKpVhUNk8K6SCD0ah3fDyYki9CH42oCTea/ teV4fZg== X-Google-Smtp-Source: AGHT+IG0rU9ibGjtPmAL08yq2KEhHsCm45b7xwYMGISD4T+sjFBkBvKxulNTeU2lvZfpr29mKdjAqeZdA/VR X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:4c2:5b4d:8797:7249]) (user=irogers job=sendgmr) by 2002:a25:adc2:0:b0:e24:9584:52d3 with SMTP id 3f1490d57ef6-e28936b99bamr11206276.2.1728158167274; Sat, 05 Oct 2024 12:56:07 -0700 (PDT) Date: Sat, 5 Oct 2024 12:55:14 -0700 In-Reply-To: <20241005195541.380070-1-irogers@google.com> Message-Id: <20241005195541.380070-5-irogers@google.com> Mime-Version: 1.0 References: <20241005195541.380070-1-irogers@google.com> X-Mailer: git-send-email 2.47.0.rc0.187.ge670bccf7e-goog Subject: [PATCH v2 04/31] perf build: Rename test-dwarf to test-libdw From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Guo Ren , Paul Walmsley , Palmer Dabbelt , Albert Ou , Nick Terrell , "Steven Rostedt (Google)" , "Masami Hiramatsu (Google)" , Guilherme Amadio , Changbin Du , Daniel Bristot de Oliveira , Daniel Wagner , Aditya Gupta , Athira Rajeev , Masahiro Yamada , Kajol Jain , Huacai Chen , Bibo Mao , Anup Patel , Atish Patra , Shenlin Liang , Oliver Upton , "Steinar H. Gunderson" , "Dr. David Alan Gilbert" , Chen Pei , Dima Kogan , Yury Norov , Alexander Lobakin , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-riscv@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241005_125609_030117_FA79E7D4 X-CRM114-Status: GOOD ( 13.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Be more intention revealing that the dwarf test is actually testing for libdw support. Signed-off-by: Ian Rogers --- tools/build/Makefile.feature | 6 +++--- tools/build/feature/Makefile | 16 ++++++++-------- tools/build/feature/test-all.c | 6 +++--- .../build/feature/{test-dwarf.c => test-libdw.c} | 0 tools/perf/Makefile.config | 6 +++--- 5 files changed, 17 insertions(+), 17 deletions(-) rename tools/build/feature/{test-dwarf.c => test-libdw.c} (100%) diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature index ffd117135094..6025810cc346 100644 --- a/tools/build/Makefile.feature +++ b/tools/build/Makefile.feature @@ -30,7 +30,7 @@ endef # FEATURE_TESTS_BASIC := \ backtrace \ - dwarf \ + libdw \ dwarf_getlocations \ dwarf_getcfi \ eventfd \ @@ -120,7 +120,7 @@ ifeq ($(FEATURE_TESTS),all) endif FEATURE_DISPLAY ?= \ - dwarf \ + libdw \ dwarf_getlocations \ glibc \ libbfd \ @@ -233,7 +233,7 @@ endef # # generates feature value assignment for name, like: -# $(call feature_assign,dwarf) == feature-dwarf=1 +# $(call feature_assign,libdw) == feature-libdw=1 # feature_assign = feature-$(1)=$(feature-$(1)) diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index 5938cf799dc6..bece326ac93b 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -5,7 +5,7 @@ FILES= \ test-all.bin \ test-backtrace.bin \ test-bionic.bin \ - test-dwarf.bin \ + test-libdw.bin \ test-dwarf_getlocations.bin \ test-dwarf_getcfi.bin \ test-eventfd.bin \ @@ -168,9 +168,9 @@ $(OUTPUT)test-libopencsd.bin: $(BUILD) # -lopencsd_c_api -lopencsd provided by # $(FEATURE_CHECK_LDFLAGS-libopencsd) -DWARFLIBS := -ldw +DWLIBS := -ldw ifeq ($(findstring -static,${LDFLAGS}),-static) - DWARFLIBS += -lelf -lz -llzma -lbz2 -lzstd + DWLIBS += -lelf -lz -llzma -lbz2 -lzstd LIBDW_VERSION := $(shell $(PKG_CONFIG) --modversion libdw) LIBDW_VERSION_1 := $(word 1, $(subst ., ,$(LIBDW_VERSION))) @@ -179,18 +179,18 @@ ifeq ($(findstring -static,${LDFLAGS}),-static) # Elfutils merged libebl.a into libdw.a starting from version 0.177, # Link libebl.a only if libdw is older than this version. ifeq ($(shell test $(LIBDW_VERSION_2) -lt 177; echo $$?),0) - DWARFLIBS += -lebl + DWLIBS += -lebl endif endif -$(OUTPUT)test-dwarf.bin: - $(BUILD) $(DWARFLIBS) +$(OUTPUT)test-libdw.bin: + $(BUILD) $(DWLIBS) $(OUTPUT)test-dwarf_getlocations.bin: - $(BUILD) $(DWARFLIBS) + $(BUILD) $(DWLIBS) $(OUTPUT)test-dwarf_getcfi.bin: - $(BUILD) $(DWARFLIBS) + $(BUILD) $(DWLIBS) $(OUTPUT)test-libelf-getphdrnum.bin: $(BUILD) -lelf diff --git a/tools/build/feature/test-all.c b/tools/build/feature/test-all.c index 6f4bf386a3b5..d60e072b6eca 100644 --- a/tools/build/feature/test-all.c +++ b/tools/build/feature/test-all.c @@ -38,8 +38,8 @@ # include "test-glibc.c" #undef main -#define main main_test_dwarf -# include "test-dwarf.c" +#define main main_test_libdw +# include "test-libdw.c" #undef main #define main main_test_dwarf_getlocations @@ -187,7 +187,7 @@ int main(int argc, char *argv[]) main_test_get_current_dir_name(); main_test_gettid(); main_test_glibc(); - main_test_dwarf(); + main_test_libdw(); main_test_dwarf_getlocations(); main_test_eventfd(); main_test_libelf_getphdrnum(); diff --git a/tools/build/feature/test-dwarf.c b/tools/build/feature/test-libdw.c similarity index 100% rename from tools/build/feature/test-dwarf.c rename to tools/build/feature/test-libdw.c diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index 182e14e39cd5..c8e157cc0c5e 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -159,8 +159,8 @@ ifeq ($(findstring -static,${LDFLAGS}),-static) DWARFLIBS += -lebl endif endif -FEATURE_CHECK_CFLAGS-dwarf := $(LIBDW_CFLAGS) -FEATURE_CHECK_LDFLAGS-dwarf := $(LIBDW_LDFLAGS) $(DWARFLIBS) +FEATURE_CHECK_CFLAGS-libdw := $(LIBDW_CFLAGS) +FEATURE_CHECK_LDFLAGS-libdw := $(LIBDW_LDFLAGS) $(DWARFLIBS) FEATURE_CHECK_CFLAGS-libdw-dwarf-unwind := $(LIBDW_CFLAGS) FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind := $(LIBDW_LDFLAGS) $(DWARFLIBS) FEATURE_CHECK_CFLAGS-dwarf_getlocations := $(LIBDW_CFLAGS) @@ -470,7 +470,7 @@ else $(warning No libdw DWARF unwind found, Please install elfutils-devel/libdw-dev >= 0.158 and/or set LIBDW_DIR) endif endif - ifneq ($(feature-dwarf), 1) + ifneq ($(feature-libdw), 1) ifndef NO_LIBDW $(warning No libdw.h found or old libdw.h found or elfutils is older than 0.138, disables dwarf support. Please install new elfutils-devel/libdw-dev) NO_LIBDW := 1