diff options
author | Arnd Bergmann <arnd@arndb.de> | 2013-04-09 09:50:59 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2013-04-09 10:01:23 -0400 |
commit | 835f9c38bbb4498c3d43b7466964bdadbb1fd244 (patch) | |
tree | ade5aec66bc7ddb97048c4f141932de0f93369b9 /kernel/trace/trace.c | |
parent | f5f29151588744ea2e283971cb0ad403ee04e3e2 (diff) | |
parent | a937536b868b8369b98967929045f1df54234323 (diff) |
Merge tag 'v3.9-rc3' into next/multiplatform
Linux 3.9-rc3
Conflicts:
arch/arm/Kconfig
arch/arm/mach-spear/spear3xx.c
arch/arm/plat-spear/Kconfig
This is a dependency for ux500/multiplatform
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r-- | kernel/trace/trace.c | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index c2e2c2310374..1f835a83cb2c 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -2400,6 +2400,27 @@ static void test_ftrace_alive(struct seq_file *m) | |||
2400 | seq_printf(m, "# MAY BE MISSING FUNCTION EVENTS\n"); | 2400 | seq_printf(m, "# MAY BE MISSING FUNCTION EVENTS\n"); |
2401 | } | 2401 | } |
2402 | 2402 | ||
2403 | #ifdef CONFIG_TRACER_MAX_TRACE | ||
2404 | static void print_snapshot_help(struct seq_file *m, struct trace_iterator *iter) | ||
2405 | { | ||
2406 | if (iter->trace->allocated_snapshot) | ||
2407 | seq_printf(m, "#\n# * Snapshot is allocated *\n#\n"); | ||
2408 | else | ||
2409 | seq_printf(m, "#\n# * Snapshot is freed *\n#\n"); | ||
2410 | |||
2411 | seq_printf(m, "# Snapshot commands:\n"); | ||
2412 | seq_printf(m, "# echo 0 > snapshot : Clears and frees snapshot buffer\n"); | ||
2413 | seq_printf(m, "# echo 1 > snapshot : Allocates snapshot buffer, if not already allocated.\n"); | ||
2414 | seq_printf(m, "# Takes a snapshot of the main buffer.\n"); | ||
2415 | seq_printf(m, "# echo 2 > snapshot : Clears snapshot buffer (but does not allocate)\n"); | ||
2416 | seq_printf(m, "# (Doesn't have to be '2' works with any number that\n"); | ||
2417 | seq_printf(m, "# is not a '0' or '1')\n"); | ||
2418 | } | ||
2419 | #else | ||
2420 | /* Should never be called */ | ||
2421 | static inline void print_snapshot_help(struct seq_file *m, struct trace_iterator *iter) { } | ||
2422 | #endif | ||
2423 | |||
2403 | static int s_show(struct seq_file *m, void *v) | 2424 | static int s_show(struct seq_file *m, void *v) |
2404 | { | 2425 | { |
2405 | struct trace_iterator *iter = v; | 2426 | struct trace_iterator *iter = v; |
@@ -2411,7 +2432,9 @@ static int s_show(struct seq_file *m, void *v) | |||
2411 | seq_puts(m, "#\n"); | 2432 | seq_puts(m, "#\n"); |
2412 | test_ftrace_alive(m); | 2433 | test_ftrace_alive(m); |
2413 | } | 2434 | } |
2414 | if (iter->trace && iter->trace->print_header) | 2435 | if (iter->snapshot && trace_empty(iter)) |
2436 | print_snapshot_help(m, iter); | ||
2437 | else if (iter->trace && iter->trace->print_header) | ||
2415 | iter->trace->print_header(m); | 2438 | iter->trace->print_header(m); |
2416 | else | 2439 | else |
2417 | trace_default_header(m); | 2440 | trace_default_header(m); |
@@ -4144,8 +4167,6 @@ tracing_snapshot_write(struct file *filp, const char __user *ubuf, size_t cnt, | |||
4144 | default: | 4167 | default: |
4145 | if (current_trace->allocated_snapshot) | 4168 | if (current_trace->allocated_snapshot) |
4146 | tracing_reset_online_cpus(&max_tr); | 4169 | tracing_reset_online_cpus(&max_tr); |
4147 | else | ||
4148 | ret = -EINVAL; | ||
4149 | break; | 4170 | break; |
4150 | } | 4171 | } |
4151 | 4172 | ||