diff options
| -rw-r--r-- | kernel/trace/trace.c | 21 | ||||
| -rw-r--r-- | kernel/trace/trace.h | 8 |
2 files changed, 0 insertions, 29 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index dd7780ddde08..69cba470ea96 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
| @@ -5865,17 +5865,6 @@ struct dentry *trace_instance_dir; | |||
| 5865 | static void | 5865 | static void |
| 5866 | init_tracer_debugfs(struct trace_array *tr, struct dentry *d_tracer); | 5866 | init_tracer_debugfs(struct trace_array *tr, struct dentry *d_tracer); |
| 5867 | 5867 | ||
| 5868 | static void init_trace_buffers(struct trace_array *tr, struct trace_buffer *buf) | ||
| 5869 | { | ||
| 5870 | int cpu; | ||
| 5871 | |||
| 5872 | for_each_tracing_cpu(cpu) { | ||
| 5873 | memset(per_cpu_ptr(buf->data, cpu), 0, sizeof(struct trace_array_cpu)); | ||
| 5874 | per_cpu_ptr(buf->data, cpu)->trace_cpu.cpu = cpu; | ||
| 5875 | per_cpu_ptr(buf->data, cpu)->trace_cpu.tr = tr; | ||
| 5876 | } | ||
| 5877 | } | ||
| 5878 | |||
| 5879 | static int | 5868 | static int |
| 5880 | allocate_trace_buffer(struct trace_array *tr, struct trace_buffer *buf, int size) | 5869 | allocate_trace_buffer(struct trace_array *tr, struct trace_buffer *buf, int size) |
| 5881 | { | 5870 | { |
| @@ -5893,8 +5882,6 @@ allocate_trace_buffer(struct trace_array *tr, struct trace_buffer *buf, int size | |||
| 5893 | return -ENOMEM; | 5882 | return -ENOMEM; |
| 5894 | } | 5883 | } |
| 5895 | 5884 | ||
| 5896 | init_trace_buffers(tr, buf); | ||
| 5897 | |||
| 5898 | /* Allocate the first page for all buffers */ | 5885 | /* Allocate the first page for all buffers */ |
| 5899 | set_buffer_entries(&tr->trace_buffer, | 5886 | set_buffer_entries(&tr->trace_buffer, |
| 5900 | ring_buffer_size(tr->trace_buffer.buffer, 0)); | 5887 | ring_buffer_size(tr->trace_buffer.buffer, 0)); |
| @@ -5961,10 +5948,6 @@ static int new_instance_create(const char *name) | |||
| 5961 | if (allocate_trace_buffers(tr, trace_buf_size) < 0) | 5948 | if (allocate_trace_buffers(tr, trace_buf_size) < 0) |
| 5962 | goto out_free_tr; | 5949 | goto out_free_tr; |
| 5963 | 5950 | ||
| 5964 | /* Holder for file callbacks */ | ||
| 5965 | tr->trace_cpu.cpu = RING_BUFFER_ALL_CPUS; | ||
| 5966 | tr->trace_cpu.tr = tr; | ||
| 5967 | |||
| 5968 | tr->dir = debugfs_create_dir(name, trace_instance_dir); | 5951 | tr->dir = debugfs_create_dir(name, trace_instance_dir); |
| 5969 | if (!tr->dir) | 5952 | if (!tr->dir) |
| 5970 | goto out_free_tr; | 5953 | goto out_free_tr; |
| @@ -6438,10 +6421,6 @@ __init static int tracer_alloc_buffers(void) | |||
| 6438 | 6421 | ||
| 6439 | global_trace.flags = TRACE_ARRAY_FL_GLOBAL; | 6422 | global_trace.flags = TRACE_ARRAY_FL_GLOBAL; |
| 6440 | 6423 | ||
| 6441 | /* Holder for file callbacks */ | ||
| 6442 | global_trace.trace_cpu.cpu = RING_BUFFER_ALL_CPUS; | ||
| 6443 | global_trace.trace_cpu.tr = &global_trace; | ||
| 6444 | |||
| 6445 | INIT_LIST_HEAD(&global_trace.systems); | 6424 | INIT_LIST_HEAD(&global_trace.systems); |
| 6446 | INIT_LIST_HEAD(&global_trace.events); | 6425 | INIT_LIST_HEAD(&global_trace.events); |
| 6447 | list_add(&global_trace.list, &ftrace_trace_arrays); | 6426 | list_add(&global_trace.list, &ftrace_trace_arrays); |
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index e7d643b8a907..afaae41b0a02 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h | |||
| @@ -130,19 +130,12 @@ enum trace_flag_type { | |||
| 130 | 130 | ||
| 131 | struct trace_array; | 131 | struct trace_array; |
| 132 | 132 | ||
| 133 | struct trace_cpu { | ||
| 134 | struct trace_array *tr; | ||
| 135 | struct dentry *dir; | ||
| 136 | int cpu; | ||
| 137 | }; | ||
| 138 | |||
| 139 | /* | 133 | /* |
| 140 | * The CPU trace array - it consists of thousands of trace entries | 134 | * The CPU trace array - it consists of thousands of trace entries |
| 141 | * plus some other descriptor data: (for example which task started | 135 | * plus some other descriptor data: (for example which task started |
| 142 | * the trace, etc.) | 136 | * the trace, etc.) |
| 143 | */ | 137 | */ |
| 144 | struct trace_array_cpu { | 138 | struct trace_array_cpu { |
| 145 | struct trace_cpu trace_cpu; | ||
| 146 | atomic_t disabled; | 139 | atomic_t disabled; |
| 147 | void *buffer_page; /* ring buffer spare */ | 140 | void *buffer_page; /* ring buffer spare */ |
| 148 | 141 | ||
| @@ -196,7 +189,6 @@ struct trace_array { | |||
| 196 | bool allocated_snapshot; | 189 | bool allocated_snapshot; |
| 197 | #endif | 190 | #endif |
| 198 | int buffer_disabled; | 191 | int buffer_disabled; |
| 199 | struct trace_cpu trace_cpu; /* place holder */ | ||
| 200 | #ifdef CONFIG_FTRACE_SYSCALLS | 192 | #ifdef CONFIG_FTRACE_SYSCALLS |
| 201 | int sys_refcount_enter; | 193 | int sys_refcount_enter; |
| 202 | int sys_refcount_exit; | 194 | int sys_refcount_exit; |
