aboutsummaryrefslogtreecommitdiff
path: root/test/trace_processor/thread_cpu_time.sql
blob: b487fe003e92ebf26a704d773b59b106f501e646 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
select
  tid,
  pid,
  thread.name as threadName,
  process.name as processName,
  total_dur as totalDur
from
  thread
  left join process using(upid)
  left join (select upid, sum(dur) as total_dur
      from sched join thread using(utid)
      group by upid
    ) using(upid)
group by utid, upid
order by total_dur desc, pid, tid