You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(19) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
1
(8) |
2
(11) |
3
(21) |
4
(15) |
5
(10) |
|
6
(7) |
7
(7) |
8
(5) |
9
(7) |
10
(5) |
11
(1) |
12
(21) |
|
13
(8) |
14
(17) |
15
(6) |
16
(10) |
17
(7) |
18
(6) |
19
(15) |
|
20
(12) |
21
(16) |
22
(25) |
23
(14) |
24
(10) |
25
(7) |
26
(6) |
|
27
(34) |
28
(13) |
29
(10) |
30
(8) |
|
|
|
|
From: Nicholas N. <nj...@ca...> - 2004-06-16 21:26:50
|
CVS commit by nethercote:
Introduced 4 macros to minimise boilerplate command line processing code.
Nicely cuts around 130 lines of code, spread over the core and several tools.
M +1 -1 coregrind/vg_include.h 1.194
M +40 -135 coregrind/vg_main.c 1.155
M +2 -10 coregrind/vg_malloc2.c 1.23
M +10 -50 helgrind/hg_main.c 1.76
M +27 -2 include/vg_skin.h.base 1.20
M +5 -24 massif/ms_main.c 1.10
M +7 -25 memcheck/mac_needs.c 1.26
M +2 -10 memcheck/mc_main.c 1.48
--- valgrind/coregrind/vg_include.h #1.193:1.194
@@ -190,5 +190,5 @@ extern Char* VG_(clo_db_command);
extern Bool VG_(clo_gen_suppressions);
/* Sanity-check level: 0 = none, 1 (default), > 1 = expensive. */
-extern Int VG_(sanity_level);
+extern Int VG_(clo_sanity_level);
/* Automatically attempt to demangle C++ names? default: YES */
extern Bool VG_(clo_demangle);
--- valgrind/coregrind/vg_main.c #1.154:1.155
@@ -1457,5 +1457,5 @@ Bool VG_(clo_db_attach) = False;
Char* VG_(clo_db_command) = VG_CLO_DEFAULT_DBCOMMAND;
Bool VG_(clo_gen_suppressions) = False;
-Int VG_(sanity_level) = 1;
+Int VG_(clo_sanity_level) = 1;
Int VG_(clo_verbosity) = 1;
Bool VG_(clo_demangle) = True;
@@ -1715,54 +1717,35 @@ static void process_cmd_line_options
VG_(clo_verbosity)--;
- else if (VG_CLO_STREQ(arg, "--error-limit=yes"))
- VG_(clo_error_limit) = True;
- else if (VG_CLO_STREQ(arg, "--error-limit=no"))
- VG_(clo_error_limit) = False;
-
- else if (VG_CLO_STREQ(arg, "--db-attach=yes"))
- VG_(clo_db_attach) = True;
- else if (VG_CLO_STREQ(arg, "--db-attach=no"))
- VG_(clo_db_attach) = False;
-
- else if (VG_CLO_STREQN(13,arg, "--db-command="))
- VG_(clo_db_command) = &arg[13];
-
- else if (VG_CLO_STREQ(arg, "--gen-suppressions=yes"))
- VG_(clo_gen_suppressions) = True;
- else if (VG_CLO_STREQ(arg, "--gen-suppressions=no"))
- VG_(clo_gen_suppressions) = False;
-
- else if (VG_CLO_STREQ(arg, "--show-below-main=yes"))
- VG_(clo_show_below_main) = True;
- else if (VG_CLO_STREQ(arg, "--show-below-main=no"))
- VG_(clo_show_below_main) = False;
-
- else if (VG_CLO_STREQ(arg, "--pointercheck=yes"))
- VG_(clo_pointercheck) = True;
- else if (VG_CLO_STREQ(arg, "--pointercheck=no"))
- VG_(clo_pointercheck) = False;
-
- else if (VG_CLO_STREQ(arg, "--demangle=yes"))
- VG_(clo_demangle) = True;
- else if (VG_CLO_STREQ(arg, "--demangle=no"))
- VG_(clo_demangle) = False;
-
- else if (VG_CLO_STREQ(arg, "--trace-children=yes"))
- VG_(clo_trace_children) = True;
- else if (VG_CLO_STREQ(arg, "--trace-children=no"))
- VG_(clo_trace_children) = False;
-
- else if (VG_CLO_STREQ(arg, "--run-libc-freeres=yes"))
- VG_(clo_run_libc_freeres) = True;
- else if (VG_CLO_STREQ(arg, "--run-libc-freeres=no"))
- VG_(clo_run_libc_freeres) = False;
+ else VG_BOOL_CLO("--branchpred", VG_(clo_branchpred))
+ else VG_BOOL_CLO("--chain-bb", VG_(clo_chain_bb))
+ else VG_BOOL_CLO("--db-attach", VG_(clo_db_attach))
+ else VG_BOOL_CLO("--demangle", VG_(clo_demangle))
+ else VG_BOOL_CLO("--error-limit", VG_(clo_error_limit))
+ else VG_BOOL_CLO("--gen-suppressions", VG_(clo_gen_suppressions))
+ else VG_BOOL_CLO("--lowlat-signals", VG_(clo_lowlat_signals))
+ else VG_BOOL_CLO("--lowlat-syscalls", VG_(clo_lowlat_syscalls))
+ else VG_BOOL_CLO("--optimise", VG_(clo_optimise))
+ else VG_BOOL_CLO("--pointercheck", VG_(clo_pointercheck))
+ else VG_BOOL_CLO("--profile", VG_(clo_profile))
+ else VG_BOOL_CLO("--run-libc-freeres", VG_(clo_run_libc_freeres))
+ else VG_BOOL_CLO("--show-below-main", VG_(clo_show_below_main))
+ else VG_BOOL_CLO("--single-step", VG_(clo_single_step))
+ else VG_BOOL_CLO("--track-fds", VG_(clo_track_fds))
+ else VG_BOOL_CLO("--trace-children", VG_(clo_trace_children))
+ else VG_BOOL_CLO("--trace-sched", VG_(clo_trace_sched))
+ else VG_BOOL_CLO("--trace-signals", VG_(clo_trace_signals))
+ else VG_BOOL_CLO("--trace-symtab", VG_(clo_trace_symtab))
+ else VG_BOOL_CLO("--trace-syscalls", VG_(clo_trace_syscalls))
+ else VG_BOOL_CLO("--wait-for-gdb", VG_(clo_wait_for_gdb))
- else if (VG_CLO_STREQ(arg, "--track-fds=yes"))
- VG_(clo_track_fds) = True;
- else if (VG_CLO_STREQ(arg, "--track-fds=no"))
- VG_(clo_track_fds) = False;
+ else VG_STR_CLO ("--db-command", VG_(clo_db_command))
+ else VG_STR_CLO ("--weird-hacks", VG_(clo_weird_hacks))
- else if (VG_CLO_STREQN(15, arg, "--sanity-level="))
- VG_(sanity_level) = (Int)VG_(atoll)(&arg[15]);
+ else VG_NUM_CLO ("--dump-error", VG_(clo_dump_error))
+ else VG_NUM_CLO ("--input-fd", VG_(clo_input_fd))
+ else VG_NUM_CLO ("--sanity-level", VG_(clo_sanity_level))
+ else VG_NUM_CLO ("--signalpolltime", VG_(clo_signal_polltime))
+ else VG_BNUM_CLO("--num-callers", VG_(clo_backtrace_size), 1,
+ VG_DEEPEST_BACKTRACE)
else if (VG_CLO_STREQN(13, arg, "--logfile-fd=")) {
@@ -1782,7 +1765,4 @@ static void process_cmd_line_options
}
- else if (VG_CLO_STREQN(11, arg, "--input-fd="))
- VG_(clo_input_fd) = (Int)VG_(atoll)(&arg[11]);
-
else if (VG_CLO_STREQN(15, arg, "--suppressions=")) {
if (VG_(clo_n_suppressions) >= VG_CLO_MAX_SFILES) {
@@ -1795,28 +1775,4 @@ static void process_cmd_line_options
VG_(clo_n_suppressions)++;
}
- else if (VG_CLO_STREQ(arg, "--profile=yes"))
- VG_(clo_profile) = True;
- else if (VG_CLO_STREQ(arg, "--profile=no"))
- VG_(clo_profile) = False;
-
- else if (VG_CLO_STREQ(arg, "--chain-bb=yes"))
- VG_(clo_chain_bb) = True;
- else if (VG_CLO_STREQ(arg, "--chain-bb=no"))
- VG_(clo_chain_bb) = False;
-
- else if (VG_CLO_STREQ(arg, "--branchpred=yes"))
- VG_(clo_branchpred) = True;
- else if (VG_CLO_STREQ(arg, "--branchpred=no"))
- VG_(clo_branchpred) = False;
-
- else if (VG_CLO_STREQ(arg, "--single-step=yes"))
- VG_(clo_single_step) = True;
- else if (VG_CLO_STREQ(arg, "--single-step=no"))
- VG_(clo_single_step) = False;
-
- else if (VG_CLO_STREQ(arg, "--optimise=yes"))
- VG_(clo_optimise) = True;
- else if (VG_CLO_STREQ(arg, "--optimise=no"))
- VG_(clo_optimise) = False;
/* "vwxyz" --> 000zyxwv (binary) */
@@ -1841,24 +1797,4 @@ static void process_cmd_line_options
}
- else if (VG_CLO_STREQ(arg, "--trace-syscalls=yes"))
- VG_(clo_trace_syscalls) = True;
- else if (VG_CLO_STREQ(arg, "--trace-syscalls=no"))
- VG_(clo_trace_syscalls) = False;
-
- else if (VG_CLO_STREQ(arg, "--trace-signals=yes"))
- VG_(clo_trace_signals) = True;
- else if (VG_CLO_STREQ(arg, "--trace-signals=no"))
- VG_(clo_trace_signals) = False;
-
- else if (VG_CLO_STREQ(arg, "--trace-symtab=yes"))
- VG_(clo_trace_symtab) = True;
- else if (VG_CLO_STREQ(arg, "--trace-symtab=no"))
- VG_(clo_trace_symtab) = False;
-
- else if (VG_CLO_STREQ(arg, "--trace-sched=yes"))
- VG_(clo_trace_sched) = True;
- else if (VG_CLO_STREQ(arg, "--trace-sched=no"))
- VG_(clo_trace_sched) = False;
-
else if (VG_CLO_STREQ(arg, "--trace-pthread=none"))
VG_(clo_trace_pthread_level) = 0;
@@ -1868,37 +1804,4 @@ static void process_cmd_line_options
VG_(clo_trace_pthread_level) = 2;
- else if (VG_CLO_STREQN(14, arg, "--weird-hacks="))
- VG_(clo_weird_hacks) = &arg[14];
-
- else if (VG_CLO_STREQN(17, arg, "--signal-polltime="))
- VG_(clo_signal_polltime) = VG_(atoll)(&arg[17]);
-
- else if (VG_CLO_STREQ(arg, "--lowlat-signals=yes"))
- VG_(clo_lowlat_signals) = True;
- else if (VG_CLO_STREQ(arg, "--lowlat-signals=no"))
- VG_(clo_lowlat_signals) = False;
-
- else if (VG_CLO_STREQ(arg, "--lowlat-syscalls=yes"))
- VG_(clo_lowlat_syscalls) = True;
- else if (VG_CLO_STREQ(arg, "--lowlat-syscalls=no"))
- VG_(clo_lowlat_syscalls) = False;
-
- else if (VG_CLO_STREQN(13, arg, "--dump-error="))
- VG_(clo_dump_error) = (Int)VG_(atoll)(&arg[13]);
-
- else if (VG_CLO_STREQ(arg, "--wait-for-gdb=yes"))
- VG_(clo_wait_for_gdb) = True;
- else if (VG_CLO_STREQ(arg, "--wait-for-gdb=no"))
- VG_(clo_wait_for_gdb) = False;
-
- else if (VG_CLO_STREQN(14, arg, "--num-callers=")) {
- /* Make sure it's sane. */
- VG_(clo_backtrace_size) = (Int)VG_(atoll)(&arg[14]);
- if (VG_(clo_backtrace_size) < 1)
- VG_(clo_backtrace_size) = 1;
- if (VG_(clo_backtrace_size) >= VG_DEEPEST_BACKTRACE)
- VG_(clo_backtrace_size) = VG_DEEPEST_BACKTRACE;
- }
-
else if ( ! VG_(needs).command_line_options
|| ! SK_(process_cmd_line_option)(arg) ) {
@@ -1907,4 +1810,6 @@ static void process_cmd_line_options
}
+ // Check various option values
+
if (VG_(clo_verbosity) < 0)
VG_(clo_verbosity) = 0;
@@ -2650,5 +2555,5 @@ void VG_(do_sanity_checks) ( Bool force_
VGP_PUSHCC(VgpCoreCheapSanity);
- if (VG_(sanity_level) < 1) return;
+ if (VG_(clo_sanity_level) < 1) return;
/* --- First do all the tests that we can do quickly. ---*/
@@ -2670,6 +2575,6 @@ void VG_(do_sanity_checks) ( Bool force_
/* Once every 25 times, check some more expensive stuff. */
if ( force_expensive
- || VG_(sanity_level) > 1
- || (VG_(sanity_level) == 1 && (VG_(sanity_fast_count) % 25) == 0)) {
+ || VG_(clo_sanity_level) > 1
+ || (VG_(clo_sanity_level) == 1 && (VG_(sanity_fast_count) % 25) == 0)) {
VGP_PUSHCC(VgpCoreExpensiveSanity);
@@ -2696,5 +2601,5 @@ void VG_(do_sanity_checks) ( Bool force_
}
- if (VG_(sanity_level) > 1) {
+ if (VG_(clo_sanity_level) > 1) {
VGP_PUSHCC(VgpCoreExpensiveSanity);
/* Check sanity of the low-level memory manager. Note that bugs
--- valgrind/coregrind/vg_malloc2.c #1.22:1.23
@@ -67,14 +67,6 @@ Bool VG_(replacement_malloc_process_cmd_
}
- else if (VG_CLO_STREQ(arg, "--sloppy-malloc=yes"))
- VG_(clo_sloppy_malloc) = True;
- else if (VG_CLO_STREQ(arg, "--sloppy-malloc=no"))
- VG_(clo_sloppy_malloc) = False;
-
- else if (VG_CLO_STREQ(arg, "--trace-malloc=yes"))
- VG_(clo_trace_malloc) = True;
- else if (VG_CLO_STREQ(arg, "--trace-malloc=no"))
- VG_(clo_trace_malloc) = False;
-
+ else VG_BOOL_CLO("--sloppy-malloc=yes", VG_(clo_sloppy_malloc))
+ else VG_BOOL_CLO("--trace-malloc=yes", VG_(clo_trace_malloc))
else
return False;
--- valgrind/helgrind/hg_main.c #1.75:1.76
@@ -3343,59 +3343,19 @@ void SK_(pre_clo_init)(void)
}
-static Bool match_Bool(Char *arg, Char *argstr, Bool *ret)
-{
- Int len = VG_(strlen)(argstr);
-
- if (VG_(strncmp)(arg, argstr, len) == 0) {
- if (VG_(strcmp)(arg+len, "yes") == 0) {
- *ret = True;
- return True;
- } else if (VG_(strcmp)(arg+len, "no") == 0) {
- *ret = False;
- return True;
- } else
- VG_(bad_option)(arg);
- }
- return False;
-}
-
-static Bool match_str(Char *arg, Char *argstr, Char **ret)
-{
- Int len = VG_(strlen)(argstr);
-
- if (VG_(strncmp)(arg, argstr, len) == 0) {
- *ret = VG_(strdup)(arg+len);
- return True;
- }
-
- return False;
-}
-
Bool SK_(process_cmd_line_option)(Char* arg)
{
- Char *str;
-
- if (match_str(arg, "--show-last-access=", &str)) {
- Bool ok = True;
- if (VG_(strcmp)(str, "no") == 0)
+ if (VG_CLO_STREQ(arg, "--show-last-access=no"))
clo_execontext = EC_None;
- else if (VG_(strcmp)(str, "some") == 0)
+ else if (VG_CLO_STREQ(arg, "--show-last-access=some"))
clo_execontext = EC_Some;
- else if (VG_(strcmp)(str, "all") == 0)
+ else if (VG_CLO_STREQ(arg, "--show-last-access=all"))
clo_execontext = EC_All;
- else {
- ok = False;
- VG_(bad_option)(arg);
- }
-
- VG_(free)(str);
- if (ok)
- return True;
- }
- if (match_Bool(arg, "--private-stacks=", &clo_priv_stacks))
- return True;
+ else VG_BOOL_CLO("--private-stacks", clo_priv_stacks)
+ else
return VG_(replacement_malloc_process_cmd_line_option)(arg);
+
+ return True;
}
--- valgrind/include/vg_skin.h.base #1.19:1.20
@@ -173,6 +173,31 @@
/* Use these for recognising skin command line options -- stops comparing
once whitespace is reached. */
-# define VG_CLO_STREQ(s1,s2) (0==VG_(strcmp_ws)((s1),(s2)))
-# define VG_CLO_STREQN(nn,s1,s2) (0==VG_(strncmp_ws)((s1),(s2),(nn)))
+#define VG_CLO_STREQ(s1,s2) (0==VG_(strcmp_ws)((s1),(s2)))
+#define VG_CLO_STREQN(nn,s1,s2) (0==VG_(strncmp_ws)((s1),(s2),(nn)))
+
+// Higher-level command-line option recognisers; use in if/else chains
+
+#define VG_BOOL_CLO(qq_option, qq_var) \
+ if (VG_CLO_STREQ(arg, qq_option"=yes")) { (qq_var) = True; } \
+ else if (VG_CLO_STREQ(arg, qq_option"=no")) { (qq_var) = False; }
+
+#define VG_STR_CLO(qq_option, qq_var) \
+ if (VG_CLO_STREQN(VG_(strlen)(qq_option)+1, arg, qq_option"=")) { \
+ (qq_var) = &arg[ VG_(strlen)(qq_option)+1 ]; \
+ }
+
+#define VG_NUM_CLO(qq_option, qq_var) \
+ if (VG_CLO_STREQN(VG_(strlen)(qq_option)+1, arg, qq_option"=")) { \
+ (qq_var) = (Int)VG_(atoll)( &arg[ VG_(strlen)(qq_option)+1 ] ); \
+ }
+
+// Bounded integer arg
+#define VG_BNUM_CLO(qq_option, qq_var, qq_lo, qq_hi) \
+ if (VG_CLO_STREQN(VG_(strlen)(qq_option)+1, arg, qq_option"=")) { \
+ (qq_var) = (Int)VG_(atoll)( &arg[ VG_(strlen)(qq_option)+1 ] ); \
+ if ((qq_var) < (qq_lo)) (qq_var) = (qq_lo); \
+ if ((qq_var) > (qq_hi)) (qq_var) = (qq_hi); \
+ }
+
/* Verbosity level: 0 = silent, 1 (default), > 1 = more verbose. */
--- valgrind/massif/ms_main.c #1.9:1.10
@@ -291,28 +291,9 @@ static XFormat clo_format = XText;
Bool SK_(process_cmd_line_option)(Char* arg)
{
- if (VG_CLO_STREQ(arg, "--heap=yes"))
- clo_heap = True;
- else if (VG_CLO_STREQ(arg, "--heap=no"))
- clo_heap = False;
-
- else if (VG_CLO_STREQN(13, arg, "--heap-admin=")) {
- clo_heap_admin = (Int)VG_(atoll)(&arg[13]);
- if (clo_heap_admin > 100) {
- VG_(message)(Vg_UserMsg,
- "Admin size for heap blocks too large");
- VG_(bad_option)(arg);
- }
- }
-
- else if (VG_CLO_STREQ(arg, "--stacks=yes"))
- clo_stacks = True;
- else if (VG_CLO_STREQ(arg, "--stacks=no"))
- clo_stacks = False;
+ VG_BOOL_CLO("--heap", clo_heap)
+ else VG_BOOL_CLO("--stacks", clo_stacks)
- else if (VG_CLO_STREQN(8, arg, "--depth=")) {
- clo_depth = (Int)VG_(atoll)(&arg[8]);
- if (clo_depth < 1) clo_depth = 1;
- if (clo_depth >= MAX_DEPTH) clo_depth = MAX_DEPTH;
- }
+ else VG_NUM_CLO ("--heap-admin", clo_heap_admin)
+ else VG_BNUM_CLO("--depth", clo_depth, 1, MAX_DEPTH)
else if (VG_CLO_STREQN(11, arg, "--alloc-fn=")) {
--- valgrind/memcheck/mac_needs.c #1.25:1.26
@@ -57,18 +57,10 @@ Bool MAC_(clo_workaround_gcc296_bugs) =
Bool MAC_(process_common_cmd_line_option)(Char* arg)
{
- if (VG_CLO_STREQ(arg, "--partial-loads-ok=yes"))
- MAC_(clo_partial_loads_ok) = True;
- else if (VG_CLO_STREQ(arg, "--partial-loads-ok=no"))
- MAC_(clo_partial_loads_ok) = False;
-
- else if (VG_CLO_STREQN(15, arg, "--freelist-vol=")) {
- MAC_(clo_freelist_vol) = (Int)VG_(atoll)(&arg[15]);
- if (MAC_(clo_freelist_vol) < 0) MAC_(clo_freelist_vol) = 0;
- }
+ VG_BOOL_CLO("--leak-check", MAC_(clo_leak_check))
+ else VG_BOOL_CLO("--partial-loads-ok", MAC_(clo_partial_loads_ok))
+ else VG_BOOL_CLO("--show-reachable", MAC_(clo_show_reachable))
+ else VG_BOOL_CLO("--workaround-gcc296-bugs",MAC_(clo_workaround_gcc296_bugs))
- else if (VG_CLO_STREQ(arg, "--leak-check=yes"))
- MAC_(clo_leak_check) = True;
- else if (VG_CLO_STREQ(arg, "--leak-check=no"))
- MAC_(clo_leak_check) = False;
+ else VG_BNUM_CLO("--freelist-vol", MAC_(clo_freelist_vol), 0, 1000000000)
else if (VG_CLO_STREQ(arg, "--leak-resolution=low"))
@@ -79,14 +71,4 @@ Bool MAC_(process_common_cmd_line_option
MAC_(clo_leak_resolution) = Vg_HighRes;
- else if (VG_CLO_STREQ(arg, "--show-reachable=yes"))
- MAC_(clo_show_reachable) = True;
- else if (VG_CLO_STREQ(arg, "--show-reachable=no"))
- MAC_(clo_show_reachable) = False;
-
- else if (VG_CLO_STREQ(arg, "--workaround-gcc296-bugs=yes"))
- MAC_(clo_workaround_gcc296_bugs) = True;
- else if (VG_CLO_STREQ(arg, "--workaround-gcc296-bugs=no"))
- MAC_(clo_workaround_gcc296_bugs) = False;
-
else
return VG_(replacement_malloc_process_cmd_line_option)(arg);
--- valgrind/memcheck/mc_main.c #1.47:1.48
@@ -1602,14 +1602,6 @@ Bool MC_(clo_cleanup) =
Bool SK_(process_cmd_line_option)(Char* arg)
{
- if (VG_CLO_STREQ(arg, "--avoid-strlen-errors=yes"))
- MC_(clo_avoid_strlen_errors) = True;
- else if (VG_CLO_STREQ(arg, "--avoid-strlen-errors=no"))
- MC_(clo_avoid_strlen_errors) = False;
-
- else if (VG_CLO_STREQ(arg, "--cleanup=yes"))
- MC_(clo_cleanup) = True;
- else if (VG_CLO_STREQ(arg, "--cleanup=no"))
- MC_(clo_cleanup) = False;
-
+ VG_BOOL_CLO("--avoid-strlen-errors", MC_(clo_avoid_strlen_errors))
+ else VG_BOOL_CLO("--cleanup", MC_(clo_cleanup))
else
return MAC_(process_common_cmd_line_option)(arg);
|
|
From: Tom H. <th...@cy...> - 2004-06-16 20:52:52
|
CVS commit by thughes:
Added VG_(cpuid) to replace the various bits of inline assembler used
to query the CPU characteristics as the use of four implicit registers
causes havoc when GCC tries to inline and optimise the assembler.
Fix to bug #79696.
A coregrind/vg_cpuid.S 1.1
M +10 -19 cachegrind/cg_main.c 1.66
M +2 -1 coregrind/Makefile.am 1.72
M +4 -27 coregrind/vg_to_ucode.c 1.139
M +4 -0 include/vg_skin.h.base 1.19
--- valgrind/cachegrind/cg_main.c #1.65:1.66
@@ -1178,13 +1178,4 @@ static cache_t clo_L2_cache = UNDEFINED_
*/
-static __inline__ void cpuid(Int n, UInt *a, UInt *b, UInt *c, UInt *d)
-{
- __asm__ __volatile__ (
- "cpuid"
- : "=a" (*a), "=b" (*b), "=c" (*c), "=d" (*d) /* output */
- : "0" (n) /* input */
- );
-}
-
static void micro_ops_warn(Int actual_size, Int used_size, Int line_size)
{
@@ -1215,5 +1206,5 @@ Int Intel_cache_info(Int level, cache_t*
}
- cpuid(2, (Int*)&info[0], (Int*)&info[4],
+ VG_(cpuid)(2, (Int*)&info[0], (Int*)&info[4],
(Int*)&info[8], (Int*)&info[12]);
trials = info[0] - 1; /* AL register - bits 0..7 of %eax */
@@ -1359,8 +1350,8 @@ Int AMD_cache_info(cache_t* I1c, cache_t
{
UInt ext_level;
- Int dummy, model;
- Int I1i, D1i, L2i;
+ UInt dummy, model;
+ UInt I1i, D1i, L2i;
- cpuid(0x80000000, &ext_level, &dummy, &dummy, &dummy);
+ VG_(cpuid)(0x80000000, &ext_level, &dummy, &dummy, &dummy);
if (0 == (ext_level & 0x80000000) || ext_level < 0x80000006) {
@@ -1371,8 +1362,8 @@ Int AMD_cache_info(cache_t* I1c, cache_t
}
- cpuid(0x80000005, &dummy, &dummy, &D1i, &I1i);
- cpuid(0x80000006, &dummy, &dummy, &L2i, &dummy);
+ VG_(cpuid)(0x80000005, &dummy, &dummy, &D1i, &I1i);
+ VG_(cpuid)(0x80000006, &dummy, &dummy, &L2i, &dummy);
- cpuid(0x1, &model, &dummy, &dummy, &dummy);
+ VG_(cpuid)(0x1, &model, &dummy, &dummy, &dummy);
/*VG_(message)(Vg_UserMsg,"CPU model %04x",model);*/
@@ -1427,5 +1418,5 @@ Int get_caches_from_CPUID(cache_t* I1c,
* doesn't support CPUID. */
if (__builtin_setjmp(cpuid_jmpbuf) == 0) {
- cpuid(0, &level, (int*)&vendor_id[0],
+ VG_(cpuid)(0, &level, (int*)&vendor_id[0],
(int*)&vendor_id[8], (int*)&vendor_id[4]);
vendor_id[12] = '\0';
--- valgrind/coregrind/Makefile.am #1.71:1.72
@@ -76,5 +76,6 @@
vg_translate.c \
vg_transtab.c \
- vg_ldt.c
+ vg_ldt.c \
+ vg_cpuid.S
stage2_DEPENDENCIES = $(srcdir)/valgrind.vs x86/stage2.lds
stage2_LDFLAGS=-Wl,--export-dynamic -Wl,-e,_ume_entry -g \
--- valgrind/coregrind/vg_to_ucode.c #1.138:1.139
@@ -96,27 +96,4 @@ static Bool has_cpuid(void)
}
-static inline UInt cpuid_eax(UInt eax)
-{
- asm("cpuid" : "=a" (eax) : "0" (eax) : "bx", "cx", "dx");
- return eax;
-}
-
-static inline void cpuid(UInt eax,
- UInt *eax_ret, UInt *ebx_ret, UInt *ecx_ret, UInt *edx_ret)
-{
- UInt ebx, ecx, edx;
-
- asm("cpuid" : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) : "0" (eax));
-
- if (eax_ret)
- *eax_ret = eax;
- if (ebx_ret)
- *ebx_ret = ebx;
- if (ecx_ret)
- *ecx_ret = ecx;
- if (edx_ret)
- *edx_ret = edx;
-}
-
static void get_cpu_features(void)
{
@@ -131,5 +108,5 @@ static void get_cpu_features(void)
cpu_features[VG_INT_FEAT] |= (1 << (VG_X86_FEAT_CPUID%32));
- cpuid(0, &cpuid_level, (UInt *)&vendorstr[0], (UInt *)&vendorstr[8], (UInt *)&vendorstr[4]);
+ VG_(cpuid)(0, &cpuid_level, (UInt *)&vendorstr[0], (UInt *)&vendorstr[8], (UInt *)&vendorstr[4]);
vendorstr[12] = '\0';
@@ -141,10 +118,10 @@ static void get_cpu_features(void)
if (cpuid_level >= 1)
- cpuid(1, NULL, NULL, &cpu_features[VG_EXT_FEAT], &cpu_features[VG_X86_FEAT]);
+ VG_(cpuid)(1, NULL, NULL, &cpu_features[VG_EXT_FEAT], &cpu_features[VG_X86_FEAT]);
switch(cpu_vendor) {
case VG_CPU_VENDOR_AMD:
/* get AMD-specific flags */
- cpuid(0x80000001, NULL, NULL, NULL, &cpu_features[VG_AMD_FEAT]);
+ VG_(cpuid)(0x80000001, NULL, NULL, NULL, &cpu_features[VG_AMD_FEAT]);
break;
@@ -260,5 +237,5 @@ void VG_(helperc_CPUID)(UInt op, UInt *e
get_cpu_features(); /* for cpu_vendor */
- cpuid(op, &eax, &ebx, &ecx, &edx);
+ VG_(cpuid)(op, &eax, &ebx, &ecx, &edx);
/* Common mangling */
--- valgrind/include/vg_skin.h.base #1.18:1.19
@@ -586,4 +586,8 @@
extern UInt VG_(read_millisecond_timer) ( void );
+extern void VG_(cpuid) ( UInt eax,
+ UInt *eax_ret, UInt *ebx_ret,
+ UInt *ecx_ret, UInt *edx_ret );
+
/*====================================================================*/
/*=== UCode definition ===*/
|
|
From: Nicholas N. <nj...@ca...> - 2004-06-16 15:06:14
|
Hi, I just saw something odd. Addrcheck has this line: VG_(init_post_mem_write) ( & ac_make_accessible ); which means it marks the A bits of written memory (eg. the buffer written to by a successful read() syscall) as addressable. AFAICT, this is totally unnecessary. Memcheck does a similar thing -- on this event it marks the V bits as valid (which makes sense -- they've just been written by the syscall) and the A bits as addressable. The result is that you could get fewer errors, eg. if you access unaddressable memory with a syscall and then again later in normal code, the 2nd access won't cause an error. Maybe this is the intention, to prevent cascading errors? Not sure -- comments? N |
|
From: Nicholas N. <nj...@ca...> - 2004-06-16 12:34:53
|
Hi,
I would like to change a couple of command line option names:
--logfile-fd --> --log-fd
--logfile --> --log-file
--logsocket --> --log-socket
so they are consistent with each other and with other options (especially
--input-fd). The old names would be kept for backwards compatibility, but
not documented. Sure, this is picky, but it's been bugging me for a
while. Any objections?
I'd also like to just get rid of a few options. Does anyone ever use the
following?
core:
--signal-polltime=<time> time, in mS, we should poll for signals.
Only applies for older kernels which need
signal routing [50]
--lowlat-signals=no|yes improve wake-up latency when a thread receives
a signal [no]
--lowlat-syscalls=no|yes improve wake-up latency when a thread's
syscall completes [no]
Memcheck/Addrcheck:
--partial-loads-ok=no|yes too hard to explain here; see manual [yes]
--avoid-strlen-errors=no|yes suppress errs from inlined strlen [yes]
I'd be interested to hear what other option people think aren't useful.
N
|
|
From: Nicholas N. <nj...@ca...> - 2004-06-16 11:56:35
|
CVS commit by nethercote:
Reinstate -h option, which disappeared at some point.
M +3 -2 coregrind/vg_main.c 1.154
M +1 -1 none/tests/cmdline1.stdout.exp 1.3
M +1 -1 none/tests/cmdline2.stdout.exp 1.3
--- valgrind/coregrind/vg_main.c #1.153:1.154
@@ -1510,5 +1510,5 @@ void usage ( Bool debug_help )
" common user options for all Valgrind tools, with defaults in [ ]:\n"
" --tool=<name> Use the Valgrind tool named <name>\n"
-" --help show this message\n"
+" -h --help show this message\n"
" --help-debug show this message, plus debugging options\n"
" --version show version\n"
@@ -1617,5 +1617,6 @@ static void pre_process_cmd_line_options
exit(0);
- } else if (VG_CLO_STREQ(VG_(vg_argv)[i], "--help")) {
+ } else if (VG_CLO_STREQ(VG_(vg_argv)[i], "--help") ||
+ VG_CLO_STREQ(VG_(vg_argv)[i], "-h")) {
*need_help = 1;
--- valgrind/none/tests/cmdline1.stdout.exp #1.2:1.3
@@ -3,5 +3,5 @@
common user options for all Valgrind tools, with defaults in [ ]:
--tool=<name> Use the Valgrind tool named <name>
- --help show this message
+ -h --help show this message
--help-debug show this message, plus debugging options
--version show version
--- valgrind/none/tests/cmdline2.stdout.exp #1.2:1.3
@@ -3,5 +3,5 @@
common user options for all Valgrind tools, with defaults in [ ]:
--tool=<name> Use the Valgrind tool named <name>
- --help show this message
+ -h --help show this message
--help-debug show this message, plus debugging options
--version show version
|
|
From: Nicholas N. <nj...@ca...> - 2004-06-16 11:51:15
|
CVS commit by nethercote:
Removed documentation references to the 'ioctl-VTIME' and 'truncate-writes'
weird hacks, which no longer exist thanks to the proxy lwp stuff.
M +1 -1 coregrind/vg_main.c 1.153
M +0 -52 coregrind/docs/coregrind_core.html 1.28
M +1 -1 none/tests/cmdline1.stdout.exp 1.2
M +1 -1 none/tests/cmdline2.stdout.exp 1.2
--- valgrind/coregrind/vg_main.c #1.152:1.153
@@ -1521,5 +1521,5 @@ void usage ( Bool debug_help )
" --run-libc-freeres=no|yes Free up glibc memory at exit? [yes]\n"
" --weird-hacks=hack1,hack2,... [none]\n"
-" recognised hacks are: ioctl-VTIME truncate-writes lax-ioctls\n"
+" recognised hacks are: lax-ioctls\n"
" --signal-polltime=<time> time, in mS, we should poll for signals.\n"
" Only applies for older kernels which need\n"
--- valgrind/coregrind/docs/coregrind_core.html #1.27:1.28
@@ -780,56 +780,4 @@
<p>
<ul>
- <li><code>ioctl-VTIME</code> Use this if you have a program
- which sets readable file descriptors to have a timeout by
- doing <code>ioctl</code> on them with a
- <code>TCSETA</code>-style command <b>and</b> a non-zero
- <code>VTIME</code> timeout value. This is considered
- potentially dangerous and therefore is not engaged by
- default, because it is (remotely) conceivable that it could
- cause threads doing <code>read</code> to incorrectly block
- the entire process.
- <p>
- You probably want to try this one if you have a program
- which unexpectedly blocks in a <code>read</code> from a file
- descriptor which you know to have been messed with by
- <code>ioctl</code>. This could happen, for example, if the
- descriptor is used to read input from some kind of screen
- handling library.
- <p>
- To find out if your program is blocking unexpectedly in the
- <code>read</code> system call, run with
- <code>--trace-syscalls=yes</code> flag.
- <p>
- <li><code>truncate-writes</code> Use this if you have a threaded
- program which appears to unexpectedly block whilst writing
- into a pipe. The effect is to modify all calls to
- <code>write()</code> so that requests to write more than
- 4096 bytes are treated as if they only requested a write of
- 4096 bytes. Valgrind does this by changing the
- <code>count</code> argument of <code>write()</code>, as
- passed to the kernel, so that it is at most 4096. The
- amount of data written will then be less than the client
- program asked for, but the client should have a loop around
- its <code>write()</code> call to check whether the requested
- number of bytes have been written. If not, it should issue
- further <code>write()</code> calls until all the data is
- written.
- <p>
- This all sounds pretty dodgy to me, which is why I've made
- this behaviour only happen on request. It is not the
- default behaviour. At the time of writing this (30 June
- 2002) I have only seen one example where this is necessary,
- so either the problem is extremely rare or nobody is using
- Valgrind :-)
- <p>
- On experimentation I see that <code>truncate-writes</code>
- doesn't interact well with <code>ioctl-VTIME</code>, so you
- probably don't want to try both at once.
- <p>
- As above, to find out if your program is blocking
- unexpectedly in the <code>write()</code> system call, you
- may find the <code>--trace-syscalls=yes
- --trace-sched=yes</code> flags useful.
- <p>
<li><code>lax-ioctls</code> Be very lax about ioctl handling; the only
assumption is that the size is correct. Doesn't require the full
--- valgrind/none/tests/cmdline1.stdout.exp #1.1:1.2
@@ -14,5 +14,5 @@
--run-libc-freeres=no|yes Free up glibc memory at exit? [yes]
--weird-hacks=hack1,hack2,... [none]
- recognised hacks are: ioctl-VTIME truncate-writes lax-ioctls
+ recognised hacks are: lax-ioctls
--signal-polltime=<time> time, in mS, we should poll for signals.
Only applies for older kernels which need
--- valgrind/none/tests/cmdline2.stdout.exp #1.1:1.2
@@ -14,5 +14,5 @@
--run-libc-freeres=no|yes Free up glibc memory at exit? [yes]
--weird-hacks=hack1,hack2,... [none]
- recognised hacks are: ioctl-VTIME truncate-writes lax-ioctls
+ recognised hacks are: lax-ioctls
--signal-polltime=<time> time, in mS, we should poll for signals.
Only applies for older kernels which need
|
|
From: Tom H. <to...@co...> - 2004-06-16 02:25:05
|
Nightly build on dunsmere ( Fedora Core 2 ) started at 2004-06-16 03:20:02 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow shorts: valgrind ./shorts smc1: valgrind ./smc1 susphello: valgrind ./susphello syscall-restart1: valgrind ./syscall-restart1 syscall-restart2: valgrind ./syscall-restart2 system: valgrind ./system yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 166 tests, 7 stderr failures, 1 stdout failure ================= corecheck/tests/fdleak_cmsg (stderr) corecheck/tests/fdleak_fcntl (stderr) corecheck/tests/fdleak_ipv4 (stderr) corecheck/tests/fdleak_socketpair (stderr) memcheck/tests/buflen_check (stderr) memcheck/tests/execve (stderr) memcheck/tests/writev (stderr) none/tests/exec-sigmask (stdout) make: *** [regtest] Error 1 |
|
From: Tom H. <th...@cy...> - 2004-06-16 02:19:45
|
Nightly build on audi ( Red Hat 9 ) started at 2004-06-16 03:15:03 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow shortpush: valgrind ./shortpush shorts: valgrind ./shorts smc1: valgrind ./smc1 susphello: valgrind ./susphello syscall-restart1: valgrind ./syscall-restart1 syscall-restart2: valgrind ./syscall-restart2 system: valgrind ./system yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 166 tests, 7 stderr failures, 0 stdout failures ================= corecheck/tests/fdleak_cmsg (stderr) corecheck/tests/fdleak_fcntl (stderr) corecheck/tests/fdleak_ipv4 (stderr) corecheck/tests/fdleak_socketpair (stderr) memcheck/tests/buflen_check (stderr) memcheck/tests/execve (stderr) memcheck/tests/writev (stderr) make: *** [regtest] Error 1 |
|
From: Tom H. <th...@cy...> - 2004-06-16 02:08:12
|
Nightly build on alvis ( Red Hat 7.3 ) started at 2004-06-16 03:05:03 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow smc1: valgrind ./smc1 susphello: valgrind ./susphello syscall-restart1: valgrind ./syscall-restart1 syscall-restart2: valgrind ./syscall-restart2 system: valgrind ./system yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 166 tests, 8 stderr failures, 1 stdout failure ================= helgrind/tests/deadlock (stderr) helgrind/tests/race (stderr) helgrind/tests/race2 (stderr) memcheck/tests/badfree-2trace (stderr) memcheck/tests/badjump (stderr) memcheck/tests/brk (stderr) memcheck/tests/error_counts (stdout) memcheck/tests/new_nothrow (stderr) memcheck/tests/writev (stderr) make: *** [regtest] Error 1 |
|
From: Tom H. <th...@cy...> - 2004-06-16 02:06:37
|
Nightly build on standard ( Red Hat 7.2 ) started at 2004-06-16 03:00:02 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow readline1: valgrind ./readline1 resolv: valgrind ./resolv seg_override: valgrind ./seg_override sem: valgrind ./sem semlimit: valgrind ./semlimit sha1_test: valgrind ./sha1_test shortpush: valgrind ./shortpush shorts: valgrind ./shorts smc1: valgrind ./smc1 susphello: valgrind ./susphello syscall-restart1: valgrind ./syscall-restart1 syscall-restart2: valgrind ./syscall-restart2 system: valgrind ./system yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 166 tests, 1 stderr failure, 0 stdout failures ================= memcheck/tests/badfree-2trace (stderr) make: *** [regtest] Error 1 |