Skip to contentSkip to conversation

tools: perf: util: fix include for non x86 architectures

PATCH New Francesco Fusco 2 participants 2 messages Jan 27, 2014 – Feb 2, 2014 1 message not in the archive perf events

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 tools: perf: util: fix include for non x86 architectures

Commit 71ae8aac ("lib: introduce arch optimized hash library") added an include to <linux/hash.h> for setting up an architecture specific fast hash. Since perf includes directly the non-uapi kernel header, it cannot find <asm/hash.h> on non-x86 and thus prevents perf to be compiled on every architecture other than x86. The problem is the inclusion of <asm/hash.h> in hash.h that results in the following error originating from util/evlist.c:

fatal error: asm/hash.h: No such file or directory

This commit simply adds an empty <asm/hash.h> stub/file to fix the compile issue on non-x86 architectures. As perf does not use any of these new functions, it fixes the compilation and therefore seems to be the most appropriate solution to go with.

---
 tools/perf/util/include/asm/hash.h | 6 ++++++
 1 file changed, 6 insertions(+)
 create mode 100644 tools/perf/util/include/asm/hash.h
tools/perf/util/include/asm/hash.h new file +6 -0
new file mode 100644
index 0000000..d82b170b
@@ -0,0 +1,6 @@
+#ifndef __ASM_GENERIC_HASH_H
+#define __ASM_GENERIC_HASH_H
+
+/* Stub */
+
+#endif /* __ASM_GENERIC_HASH_H */
Signature · 1 line
1.8.3.1
#2 lore raw

[tip:perf/urgent] perf tools: Fix include for non x86 architectures

perf tools: Fix include for non x86 architectures
Commit-ID:  6a02652df511029127406cf8fa89cdf5e987f963
Gitweb:     http://git.kernel.org/tip/6a02652df511029127406cf8fa89cdf5e987f963
Author:     Francesco Fusco <[email protected]>
AuthorDate: Mon, 27 Jan 2014 14:39:13 +0100
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Fri, 31 Jan 2014 17:21:42 -0300

perf tools: Fix include for non x86 architectures

Commit 71ae8aac ("lib: introduce arch optimized hash library") added an include to <linux/hash.h> for setting up an architecture specific fast hash.

Since perf includes directly the non-uapi kernel header, it cannot find <asm/hash.h> on non-x86 and thus prevents perf to be compiled on every architecture other than x86.

The problem is the inclusion of <asm/hash.h> in hash.h that results in the following error originating from util/evlist.c:

fatal error: asm/hash.h: No such file or directory

This commit simply adds an empty <asm/hash.h> stub/file to fix the compile issue on non-x86 architectures.

As perf does not use any of these new functions, it fixes the compilation and therefore seems to be the most appropriate solution to go with.

---
 tools/perf/util/include/asm/hash.h | 6 ++++++
 1 file changed, 6 insertions(+)
tools/perf/util/include/asm/hash.h new file +6 -0
new file mode 100644
index 0000000..d82b170b
@@ -0,0 +1,6 @@
+#ifndef __ASM_GENERIC_HASH_H
+#define __ASM_GENERIC_HASH_H
+
+/* Stub */
+
+#endif /* __ASM_GENERIC_HASH_H */