Remove --vex-iropt-precise-memory-exns, implement --vex-iropt-register-updates
authorphilippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9>
Wed, 1 Aug 2012 22:03:12 +0000 (22:03 +0000)
committerphilippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9>
Wed, 1 Aug 2012 22:03:12 +0000 (22:03 +0000)
* Option --vex-iropt-precise-memory-exns has been removed.
  It is replaced by --vex-iropt-register-updates which accepts
  3 values : 'unwindregs-at-mem-access' (replacing
  --vex-iropt-precise-memory-exns=no), 'allregs-at-mem-access'
  (replacing --vex-iropt-precise-memory-exns=yes)
  and a new value 'allregs-at-each-insn'.
  'allregs-at-each-insn' allows the Valgrind gdbserver to always
  show up to date values to GDB.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12809 a5019735-40e9-0310-863c-91ae7b9d1cf9

NEWS
coregrind/m_main.c
docs/xml/manual-core-adv.xml
docs/xml/manual-core.xml
gdbserver_tests/mcsignopass.vgtest
gdbserver_tests/mcsigpass.vgtest
none/tests/cmdline2.stdout.exp
none/tests/selfrun.vgtest

diff --git a/NEWS b/NEWS
index ad79d6e66b87c7508e228c0bcbe985da7298dc8c..4df34f44c186332708565d6dc24059978c6b3533 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -88,6 +88,15 @@ xxx Don't forget to update VALGRIND_MAJOR/MINOR before release
 
 * Improved DWARF4 support (284124)
 
+* Option --vex-iropt-precise-memory-exns has been removed.
+  It is replaced by --vex-iropt-register-updates which accepts
+  3 values : 'unwindregs-at-mem-access' (replacing
+  --vex-iropt-precise-memory-exns=no), 'allregs-at-mem-access'
+  (replacing --vex-iropt-precise-memory-exns=yes)
+  and a new value 'allregs-at-each-insn'.
+  'allregs-at-each-insn' allows the Valgrind gdbserver to always
+  show up to date values to GDB.
+
 * ==================== FIXED BUGS ====================
 
 The following bugs have been fixed or resolved.  Note that "n-i-bz"
index 7229bf2903195200b362ebf26cf54855065ec0b5..3d7fc1c64db121f4e11ac348459ce5108128d782 100644 (file)
@@ -228,7 +228,9 @@ static void usage_NORETURN ( Bool debug_help )
 "  Vex options for all Valgrind tools:\n"
 "    --vex-iropt-verbosity=<0..9>           [0]\n"
 "    --vex-iropt-level=<0..2>               [2]\n"
-"    --vex-iropt-precise-memory-exns=no|yes [no]\n"
+"    --vex-iropt-register-updates=unwindregs-at-mem-access\n"
+"                                |allregs-at-mem-access\n"
+"                                |allregs-at-each-insn  [unwindregs-at-mem-access]\n"
 "    --vex-iropt-unroll-thresh=<0..400>     [120]\n"
 "    --vex-guest-max-insns=<1..100>         [50]\n"
 "    --vex-guest-chase-thresh=<0..99>       [10]\n"
