6041f70ae3 
								
							 
						 
						
							
							
								
								libitm: Fix HTM fastpath.  
							
							... 
							
							
							
							* beginend.cc (GTM::gtm_thread::serial_lock): Put on cacheline
	boundary.
	(htm_fastpath): Remove.
	(gtm_thread::begin_transaction): Fix HTM fastpath.
	(_ITM_commitTransaction): Adapt.
	(_ITM_commitTransactionEH): Adapt.
	* libitm/config/linux/rwlock.h (gtm_rwlock): Add htm_fastpath member
	and accessors.
	* libitm/config/posix/rwlock.h (gtm_rwlock): Likewise.
	* libitm/config/posix/rwlock.cc (gtm_rwlock::gtm_rwlock): Adapt.
	* libitm/config/x86/sjlj.S (_ITM_beginTransaction): Fix HTM fastpath.
	* libitm/libitm_i.h (htm_fastpath): Remove declaration.
	* libitm/method-serial.cc (htm_mg): Adapt.
	(gtm_thread::serialirr_mode): Adapt.
	* libitm/query.cc (_ITM_inTransaction, _ITM_getTransactionId): Adapt.
From-SVN: r232735 
							
						 
						
							2016-01-22 16:13:06 +00:00  
				
					
						
							
							
								 
						
							
								f57fc96068 
								
							 
						 
						
							
							
								
								libitm: Remove dead code.  
							
							... 
							
							
							
							* local_type_traits: Remove file.
	* libitm_i.h: Don't include it anymore.
	(sized_integral): Remove.
From-SVN: r232581 
							
						 
						
							2016-01-19 19:49:14 +00:00  
				
					
						
							
							
								 
						
							
								0d1ed41261 
								
							 
						 
						
							
							
								
								libitm: Remove dead code and data.  
							
							... 
							
							
							
							From-SVN: r232275 
							
						 
						
							2016-01-12 14:57:45 +00:00  
				
					
						
							
							
								 
						
							
								818ab71a41 
								
							 
						 
						
							
							
								
								Update copyright years.  
							
							... 
							
							
							
							From-SVN: r232055 
							
						 
						
							2016-01-04 15:30:50 +01:00  
				
					
						
							
							
								 
						
							
								4f8a3b87f9 
								
							 
						 
						
							
							
								
								libitm: Fix recent changes to allocations log.  
							
							... 
							
							
							
							libitm/
	* libitm_i.h (gtm_alloc_action): Remove union.
	* testsuite/libitm.c/alloc-1.c: New.
From-SVN: r230727 
							
						 
						
							2015-11-22 20:56:20 +00:00  
				
					
						
							
							
								 
						
							
								258c1d0722 
								
							 
						 
						
							
							
								
								Support __cxa_free_exception and fix exception handling.  
							
							... 
							
							
							
							gcc/cp/
	* except.c (do_free_exception): Use transactional wrapper.
	libitm/
	* testsuite/libitm.c++/eh-5.C: New.
	* libitm.h (_ITM_cxa_free_exception): New.
	* libitm.map (_ITM_cxa_free_exception): Add it.
	* libitm.texi: Update ABI docs.
	* libitm_i.h (gtm_transaction_cp::cxa_unthrown): Remove.
	(gtm_transaction_cp::cxa_uncaught_count): Add.
	(gtm_thread::cxa_unthrown): Remove.
	(gtm_thread::cxa_uncaught_count_ptr): Add.
	(gtm_thread::cxa_uncaught_count): Add.
	(gtm_thread::drop_references_allocations): Rename to...
	(gtm_thread::discard_allocation): ... this and adapt.
	(gtm_thread::init_cpp_exceptions): New.
	* beginend.cc (gtm_thread::gtm_thread): Adapt EH handling.
	(gtm_thread::begin_transaction): Likewise.
	(gtm_transaction_cp::save): Likewise.
	(gtm_thread::trycommit): Likewise.
	* eh_cpp.cc: Add overview comments.
	(__cxa_eh_globals, __cxa_get_globals, __cxa_free_exception): Declare.
	(free_any_exception, _ITM_cxa_free_exception): New.
	(gtm_thread::init_cpp_exceptions): Define.
	(_ITM_cxa_allocate_exception, _ITM_cxa_throw): Adapt.
	(_ITM_cxa_begin_catch, _ITM_cxa_end_catch): Likewise.
	(gtm_thread::revert_cpp_exceptions): Likewise.
From-SVN: r230634 
							
						 
						
							2015-11-20 00:10:08 +00:00  
				
					
						
							
							
								 
						
							
								c518678b14 
								
							 
						 
						
							
							
								
								Support sized delete.  
							
							... 
							
							
							
							This adds transactional clones of the sized version of operator delete.
