浏览代码

tracing: Remove lock_depth from event entry

The lock_depth field in the event headers was added as a temporary
data point for help in removing the BKL. Now that the BKL is pretty
much been removed, we can remove this field.

This in turn changes the header from 12 bytes to 8 bytes,
removing the 4 byte buffer that gcc would insert if the first field
in the data load was 8 bytes in size.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Steven Rostedt 14 年之前
父节点
当前提交
e6e1e25935
共有 4 个文件被更改,包括 5 次插入15 次删除
  1. 0 1
      include/linux/ftrace_event.h
  2. 3 5
      kernel/trace/trace.c
  3. 0 1
      kernel/trace/trace_events.c
  4. 2 8
      kernel/trace/trace_output.c

+ 0 - 1
include/linux/ftrace_event.h

@@ -37,7 +37,6 @@ struct trace_entry {
 	unsigned char		flags;
 	unsigned char		flags;
 	unsigned char		preempt_count;
 	unsigned char		preempt_count;
 	int			pid;
 	int			pid;
-	int			lock_depth;
 };
 };
 
 
 #define FTRACE_MAX_EVENT						\
 #define FTRACE_MAX_EVENT						\

+ 3 - 5
kernel/trace/trace.c

@@ -1101,7 +1101,6 @@ tracing_generic_entry_update(struct trace_entry *entry, unsigned long flags,
 
 
 	entry->preempt_count		= pc & 0xff;
 	entry->preempt_count		= pc & 0xff;
 	entry->pid			= (tsk) ? tsk->pid : 0;
 	entry->pid			= (tsk) ? tsk->pid : 0;
-	entry->lock_depth		= (tsk) ? tsk->lock_depth : 0;
 	entry->flags =
 	entry->flags =
 #ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT
 #ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT
 		(irqs_disabled_flags(flags) ? TRACE_FLAG_IRQS_OFF : 0) |
 		(irqs_disabled_flags(flags) ? TRACE_FLAG_IRQS_OFF : 0) |
@@ -1748,10 +1747,9 @@ static void print_lat_help_header(struct seq_file *m)
 	seq_puts(m, "#                | / _----=> need-resched    \n");
 	seq_puts(m, "#                | / _----=> need-resched    \n");
 	seq_puts(m, "#                || / _---=> hardirq/softirq \n");
 	seq_puts(m, "#                || / _---=> hardirq/softirq \n");
 	seq_puts(m, "#                ||| / _--=> preempt-depth   \n");
 	seq_puts(m, "#                ||| / _--=> preempt-depth   \n");
-	seq_puts(m, "#                |||| /_--=> lock-depth       \n");
-	seq_puts(m, "#                |||||/     delay             \n");
-	seq_puts(m, "#  cmd     pid   |||||| time  |   caller      \n");
-	seq_puts(m, "#     \\   /      ||||||   \\   |   /           \n");
+	seq_puts(m, "#                |||| /     delay             \n");
+	seq_puts(m, "#  cmd     pid   ||||| time  |   caller      \n");
+	seq_puts(m, "#     \\   /      |||||  \\    |   /           \n");
 }
 }
 
 
 static void print_func_help_header(struct seq_file *m)
 static void print_func_help_header(struct seq_file *m)

+ 0 - 1
kernel/trace/trace_events.c

@@ -116,7 +116,6 @@ static int trace_define_common_fields(void)
 	__common_field(unsigned char, flags);
 	__common_field(unsigned char, flags);
 	__common_field(unsigned char, preempt_count);
 	__common_field(unsigned char, preempt_count);
 	__common_field(int, pid);
 	__common_field(int, pid);
-	__common_field(int, lock_depth);
 
 
 	return ret;
 	return ret;
 }
 }

+ 2 - 8
kernel/trace/trace_output.c

@@ -529,7 +529,7 @@ seq_print_ip_sym(struct trace_seq *s, unsigned long ip, unsigned long sym_flags)
  * @entry: The trace entry field from the ring buffer
  * @entry: The trace entry field from the ring buffer
  *
  *
  * Prints the generic fields of irqs off, in hard or softirq, preempt
  * Prints the generic fields of irqs off, in hard or softirq, preempt
- * count and lock depth.
+ * count.
  */
  */
 int trace_print_lat_fmt(struct trace_seq *s, struct trace_entry *entry)
 int trace_print_lat_fmt(struct trace_seq *s, struct trace_entry *entry)
 {
 {
@@ -554,13 +554,7 @@ int trace_print_lat_fmt(struct trace_seq *s, struct trace_entry *entry)
 	else
 	else
 		ret = trace_seq_putc(s, '.');
 		ret = trace_seq_putc(s, '.');
 
 
-	if (!ret)
-		return 0;
-
-	if (entry->lock_depth < 0)
-		return trace_seq_putc(s, '.');
-
-	return trace_seq_printf(s, "%d", entry->lock_depth);
+	return ret;
 }
 }
 
 
 static int
 static int