X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=kernel%2Fworkqueue.c;h=8bd600c020e5cdf5f2454681bc2e89fcc99c47d0;hb=e933424c4823596ed231648eeb602b5209960ff6;hp=9ca34cddaf6d961c1e07bee9080ff4dd6be1338e;hpb=45d7f32c7a43cbb9592886d38190e379e2eb2226;p=cascardo%2Flinux.git diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 9ca34cddaf6d..8bd600c020e5 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -35,6 +35,9 @@ #include #include +#define CREATE_TRACE_POINTS +#include + #include "workqueue_sched.h" enum { @@ -1790,7 +1793,13 @@ static void process_one_work(struct worker *worker, struct work_struct *work) work_clear_pending(work); lock_map_acquire(&cwq->wq->lockdep_map); lock_map_acquire(&lockdep_map); + trace_workqueue_execute_start(work); f(work); + /* + * While we must be careful to not use "work" after this, the trace + * point will only record its address. + */ + trace_workqueue_execute_end(work); lock_map_release(&lockdep_map); lock_map_release(&cwq->wq->lockdep_map); @@ -2568,7 +2577,7 @@ EXPORT_SYMBOL(schedule_delayed_work_on); int schedule_on_each_cpu(work_func_t func) { int cpu; - struct work_struct *works; + struct work_struct __percpu *works; works = alloc_percpu(struct work_struct); if (!works) @@ -3527,7 +3536,7 @@ static int __init init_workqueues(void) unsigned int cpu; int i; - hotcpu_notifier(workqueue_cpu_callback, CPU_PRI_WORKQUEUE); + cpu_notifier(workqueue_cpu_callback, CPU_PRI_WORKQUEUE); /* initialize gcwqs */ for_each_gcwq_cpu(cpu) {