From 1f44ebf9a03fedc1d2b80cc876d41806127baa86 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 21 Nov 2013 01:28:38 +0000 Subject: [PATCH] [x86, powerpc, ppc64] linux-tools: Build perf with libnuma Add a patch to fix some type errors on 32-bit architectures. svn path=/dists/trunk/linux-tools/; revision=20809 --- debian/changelog | 1 + debian/patches/perf-fix-numa-types.patch | 46 ++++++++++++++++++++++++ debian/patches/series | 1 + debian/templates/control.source.in | 2 +- 4 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 debian/patches/perf-fix-numa-types.patch diff --git a/debian/changelog b/debian/changelog index 2aa9f8d9c..415f2cd0e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ linux-tools (3.12-1~exp1) UNRELEASED; urgency=low * New upstream release (Closes: #729197) + * [x86, powerpc, ppc64] linux-tools: Build perf with libnuma -- Ben Hutchings Mon, 18 Nov 2013 04:17:25 +0000 diff --git a/debian/patches/perf-fix-numa-types.patch b/debian/patches/perf-fix-numa-types.patch new file mode 100644 index 000000000..136fd9735 --- /dev/null +++ b/debian/patches/perf-fix-numa-types.patch @@ -0,0 +1,46 @@ +From: Ben Hutchings +Date: Mon, 18 Nov 2013 05:12:30 +0000 +Subject: perf: Fix type errors in bench/numa.c +Forwarded: no + +Fix the following errors on i386 and probably most other 32-bit +architectures: + +bench/numa.c: In function 'worker_thread': +bench/numa.c:1113:20: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] + if (diff.tv_sec >= g->p.nr_secs) { + ^ +bench/numa.c:1161:6: error: format '%lx' expects argument of type 'long unsigned int', but argument 5 has type 'u64' [-Werror=format=] + process_nr, thread_nr, runtime_ns_max / bytes_done, val); + ^ + +Signed-off-by: Ben Hutchings +--- +--- a/tools/perf/bench/numa.c ++++ b/tools/perf/bench/numa.c +@@ -12,6 +12,7 @@ + #include "bench.h" + + #include ++#include + #include + #include + #include +@@ -1110,7 +1111,7 @@ static void *worker_thread(void *__tdata + /* Check whether our max runtime timed out: */ + if (g->p.nr_secs) { + timersub(&stop, &start0, &diff); +- if (diff.tv_sec >= g->p.nr_secs) { ++ if (diff.tv_sec >= (time_t)g->p.nr_secs) { + g->stop_work = true; + break; + } +@@ -1157,7 +1158,7 @@ static void *worker_thread(void *__tdata + runtime_ns_max += diff.tv_usec * 1000; + + if (details >= 0) { +- printf(" #%2d / %2d: %14.2lf nsecs/op [val: %016lx]\n", ++ printf(" #%2d / %2d: %14.2lf nsecs/op [val: %016"PRIx64"]\n", + process_nr, thread_nr, runtime_ns_max / bytes_done, val); + } + fflush(stdout); diff --git a/debian/patches/series b/debian/patches/series index 8a0a63bc7..62a2a395d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,4 @@ modpost-symbol-prefix.patch tools-perf-version.patch tools-perf-install.patch usbip-document-tcp-wrappers.patch +perf-fix-numa-types.patch diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index 14b6c8317..f1f520bc9 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -6,7 +6,7 @@ Uploaders: Bastian Blank , Ben Hutchings Standards-Version: 3.9.4 Build-Depends: debhelper (>> 7), python, - asciidoc, binutils-dev, bison, flex, libaudit-dev, libdw-dev, libelf-dev, libnewt-dev, libperl-dev, libunwind7-dev [amd64 i386], python-dev, xmlto, + asciidoc, binutils-dev, bison, flex, libaudit-dev, libdw-dev, libelf-dev, libnewt-dev, libnuma-dev [amd64 i386 powerpc ppc64], libperl-dev, libunwind7-dev [amd64 i386], python-dev, xmlto, autoconf, automake, libtool, libglib2.0-dev, libsysfs-dev, libwrap0-dev Vcs-Svn: svn://svn.debian.org/svn/kernel/dists/trunk/linux-tools/ Vcs-Browser: http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux-tools/