]>
Commit | Line | Data |
---|---|---|
bedc6c43 JR |
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 | |
3 | @@ -24,8 +24,14 @@ | |
4 | ARCH ?= $(RAW_ARCH) | |
5 | ||
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) | |
8 | ifeq ($(LP64), 1) | |
9 | IS_64_BIT := 1 | |
10 | else | |
11 | IS_64_BIT := 0 | |
12 | endif | |
13 | +ifeq ($(ILP32), 1) | |
14 | + IS_X32_BIT := 1 | |
15 | +else | |
16 | + IS_X32_BIT := 0 | |
17 | +endif | |
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 | |
20 | @@ -28,6 +28,9 @@ | |
21 | LIBUNWIND_LIBS = -lunwind -lunwind-x86 | |
22 | endif | |
23 | NO_PERF_REGS := 0 | |
24 | + ifeq (${IS_X32_BIT}, 1) | |
25 | + CFLAGS += -DHAVE_ARCH_X32_SUPPORT | |
26 | + endif | |
27 | endif | |
28 | ||
29 | ifeq ($(ARCH),arm) | |
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 | |
32 | @@ -62,14 +62,20 @@ | |
33 | ENDPROC(perf_regs_load) | |
34 | #else | |
35 | ENTRY(perf_regs_load) | |
36 | - push %edi | |
37 | +#ifdef HAVE_ARCH_X32_SUPPORT | |
38 | +#else | |
39 | + pushl %edi | |
40 | +#endif | |
41 | movl 8(%esp), %edi | |
42 | movl %eax, AX(%edi) | |
43 | movl %ebx, BX(%edi) | |
44 | movl %ecx, CX(%edi) | |
45 | movl %edx, DX(%edi) | |
46 | movl %esi, SI(%edi) | |
47 | - pop %eax | |
48 | +#ifdef HAVE_ARCH_X32_SUPPORT | |
49 | +#else | |
50 | + popl %eax | |
51 | +#endif | |
52 | movl %eax, DI(%edi) | |
53 | movl %ebp, BP(%edi) | |
54 | ||
bedc6c43 JR |
55 | --- linux-3.19/tools/perf/bench/sched-messaging.c~ 2015-02-09 03:54:22.000000000 +0100 |
56 | +++ linux-3.19/tools/perf/bench/sched-messaging.c 2015-04-11 12:33:22.587917365 +0200 | |
57 | @@ -310,13 +310,24 @@ | |
58 | printf("# %d groups == %d %s run\n\n", | |
59 | num_groups, num_groups * 2 * num_fds, | |
60 | thread_mode ? "threads" : "processes"); | |
61 | +#if defined(__x86_64__) && !defined(__ILP32__) | |
62 | printf(" %14s: %lu.%03lu [sec]\n", "Total time", | |
63 | diff.tv_sec, | |
64 | (unsigned long) (diff.tv_usec/1000)); | |
65 | +#else | |
66 | + printf(" %14s: %llu.%03llu [sec]\n", "Total time", | |
67 | + diff.tv_sec, | |
68 | + (unsigned long long) (diff.tv_usec/1000)); | |
69 | +#endif | |
70 | break; | |
71 | case BENCH_FORMAT_SIMPLE: | |
72 | +#if defined(__x86_64__) && !defined(__ILP32__) | |
73 | printf("%lu.%03lu\n", diff.tv_sec, | |
74 | (unsigned long) (diff.tv_usec/1000)); | |
75 | +#else | |
76 | + printf("%llu.%03llu\n", diff.tv_sec, | |
77 | + (unsigned long long) (diff.tv_usec/1000)); | |
78 | +#endif | |
79 | break; | |
80 | default: | |
81 | /* reaching here is something disaster */ | |
82 | --- linux-3.19/tools/perf/bench/sched-pipe.c~ 2015-02-09 03:54:22.000000000 +0100 | |
83 | +++ linux-3.19/tools/perf/bench/sched-pipe.c 2015-04-11 12:34:32.727917841 +0200 | |
84 | @@ -156,9 +156,15 @@ | |
85 | result_usec = diff.tv_sec * 1000000; | |
86 | result_usec += diff.tv_usec; | |
87 | ||
88 | +#if defined(__x86_64__) && !defined(__ILP32__) | |
89 | printf(" %14s: %lu.%03lu [sec]\n\n", "Total time", | |
90 | diff.tv_sec, | |
91 | (unsigned long) (diff.tv_usec/1000)); | |
92 | +#else | |
93 | + printf(" %14s: %llu.%03llu [sec]\n\n", "Total time", | |
94 | + diff.tv_sec, | |
95 | + (unsigned long long) (diff.tv_usec/1000)); | |
96 | +#endif | |
97 | ||
98 | printf(" %14lf usecs/op\n", | |
99 | (double)result_usec / (double)loops); | |
100 | @@ -168,9 +174,15 @@ | |
101 | break; | |
102 | ||
103 | case BENCH_FORMAT_SIMPLE: | |
104 | +#if defined(__x86_64__) && !defined(__ILP32__) | |
105 | printf("%lu.%03lu\n", | |
106 | diff.tv_sec, | |
107 | (unsigned long) (diff.tv_usec / 1000)); | |
108 | +#else | |
109 | + printf("%llu.%03llu\n", | |
110 | + diff.tv_sec, | |
111 | + (unsigned long long) (diff.tv_usec / 1000)); | |
112 | +#endif | |
113 | break; | |
114 | ||
115 | default: | |
116 | --- linux-3.19/tools/perf/builtin-stat.c~ 2015-02-09 03:54:22.000000000 +0100 | |
117 | +++ linux-3.19/tools/perf/builtin-stat.c 2015-04-11 12:35:21.841251509 +0200 | |
118 | @@ -550,7 +550,11 @@ | |
0b118214 JR |
119 | { |
120 | static int num_print_interval; | |
bedc6c43 | 121 | |
bedc6c43 | 122 | +#if defined(__x86_64__) && !defined(__ILP32__) |
0b118214 | 123 | sprintf(prefix, "%6lu.%09lu%s", ts->tv_sec, ts->tv_nsec, csv_sep); |
bedc6c43 | 124 | +#else |
0b118214 | 125 | + sprintf(prefix, "%6llu.%09llu%s", ts->tv_sec, ts->tv_nsec, csv_sep); |
bedc6c43 JR |
126 | +#endif |
127 | ||
128 | if (num_print_interval == 0 && !csv_output) { | |
129 | switch (aggr_mode) { | |
130 | --- linux-3.19/tools/perf/builtin-kvm.c~ 2015-02-09 03:54:22.000000000 +0100 | |
131 | +++ linux-3.19/tools/perf/builtin-kvm.c 2015-04-11 12:36:00.511251770 +0200 | |
132 | @@ -565,7 +565,11 @@ | |
133 | gettimeofday(&tv, NULL); | |
134 | if (localtime_r(&tv.tv_sec, <ime)) { | |
135 | strftime(date, sizeof(date), "%H:%M:%S", <ime); | |
136 | +#if defined(__x86_64__) && !defined(__ILP32__) | |
137 | pr_info("%s.%06ld", date, tv.tv_usec); | |
138 | +#else | |
139 | + pr_info("%s.%06lld", date, tv.tv_usec); | |
140 | +#endif | |
141 | } else | |
142 | pr_info("00:00:00.000000"); | |
143 |