X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcputop.c;h=3615085852ecad469a9cbde83c39911dbf781439;hb=37b4b0bb2f0f1f34056f529dbea8a929987aaa75;hp=eb7afb3e76a799f758b3d2b99ad00dceccf162a7;hpb=24306dda1f206d5451f60f480a7b4d6f697676d7;p=lttngtop.git diff --git a/src/cputop.c b/src/cputop.c index eb7afb3..3615085 100644 --- a/src/cputop.c +++ b/src/cputop.c @@ -33,7 +33,8 @@ void update_cputop_data(unsigned long timestamp, int64_t cpu, int prev_pid, elapsed = timestamp - tmpcpu->task_start; tmpcpu->current_task->totalcpunsec += elapsed; tmpcpu->current_task->threadstotalcpunsec += elapsed; - if (tmpcpu->current_task->pid != tmpcpu->current_task->tid) + if (tmpcpu->current_task->threadparent && + tmpcpu->current_task->pid != tmpcpu->current_task->tid) tmpcpu->current_task->threadparent->threadstotalcpunsec += elapsed; }