Hi Ingo,
Please consider pulling from:
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 perf/urgent
Regards,
- Arnaldo
Josh Hunt (1):
perf tools: Version incorrect with some versions of grep
Marcin Slusarz (1):
perf lock: Fix sorting by wait_min
tools/perf/builtin-lock.c | 13 ++++++++++++-
tools/perf/util/PERF-VERSION-GEN | 8 ++++----
2 files changed, 16 insertions(+), 5 deletions(-)
From: Marcin Slusarz <[email protected]>
If lock was uncontended, wait_time_min == ULLONG_MAX, so we need to
handle this case differently to show high wait times first
Acked-by: Hitoshi Mitake <[email protected]>
Cc: Hitoshi Mitake <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Marcin Slusarz <[email protected]>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
---
tools/perf/builtin-lock.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c
index 2e93f99..7a2a79d 100644
--- a/tools/perf/builtin-lock.c
+++ b/tools/perf/builtin-lock.c
@@ -202,9 +202,20 @@ static struct thread_stat *thread_stat_findnew_first(u32 tid)
SINGLE_KEY(nr_acquired)
SINGLE_KEY(nr_contended)
SINGLE_KEY(wait_time_total)
-SINGLE_KEY(wait_time_min)
SINGLE_KEY(wait_time_max)
+static int lock_stat_key_wait_time_min(struct lock_stat *one,
+ struct lock_stat *two)
+{
+ u64 s1 = one->wait_time_min;
+ u64 s2 = two->wait_time_min;
+ if (s1 == ULLONG_MAX)
+ s1 = 0;
+ if (s2 == ULLONG_MAX)
+ s2 = 0;
+ return s1 > s2;
+}
+
struct lock_key {
/*
* name: the value for specify by user
--
1.6.2.5
From: Josh Hunt <[email protected]>
Some versions of grep don't treat '\s' properly. When building perf on such
systems and using a kernel tarball the perf version is unable to be determined
from the main kernel Makefile and the user is left with a version of '..'.
Replacing the use of '\s' with '[[:space:]]', which should work in all grep
versions, gives a usable version number.
Reported-by: Tapan Dhimant <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Tapan Dhimant <[email protected]>
Cc: [email protected]
Cc: [email protected]
LKML-Reference: <[email protected]>
Signed-off-by: Josh Hunt <[email protected]>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
---
tools/perf/util/PERF-VERSION-GEN | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/perf/util/PERF-VERSION-GEN b/tools/perf/util/PERF-VERSION-GEN
index 97d7656..26d4d3f 100755
--- a/tools/perf/util/PERF-VERSION-GEN
+++ b/tools/perf/util/PERF-VERSION-GEN
@@ -23,10 +23,10 @@ if test -d ../../.git -o -f ../../.git &&
then
VN=$(echo "$VN" | sed -e 's/-/./g');
else
- eval `grep '^VERSION\s*=' ../../Makefile|tr -d ' '`
- eval `grep '^PATCHLEVEL\s*=' ../../Makefile|tr -d ' '`
- eval `grep '^SUBLEVEL\s*=' ../../Makefile|tr -d ' '`
- eval `grep '^EXTRAVERSION\s*=' ../../Makefile|tr -d ' '`
+ eval $(grep '^VERSION[[:space:]]*=' ../../Makefile|tr -d ' ')
+ eval $(grep '^PATCHLEVEL[[:space:]]*=' ../../Makefile|tr -d ' ')
+ eval $(grep '^SUBLEVEL[[:space:]]*=' ../../Makefile|tr -d ' ')
+ eval $(grep '^EXTRAVERSION[[:space:]]*=' ../../Makefile|tr -d ' ')
VN="${VERSION}.${PATCHLEVEL}.${SUBLEVEL}${EXTRAVERSION}"
fi
--
1.6.2.5
* Arnaldo Carvalho de Melo <[email protected]> wrote:
> Hi Ingo,
>
> Please consider pulling from:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 perf/urgent
>
> Regards,
>
> - Arnaldo
>
> Josh Hunt (1):
> perf tools: Version incorrect with some versions of grep
>
> Marcin Slusarz (1):
> perf lock: Fix sorting by wait_min
>
> tools/perf/builtin-lock.c | 13 ++++++++++++-
> tools/perf/util/PERF-VERSION-GEN | 8 ++++----
> 2 files changed, 16 insertions(+), 5 deletions(-)
Pulled, thanks Arnaldo!
Ingo