Patches contributed by Eötvös Lorand University
commit 99f4c9de2b707795acb215e2e94df7ea266042b5
Merge: 62ad33f67003 156171c71a0d
Author: Ingo Molnar <mingo@elte.hu>
Date: Tue Nov 17 07:51:02 2009 +0100
Merge commit 'v2.6.32-rc7' into core/iommu
Merge reason: Add fixes we'll depend on.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
commit 0ffa798d947f5f5e40690cc9d38e678080a34f87
Merge: 39dc78b65103 c86e2eaded39 c5659b74f052
Author: Ingo Molnar <mingo@elte.hu>
Date: Sun Nov 15 09:51:19 2009 +0100
Merge branches 'perf/powerpc' and 'perf/bench' into perf/core
Merge reason: Both 'perf bench' and the pending PowerPC changes
are now ready for the next merge window.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --cc include/linux/perf_event.h
index ec3768a81058,a33707a3a788,45b56faf5cdc..df4e73e33774
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@@@ -219,9 -221,8 -219,9 +221,9 @@@@ struct perf_event_attr
#define PERF_EVENT_IOC_DISABLE _IO ('$', 1)
#define PERF_EVENT_IOC_REFRESH _IO ('$', 2)
#define PERF_EVENT_IOC_RESET _IO ('$', 3)
--#define PERF_EVENT_IOC_PERIOD _IOW('$', 4, u64)
++#define PERF_EVENT_IOC_PERIOD _IOW('$', 4, __u64)
#define PERF_EVENT_IOC_SET_OUTPUT _IO ('$', 5)
+ #define PERF_EVENT_IOC_SET_FILTER _IOW('$', 6, char *)
enum perf_event_ioc_flags {
PERF_IOC_FLAG_GROUP = 1U << 0,
diff --cc tools/perf/Makefile
index e6d42728a33a,742a32eee8fc,0a2542844a62..f7cd89622cf4
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@@@ -200,14 -201,7 -200,14 +200,14 @@@@ EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wo
EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wstrict-prototypes
EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wdeclaration-after-statement
- CFLAGS = $(MBITS) -ggdb3 -Wall -Wextra -std=gnu99 -Werror -O6 -fstack-protector-all -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS)
+ ifeq ("$(origin DEBUG)", "command line")
+ PERF_DEBUG = $(DEBUG)
+ endif
+ ifndef PERF_DEBUG
+ CFLAGS_OPTIMIZE = -O6
+ endif
+
-CFLAGS = $(MBITS) -ggdb3 -Wall -Wextra -std=gnu99 -Werror $(CFLAGS_OPTIMIZE) -fstack-protector-all -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS)
++CFLAGS = $(MBITS) -ggdb3 -Wall -Wextra -std=gnu99 -Werror $(CFLAGS_OPTIMIZE) -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS)
LDFLAGS = -lpthread -lrt -lelf -lm
ALL_CFLAGS = $(CFLAGS)
ALL_LDFLAGS = $(LDFLAGS)
@@@@ -337,27 -328,8 -334,26 +337,27 @@@@ LIB_FILE=libperf.
LIB_H += ../../include/linux/perf_event.h
LIB_H += ../../include/linux/rbtree.h
LIB_H += ../../include/linux/list.h
+ LIB_H += util/include/linux/bitmap.h
+ LIB_H += util/include/linux/bitops.h
+ LIB_H += util/include/linux/compiler.h
+ LIB_H += util/include/linux/ctype.h
+ LIB_H += util/include/linux/kernel.h
LIB_H += util/include/linux/list.h
+ LIB_H += util/include/linux/module.h
+ LIB_H += util/include/linux/poison.h
+ LIB_H += util/include/linux/prefetch.h
+ LIB_H += util/include/linux/rbtree.h
+ LIB_H += util/include/linux/string.h
+ LIB_H += util/include/linux/types.h
+ LIB_H += util/include/asm/asm-offsets.h
+ LIB_H += util/include/asm/bitops.h
+ LIB_H += util/include/asm/byteorder.h
+ LIB_H += util/include/asm/swab.h
+ LIB_H += util/include/asm/system.h
+ LIB_H += util/include/asm/uaccess.h
LIB_H += perf.h
++LIB_H += util/debugfs.h
+ LIB_H += util/event.h
LIB_H += util/types.h
LIB_H += util/levenshtein.h
LIB_H += util/parse-options.h
@@@@ -382,9 -351,7 -378,8 +382,9 @@@@ LIB_OBJS += util/abspath.
LIB_OBJS += util/alias.o
LIB_OBJS += util/config.o
LIB_OBJS += util/ctype.o
++LIB_OBJS += util/debugfs.o
LIB_OBJS += util/environment.o
+ LIB_OBJS += util/event.o
LIB_OBJS += util/exec_cmd.o
LIB_OBJS += util/help.o
LIB_OBJS += util/levenshtein.o
@@@@ -416,11 -381,8 -411,18 +416,18 @@@@ LIB_OBJS += util/trace-event-parse.
LIB_OBJS += util/trace-event-read.o
LIB_OBJS += util/trace-event-info.o
LIB_OBJS += util/svghelper.o
+ LIB_OBJS += util/sort.o
+ LIB_OBJS += util/hist.o
+ LIB_OBJS += util/data_map.o
BUILTIN_OBJS += builtin-annotate.o
++
++ BUILTIN_OBJS += builtin-bench.o
++
++ # Benchmark modules
++ BUILTIN_OBJS += bench/sched-messaging.o
++ BUILTIN_OBJS += bench/sched-pipe.o
++
BUILTIN_OBJS += builtin-help.o
BUILTIN_OBJS += builtin-sched.o
BUILTIN_OBJS += builtin-list.o
diff --cc tools/perf/util/parse-events.c
index 097938a96d74,34bd84423933,31baa5a60365..0faf4f2bb5ca
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@@@ -7,12 -7,10 -7,11 +7,12 @@@@
#include "string.h"
#include "cache.h"
#include "header.h"
++#include "debugfs.h"
- int nr_counters;
+ int nr_counters;
struct perf_event_attr attrs[MAX_COUNTERS];
+ char *filters[MAX_COUNTERS];
struct event_symbol {
u8 type;
commit 39dc78b6510323848e3356452f7dab9499736978
Merge: 4c49b12853fb 156171c71a0d
Author: Ingo Molnar <mingo@elte.hu>
Date: Sun Nov 15 09:50:38 2009 +0100
Merge commit 'v2.6.32-rc7' into perf/core
Merge reason: pick up perf fixlets
Signed-off-by: Ingo Molnar <mingo@elte.hu>
commit 68efa37df779b3e04280598e8b5b3a1919b65fee
Author: Ingo Molnar <mingo@elte.hu>
Date: Sat Nov 14 01:35:29 2009 +0100
hw-breakpoints, x86: Fix modular KVM build
This build error:
arch/x86/kvm/x86.c:3655: error: implicit declaration of function 'hw_breakpoint_restore'
Happens because in the CONFIG_KVM=m case there's no 'CONFIG_KVM' define
in the kernel - it's CONFIG_KVM_MODULE in that case.
Make the prototype available unconditionally.
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Prasad <prasad@linux.vnet.ibm.com>
LKML-Reference: <1258114575-32655-1-git-send-email-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/arch/x86/include/asm/debugreg.h b/arch/x86/include/asm/debugreg.h
index 0f6e92af4227..fdabd8435765 100644
--- a/arch/x86/include/asm/debugreg.h
+++ b/arch/x86/include/asm/debugreg.h
@@ -96,9 +96,7 @@ static inline int hw_breakpoint_active(void)
extern void aout_dump_debugregs(struct user *dump);
-#ifdef CONFIG_KVM
extern void hw_breakpoint_restore(void);
-#endif
#endif /* __KERNEL__ */
diff --git a/arch/x86/kernel/hw_breakpoint.c b/arch/x86/kernel/hw_breakpoint.c
index 57dcee5fa958..752daebe91c6 100644
--- a/arch/x86/kernel/hw_breakpoint.c
+++ b/arch/x86/kernel/hw_breakpoint.c
@@ -43,6 +43,7 @@
/* Per cpu debug control register value */
DEFINE_PER_CPU(unsigned long, dr7);
+EXPORT_PER_CPU_SYMBOL(dr7);
/* Per cpu debug address registers values */
static DEFINE_PER_CPU(unsigned long, cpu_debugreg[HBP_NUM]);
@@ -409,6 +410,7 @@ void aout_dump_debugregs(struct user *dump)
dump->u_debugreg[7] = dr7;
}
+EXPORT_SYMBOL_GPL(aout_dump_debugregs);
/*
* Release the user breakpoints used by ptrace
@@ -424,7 +426,6 @@ void flush_ptrace_hw_breakpoint(struct task_struct *tsk)
}
}
-#ifdef CONFIG_KVM
void hw_breakpoint_restore(void)
{
set_debugreg(__get_cpu_var(cpu_debugreg[0]), 0);
@@ -435,7 +436,6 @@ void hw_breakpoint_restore(void)
set_debugreg(__get_cpu_var(dr7), 7);
}
EXPORT_SYMBOL_GPL(hw_breakpoint_restore);
-#endif
/*
* Handle debug exception notifications.
commit 31c997cac76e62918858a432fff6e43fd48425f9
Author: Ingo Molnar <mingo@elte.hu>
Date: Sat Nov 14 10:34:41 2009 +0100
x86: Fix cpu_devs[] initialization in early_cpu_init()
Yinghai Lu noticed that this commit:
0388423: x86: Minimise printk spew from per-vendor init code
mistakenly left out the initialization of cpu_devs[] in the
!PROCESSOR_SELECT case. Fix it.
Reported-by: Yinghai Lu <yinghai@kernel.org>
Cc: Dave Jones <davej@redhat.com>
LKML-Reference: <20091113203000.GA19160@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 9db1e2425c27..61242a56c2d6 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -651,28 +651,34 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
void __init early_cpu_init(void)
{
-#ifdef PROCESSOR_SELECT
const struct cpu_dev *const *cdev;
int count = 0;
+#ifdef PROCESSOR_SELECT
printk(KERN_INFO "KERNEL supported cpus:\n");
+#endif
+
for (cdev = __x86_cpu_dev_start; cdev < __x86_cpu_dev_end; cdev++) {
const struct cpu_dev *cpudev = *cdev;
- unsigned int j;
if (count >= X86_VENDOR_NUM)
break;
cpu_devs[count] = cpudev;
count++;
- for (j = 0; j < 2; j++) {
- if (!cpudev->c_ident[j])
- continue;
- printk(KERN_INFO " %s %s\n", cpudev->c_vendor,
- cpudev->c_ident[j]);
+#ifdef PROCESSOR_SELECT
+ {
+ unsigned int j;
+
+ for (j = 0; j < 2; j++) {
+ if (!cpudev->c_ident[j])
+ continue;
+ printk(KERN_INFO " %s %s\n", cpudev->c_vendor,
+ cpudev->c_ident[j]);
+ }
}
- }
#endif
+ }
early_identify_cpu(&boot_cpu_data);
}
commit 688bcaff291cf2fe2734e43f2793d4d05b850518
Author: Ingo Molnar <mingo@elte.hu>
Date: Sat Nov 14 01:12:47 2009 +0100
hw-breakpoints: Fix build on !perf architectures
the arch/alpha build fails with:
In file included from tip/kernel/exit.c:52:
tip/include/linux/hw_breakpoint.h: In function 'hw_breakpoint_addr':
tip/include/linux/hw_breakpoint.h:21: error: 'struct perf_event' has no member named 'attr'
[...]
Move these helper inlines inside the CONFIG_HAVE_HW_BREAKPOINT ifdef.
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Prasad <prasad@linux.vnet.ibm.com>
LKML-Reference: <1258114575-32655-1-git-send-email-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/include/linux/hw_breakpoint.h b/include/linux/hw_breakpoint.h
index 18710e0c84bd..0b98cbf76da7 100644
--- a/include/linux/hw_breakpoint.h
+++ b/include/linux/hw_breakpoint.h
@@ -16,6 +16,8 @@ enum {
HW_BREAKPOINT_X = 4,
};
+#ifdef CONFIG_HAVE_HW_BREAKPOINT
+
static inline unsigned long hw_breakpoint_addr(struct perf_event *bp)
{
return bp->attr.bp_addr;
@@ -31,7 +33,6 @@ static inline int hw_breakpoint_len(struct perf_event *bp)
return bp->attr.bp_len;
}
-#ifdef CONFIG_HAVE_HW_BREAKPOINT
extern struct perf_event *
register_user_hw_breakpoint(unsigned long addr,
int len,
commit b4941a9a606f0131559cc040b64e8437ac7b32c5
Author: Ingo Molnar <mingo@elte.hu>
Date: Tue Nov 10 14:37:58 2009 +0100
x86: Add iommu_init to x86_init_ops, fix build
Most of the time x86_init.h is included in pci-dma.c - but not always,
leading to this rare build failure:
arch/x86/kernel/pci-dma.c:296: error: 'x86_init' undeclared (first use in this function)
So include asm/x86_init.h explicitly.
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: chrisw@sous-sol.org
Cc: dwmw2@infradead.org
Cc: joerg.roedel@amd.com
Cc: muli@il.ibm.com
LKML-Reference: <1257849980-22640-2-git-send-email-fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index 63eebee80e75..f79870e89266 100644
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -11,6 +11,7 @@
#include <asm/gart.h>
#include <asm/calgary.h>
#include <asm/amd_iommu.h>
+#include <asm/x86_init.h>
static int forbid_dac __read_mostly;
commit 606bc1e18d346fc7d7fb333909cc95b06b1ca5b1
Author: Ingo Molnar <mingo@elte.hu>
Date: Tue Nov 10 20:50:53 2009 +0900
perf bench: Clean up bench/bench.h
Clean up initializers in bench.h:
- No need to break the line for function prototypes, they are more
readable in a single line. (even if checkpatch complains about it
- We try to align definitions / structure fields vertically,
to make it all a bit more readable.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1257853855-28934-2-git-send-email-mitake@dcl.info.waseda.ac.jp>
diff --git a/tools/perf/bench/bench.h b/tools/perf/bench/bench.h
index 42167ea41944..9fbd8d745fa1 100644
--- a/tools/perf/bench/bench.h
+++ b/tools/perf/bench/bench.h
@@ -1,17 +1,15 @@
#ifndef BENCH_H
#define BENCH_H
-extern int bench_sched_messaging(int argc, const char **argv,
- const char *prefix);
-extern int bench_sched_pipe(int argc, const char **argv,
- const char *prefix);
+extern int bench_sched_messaging(int argc, const char **argv, const char *prefix);
+extern int bench_sched_pipe(int argc, const char **argv, const char *prefix);
-#define BENCH_FORMAT_DEFAULT_STR "default"
-#define BENCH_FORMAT_DEFAULT 0
-#define BENCH_FORMAT_SIMPLE_STR "simple"
-#define BENCH_FORMAT_SIMPLE 1
+#define BENCH_FORMAT_DEFAULT_STR "default"
+#define BENCH_FORMAT_DEFAULT 0
+#define BENCH_FORMAT_SIMPLE_STR "simple"
+#define BENCH_FORMAT_SIMPLE 1
-#define BENCH_FORMAT_UNKNOWN -1
+#define BENCH_FORMAT_UNKNOWN -1
extern int bench_format;
commit 7e1a2766e67a529f62c8cfba0a47d63fc4f7fa8a
Merge: c5e0cb3ddc5f 83f5b01ffbba
Author: Ingo Molnar <mingo@elte.hu>
Date: Tue Nov 10 04:10:31 2009 +0100
Merge branch 'core/urgent' into core/rcu
Merge reason: Pick up RCU fixlet to base further commits on.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
commit a2e71271535fde493c32803b1f34789f97efcb5e
Merge: 6d7aa9d721c8 b419148e5677
Author: Ingo Molnar <mingo@elte.hu>
Date: Wed Nov 4 11:54:15 2009 +0100
Merge commit 'v2.6.32-rc6' into perf/core
Conflicts:
tools/perf/Makefile
Merge reason: Resolve the conflict, merge to upstream and merge in
perf fixes so we can add a dependent patch.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --cc tools/perf/util/symbol.c
index 93c49f4685ff,226f44a2357d..ac94d7b94f61
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@@ -671,11 -531,13 +671,11 @@@ static int dso__load_sym(struct dso *se
GElf_Sym sym;
Elf_Scn *sec, *sec_strndx;
Elf *elf;
- int nr = 0, kernel = !strcmp("[kernel]", self->name);
+ int nr = 0;
- elf = elf_begin(fd, ELF_C_READ_MMAP, NULL);
+ elf = elf_begin(fd, PERF_ELF_C_READ_MMAP, NULL);
if (elf == NULL) {
- if (v)
- fprintf(stderr, "%s: cannot read %s ELF file.\n",
- __func__, name);
+ pr_err("%s: cannot read %s ELF file.\n", __func__, name);
goto out_close;
}
@@@ -842,10 -675,11 +842,10 @@@ static char *dso__read_build_id(struct
if (fd < 0)
goto out;
- elf = elf_begin(fd, ELF_C_READ_MMAP, NULL);
+ elf = elf_begin(fd, PERF_ELF_C_READ_MMAP, NULL);
if (elf == NULL) {
- if (v)
- fprintf(stderr, "%s: cannot read %s ELF file.\n",
- __func__, self->name);
+ pr_err("%s: cannot read %s ELF file.\n", __func__,
+ self->long_name);
goto out_close;
}