From-SVN: r230036 
							
						 
						
							2015-11-09 17:30:24 +00:00  
				
					
						
							
							
								 
						
							
								5624e564d2 
								
							 
						 
						
							
							
								
								Update copyright years.  
							
							... 
							
							
							
							From-SVN: r219188 
							
						 
						
							2015-01-05 13:33:28 +01:00  
				
					
						
							
							
								 
						
							
								f93608e6d4 
								
							 
						 
						
							
							
								
								Update copyright years in libitm/  
							
							... 
							
							
							
							From-SVN: r206298 
							
						 
						
							2014-01-02 22:26:00 +00:00  
				
					
						
							
							
								 
						
							
								bec9ec3fc1 
								
							 
						 
						
							
							
								
								Add custom HTM fast path for RTM on x86_64.  
							
							... 
							
							
							
							* libitm_i.h (gtm_thread): Assign an asm name to serial_lock.
	(htm_fastpath): Assign an asm name.
	* libitm.h (_ITM_codeProperties): Add non-ABI flags used by custom
	HTM fast paths.
	(_ITM_actions): Likewise.
	* config/x86/target.h (HTM_CUSTOM_FASTPATH): Enable custom fastpath on
	x86_64.
	* config/x86/sjlj.S (_ITM_beginTransaction): Add custom HTM fast path.
	* config/posix/rwlock.h (gtm_rwlock): Update comments.  Move summary
	field to the start of the structure.
	* config/linux/rwlock.h (gtm_rwlock): Update comments.
	* beginend.cc (gtm_thread::begin_transaction): Add retry policy
	handling for custom HTM fast paths.
From-SVN: r202101 
							
						 
						
							2013-08-30 10:33:41 +00:00  
				
					
						
							
							
								 
						
							
								75f9527c9b 
								
							 
						 
						
							
							
								
								Update copyright in libitm.  
							
							... 
							
							
							
							From-SVN: r195697 
							
						 
						
							2013-02-03 17:46:11 +00:00  
				
					
						
							
							
								 
						
							
								64fbcc74a3 
								
							 
						 
						
							
							
								
								Add HTM fastpath and use Intel RTM for it on x86.  
							
							... 
							
							
							
							* beginend.cc (htm_fastpath): New.
	(gtm_thread::begin_transaction, _ITM_commitTransaction,
	_ITM_commitTransactionEH): Add HTM fastpath handling.
	* config/linux/rwlock.h (gtm_rwlock.is_write_locked): New.
	* config/posix/rwlock.h (gtm_rwlock.is_write_locked): New.
	* config/x86/target.h (htm_available, htm_init, htm_begin_success,
	htm_begin, htm_commit, htm_abort, htm_abort_should_retry): New.
	* configure.tgt: Add -mrtm to XCFLAGS.
	* method-serial.cc (htm_mg, o_htm_mg, htm_dispatch, dispatch_htm): New.
	(gtm_thread::serialirr_mode): Add HTM fastpath handling.
	* libitm_i.h (htm_fastpath, dispatch_htm): Declare.
	* retry.cc (parse_default_method): Add HTM method parsing.
	(gtm_thread::number_of_threads_changed): Use HTM by default if
	available.
From-SVN: r193369 
							
						 
						
							2012-11-09 17:04:40 +00:00  
				
					
						
							
							
								 
						
							
								31772c9507 
								
							 
						 
						
							
							
								
								libitm: Add multi-lock, write-through TM method.  
							
							... 
							
							
							
							libitm/
	* libitm_i.h (GTM::gtm_rwlog_entry): New.
	(GTM::gtm_thread): Add read and write logs.
	(GTM::dispatch_ml_wt): Declare.
	* retry.cc (parse_default_method): Support ml_wt.
	* method-ml.cc: New file.
	* Makefile.am: Add method-ml.cc.
	* Makefile.in: Regenerate.
From-SVN: r184212 
							
						 
						
							2012-02-14 13:14:27 +00:00  
				
					
						
							
							
								 
						
							
								07b6642b93 
								
							 
						 
						
							
							
								
								libitm: Filter out undo writes that overlap with the libitm stack.  
							
							... 
							
							
							
							PR libitm/51855
	* config/generic/tls.h (GTM::mask_stack_top): New.
	(GTM::mask_stack_bottom): Declare.
	* config/generic/tls.c (GTM::mask_stack_bottom): New.
	* local.cc (gtm_undolog::rollback): Filter out any updates that
	overlap the libitm stack.  Add current transaction as parameter.
	* libitm_i.h (GTM::gtm_undolog::rollback): Adapt.
	* beginend.cc (GTM::gtm_thread::rollback): Adapt.
	* testsuite/libitm.c/stackundo.c: New test.
From-SVN: r183172 
							
						 
						
							2012-01-13 23:45:06 +00:00  
				
					
						
							
							
								 
						
							
								8377e5e546 
								
							 
						 
						
							
							
								
								libitm_i.h (_Unwind_DeleteException): Declare weak.  
							
							... 
							
							
							
							* libitm_i.h (_Unwind_DeleteException): Declare weak.
	* eh_cpp.cc (_Unwind_DeleteException): Define for
	!HAVE_ELF_STYLE_WEAKREF.
