[PATCH v2] perf arm: Fix off-by-one directory paths.

Arnaldo Carvalho de Melo acme at kernel.org
Fri Sep 24 12:00:23 PDT 2021


Em Thu, Sep 23, 2021 at 08:42:54AM -0700, Ian Rogers escreveu:
> Relative path include works in the regular build due to -I paths but may
> fail in other situations.
> 
> v2. Rebase. Comments on v1 were that we should handle include paths
>     differently and it is agreed that can be a sensible refactor but
>     beyond the scope of this change.
> https://lore.kernel.org/lkml/20210504191227.793712-1-irogers@google.com/

Thanks, applied.

- Arnaldo

 
> Signed-off-by: Ian Rogers <irogers at google.com>
> ---
>  tools/perf/arch/arm/util/auxtrace.c         |  8 +++----
>  tools/perf/arch/arm/util/cs-etm.c           | 24 ++++++++++-----------
>  tools/perf/arch/arm/util/perf_regs.c        |  2 +-
>  tools/perf/arch/arm/util/pmu.c              |  2 +-
>  tools/perf/arch/arm/util/unwind-libdw.c     |  6 +++---
>  tools/perf/arch/arm/util/unwind-libunwind.c |  4 ++--
>  6 files changed, 23 insertions(+), 23 deletions(-)
> 
> diff --git a/tools/perf/arch/arm/util/auxtrace.c b/tools/perf/arch/arm/util/auxtrace.c
> index c7c7ec0812d5..5fc6a2a3dbc5 100644
> --- a/tools/perf/arch/arm/util/auxtrace.c
> +++ b/tools/perf/arch/arm/util/auxtrace.c
> @@ -8,10 +8,10 @@
>  #include <linux/coresight-pmu.h>
>  #include <linux/zalloc.h>
>  
> -#include "../../util/auxtrace.h"
> -#include "../../util/debug.h"
> -#include "../../util/evlist.h"
> -#include "../../util/pmu.h"
> +#include "../../../util/auxtrace.h"
> +#include "../../../util/debug.h"
> +#include "../../../util/evlist.h"
> +#include "../../../util/pmu.h"
>  #include "cs-etm.h"
>  #include "arm-spe.h"
>  
> diff --git a/tools/perf/arch/arm/util/cs-etm.c b/tools/perf/arch/arm/util/cs-etm.c
> index 515aae470e23..293a23bf8be3 100644
> --- a/tools/perf/arch/arm/util/cs-etm.c
> +++ b/tools/perf/arch/arm/util/cs-etm.c
> @@ -16,19 +16,19 @@
>  #include <linux/zalloc.h>
>  
>  #include "cs-etm.h"
> -#include "../../util/debug.h"
> -#include "../../util/record.h"
> -#include "../../util/auxtrace.h"
> -#include "../../util/cpumap.h"
> -#include "../../util/event.h"
> -#include "../../util/evlist.h"
> -#include "../../util/evsel.h"
> -#include "../../util/perf_api_probe.h"
> -#include "../../util/evsel_config.h"
> -#include "../../util/pmu.h"
> -#include "../../util/cs-etm.h"
> +#include "../../../util/debug.h"
> +#include "../../../util/record.h"
> +#include "../../../util/auxtrace.h"
> +#include "../../../util/cpumap.h"
> +#include "../../../util/event.h"
> +#include "../../../util/evlist.h"
> +#include "../../../util/evsel.h"
> +#include "../../../util/perf_api_probe.h"
> +#include "../../../util/evsel_config.h"
> +#include "../../../util/pmu.h"
> +#include "../../../util/cs-etm.h"
>  #include <internal/lib.h> // page_size
> -#include "../../util/session.h"
> +#include "../../../util/session.h"
>  
>  #include <errno.h>
>  #include <stdlib.h>
> diff --git a/tools/perf/arch/arm/util/perf_regs.c b/tools/perf/arch/arm/util/perf_regs.c
> index 2864e2e3776d..2833e101a7c6 100644
> --- a/tools/perf/arch/arm/util/perf_regs.c
> +++ b/tools/perf/arch/arm/util/perf_regs.c
> @@ -1,5 +1,5 @@
>  // SPDX-License-Identifier: GPL-2.0
> -#include "../../util/perf_regs.h"
> +#include "../../../util/perf_regs.h"
>  
>  const struct sample_reg sample_reg_masks[] = {
>  	SMPL_REG_END
> diff --git a/tools/perf/arch/arm/util/pmu.c b/tools/perf/arch/arm/util/pmu.c
> index bbc297a7e2e3..b8b23b9dc598 100644
> --- a/tools/perf/arch/arm/util/pmu.c
> +++ b/tools/perf/arch/arm/util/pmu.c
> @@ -10,7 +10,7 @@
>  #include <linux/string.h>
>  
>  #include "arm-spe.h"
> -#include "../../util/pmu.h"
> +#include "../../../util/pmu.h"
>  
>  struct perf_event_attr
>  *perf_pmu__get_default_config(struct perf_pmu *pmu __maybe_unused)
> diff --git a/tools/perf/arch/arm/util/unwind-libdw.c b/tools/perf/arch/arm/util/unwind-libdw.c
> index 36ba4c69c3c5..b7692cb0c733 100644
> --- a/tools/perf/arch/arm/util/unwind-libdw.c
> +++ b/tools/perf/arch/arm/util/unwind-libdw.c
> @@ -1,8 +1,8 @@
>  // SPDX-License-Identifier: GPL-2.0
>  #include <elfutils/libdwfl.h>
> -#include "../../util/unwind-libdw.h"
> -#include "../../util/perf_regs.h"
> -#include "../../util/event.h"
> +#include "../../../util/unwind-libdw.h"
> +#include "../../../util/perf_regs.h"
> +#include "../../../util/event.h"
>  
>  bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg)
>  {
> diff --git a/tools/perf/arch/arm/util/unwind-libunwind.c b/tools/perf/arch/arm/util/unwind-libunwind.c
> index 3a550225dfaf..438906bf0014 100644
> --- a/tools/perf/arch/arm/util/unwind-libunwind.c
> +++ b/tools/perf/arch/arm/util/unwind-libunwind.c
> @@ -3,8 +3,8 @@
>  #include <errno.h>
>  #include <libunwind.h>
>  #include "perf_regs.h"
> -#include "../../util/unwind.h"
> -#include "../../util/debug.h"
> +#include "../../../util/unwind.h"
> +#include "../../../util/debug.h"
>  
>  int libunwind__arch_reg_id(int regnum)
>  {
> -- 
> 2.33.0.464.g1972c5931b-goog

-- 

- Arnaldo



More information about the linux-arm-kernel mailing list