Commit Graph

7 Commits

Author SHA1 Message Date
Richard Sandiford f93608e6d4 Update copyright years in libitm/
From-SVN: r206298
2014-01-02 22:26:00 +00:00
Richard Sandiford 75f9527c9b Update copyright in libitm.
From-SVN: r195697
2013-02-03 17:46:11 +00:00
Torvald Riegel 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
Torvald Riegel b679c81340 Ask dispatch whether it requires serial mode.
* retry.cc (gtm_thread::decide_begin_dispatch): Ask dispatch whether
	it requires serial mode instead of assuming that for certain
	dispatchs.
	* dispatch.h (abi_dispatch::requires_serial): New.
	(abi_dispatch::abi_dispatch): Adapt.
	* method-gl.cc (gl_wt_dispatch::gl_wt_dispatch): Adapt.
	* method-ml.cc (ml_wt_dispatch::ml_wt_dispatch): Same.
	* method-serial.cc (serialirr_dispatch::serialirr_dispatch,
	serial_dispatch::serial_dispatch,
	serialirr_onwrite_dispatch::serialirr_onwrite_dispatch): Same.

From-SVN: r192777
2012-10-24 19:52:02 +00:00
Torvald Riegel 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
Torvald Riegel 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
Aldy Hernandez 0a35513e4e Merge from transactional-memory branch.
From-SVN: r181154
2011-11-08 11:13:41 +00:00