This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: profile mode fix
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: FranÃois Dumont <frs dot dumont at gmail dot com>
- Cc: "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 29 Jan 2014 20:18:45 +0000
- Subject: Re: profile mode fix
- Authentication-results: sourceware.org; auth=none
- References: <52E4D8BC dot 5090701 at gmail dot com> <CAH6eHdQPpktHs6HR8NRCk955U_PmG0xxrBjFNwHaTSTzaWZN-A at mail dot gmail dot com> <52E6DB25 dot 20804 at gmail dot com> <52E95F57 dot 5090500 at gmail dot com>
On 29 January 2014 20:06, FranÃois Dumont <frs.dumont@gmail.com> wrote:
> Here is the patch that simply consider 55083 as not supported except in
> normal mode. This is a temporary workaround for 4.9 release so I prefer not
> to introduce a dg-profile-mode-unsupported or something like that. Those
> tests will simply appear as not supported for debug and parallel mode even
> if they are, not a big deal, no ?
But with that change we don't find out if those tests regress in debug mode :-(
I prefer to just add noexcept to the profile mode move constructor,
and if it throws then the program terminates. If you run out of
memory when using profile mode then terminating seems reasonable to
me; I don't think people are using profile mode to test how their
programs handle std::bad_alloc.
Put another way, if your program runs out of memory *because* of
profile mode, then the results of the profiling will not give you
useful data about how your program usually behaves. Using profile mode
has altered the behaviour of the program. So in that situation simply
calling std::terminate() makes sense.