Skip to contentSkip to conversation

perf libdw: Fix off-by 1 relative directory includes

PATCH Applied Ian Rogers 3 participants 4 messages May 29, 2020 – Jun 1, 2020

Subsystems (2)
lore
Share & tools
lore

Ian Rogers

author reviewer
#0 lore raw

PATCH 1/1 perf libdw: Fix off-by 1 relative directory includes

This is currently working due to extra include paths in the build.

Before:

$ cd tools/perf/arch/arm64/util
$ ls -la ../../util/unwind-libdw.h
ls: cannot access '../../util/unwind-libdw.h': No such file or directory

After:

$ ls -la ../../../util/unwind-libdw.h
-rw-r----- 1 irogers irogers 553 Apr 17 14:31 ../../../util/unwind-libdw.h
---
 tools/perf/arch/arm64/util/unwind-libdw.c   | 6 +++---
 tools/perf/arch/powerpc/util/unwind-libdw.c | 6 +++---
 tools/perf/arch/x86/util/unwind-libdw.c     | 6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)
tools/perf/arch/arm64/util/unwind-libdw.c +3 -3
index 7623d85e77f3..a50941629649 100644
@@ -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)
 {
tools/perf/arch/powerpc/util/unwind-libdw.c +3 -3
index abf2dbc7f829..7b2d96ec28e3 100644
@@ -1,9 +1,9 @@
 // SPDX-License-Identifier: GPL-2.0
 #include <elfutils/libdwfl.h>
 #include <linux/kernel.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"
 
 /* See backends/ppc_initreg.c and backends/ppc_regs.c in elfutils.  */
 static const int special_regs[3][2] = {
tools/perf/arch/x86/util/unwind-libdw.c +3 -3
index fda8f4206ee4..eea2bf87232b 100644
@@ -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)
 {
Signature · 1 line
2.27.0.rc2.251.g90737beb825-goog
maintainer Acked-by on v1 1/1
#1 lore raw

Hi Ian,

Quoted 11 lines · Ian Rogers

This is currently working due to extra include paths in the build.

Before:

$ cd tools/perf/arch/arm64/util
$ ls -la ../../util/unwind-libdw.h
ls: cannot access '../../util/unwind-libdw.h': No such file or directory

After:

$ ls -la ../../../util/unwind-libdw.h
-rw-r----- 1 irogers irogers 553 Apr 17 14:31 ../../../util/unwind-libdw.h

Missing sign-off, but otherwise looks good to me

Thanks
Namhyung

Quoted 58 lines
---
 tools/perf/arch/arm64/util/unwind-libdw.c   | 6 +++---
 tools/perf/arch/powerpc/util/unwind-libdw.c | 6 +++---
 tools/perf/arch/x86/util/unwind-libdw.c     | 6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)
tools/perf/arch/arm64/util/unwind-libdw.c +3 -3
index 7623d85e77f3..a50941629649 100644
@@ -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)
 {
tools/perf/arch/powerpc/util/unwind-libdw.c +3 -3
index abf2dbc7f829..7b2d96ec28e3 100644
@@ -1,9 +1,9 @@
 // SPDX-License-Identifier: GPL-2.0
 #include <elfutils/libdwfl.h>
 #include <linux/kernel.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"
 
 /* See backends/ppc_initreg.c and backends/ppc_regs.c in elfutils.  */
 static const int special_regs[3][2] = {
tools/perf/arch/x86/util/unwind-libdw.c +3 -4
index fda8f4206ee4..eea2bf87232b 100644
@@ -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)
 {
--

2.27.0.rc2.251.g90737beb825-goog

author reviewer
#2 lore raw
Quoted 12 lines · Namhyung Kim

Hi Ian,

Quoted 8 lines · Ian Rogers

This is currently working due to extra include paths in the build.

Before:

$ cd tools/perf/arch/arm64/util
$ ls -la ../../util/unwind-libdw.h
ls: cannot access '../../util/unwind-libdw.h': No such file or directory
Quoted 5 lines
Quoted 3 lines

After:

$ ls -la ../../../util/unwind-libdw.h
-rw-r----- 1 irogers irogers 553 Apr 17 14:31 ../../../util/unwind-libdw.h

Missing sign-off, but otherwise looks good to me

Doh! Thanks Namhyung.

Ian

Quoted 64 lines

Thanks
Namhyung

Quoted 58 lines
---
 tools/perf/arch/arm64/util/unwind-libdw.c   | 6 +++---
 tools/perf/arch/powerpc/util/unwind-libdw.c | 6 +++---
 tools/perf/arch/x86/util/unwind-libdw.c     | 6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)
tools/perf/arch/arm64/util/unwind-libdw.c +3 -3
index 7623d85e77f3..a50941629649 100644
@@ -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)
 {
tools/perf/arch/powerpc/util/unwind-libdw.c +3 -3
index abf2dbc7f829..7b2d96ec28e3 100644
@@ -1,9 +1,9 @@
 // SPDX-License-Identifier: GPL-2.0
 #include <elfutils/libdwfl.h>
 #include <linux/kernel.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"
 
 /* See backends/ppc_initreg.c and backends/ppc_regs.c in elfutils.  */
 static const int special_regs[3][2] = {
tools/perf/arch/x86/util/unwind-libdw.c +3 -4
index fda8f4206ee4..eea2bf87232b 100644
@@ -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)
 {
--

2.27.0.rc2.251.g90737beb825-goog

maintainer Applied
#3 lore raw

Em Sun, May 31, 2020 at 05:06:08PM -0700, Ian Rogers escreveu:

Quoted 17 lines · Namhyung Kim
Quoted 16 lines

Hi Ian,

Quoted 11 lines · Ian Rogers

This is currently working due to extra include paths in the build.

Before:

$ cd tools/perf/arch/arm64/util
$ ls -la ../../util/unwind-libdw.h
ls: cannot access '../../util/unwind-libdw.h': No such file or directory

After:

$ ls -la ../../../util/unwind-libdw.h
-rw-r----- 1 irogers irogers 553 Apr 17 14:31 ../../../util/unwind-libdw.h
Quoted 5 lines
Quoted 1 line

Missing sign-off, but otherwise looks good to me

Doh! Thanks Namhyung.

Thanks, applied.

- Arnaldo

Quoted 66 lines

Ian

Quoted 64 lines

Thanks
Namhyung

Quoted 58 lines
---
 tools/perf/arch/arm64/util/unwind-libdw.c   | 6 +++---
 tools/perf/arch/powerpc/util/unwind-libdw.c | 6 +++---
 tools/perf/arch/x86/util/unwind-libdw.c     | 6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)
tools/perf/arch/arm64/util/unwind-libdw.c +3 -3
index 7623d85e77f3..a50941629649 100644
@@ -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)
 {
tools/perf/arch/powerpc/util/unwind-libdw.c +3 -3
index abf2dbc7f829..7b2d96ec28e3 100644
@@ -1,9 +1,9 @@
 // SPDX-License-Identifier: GPL-2.0
 #include <elfutils/libdwfl.h>
 #include <linux/kernel.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"
 
 /* See backends/ppc_initreg.c and backends/ppc_regs.c in elfutils.  */
 static const int special_regs[3][2] = {
tools/perf/arch/x86/util/unwind-libdw.c +3 -4
index fda8f4206ee4..eea2bf87232b 100644
@@ -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)
 {
--

2.27.0.rc2.251.g90737beb825-goog

Signature · 1 line
- Arnaldo