From-SVN: r183049 
							
						 
						
							2012-01-09 19:16:07 -08:00  
				
					
						
							
							
								 
						
							
								11f30bb0e4 
								
							 
						 
						
							
							
								
								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 
							
						 
						
							2012-01-08 14:13:49 +00:00  
				
					
						
							
							
								 
						
							
								610e390135 
								
							 
						 
						
							
							
								
								libitm: Fix privatization safety during upgrades to serial mode.  
							
							... 
							
							
							
							libitm/
	* beginend.cc (GTM::gtm_thread::restart): Add and handle
	finish_serial_upgrade parameter.
	* libitm.h (GTM::gtm_thread::restart): Adapt declaration.
	* config/linux/rwlock.cc (GTM::gtm_rwlock::write_lock_generic):
	Don't unset reader flag.
	(GTM::gtm_rwlock::write_upgrade_finish): New.
	* config/posix/rwlock.cc: Same.
	* config/linux/rwlock.h (GTM::gtm_rwlock::write_upgrade_finish):
	Declare.
	* config/posix/rwlock.h: Same.
	* method-serial.cc (GTM::gtm_thread::serialirr_mode): Unset reader
	flag after commit or after rollback when restarting.
From-SVN: r182675 
							
						 
						
							2011-12-24 01:42:35 +00:00  
				
					
						
							
							
								 
						
							
								36cfbee133 
								
							 
						 
						
							
							
								
								libitm: Conversion to c++11 atomics.  
							
							... 
							
							
							
							* local_atomic: New file.
        * libitm_i.h: Include it.
        (gtm_thread::shared_state): Use atomic template.
        * beginend.cc (GTM::gtm_clock): Use atomic template.
        (global_tid): Use atomic template if 64-bit atomics available.
        (gtm_thread::gtm_thread): Update shared_state access.
        (gtm_thread::trycommit): Likewise.
        (choose_code_path): Update global_tid access.
        * method-gl.cc (gl_mg::orec): Use atomic template.  Update all users.
        * stmlock.h (GTM::gtm_clock): Use atomic template.
        (gtm_get_clock, gtm_inc_clock): Update accesses.
        * config/linux/rwlock.cc (gtm_rwlock::read_lock): Remove
        redundant __sync_synchronize after atomic shared_state access.
        * config/posix/rwlock.cc (gtm_rwlock::read_lock): Likewise.
        (gtm_rwlock::write_lock_generic): Likewise.
        (gtm_rwlock::read_unlock): Likewise.
        * config/alpha/target.h (atomic_read_barrier): Remove.
        (atomic_write_barrier): Remove.
        * config/x86/target.h (atomic_read_barrier): Remove.
        (atomic_write_barrier): Remove.
From-SVN: r182294 
							
						 
						
							2011-12-13 11:11:25 -08:00  
				
					
						
							
							
								 
						
							
								062f93f255 
								
							 
						 
						
							
							
								
								Swap the action and jmpbuf arguments to GTM_longjmp  
							
							... 
							
							
							
							On several ABIs, the first register parameter is the same as
the return value register.  Moving the action parameter first
avoids the need for register shuffling on these targets.
        * libitm_i.h (GTM_longjmp): Swap first and second arguments.
        * beginend.c (_ITM_abortTransaction): Update to match.
        (GTM::gtm_thread::restart): Likewise.
        * config/alpha/sjlj.S (GTM_longjmp): Likewise.
        * config/x86/sjlj.S (GTM_longjmp): Likewise.
From-SVN: r181863 
							
						 
						
							2011-11-30 14:29:33 -08:00  
				
					
						
							
							
								 
						
							
								0b41ebef72 
								
							 
						 
						
							
							
								
								sjlj.S (CONCAT1, [...]): Respond to __USER_LABEL_PREFIX__ for targets that use it.  
							
							... 
							
							
							
							libitm:
	* config/x86/sjlj.S (CONCAT1, CONCAT2, SYM): Respond to
	__USER_LABEL_PREFIX__ for targets that use it.
	TYPE, SIZE, HIDDEN): New macros to assist on non-elf targets.
	(_ITM_beginTransaction): Use SYM, TYPE, SIZE macros to assist
	in portability to non-elf targets.
	(GTM_longjmp): LIkewise.
	* libitm_i.h (begin_transaction): Apply __USER_LABEL_PREFIX__
	where required.
From-SVN: r181612 
							
						 
						
							2011-11-22 09:57:19 +00:00  
				
					
						
							
							
								 
						
							
								79b1edb6b5 
								
							 
						 
						
							
							
								
								libitm: Remove unused code.  
							
							... 
							
							
							
							In particular, unused code that's presenting portability problems.
From-SVN: r181241 
							
						 
						
							2011-11-09 14:54:55 -08:00  
				
					
						
							
							
								 
						
							
								0a35513e4e 
								
							 
						 
						
							
							
								
								Merge from transactional-memory branch.  
							
							... 
							
							
							
							From-SVN: r181154 
							
						 
						
							2011-11-08 11:13:41 +00:00