@@ -488,6 +490,21 @@ void main_process_cmd_line_options ( /*OUT*/Bool* logging_to_fd,
       else if VG_STREQN(14, arg, "--core-redzone-size")  {}
       else if VG_STREQN(14, arg, "--redzone-size")       {}
 
+      /* Obsolete options. Report an error and exit */
+      else if VG_STREQN(34, arg, "--vex-iropt-precise-memory-exns=no") {
+         VG_(fmsg_bad_option)
+            (arg,
+             "--vex-iropt-precise-memory-exns is obsolete\n"
+             "Use --vex-iropt-register-updates=unwindregs-at-mem-access instead\n");
+      }
+      else if VG_STREQN(35, arg, "--vex-iropt-precise-memory-exns=yes") {
+         VG_(fmsg_bad_option)
+            (arg,
+             "--vex-iropt-precise-memory-exns is obsolete\n"
+             "Use --vex-iropt-register-updates=allregs-at-mem-access instead\n"
+             " (or --vex-iropt-register-updates=allregs-at-each-insn)\n");
+      }
+
       // These options are new.
       else if (VG_STREQ(arg, "-v") ||
                VG_STREQ(arg, "--verbose"))
@@ -503,7 +520,12 @@ void main_process_cmd_line_options ( /*OUT*/Bool* logging_to_fd,
 
       else if VG_XACT_CLO(arg, "--vgdb=no",        VG_(clo_vgdb), Vg_VgdbNo) {}
       else if VG_XACT_CLO(arg, "--vgdb=yes",       VG_(clo_vgdb), Vg_VgdbYes) {}
-      else if VG_XACT_CLO(arg, "--vgdb=full",      VG_(clo_vgdb), Vg_VgdbFull) {}
+      else if VG_XACT_CLO(arg, "--vgdb=full",      VG_(clo_vgdb), Vg_VgdbFull) {
+         /* automatically updates register values at each insn
+            with --vgdb=full */
+         VG_(clo_vex_control).iropt_register_updates 
+            = VexRegUpdAllregsAtEachInsn;
+      }
       else if VG_INT_CLO (arg, "--vgdb-poll",      VG_(clo_vgdb_poll)) {}
       else if VG_INT_CLO (arg, "--vgdb-error",     VG_(clo_vgdb_error)) {}
       else if VG_STR_CLO (arg, "--vgdb-prefix",    VG_(clo_vgdb_prefix)) {}
@@ -582,8 +604,18 @@ void main_process_cmd_line_options ( /*OUT*/Bool* logging_to_fd,
                        VG_(clo_vex_control).iropt_verbosity, 0, 10) {}
       else if VG_BINT_CLO(arg, "--vex-iropt-level",
                        VG_(clo_vex_control).iropt_level, 0, 2) {}
-      else if VG_BOOL_CLO(arg, "--vex-iropt-precise-memory-exns",
-                       VG_(clo_vex_control).iropt_precise_memory_exns) {}
+      else if VG_XACT_CLO(arg, 
+                       "--vex-iropt-register-updates=unwindregs-at-mem-access",
+                       VG_(clo_vex_control).iropt_register_updates,
+                       VexRegUpdUnwindregsAtMemAccess);
+      else if VG_XACT_CLO(arg, 
+                       "--vex-iropt-register-updates=allregs-at-mem-access",
+                       VG_(clo_vex_control).iropt_register_updates,
+                       VexRegUpdAllregsAtMemAccess);
+      else if VG_XACT_CLO(arg, 
+                       "--vex-iropt-register-updates=allregs-at-each-insn",
+                       VG_(clo_vex_control).iropt_register_updates,
+                       VexRegUpdAllregsAtEachInsn);
       else if VG_BINT_CLO(arg, "--vex-iropt-unroll-thresh",
                        VG_(clo_vex_control).iropt_unroll_thresh, 0, 400) {}
       else if VG_BINT_CLO(arg, "--vex-guest-max-insns",
index b7e83b370effe3ec6aeb463e4cebbbcc41f0a730..d3c43e8e20777eea9d2a0ee5562d1ac3168ff39d 100644 (file)
@@ -788,21 +788,28 @@ are however some limitations and peculiarities:</para>
      <para>When Valgrind gdbserver stops on an error, on a breakpoint
      or when single stepping, registers and flags values might not be always
      up to date due to the optimisations done by the Valgrind core.
-     Disabling some optimisations using the following options will increase
+     The default value 
+     <option>--vex-iropt-register-updates=unwindregs-at-mem-access</option>
+     ensures that the registers needed to make a stack trace (typically
+     PC/SP/FP) are up to date at each memory access (i.e. memory exception
+     points).
+     Disabling some optimisations using the following values will increase
      the precision of registers and flags values (a typical performance 
      impact for memcheck is given for each option).
        <itemizedlist>
          <listitem>
-           <option>--vex-iropt-precise-memory-exns=yes</option> (+5%) ensures
-           that all integer registers are up to date at each memory access.
+           <option>--vex-iropt-register-updates=allregs-at-mem-access</option> (+10%)
+           ensures that all registers and flags are up to date at each memory
+           access.
          </listitem>
          <listitem>
-           <option>--vex-guest-max-insns=1</option> (+100%) ensures that
-           all registers and flags values are up to date at each instruction.
+           <option>--vex-iropt-register-updates=allregs-at-each-insn</option> (+25%)
+           ensures that all registers and flags are up to date at each instruction.
          </listitem>
        </itemizedlist>
-       Note that the above options can be combined with <option>--vgdb=full</option>
-       (+500%, see above Precision of "stop-at" commands).
+       Note that <option>--vgdb=full</option> (+500%, see above
+       Precision of "stop-at" commands) automatically
+       activates <option>--vex-iropt-register-updates=allregs-at-each-insn</option>.
      </para>
    </listitem>
 
@@ -898,7 +905,8 @@ Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
      <para>On PPC32/PPC64, stack unwinding for leaf functions
      (functions that do not call any other functions) works properly
      only when you give the option
-     <option>--vex-iropt-precise-memory-exns=yes</option>.
+     <option>--vex-iropt-register-updates=allregs-at-mem-access</option>
+     or <option>--vex-iropt-register-updates=allregs-at-each-insn</option>.
      You must also pass this option in order to get a precise stack when
      a signal is trapped by GDB.
      </para>
index f9da8438a4cabaebcf6d3d686cf1cead441a916a..fe11c17da584c185e8fec07f374a28ba6915364b 100644 (file)
@@ -2074,7 +2074,8 @@ able to cope with any POSIX-compliant use of signals.</para>
 <para>If you're using signals in clever ways (for example, catching
 SIGSEGV, modifying page state and restarting the instruction), you're
 probably relying on precise exceptions.  In this case, you will need
-to use <option>--vex-iropt-precise-memory-exns=yes</option>.
+to use <option>--vex-iropt-register-updates=allregs-at-mem-access</option>
+or <option>--vex-iropt-register-updates=allregs-at-each-insn</option>.
 </para>
 
 <para>If your program dies as a result of a fatal core-dumping signal,
index 32d169754196bed629cbb717cf9673eda979013e..61992aab5d53b70e8fcda0885dc6fea8e6c0320e 100644 (file)
@@ -6,7 +6,7 @@
 #      are eventually passed.
 prereq: test -e gdb
 prog: ../none/tests/faultstatus
-vgopts: --tool=memcheck --vgdb=full --vex-iropt-precise-memory-exns=yes --vgdb-error=0 --vgdb-prefix=./vgdb-prefix-mcsignopass
+vgopts: --tool=memcheck --vgdb=full --vex-iropt-register-updates=allregs-at-mem-access --vgdb-error=0 --vgdb-prefix=./vgdb-prefix-mcsignopass
 stderr_filter: filter_memcheck_monitor
 stderr_filter_args: faultstatus.c
 progB: gdb
index c23845b5e4ffd2de58aae01e2a3b1c8ea840e5c0..20f786456d12f0954ff350725cda84da96087b5e 100644 (file)
@@ -1,7 +1,7 @@
 # test the signal handling, when signals are passed to the Valgrind guest.
 prereq: test -e gdb
 prog: ../none/tests/faultstatus
-vgopts: --tool=memcheck --vgdb=full --vex-iropt-precise-memory-exns=yes --vgdb-error=0 --vgdb-prefix=./vgdb-prefix-mcsigpass
+vgopts: --tool=memcheck --vgdb=full --vex-iropt-register-updates=allregs-at-mem-access --vgdb-error=0 --vgdb-prefix=./vgdb-prefix-mcsigpass
 stderr_filter: filter_memcheck_monitor
 stderr_filter_args: faultstatus.c
 progB: gdb
index 72184a8721e72813110fa9f044d78b2b33c9197a..0caaba47d8abb7a27e8a1489670ead3992ea8eed 100644 (file)
@@ -117,7 +117,9 @@ usage: valgrind [options] prog-and-args
   Vex options for all Valgrind tools:
     --vex-iropt-verbosity=<0..9>           [0]
     --vex-iropt-level=<0..2>               [2]
-    --vex-iropt-precise-memory-exns=no|yes [no]
+    --vex-iropt-register-updates=unwindregs-at-mem-access
+                                |allregs-at-mem-access
+                                |allregs-at-each-insn  [unwindregs-at-mem-access]
     --vex-iropt-unroll-thresh=<0..400>     [120]
     --vex-guest-max-insns=<1..100>         [50]
     --vex-guest-chase-thresh=<0..99>       [10]
index 8db277939092dbb4688134a452938ff7dd05d203..55cc8c9f3b50d14c649bb384189a20542ed0c871 100644 (file)
@@ -1,3 +1,3 @@
 prog: ../../coregrind/valgrind --tool=none --command-line-only=yes ./selfrun
-vgopts: --vex-iropt-precise-memory-exns=yes
+vgopts: --vex-iropt-register-updates=allregs-at-mem-access
 prereq: grep '^#define HAVE_PIE 1' ../../config.h > /dev/null