diff options
author | Bjoern Brandenburg <bbb@swan.cs.unc.edu> | 2007-02-15 08:26:53 -0500 |
---|---|---|
committer | Bjoern Brandenburg <bbb@swan.cs.unc.edu> | 2007-02-15 08:26:53 -0500 |
commit | c124b7ef72a4184397e68fef66887ecdc65549a4 (patch) | |
tree | 767b2be2bd413f17260baab50ecd2a124d00c53c /kernel | |
parent | f6ba0725ffb3bfc04670b0588af601cb38290c6b (diff) |
finishing touches for TRACE() implementation
Remove some stale comments and prevent NULL bytes from being copied into
the TRACE ring-buffer.
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/edf_common.c | 1 | ||||
-rw-r--r-- | kernel/sched_global_edf.c | 1 | ||||
-rw-r--r-- | kernel/sched_plugin.c | 5 | ||||
-rw-r--r-- | kernel/sched_trace.c | 7 |
4 files changed, 4 insertions, 10 deletions
diff --git a/kernel/edf_common.c b/kernel/edf_common.c index 0cc93ed50e..8c5f677164 100644 --- a/kernel/edf_common.c +++ b/kernel/edf_common.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/litmus.h> | 11 | #include <linux/litmus.h> |
12 | #include <linux/sched_plugin.h> | 12 | #include <linux/sched_plugin.h> |
13 | #include <linux/sched_trace.h> | 13 | #include <linux/sched_trace.h> |
14 | /* CLEANUP: #include <linux/plugin_trace.h> */ | ||
15 | 14 | ||
16 | #include <linux/edf_common.h> | 15 | #include <linux/edf_common.h> |
17 | 16 | ||
diff --git a/kernel/sched_global_edf.c b/kernel/sched_global_edf.c index a15876fba2..ac4201a872 100644 --- a/kernel/sched_global_edf.c +++ b/kernel/sched_global_edf.c | |||
@@ -13,7 +13,6 @@ | |||
13 | 13 | ||
14 | #include <linux/litmus.h> | 14 | #include <linux/litmus.h> |
15 | #include <linux/sched_plugin.h> | 15 | #include <linux/sched_plugin.h> |
16 | /* CLEANUP: #include <linux/plugin_trace.h> */ | ||
17 | #include <linux/edf_common.h> | 16 | #include <linux/edf_common.h> |
18 | #include <linux/sched_trace.h> | 17 | #include <linux/sched_trace.h> |
19 | 18 | ||
diff --git a/kernel/sched_plugin.c b/kernel/sched_plugin.c index 31771f7c51..fa8339ba78 100644 --- a/kernel/sched_plugin.c +++ b/kernel/sched_plugin.c | |||
@@ -8,11 +8,6 @@ | |||
8 | #include <linux/litmus.h> | 8 | #include <linux/litmus.h> |
9 | #include <linux/sched_plugin.h> | 9 | #include <linux/sched_plugin.h> |
10 | 10 | ||
11 | /* | ||
12 | #include <linux/plugin_trace.h> | ||
13 | #include <linux/plugin_stats.h> | ||
14 | */ | ||
15 | |||
16 | 11 | ||
17 | /* These are the original Linux initialization functions. | 12 | /* These are the original Linux initialization functions. |
18 | * We replace them here with our initialization code and call them | 13 | * We replace them here with our initialization code and call them |
diff --git a/kernel/sched_trace.c b/kernel/sched_trace.c index 3d3dcbf432..8ca7fbc5a4 100644 --- a/kernel/sched_trace.c +++ b/kernel/sched_trace.c | |||
@@ -1,6 +1,5 @@ | |||
1 | /* sched_trace.c -- record scheduling events to a byte stream. | 1 | /* sched_trace.c -- record scheduling events to a byte stream. |
2 | * | 2 | * |
3 | * TODO: factor out ring buffer code and reuse for tracing facility | ||
4 | * TODO: Move ring buffer to a lockfree implementation. | 3 | * TODO: Move ring buffer to a lockfree implementation. |
5 | */ | 4 | */ |
6 | 5 | ||
@@ -514,8 +513,10 @@ void sched_trace_log_message(const char* fmt, ...) | |||
514 | len = vscnprintf(buf, MSG_SIZE, fmt, args); | 513 | len = vscnprintf(buf, MSG_SIZE, fmt, args); |
515 | 514 | ||
516 | queue_lock(&log_buffer_lock); | 515 | queue_lock(&log_buffer_lock); |
517 | /* put message into buffer, don't forget the trailing null byte */ | 516 | /* Don't copy the trailing null byte, we don't want null bytes |
518 | rb_put(&log_buffer.buf, buf, len + 1); | 517 | * in a text file. |
518 | */ | ||
519 | rb_put(&log_buffer.buf, buf, len); | ||
519 | queue_unlock(&log_buffer_lock); | 520 | queue_unlock(&log_buffer_lock); |
520 | 521 | ||
521 | local_irq_restore(flags); | 522 | local_irq_restore(flags); |