libitm: Optimize undo log.

	libitm/
	* local.cc (GTM_LB): Use GTM::gtm_undolog.
	(GTM::gtm_thread::drop_references_undolog): Remove.
	(GTM::gtm_thread::commit_undolog,
	GTM::gtm_thread::rollback_undolog): Move to ...
	* libitm_i.h (GTM::gtm_undolog): ...here. New.
	(GTM::gtm_undolog_entry): Remove.
	(GTM::gtm_thread): Adapt.
	* beginend.cc (GTM::gtm_thread::rollback): Adapt.
	(GTM::gtm_thread::trycommit): Adapt.
	* method-serial.cc (serial_dispatch::log): Adapt.
	* method-gl.cc (gl_wt_dispatch::pre_write): Adapt.
	(gl_wt_dispatch::store): Fix likely/unlikely.
	* containers.h (GTM::vector::resize): Add additional_capacity
	parameter and handle it.
	(GTM::vector::resize_noinline): New/adapt.
	(GTM::vector::push): New.

From-SVN: r182992
diff --git a/libitm/beginend.cc b/libitm/beginend.cc
index 7975481..fe14f32 100644
--- a/libitm/beginend.cc
+++ b/libitm/beginend.cc
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008, 2009, 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2008, 2009, 2011, 2012 Free Software Foundation, Inc.
    Contributed by Richard Henderson <rth@redhat.com>.
 
    This file is part of the GNU Transactional Memory Library (libitm).
@@ -327,7 +327,7 @@
   // data. Because of the latter, we have to roll it back before any
   // dispatch-specific rollback (which handles synchronization with other
   // transactions).
-  rollback_undolog (cp ? cp->undolog_size : 0);
+  undolog.rollback (cp ? cp->undolog_size : 0);
 
   // Perform dispatch-specific rollback.
   abi_disp()->rollback (cp);
@@ -470,7 +470,7 @@
       // We can commit the undo log after dispatch-specific commit and after
       // making the transaction inactive because we only have to reset
       // gtm_thread state.
-      commit_undolog ();
+      undolog.commit ();
       // Reset further transaction state.
       cxa_catch_count = 0;
       cxa_unthrown = NULL;