power: rk818: use EXTCON_USB_VBUS_EN to notify rk818 enable otg
[firefly-linux-kernel-4.4.55.git] / tools / perf / builtin-sched.c
index 0ee6d900e100a29ceeb3cacf7e97d81dce8f8d17..e3d3e32c0a934dc8fd5ce207073f3b80ecf4361a 100644 (file)
@@ -1203,12 +1203,13 @@ static void output_lat_thread(struct perf_sched *sched, struct work_atoms *work_
 
 static int pid_cmp(struct work_atoms *l, struct work_atoms *r)
 {
+       if (l->thread == r->thread)
+               return 0;
        if (l->thread->tid < r->thread->tid)
                return -1;
        if (l->thread->tid > r->thread->tid)
                return 1;
-
-       return 0;
+       return (int)(l->thread - r->thread);
 }
 
 static int avg_cmp(struct work_atoms *l, struct work_atoms *r)