Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp731752pxj; Thu, 13 May 2021 15:49:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2efVfmtq7jJXvTsllMm50/Awt7iR62JmaoQu2Q2VY9OrgfMpTOrvCRr35D8gvxF5u+HrY X-Received: by 2002:a17:907:1b06:: with SMTP id mp6mr46386081ejc.292.1620946198422; Thu, 13 May 2021 15:49:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620946198; cv=none; d=google.com; s=arc-20160816; b=bypw8nw0Jm/a+1Ra5t38XdgRSmSLuLHcRlXfbvTaZLqM3fsXkwLTkMjpAU2I73W3Oh bFpk9ruSlqLFvwJgOS7VZZavQXXFPu5ka4d18aMhzR1lzQoP01CfyM4qq9rPm7UOeKJ4 xjlsED8qxticvYsI0sM2Nt4KDbA5d6l1IPAs/7aQ1cerDRPQnUDsYfxe7LXQvaGNYb1b pOnQ4GmUyn2QvgEzAqVFIJmvfJRbCYr5kNGGT1DYLUZoxtTR76hNHxzRuIzP5WXmJ7n0 7HVXppA1ifoOLAtY/VMK5eIxQSE30K+eOCpe92UpFSze7tuwp12LN4ZcWgjqKN75lGdk lJdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=zdTDXiO3NCoXj2kA8r3dNvE7uEpdg8I31kDVNthsFDo=; b=PJL9Jxmwb9QCvDqjr+xzqOHfpNn2gKxum0I8AH8e0r+b+K5qVMK9lWW5uaR0jlq09/ 46Vk+gUAvgp2o7+k96cgWD/7t4BiZAP6+6RyuPhtn5XqA9qCEqx3GcjiJO80ivXm+3CP BlCjStb1T/wCtiEwv92AT35TVMJX3X4wvqhgpJsNNUm5GAKHlyxIlvFtLkxilzI9yvwd KO8i2B0BgV+icZSvjDyvKP9IfHNfzn5f6YBaHj1zSn2dpXxTKzPHs7zvRmaoOndgygYn nPOinbyHZbzDTpHJh+zGOHqxC9nQz6O9SUPya/rfAeRr+GJ47hIG1rdimKqf+Q6aFCDZ eRnQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j10si3860704edn.595.2021.05.13.15.49.34; Thu, 13 May 2021 15:49:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S230204AbhEMRr1 (ORCPT + 99 others); Thu, 13 May 2021 13:47:27 -0400 Received: from mail-oi1-f173.google.com ([209.85.167.173]:43582 "EHLO mail-oi1-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230175AbhEMRr0 (ORCPT ); Thu, 13 May 2021 13:47:26 -0400 Received: by mail-oi1-f173.google.com with SMTP id j75so26020232oih.10; Thu, 13 May 2021 10:46:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zdTDXiO3NCoXj2kA8r3dNvE7uEpdg8I31kDVNthsFDo=; b=gpY5EbX4xu/u+ROrmiRe8Kr7I/UEZELKt2apMxu2zSqx8zX2KArlf8wq4cXyFwz2xb mnG52vTLo/wknb4UvEMngl/FxclmMkepKaayRA9N8TkUbgUittshbL5tm1AMscB71Lo3 ai/qfSYdxGAax7zN6h3MCNwM3Lgq2uDL8VUjiI9B+9tTKVlMJwywfY8XefDd68LM8aQf Fo+RLwxacrTWARCvdlZNtKF2NnHYvwHB9IZ3UN5r7u+G8bMle1Zjam2N+vMjQbHRaqBy tDD5YEaYfeah1BKPjoqLpE99u8OrDZApO0FbhcNIHCRBR8g5/6XOYlb7pyJuFGXca+JY pPNQ== X-Gm-Message-State: AOAM53030PQ8uCwWaUHoY+IzNWSpyyINbux1Cbdh9VRfajo75uPuZPMw znZK/V+HAOZs0JBoOKJVMA== X-Received: by 2002:aca:1a16:: with SMTP id a22mr31566448oia.55.1620927976007; Thu, 13 May 2021 10:46:16 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id r7sm799574oom.46.2021.05.13.10.46.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 May 2021 10:46:15 -0700 (PDT) From: Rob Herring To: Arnaldo Carvalho de Melo Cc: linux-kernel@vger.kernel.org, Matt Fleming , Masayoshi Mizuma , John Garry , Will Deacon , Mathieu Poirier , Leo Yan , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org Subject: [PATCH 1/2] perf tests: Consolidate test__arch_unwind_sample declaration Date: Thu, 13 May 2021 12:46:13 -0500 Message-Id: <20210513174614.2242210-1-robh@kernel.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There's no reason for making the test__arch_unwind_sample declaration per arch. Currently that's done 2 different ways either with a declaration in arch-tests.h or with an arch define. Unify all this with an unconditional declaration in tests.h. Cc: Matt Fleming Cc: Masayoshi Mizuma Cc: John Garry Cc: Will Deacon Cc: Mathieu Poirier Cc: Leo Yan Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Mark Rutland Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: linux-arm-kernel@lists.infradead.org Cc: linux-perf-users@vger.kernel.org Signed-off-by: Rob Herring --- Note that the only thing really arch specific is getting the stack pointer. I'm happy to refactor this further to just an arch function to get the stack pointer reg. Compiled on arm64 and x86. --- tools/perf/arch/arm/include/arch-tests.h | 5 ----- tools/perf/arch/arm64/include/arch-tests.h | 5 ----- tools/perf/arch/powerpc/include/arch-tests.h | 7 ------- tools/perf/arch/powerpc/tests/dwarf-unwind.c | 1 - tools/perf/arch/x86/include/arch-tests.h | 7 ------- tools/perf/arch/x86/tests/dwarf-unwind.c | 1 - tools/perf/tests/dwarf-unwind.c | 4 ---- tools/perf/tests/tests.h | 2 -- 8 files changed, 32 deletions(-) diff --git a/tools/perf/arch/arm/include/arch-tests.h b/tools/perf/arch/arm/include/arch-tests.h index 90ec4c8cb880..c62538052404 100644 --- a/tools/perf/arch/arm/include/arch-tests.h +++ b/tools/perf/arch/arm/include/arch-tests.h @@ -2,11 +2,6 @@ #ifndef ARCH_TESTS_H #define ARCH_TESTS_H -#ifdef HAVE_DWARF_UNWIND_SUPPORT -struct thread; -struct perf_sample; -#endif - extern struct test arch_tests[]; #endif diff --git a/tools/perf/arch/arm64/include/arch-tests.h b/tools/perf/arch/arm64/include/arch-tests.h index 90ec4c8cb880..c62538052404 100644 --- a/tools/perf/arch/arm64/include/arch-tests.h +++ b/tools/perf/arch/arm64/include/arch-tests.h @@ -2,11 +2,6 @@ #ifndef ARCH_TESTS_H #define ARCH_TESTS_H -#ifdef HAVE_DWARF_UNWIND_SUPPORT -struct thread; -struct perf_sample; -#endif - extern struct test arch_tests[]; #endif diff --git a/tools/perf/arch/powerpc/include/arch-tests.h b/tools/perf/arch/powerpc/include/arch-tests.h index 1c7be75cbc78..c62538052404 100644 --- a/tools/perf/arch/powerpc/include/arch-tests.h +++ b/tools/perf/arch/powerpc/include/arch-tests.h @@ -2,13 +2,6 @@ #ifndef ARCH_TESTS_H #define ARCH_TESTS_H -#ifdef HAVE_DWARF_UNWIND_SUPPORT -struct thread; -struct perf_sample; -int test__arch_unwind_sample(struct perf_sample *sample, - struct thread *thread); -#endif - extern struct test arch_tests[]; #endif diff --git a/tools/perf/arch/powerpc/tests/dwarf-unwind.c b/tools/perf/arch/powerpc/tests/dwarf-unwind.c index 8efd9ed9e9db..c9cb4b059392 100644 --- a/tools/perf/arch/powerpc/tests/dwarf-unwind.c +++ b/tools/perf/arch/powerpc/tests/dwarf-unwind.c @@ -7,7 +7,6 @@ #include "event.h" #include "debug.h" #include "tests/tests.h" -#include "arch-tests.h" #define STACK_SIZE 8192 diff --git a/tools/perf/arch/x86/include/arch-tests.h b/tools/perf/arch/x86/include/arch-tests.h index 0e20f3dc69f3..462546bfc5f7 100644 --- a/tools/perf/arch/x86/include/arch-tests.h +++ b/tools/perf/arch/x86/include/arch-tests.h @@ -12,13 +12,6 @@ int test__intel_pt_pkt_decoder(struct test *test, int subtest); int test__bp_modify(struct test *test, int subtest); int test__x86_sample_parsing(struct test *test, int subtest); -#ifdef HAVE_DWARF_UNWIND_SUPPORT -struct thread; -struct perf_sample; -int test__arch_unwind_sample(struct perf_sample *sample, - struct thread *thread); -#endif - extern struct test arch_tests[]; #endif diff --git a/tools/perf/arch/x86/tests/dwarf-unwind.c b/tools/perf/arch/x86/tests/dwarf-unwind.c index 478078fb0f22..a54dea7c112f 100644 --- a/tools/perf/arch/x86/tests/dwarf-unwind.c +++ b/tools/perf/arch/x86/tests/dwarf-unwind.c @@ -7,7 +7,6 @@ #include "event.h" #include "debug.h" #include "tests/tests.h" -#include "arch-tests.h" #define STACK_SIZE 8192 diff --git a/tools/perf/tests/dwarf-unwind.c b/tools/perf/tests/dwarf-unwind.c index 83638097c3bc..a288035eb362 100644 --- a/tools/perf/tests/dwarf-unwind.c +++ b/tools/perf/tests/dwarf-unwind.c @@ -17,10 +17,6 @@ #include "callchain.h" #include "util/synthetic-events.h" -#if defined (__x86_64__) || defined (__i386__) || defined (__powerpc__) -#include "arch-tests.h" -#endif - /* For bsearch. We try to unwind functions in shared object. */ #include diff --git a/tools/perf/tests/tests.h b/tools/perf/tests/tests.h index b85f005308a3..1100dd55b657 100644 --- a/tools/perf/tests/tests.h +++ b/tools/perf/tests/tests.h @@ -133,14 +133,12 @@ bool test__bp_account_is_supported(void); bool test__wp_is_supported(void); bool test__tsc_is_supported(void); -#if defined(__arm__) || defined(__aarch64__) #ifdef HAVE_DWARF_UNWIND_SUPPORT struct thread; struct perf_sample; int test__arch_unwind_sample(struct perf_sample *sample, struct thread *thread); #endif -#endif #if defined(__arm__) int test__vectors_page(struct test *test, int subtest); -- 2.27.0