| .. | .. |
|---|
| 23 | 23 | #include <trace/events/power.h> |
|---|
| 24 | 24 | #include <linux/cpuset.h> |
|---|
| 25 | 25 | |
|---|
| 26 | +#include <trace/hooks/power.h> |
|---|
| 27 | + |
|---|
| 26 | 28 | /* |
|---|
| 27 | 29 | * Timeout for stopping processes |
|---|
| 28 | 30 | */ |
|---|
| .. | .. |
|---|
| 99 | 101 | if (wq_busy) |
|---|
| 100 | 102 | show_workqueue_state(); |
|---|
| 101 | 103 | |
|---|
| 102 | | - read_lock(&tasklist_lock); |
|---|
| 103 | | - for_each_process_thread(g, p) { |
|---|
| 104 | | - if (p != current && !freezer_should_skip(p) |
|---|
| 105 | | - && freezing(p) && !frozen(p)) |
|---|
| 106 | | - sched_show_task(p); |
|---|
| 104 | + if (pm_debug_messages_on) { |
|---|
| 105 | + read_lock(&tasklist_lock); |
|---|
| 106 | + for_each_process_thread(g, p) { |
|---|
| 107 | + if (p != current && !freezer_should_skip(p) |
|---|
| 108 | + && freezing(p) && !frozen(p)) { |
|---|
| 109 | + sched_show_task(p); |
|---|
| 110 | + trace_android_vh_try_to_freeze_todo_unfrozen(p); |
|---|
| 111 | + } |
|---|
| 112 | + } |
|---|
| 113 | + read_unlock(&tasklist_lock); |
|---|
| 107 | 114 | } |
|---|
| 108 | | - read_unlock(&tasklist_lock); |
|---|
| 115 | + |
|---|
| 116 | + trace_android_vh_try_to_freeze_todo(todo, elapsed_msecs, wq_busy); |
|---|
| 109 | 117 | } else { |
|---|
| 110 | 118 | pr_cont("(elapsed %d.%03d seconds) ", elapsed_msecs / 1000, |
|---|
| 111 | 119 | elapsed_msecs % 1000); |
|---|
| .. | .. |
|---|
| 135 | 143 | if (!pm_freezing) |
|---|
| 136 | 144 | atomic_inc(&system_freezing_cnt); |
|---|
| 137 | 145 | |
|---|
| 138 | | - pm_wakeup_clear(true); |
|---|
| 146 | + pm_wakeup_clear(0); |
|---|
| 139 | 147 | pr_info("Freezing user space processes ... "); |
|---|
| 140 | 148 | pm_freezing = true; |
|---|
| 141 | 149 | error = try_to_freeze_tasks(true); |
|---|
| .. | .. |
|---|
| 147 | 155 | BUG_ON(in_atomic()); |
|---|
| 148 | 156 | |
|---|
| 149 | 157 | /* |
|---|
| 150 | | - * Now that the whole userspace is frozen we need to disbale |
|---|
| 158 | + * Now that the whole userspace is frozen we need to disable |
|---|
| 151 | 159 | * the OOM killer to disallow any further interference with |
|---|
| 152 | 160 | * killable tasks. There is no guarantee oom victims will |
|---|
| 153 | 161 | * ever reach a point they go away we have to wait with a timeout. |
|---|