diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-09-06 00:11:38 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-09-06 00:11:42 -0400 |
commit | ed011b22ce567eabefa9ea571d3721c10ecd0553 (patch) | |
tree | c7aee6684613075c772388a99a9137014549434e /kernel/trace | |
parent | 85bac32c4a52c592b857f2c360cc5ec93a097d70 (diff) | |
parent | e07cccf4046978df10f2e13fe2b99b2f9b3a65db (diff) |
Merge commit 'v2.6.31-rc9' into tracing/core
Merge reason: move from -rc5 to -rc9.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/blktrace.c | 12 | ||||
-rw-r--r-- | kernel/trace/ftrace.c | 17 | ||||
-rw-r--r-- | kernel/trace/trace.c | 12 |
3 files changed, 14 insertions, 27 deletions
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c index 243bafc2ec90..3eb159c277c8 100644 --- a/kernel/trace/blktrace.c +++ b/kernel/trace/blktrace.c | |||
@@ -271,8 +271,8 @@ static void blk_trace_free(struct blk_trace *bt) | |||
271 | { | 271 | { |
272 | debugfs_remove(bt->msg_file); | 272 | debugfs_remove(bt->msg_file); |
273 | debugfs_remove(bt->dropped_file); | 273 | debugfs_remove(bt->dropped_file); |
274 | debugfs_remove(bt->dir); | ||
275 | relay_close(bt->rchan); | 274 | relay_close(bt->rchan); |
275 | debugfs_remove(bt->dir); | ||
276 | free_percpu(bt->sequence); | 276 | free_percpu(bt->sequence); |
277 | free_percpu(bt->msg_data); | 277 | free_percpu(bt->msg_data); |
278 | kfree(bt); | 278 | kfree(bt); |
@@ -382,18 +382,8 @@ static int blk_subbuf_start_callback(struct rchan_buf *buf, void *subbuf, | |||
382 | 382 | ||
383 | static int blk_remove_buf_file_callback(struct dentry *dentry) | 383 | static int blk_remove_buf_file_callback(struct dentry *dentry) |
384 | { | 384 | { |
385 | struct dentry *parent = dentry->d_parent; | ||
386 | debugfs_remove(dentry); | 385 | debugfs_remove(dentry); |
387 | 386 | ||
388 | /* | ||
389 | * this will fail for all but the last file, but that is ok. what we | ||
390 | * care about is the top level buts->name directory going away, when | ||
391 | * the last trace file is gone. Then we don't have to rmdir() that | ||
392 | * manually on trace stop, so it nicely solves the issue with | ||
393 | * force killing of running traces. | ||
394 | */ | ||
395 | |||
396 | debugfs_remove(parent); | ||
397 | return 0; | 387 | return 0; |
398 | } | 388 | } |
399 | 389 | ||
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 1993b7186cdb..8c804e24f96f 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -2222,7 +2222,11 @@ ftrace_regex_write(struct file *file, const char __user *ubuf, | |||
2222 | read++; | 2222 | read++; |
2223 | cnt--; | 2223 | cnt--; |
2224 | 2224 | ||
2225 | if (!(iter->flags & ~FTRACE_ITER_CONT)) { | 2225 | /* |
2226 | * If the parser haven't finished with the last write, | ||
2227 | * continue reading the user input without skipping spaces. | ||
2228 | */ | ||
2229 | if (!(iter->flags & FTRACE_ITER_CONT)) { | ||
2226 | /* skip white space */ | 2230 | /* skip white space */ |
2227 | while (cnt && isspace(ch)) { | 2231 | while (cnt && isspace(ch)) { |
2228 | ret = get_user(ch, ubuf++); | 2232 | ret = get_user(ch, ubuf++); |
@@ -2232,8 +2236,9 @@ ftrace_regex_write(struct file *file, const char __user *ubuf, | |||
2232 | cnt--; | 2236 | cnt--; |
2233 | } | 2237 | } |
2234 | 2238 | ||
2239 | /* only spaces were written */ | ||
2235 | if (isspace(ch)) { | 2240 | if (isspace(ch)) { |
2236 | file->f_pos += read; | 2241 | *ppos += read; |
2237 | ret = read; | 2242 | ret = read; |
2238 | goto out; | 2243 | goto out; |
2239 | } | 2244 | } |
@@ -2262,12 +2267,12 @@ ftrace_regex_write(struct file *file, const char __user *ubuf, | |||
2262 | if (ret) | 2267 | if (ret) |
2263 | goto out; | 2268 | goto out; |
2264 | iter->buffer_idx = 0; | 2269 | iter->buffer_idx = 0; |
2265 | } else | 2270 | } else { |
2266 | iter->flags |= FTRACE_ITER_CONT; | 2271 | iter->flags |= FTRACE_ITER_CONT; |
2272 | iter->buffer[iter->buffer_idx++] = ch; | ||
2273 | } | ||
2267 | 2274 | ||
2268 | 2275 | *ppos += read; | |
2269 | file->f_pos += read; | ||
2270 | |||
2271 | ret = read; | 2276 | ret = read; |
2272 | out: | 2277 | out: |
2273 | mutex_unlock(&ftrace_regex_lock); | 2278 | mutex_unlock(&ftrace_regex_lock); |
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 6df9861fde6b..5c75deeefe30 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -3901,17 +3901,9 @@ trace_options_core_write(struct file *filp, const char __user *ubuf, size_t cnt, | |||
3901 | if (ret < 0) | 3901 | if (ret < 0) |
3902 | return ret; | 3902 | return ret; |
3903 | 3903 | ||
3904 | switch (val) { | 3904 | if (val != 0 && val != 1) |
3905 | case 0: | ||
3906 | trace_flags &= ~(1 << index); | ||
3907 | break; | ||
3908 | case 1: | ||
3909 | trace_flags |= 1 << index; | ||
3910 | break; | ||
3911 | |||
3912 | default: | ||
3913 | return -EINVAL; | 3905 | return -EINVAL; |
3914 | } | 3906 | set_tracer_flags(1 << index, val); |
3915 | 3907 | ||
3916 | *ppos += cnt; | 3908 | *ppos += cnt; |
3917 | 3909 | ||