Merge branch 'x86/core' into tracing/ftrace
authorIngo Molnar <mingo@elte.hu>
Tue, 10 Mar 2009 09:16:17 +0000 (10:16 +0100)
committerIngo Molnar <mingo@elte.hu>
Tue, 10 Mar 2009 09:17:48 +0000 (10:17 +0100)
Semantic merge:

  kernel/trace/trace_functions_graph.c

Signed-off-by: Ingo Molnar <mingo@elte.hu>
1  2 
arch/x86/kernel/cpu/intel.c
arch/x86/mm/init_32.c
arch/x86/mm/init_64.c
kernel/module.c
kernel/trace/trace_functions_graph.c

Simple merge
Simple merge
Simple merge
diff --cc kernel/module.c
Simple merge
@@@ -807,44 -642,18 +807,44 @@@ static void print_graph_headers(struct 
  
        /* 2nd line */
        seq_printf(s, "# ");
 +      if (tracer_flags.val & TRACE_GRAPH_PRINT_ABS_TIME)
 +              seq_printf(s, "      |         ");
        if (tracer_flags.val & TRACE_GRAPH_PRINT_CPU)
 -              seq_printf(s, "|   ");
 +              seq_printf(s, "|  ");
        if (tracer_flags.val & TRACE_GRAPH_PRINT_PROC)
 -              seq_printf(s, "|      |     ");
 -      if (tracer_flags.val & TRACE_GRAPH_PRINT_OVERHEAD) {
 -              seq_printf(s, "|        ");
 -              seq_printf(s, "|                   |   |   |   |\n");
 -      } else
 -              seq_printf(s, "    |               |   |   |   |\n");
 +              seq_printf(s, "  |    |        ");
 +      if (tracer_flags.val & TRACE_GRAPH_PRINT_DURATION)
 +              seq_printf(s, "   |   |      ");
 +      seq_printf(s, "               |   |   |   |\n");
  }
-       percpu_free(iter->private);
 +
 +static void graph_trace_open(struct trace_iterator *iter)
 +{
 +      /* pid on the last trace processed */
 +      pid_t *last_pid = alloc_percpu(pid_t);
 +      int cpu;
 +
 +      if (!last_pid)
 +              pr_warning("function graph tracer: not enough memory\n");
 +      else
 +              for_each_possible_cpu(cpu) {
 +                      pid_t *pid = per_cpu_ptr(last_pid, cpu);
 +                      *pid = -1;
 +              }
 +
 +      iter->private = last_pid;
 +}
 +
 +static void graph_trace_close(struct trace_iterator *iter)
 +{
++      free_percpu(iter->private);
 +}
 +
  static struct tracer graph_trace __read_mostly = {
        .name           = "function_graph",
 +      .open           = graph_trace_open,
 +      .close          = graph_trace_close,
 +      .wait_pipe      = poll_wait_pipe,
        .init           = graph_trace_init,
        .reset          = graph_trace_reset,
        .print_line     = print_graph_function,