Clean up debug printing for scheduler / pthreads.  Two new flags,
--trace-sched=no|yes and --trace-pthread=no|yes, if you really want
to see tons of gory details.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@55 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/vg_main.c b/vg_main.c
index 6e5c01a..128bfdd 100644
--- a/vg_main.c
+++ b/vg_main.c
@@ -439,6 +439,8 @@
 Bool   VG_(clo_trace_signals);
 Bool   VG_(clo_trace_symtab);
 Bool   VG_(clo_trace_malloc);
+Bool   VG_(clo_trace_sched);
+Bool   VG_(clo_trace_pthread);
 ULong  VG_(clo_stop_after);
 Int    VG_(clo_dump_error);
 Int    VG_(clo_backtrace_size);
@@ -521,6 +523,8 @@
    VG_(clo_trace_signals)    = False;
    VG_(clo_trace_symtab)     = False;
    VG_(clo_trace_malloc)     = False;
+   VG_(clo_trace_sched)      = False;
+   VG_(clo_trace_pthread)    = False;
    VG_(clo_stop_after)       = 1000000000000LL;
    VG_(clo_dump_error)       = 0;
    VG_(clo_backtrace_size)   = 4;
@@ -789,6 +793,16 @@
       else if (STREQ(argv[i], "--trace-malloc=no"))
          VG_(clo_trace_malloc) = False;
 
+      else if (STREQ(argv[i], "--trace-sched=yes"))
+         VG_(clo_trace_sched) = True;
+      else if (STREQ(argv[i], "--trace-sched=no"))
+         VG_(clo_trace_sched) = False;
+
+      else if (STREQ(argv[i], "--trace-pthread=yes"))
+         VG_(clo_trace_pthread) = True;
+      else if (STREQ(argv[i], "--trace-pthread=no"))
+         VG_(clo_trace_pthread) = False;
+
       else if (STREQN(13, argv[i], "--stop-after="))
          VG_(clo_stop_after) = VG_(atoll)(&argv[i][13]);