Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 223832
b: refs/heads/master
c: ea7872b
h: refs/heads/master
v: v3
  • Loading branch information
Hitoshi Mitake authored and Ingo Molnar committed Nov 26, 2010
1 parent 50fdf16 commit 033c4ef
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 49ce8fc651794878189fd5f273228832cdfb5be9
refs/heads/master: ea7872b9d6a81101f6ba0ec141544a62fea35876
11 changes: 11 additions & 0 deletions trunk/tools/perf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,10 @@ ifeq ($(ARCH),i386)
ARCH := x86
endif
ifeq ($(ARCH),x86_64)
RAW_ARCH := x86_64
ARCH := x86
ARCH_CFLAGS := -DARCH_X86_64
ARCH_INCLUDE = ../../arch/x86/lib/memcpy_64.S
endif

# CFLAGS and LDFLAGS are for the users to override from the command line.
Expand Down Expand Up @@ -375,6 +378,7 @@ 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/linux/linkage.h
LIB_H += util/include/asm/asm-offsets.h
LIB_H += util/include/asm/bug.h
LIB_H += util/include/asm/byteorder.h
Expand All @@ -383,6 +387,8 @@ LIB_H += util/include/asm/swab.h
LIB_H += util/include/asm/system.h
LIB_H += util/include/asm/uaccess.h
LIB_H += util/include/dwarf-regs.h
LIB_H += util/include/asm/dwarf2.h
LIB_H += util/include/asm/cpufeature.h
LIB_H += perf.h
LIB_H += util/cache.h
LIB_H += util/callchain.h
Expand Down Expand Up @@ -417,6 +423,7 @@ LIB_H += util/probe-finder.h
LIB_H += util/probe-event.h
LIB_H += util/pstack.h
LIB_H += util/cpumap.h
LIB_H += $(ARCH_INCLUDE)

LIB_OBJS += $(OUTPUT)util/abspath.o
LIB_OBJS += $(OUTPUT)util/alias.o
Expand Down Expand Up @@ -472,6 +479,9 @@ BUILTIN_OBJS += $(OUTPUT)builtin-bench.o
# Benchmark modules
BUILTIN_OBJS += $(OUTPUT)bench/sched-messaging.o
BUILTIN_OBJS += $(OUTPUT)bench/sched-pipe.o
ifeq ($(RAW_ARCH),x86_64)
BUILTIN_OBJS += $(OUTPUT)bench/mem-memcpy-x86-64-asm.o
endif
BUILTIN_OBJS += $(OUTPUT)bench/mem-memcpy.o

BUILTIN_OBJS += $(OUTPUT)builtin-diff.o
Expand Down Expand Up @@ -898,6 +908,7 @@ BASIC_CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER_SQ)' \
LIB_OBJS += $(COMPAT_OBJS)

ALL_CFLAGS += $(BASIC_CFLAGS)
ALL_CFLAGS += $(ARCH_CFLAGS)
ALL_LDFLAGS += $(BASIC_LDFLAGS)

export TAR INSTALL DESTDIR SHELL_PATH
Expand Down
12 changes: 12 additions & 0 deletions trunk/tools/perf/bench/mem-memcpy-arch.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

#ifdef ARCH_X86_64

#define MEMCPY_FN(fn, name, desc) \
extern void *fn(void *, const void *, size_t);

#include "mem-memcpy-x86-64-asm-def.h"

#undef MEMCPY_FN

#endif

4 changes: 4 additions & 0 deletions trunk/tools/perf/bench/mem-memcpy-x86-64-asm-def.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

MEMCPY_FN(__memcpy,
"x86-64-unrolled",
"unrolled memcpy() in arch/x86/lib/memcpy_64.S")
2 changes: 2 additions & 0 deletions trunk/tools/perf/bench/mem-memcpy-x86-64-asm.S
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

#include "../../../arch/x86/lib/memcpy_64.S"
9 changes: 9 additions & 0 deletions trunk/tools/perf/util/include/asm/cpufeature.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

#ifndef PERF_CPUFEATURE_H
#define PERF_CPUFEATURE_H

/* cpufeature.h ... dummy header file for including arch/x86/lib/memcpy_64.S */

#define X86_FEATURE_REP_GOOD 0

#endif /* PERF_CPUFEATURE_H */
11 changes: 11 additions & 0 deletions trunk/tools/perf/util/include/asm/dwarf2.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

#ifndef PERF_DWARF2_H
#define PERF_DWARF2_H

/* dwarf2.h ... dummy header file for including arch/x86/lib/memcpy_64.S */

#define CFI_STARTPROC
#define CFI_ENDPROC

#endif /* PERF_DWARF2_H */

13 changes: 13 additions & 0 deletions trunk/tools/perf/util/include/linux/linkage.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

#ifndef PERF_LINUX_LINKAGE_H_
#define PERF_LINUX_LINKAGE_H_

/* linkage.h ... for including arch/x86/lib/memcpy_64.S */

#define ENTRY(name) \
.globl name; \
name:

#define ENDPROC(name)

#endif /* PERF_LINUX_LINKAGE_H_ */

0 comments on commit 033c4ef

Please sign in to comment.