]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/trace/trace_stack.c
nilfs2: fix gc failure on volumes keeping numerous snapshots
[linux-2.6-omap-h63xx.git] / kernel / trace / trace_stack.c
index d0871bc0aca5d0f670f9363cf49489fd9e85cf0c..c750f65f9661531273ee16553623b405268fc758 100644 (file)
@@ -245,16 +245,31 @@ static int trace_lookup_stack(struct seq_file *m, long i)
 #endif
 }
 
+static void print_disabled(struct seq_file *m)
+{
+       seq_puts(m, "#\n"
+                "#  Stack tracer disabled\n"
+                "#\n"
+                "# To enable the stack tracer, either add 'stacktrace' to the\n"
+                "# kernel command line\n"
+                "# or 'echo 1 > /proc/sys/kernel/stack_tracer_enabled'\n"
+                "#\n");
+}
+
 static int t_show(struct seq_file *m, void *v)
 {
        long i;
        int size;
 
        if (v == SEQ_START_TOKEN) {
-               seq_printf(m, "        Depth   Size      Location"
+               seq_printf(m, "        Depth    Size   Location"
                           "    (%d entries)\n"
-                          "        -----   ----      --------\n",
+                          "        -----    ----   --------\n",
                           max_stack_trace.nr_entries);
+
+               if (!stack_tracer_enabled && !max_stack_size)
+                       print_disabled(m);
+
                return 0;
        }