From 0584d278d1b3b62184e5425f794de6e08666888c Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Mon, 7 Mar 2011 10:47:27 +0100 Subject: [PATCH] Clear the timer map to help valgrind. * src/misc/timer.hh (reset_all): New method. * iface/dve2/dve2check.cc: Use it to help valgrind. --- ChangeLog | 7 +++++++ iface/dve2/dve2check.cc | 1 + src/misc/timer.hh | 11 +++++++++-- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9406170ff..14b01a07d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-03-07 Alexandre Duret-Lutz + + Clear the timer map to help valgrind. + + * src/misc/timer.hh (reset_all): New method. + * iface/dve2/dve2check.cc: Use it to help valgrind. + 2011-03-07 Alexandre Duret-Lutz Some documentation of about the dve2 interface. diff --git a/iface/dve2/dve2check.cc b/iface/dve2/dve2check.cc index 37cbd0f63..d35e416cc 100644 --- a/iface/dve2/dve2check.cc +++ b/iface/dve2/dve2check.cc @@ -306,6 +306,7 @@ main(int argc, char **argv) if (use_timer) tm.print(std::cout); + tm.reset_all(); // This helps valgrind. spot::ltl::atomic_prop::dump_instances(std::cerr); spot::ltl::unop::dump_instances(std::cerr); diff --git a/src/misc/timer.hh b/src/misc/timer.hh index 3d3547b53..abadd33f2 100644 --- a/src/misc/timer.hh +++ b/src/misc/timer.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2009 Laboratoire de Recherche et Développement +// Copyright (C) 2009, 2011 Laboratoire de Recherche et Developpement // de l'Epita (LRDE). // Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6), // département Systèmes Répartis Coopératifs (SRC), Université Pierre @@ -191,6 +191,13 @@ namespace spot std::ostream& print(std::ostream& os) const; + /// \brief Remove information about all timers. + void + reset_all() + { + tm.clear(); + } + protected: typedef std::pair item_type; typedef std::map tm_type; @@ -200,4 +207,4 @@ namespace spot /// @} } -#endif // SPOT_MISC_ESCAPE_HH +#endif // SPOT_MISC_TIMER_HH