diff options
| author | Michal Marek <mmarek@suse.cz> | 2010-08-04 08:05:07 -0400 |
|---|---|---|
| committer | Michal Marek <mmarek@suse.cz> | 2010-08-04 08:05:07 -0400 |
| commit | 7a996d3ab150bb0e1b71fa182f70199a703efdd1 (patch) | |
| tree | 96a36947d90c9b96580899abd38cb3b70cd9d40b /kernel/trace/trace_workqueue.c | |
| parent | 7cf3d73b4360e91b14326632ab1aeda4cb26308d (diff) | |
| parent | 9fe6206f400646a2322096b56c59891d530e8d51 (diff) | |
Merge commit 'v2.6.35' into kbuild/kconfig
Conflicts:
scripts/kconfig/Makefile
Diffstat (limited to 'kernel/trace/trace_workqueue.c')
| -rw-r--r-- | kernel/trace/trace_workqueue.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/kernel/trace/trace_workqueue.c b/kernel/trace/trace_workqueue.c index 40cafb07dffd..a7cc3793baf6 100644 --- a/kernel/trace/trace_workqueue.c +++ b/kernel/trace/trace_workqueue.c | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | #include <trace/events/workqueue.h> | 9 | #include <trace/events/workqueue.h> |
| 10 | #include <linux/list.h> | 10 | #include <linux/list.h> |
| 11 | #include <linux/percpu.h> | 11 | #include <linux/percpu.h> |
| 12 | #include <linux/slab.h> | ||
| 12 | #include <linux/kref.h> | 13 | #include <linux/kref.h> |
| 13 | #include "trace_stat.h" | 14 | #include "trace_stat.h" |
| 14 | #include "trace.h" | 15 | #include "trace.h" |
| @@ -48,7 +49,8 @@ static void cpu_workqueue_stat_free(struct kref *kref) | |||
| 48 | 49 | ||
| 49 | /* Insertion of a work */ | 50 | /* Insertion of a work */ |
| 50 | static void | 51 | static void |
| 51 | probe_workqueue_insertion(struct task_struct *wq_thread, | 52 | probe_workqueue_insertion(void *ignore, |
| 53 | struct task_struct *wq_thread, | ||
| 52 | struct work_struct *work) | 54 | struct work_struct *work) |
| 53 | { | 55 | { |
| 54 | int cpu = cpumask_first(&wq_thread->cpus_allowed); | 56 | int cpu = cpumask_first(&wq_thread->cpus_allowed); |
| @@ -69,7 +71,8 @@ found: | |||
| 69 | 71 | ||
| 70 | /* Execution of a work */ | 72 | /* Execution of a work */ |
| 71 | static void | 73 | static void |
| 72 | probe_workqueue_execution(struct task_struct *wq_thread, | 74 | probe_workqueue_execution(void *ignore, |
| 75 | struct task_struct *wq_thread, | ||
| 73 | struct work_struct *work) | 76 | struct work_struct *work) |
| 74 | { | 77 | { |
| 75 | int cpu = cpumask_first(&wq_thread->cpus_allowed); | 78 | int cpu = cpumask_first(&wq_thread->cpus_allowed); |
| @@ -89,7 +92,8 @@ found: | |||
| 89 | } | 92 | } |
| 90 | 93 | ||
| 91 | /* Creation of a cpu workqueue thread */ | 94 | /* Creation of a cpu workqueue thread */ |
| 92 | static void probe_workqueue_creation(struct task_struct *wq_thread, int cpu) | 95 | static void probe_workqueue_creation(void *ignore, |
| 96 | struct task_struct *wq_thread, int cpu) | ||
| 93 | { | 97 | { |
| 94 | struct cpu_workqueue_stats *cws; | 98 | struct cpu_workqueue_stats *cws; |
| 95 | unsigned long flags; | 99 | unsigned long flags; |
| @@ -113,7 +117,8 @@ static void probe_workqueue_creation(struct task_struct *wq_thread, int cpu) | |||
| 113 | } | 117 | } |
| 114 | 118 | ||
| 115 | /* Destruction of a cpu workqueue thread */ | 119 | /* Destruction of a cpu workqueue thread */ |
| 116 | static void probe_workqueue_destruction(struct task_struct *wq_thread) | 120 | static void |
| 121 | probe_workqueue_destruction(void *ignore, struct task_struct *wq_thread) | ||
| 117 | { | 122 | { |
| 118 | /* Workqueue only execute on one cpu */ | 123 | /* Workqueue only execute on one cpu */ |
| 119 | int cpu = cpumask_first(&wq_thread->cpus_allowed); | 124 | int cpu = cpumask_first(&wq_thread->cpus_allowed); |
| @@ -258,19 +263,19 @@ int __init trace_workqueue_early_init(void) | |||
| 258 | { | 263 | { |
| 259 | int ret, cpu; | 264 | int ret, cpu; |
| 260 | 265 | ||
| 261 | ret = register_trace_workqueue_insertion(probe_workqueue_insertion); | 266 | ret = register_trace_workqueue_insertion(probe_workqueue_insertion, NULL); |
| 262 | if (ret) | 267 | if (ret) |
| 263 | goto out; | 268 | goto out; |
| 264 | 269 | ||
| 265 | ret = register_trace_workqueue_execution(probe_workqueue_execution); | 270 | ret = register_trace_workqueue_execution(probe_workqueue_execution, NULL); |
| 266 | if (ret) | 271 | if (ret) |
| 267 | goto no_insertion; | 272 | goto no_insertion; |
| 268 | 273 | ||
| 269 | ret = register_trace_workqueue_creation(probe_workqueue_creation); | 274 | ret = register_trace_workqueue_creation(probe_workqueue_creation, NULL); |
| 270 | if (ret) | 275 | if (ret) |
| 271 | goto no_execution; | 276 | goto no_execution; |
| 272 | 277 | ||
| 273 | ret = register_trace_workqueue_destruction(probe_workqueue_destruction); | 278 | ret = register_trace_workqueue_destruction(probe_workqueue_destruction, NULL); |
| 274 | if (ret) | 279 | if (ret) |
| 275 | goto no_creation; | 280 | goto no_creation; |
| 276 | 281 | ||
| @@ -282,11 +287,11 @@ int __init trace_workqueue_early_init(void) | |||
| 282 | return 0; | 287 | return 0; |
| 283 | 288 | ||
| 284 | no_creation: | 289 | no_creation: |
| 285 | unregister_trace_workqueue_creation(probe_workqueue_creation); | 290 | unregister_trace_workqueue_creation(probe_workqueue_creation, NULL); |
| 286 | no_execution: | 291 | no_execution: |
| 287 | unregister_trace_workqueue_execution(probe_workqueue_execution); | 292 | unregister_trace_workqueue_execution(probe_workqueue_execution, NULL); |
| 288 | no_insertion: | 293 | no_insertion: |
| 289 | unregister_trace_workqueue_insertion(probe_workqueue_insertion); | 294 | unregister_trace_workqueue_insertion(probe_workqueue_insertion, NULL); |
| 290 | out: | 295 | out: |
| 291 | pr_warning("trace_workqueue: unable to trace workqueues\n"); | 296 | pr_warning("trace_workqueue: unable to trace workqueues\n"); |
| 292 | 297 | ||
