diff options
| author | Ingo Molnar <mingo@kernel.org> | 2013-09-03 01:41:11 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2013-09-03 01:41:11 -0400 |
| commit | 7d992feb7694a21ee81f22894b455dadd5d1c110 (patch) | |
| tree | d0f0961186b1c31c536a26a7f986ad7ca677453b /kernel/trace | |
| parent | 6e4664525b1db28f8c4e1130957f70a94c19213e (diff) | |
| parent | 25f27ce4a6a4995c8bdd69b4b2180465ed5ad2b8 (diff) | |
Merge branch 'rcu/next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu
Pull RCU updates from Paul E. McKenney:
"
* Update RCU documentation. These were posted to LKML at
https://lkml.org/lkml/2013/8/19/611.
* Miscellaneous fixes. These were posted to LKML at
https://lkml.org/lkml/2013/8/19/619.
* Full-system idle detection. This is for use by Frederic
Weisbecker's adaptive-ticks mechanism. Its purpose is
to allow the timekeeping CPU to shut off its tick when
all other CPUs are idle. These were posted to LKML at
https://lkml.org/lkml/2013/8/19/648.
* Improve rcutorture test coverage. These were posted to LKML at
https://lkml.org/lkml/2013/8/19/675.
"
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/trace')
| -rw-r--r-- | kernel/trace/trace.h | 3 | ||||
| -rw-r--r-- | kernel/trace/trace_printk.c | 19 |
2 files changed, 22 insertions, 0 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index afaae41b0a02..fe39acd4c1aa 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h | |||
| @@ -1022,6 +1022,9 @@ extern struct list_head ftrace_events; | |||
| 1022 | extern const char *__start___trace_bprintk_fmt[]; | 1022 | extern const char *__start___trace_bprintk_fmt[]; |
| 1023 | extern const char *__stop___trace_bprintk_fmt[]; | 1023 | extern const char *__stop___trace_bprintk_fmt[]; |
| 1024 | 1024 | ||
| 1025 | extern const char *__start___tracepoint_str[]; | ||
| 1026 | extern const char *__stop___tracepoint_str[]; | ||
| 1027 | |||
| 1025 | void trace_printk_init_buffers(void); | 1028 | void trace_printk_init_buffers(void); |
| 1026 | void trace_printk_start_comm(void); | 1029 | void trace_printk_start_comm(void); |
| 1027 | int trace_keep_overwrite(struct tracer *tracer, u32 mask, int set); | 1030 | int trace_keep_overwrite(struct tracer *tracer, u32 mask, int set); |
diff --git a/kernel/trace/trace_printk.c b/kernel/trace/trace_printk.c index a9077c1b4ad3..2900817ba65c 100644 --- a/kernel/trace/trace_printk.c +++ b/kernel/trace/trace_printk.c | |||
| @@ -244,12 +244,31 @@ static const char **find_next(void *v, loff_t *pos) | |||
| 244 | { | 244 | { |
| 245 | const char **fmt = v; | 245 | const char **fmt = v; |
| 246 | int start_index; | 246 | int start_index; |
| 247 | int last_index; | ||
| 247 | 248 | ||
| 248 | start_index = __stop___trace_bprintk_fmt - __start___trace_bprintk_fmt; | 249 | start_index = __stop___trace_bprintk_fmt - __start___trace_bprintk_fmt; |
| 249 | 250 | ||
| 250 | if (*pos < start_index) | 251 | if (*pos < start_index) |
| 251 | return __start___trace_bprintk_fmt + *pos; | 252 | return __start___trace_bprintk_fmt + *pos; |
| 252 | 253 | ||
| 254 | /* | ||
| 255 | * The __tracepoint_str section is treated the same as the | ||
| 256 | * __trace_printk_fmt section. The difference is that the | ||
| 257 | * __trace_printk_fmt section should only be used by trace_printk() | ||
| 258 | * in a debugging environment, as if anything exists in that section | ||
| 259 | * the trace_prink() helper buffers are allocated, which would just | ||
| 260 | * waste space in a production environment. | ||
| 261 | * | ||
| 262 | * The __tracepoint_str sections on the other hand are used by | ||
| 263 | * tracepoints which need to map pointers to their strings to | ||
| 264 | * the ASCII text for userspace. | ||
| 265 | */ | ||
| 266 | last_index = start_index; | ||
| 267 | start_index = __stop___tracepoint_str - __start___tracepoint_str; | ||
| 268 | |||
| 269 | if (*pos < last_index + start_index) | ||
| 270 | return __start___tracepoint_str + (*pos - last_index); | ||
| 271 | |||
| 253 | return find_next_mod_format(start_index, v, fmt, pos); | 272 | return find_next_mod_format(start_index, v, fmt, pos); |
| 254 | } | 273 | } |
| 255 | 274 | ||
