diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2011-05-16 19:14:22 -0400 |
---|---|---|
committer | Arjan van de Ven <arjan@linux.intel.com> | 2011-05-16 19:14:22 -0400 |
commit | cdd4c9bffce7cf5ab5ae760f19934ab16b1f0032 (patch) | |
tree | 1f9c7d52b7ae481e36b6b4f0de927225fabd4875 | |
parent | 124b01dd39d864bc2687954b951d6d282942786e (diff) | |
parent | e25ad37227d54b9d40ec244bc692d0fbd9bc52ce (diff) | |
download | powertop-cdd4c9bffce7cf5ab5ae760f19934ab16b1f0032.tar.gz |
Merge branch 'master' of master.kernel.org:/pub/scm/status/powertop/powertop
-rw-r--r-- | process/do_process.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/process/do_process.cpp b/process/do_process.cpp index eca6151..87d1b52 100644 --- a/process/do_process.cpp +++ b/process/do_process.cpp @@ -255,7 +255,7 @@ void perf_process_bundle::handle_trace_point(int type, void *trace, int cpu, uin if (strcmp(event_name, "sched:sched_wakeup") == 0) { struct wakeup_entry *we; class power_consumer *from = NULL; - class process *dest_proc; + class process *dest_proc, *from_proc; int i; we = (struct wakeup_entry *)trace; @@ -280,10 +280,12 @@ void perf_process_bundle::handle_trace_point(int type, void *trace, int cpu, uin if (from && strcmp(from->name(), "process")!=0){ /* not a process doing the wakeup */ from = NULL; + from_proc = NULL; + } else { + from_proc = (class process *) from; } - - if (from && (dest_proc->running == 0) && (dest_proc->waker == NULL) && (we->pid != 0) && !dont_blame_me(we->comm)) + if (from_proc && (dest_proc->running == 0) && (dest_proc->waker == NULL) && (we->pid != 0) && !dont_blame_me(from_proc->comm)) dest_proc->waker = from; if (from) dest_proc->last_waker = from; |