]> Pileus Git - ~andy/linux/blobdiff - tools/perf/builtin-lock.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-linus
[~andy/linux] / tools / perf / builtin-lock.c
index 2e93f99b148063a638016b3b874779e9c601ebdb..7a2a79d2cf2cc837a9e0894273b53cc31f3c589b 100644 (file)
@@ -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