1 --- linux-3.19/tools/perf/config/Makefile.arch~ 2015-02-09 03:54:22.000000000 +0100
2 +++ linux-3.19/tools/perf/config/Makefile.arch 2015-04-11 12:17:45.107911011 +0200
6 LP64 := $(shell echo __LP64__ | ${CC} ${CFLAGS} -E -x c - | tail -n 1)
7 +ILP32 := $(shell echo __ILP32__ | ${CC} ${CFLAGS} -E -x c - | tail -n 1)
18 --- linux-3.19/tools/perf/config/Makefile~ 2015-04-11 12:12:31.000000000 +0200
19 +++ linux-3.19/tools/perf/config/Makefile 2015-04-11 12:19:05.011244885 +0200
21 LIBUNWIND_LIBS = -lunwind -lunwind-x86
24 + ifeq (${IS_X32_BIT}, 1)
25 + CFLAGS += -DHAVE_ARCH_X32_SUPPORT
30 --- linux-3.19/tools/perf/arch/x86/tests/regs_load.S~ 2015-02-09 03:54:22.000000000 +0100
31 +++ linux-3.19/tools/perf/arch/x86/tests/regs_load.S 2015-04-11 12:21:07.717912384 +0200
33 ENDPROC(perf_regs_load)
37 +#ifdef HAVE_ARCH_X32_SUPPORT
48 +#ifdef HAVE_ARCH_X32_SUPPORT
55 --- linux-3.19/arch/x86/include/uapi/asm/bitsperlong.h~ 2015-02-09 03:54:22.000000000 +0100
56 +++ linux-3.19/arch/x86/include/uapi/asm/bitsperlong.h 2015-04-11 12:31:26.051249909 +0200
58 #ifndef __ASM_X86_BITSPERLONG_H
59 #define __ASM_X86_BITSPERLONG_H
62 +#if defined(__x86_64__) && !defined(__ILP32__)
63 # define __BITS_PER_LONG 64
65 # define __BITS_PER_LONG 32
66 --- linux-3.19/tools/perf/bench/sched-messaging.c~ 2015-02-09 03:54:22.000000000 +0100
67 +++ linux-3.19/tools/perf/bench/sched-messaging.c 2015-04-11 12:33:22.587917365 +0200
69 printf("# %d groups == %d %s run\n\n",
70 num_groups, num_groups * 2 * num_fds,
71 thread_mode ? "threads" : "processes");
72 +#if defined(__x86_64__) && !defined(__ILP32__)
73 printf(" %14s: %lu.%03lu [sec]\n", "Total time",
75 (unsigned long) (diff.tv_usec/1000));
77 + printf(" %14s: %llu.%03llu [sec]\n", "Total time",
79 + (unsigned long long) (diff.tv_usec/1000));
82 case BENCH_FORMAT_SIMPLE:
83 +#if defined(__x86_64__) && !defined(__ILP32__)
84 printf("%lu.%03lu\n", diff.tv_sec,
85 (unsigned long) (diff.tv_usec/1000));
87 + printf("%llu.%03llu\n", diff.tv_sec,
88 + (unsigned long long) (diff.tv_usec/1000));
92 /* reaching here is something disaster */
93 --- linux-3.19/tools/perf/bench/sched-pipe.c~ 2015-02-09 03:54:22.000000000 +0100
94 +++ linux-3.19/tools/perf/bench/sched-pipe.c 2015-04-11 12:34:32.727917841 +0200
96 result_usec = diff.tv_sec * 1000000;
97 result_usec += diff.tv_usec;
99 +#if defined(__x86_64__) && !defined(__ILP32__)
100 printf(" %14s: %lu.%03lu [sec]\n\n", "Total time",
102 (unsigned long) (diff.tv_usec/1000));
104 + printf(" %14s: %llu.%03llu [sec]\n\n", "Total time",
106 + (unsigned long long) (diff.tv_usec/1000));
109 printf(" %14lf usecs/op\n",
110 (double)result_usec / (double)loops);
114 case BENCH_FORMAT_SIMPLE:
115 +#if defined(__x86_64__) && !defined(__ILP32__)
116 printf("%lu.%03lu\n",
118 (unsigned long) (diff.tv_usec / 1000));
120 + printf("%llu.%03llu\n",
122 + (unsigned long long) (diff.tv_usec / 1000));
127 --- linux-3.19/tools/perf/builtin-stat.c~ 2015-02-09 03:54:22.000000000 +0100
128 +++ linux-3.19/tools/perf/builtin-stat.c 2015-04-11 12:35:21.841251509 +0200
131 clock_gettime(CLOCK_MONOTONIC, &ts);
132 diff_timespec(&rs, &ts, &ref_time);
133 +#if defined(__x86_64__) && !defined(__ILP32__)
134 sprintf(prefix, "%6lu.%09lu%s", rs.tv_sec, rs.tv_nsec, csv_sep);
136 + sprintf(prefix, "%6llu.%09llu%s", rs.tv_sec, rs.tv_nsec, csv_sep);
139 if (num_print_interval == 0 && !csv_output) {
141 --- linux-3.19/tools/perf/builtin-kvm.c~ 2015-02-09 03:54:22.000000000 +0100
142 +++ linux-3.19/tools/perf/builtin-kvm.c 2015-04-11 12:36:00.511251770 +0200
144 gettimeofday(&tv, NULL);
145 if (localtime_r(&tv.tv_sec, <ime)) {
146 strftime(date, sizeof(date), "%H:%M:%S", <ime);
147 +#if defined(__x86_64__) && !defined(__ILP32__)
148 pr_info("%s.%06ld", date, tv.tv_usec);
150 + pr_info("%s.%06lld", date, tv.tv_usec);
153 pr_info("00:00:00.000000");