1 FIXME: regs_load.S need complete x32 ABI support; now it will just compile, but tests won't run properly.
2 --- linux-4.7/tools/scripts/Makefile.arch~ 2015-02-09 03:54:22.000000000 +0100
3 +++ linux-4.7/tools/scripts/Makefile.arch 2015-04-11 12:17:45.107911011 +0200
7 LP64 := $(shell echo __LP64__ | ${CC} ${CFLAGS} -E -x c - | tail -n 1)
8 +ILP32 := $(shell echo __ILP32__ | ${CC} ${CFLAGS} -E -x c - | tail -n 1)
19 --- linux-4.8/tools/perf/Makefile.config~ 2015-04-11 12:12:31.000000000 +0200
20 +++ linux-4.8/tools/perf/Makefile.config 2015-04-11 12:19:05.011244885 +0200
22 LIBUNWIND_LIBS = -lunwind-x86 -llzma -lunwind
25 + ifeq (${IS_X32_BIT}, 1)
26 + CFLAGS += -DHAVE_ARCH_X32_SUPPORT
31 --- linux-3.19/tools/perf/arch/x86/tests/regs_load.S~ 2015-02-09 03:54:22.000000000 +0100
32 +++ linux-3.19/tools/perf/arch/x86/tests/regs_load.S 2015-04-11 12:21:07.717912384 +0200
34 ENDPROC(perf_regs_load)
38 +#ifdef HAVE_ARCH_X32_SUPPORT
49 +#ifdef HAVE_ARCH_X32_SUPPORT
56 --- linux-3.19/tools/perf/bench/sched-messaging.c~ 2015-02-09 03:54:22.000000000 +0100
57 +++ linux-3.19/tools/perf/bench/sched-messaging.c 2015-04-11 12:33:22.587917365 +0200
59 printf("# %d groups == %d %s run\n\n",
60 num_groups, num_groups * 2 * num_fds,
61 thread_mode ? "threads" : "processes");
62 +#if defined(__x86_64__) && !defined(__ILP32__)
63 printf(" %14s: %lu.%03lu [sec]\n", "Total time",
65 (unsigned long) (diff.tv_usec/1000));
67 + printf(" %14s: %llu.%03llu [sec]\n", "Total time",
69 + (unsigned long long) (diff.tv_usec/1000));
72 case BENCH_FORMAT_SIMPLE:
73 +#if defined(__x86_64__) && !defined(__ILP32__)
74 printf("%lu.%03lu\n", diff.tv_sec,
75 (unsigned long) (diff.tv_usec/1000));
77 + printf("%llu.%03llu\n", diff.tv_sec,
78 + (unsigned long long) (diff.tv_usec/1000));
82 /* reaching here is something disaster */
83 --- linux-3.19/tools/perf/bench/sched-pipe.c~ 2015-02-09 03:54:22.000000000 +0100
84 +++ linux-3.19/tools/perf/bench/sched-pipe.c 2015-04-11 12:34:32.727917841 +0200
86 result_usec = diff.tv_sec * 1000000;
87 result_usec += diff.tv_usec;
89 +#if defined(__x86_64__) && !defined(__ILP32__)
90 printf(" %14s: %lu.%03lu [sec]\n\n", "Total time",
92 (unsigned long) (diff.tv_usec/1000));
94 + printf(" %14s: %llu.%03llu [sec]\n\n", "Total time",
96 + (unsigned long long) (diff.tv_usec/1000));
99 printf(" %14lf usecs/op\n",
100 (double)result_usec / (double)loops);
104 case BENCH_FORMAT_SIMPLE:
105 +#if defined(__x86_64__) && !defined(__ILP32__)
106 printf("%lu.%03lu\n",
108 (unsigned long) (diff.tv_usec / 1000));
110 + printf("%llu.%03llu\n",
112 + (unsigned long long) (diff.tv_usec / 1000));
117 --- linux-3.19/tools/perf/builtin-stat.c~ 2015-02-09 03:54:22.000000000 +0100
118 +++ linux-3.19/tools/perf/builtin-stat.c 2015-04-11 12:35:21.841251509 +0200
121 static int num_print_interval;
123 +#if defined(__x86_64__) && !defined(__ILP32__)
124 sprintf(prefix, "%6lu.%09lu%s", ts->tv_sec, ts->tv_nsec, csv_sep);
126 + sprintf(prefix, "%6llu.%09llu%s", ts->tv_sec, ts->tv_nsec, csv_sep);
129 if (num_print_interval == 0 && !csv_output) {
131 --- linux-3.19/tools/perf/builtin-kvm.c~ 2015-02-09 03:54:22.000000000 +0100
132 +++ linux-3.19/tools/perf/builtin-kvm.c 2015-04-11 12:36:00.511251770 +0200
134 gettimeofday(&tv, NULL);
135 if (localtime_r(&tv.tv_sec, <ime)) {
136 strftime(date, sizeof(date), "%H:%M:%S", <ime);
137 +#if defined(__x86_64__) && !defined(__ILP32__)
138 pr_info("%s.%06ld", date, tv.tv_usec);
140 + pr_info("%s.%06lld", date, tv.tv_usec);
143 pr_info("00:00:00.000000");