summaryrefslogtreecommitdiff
path: root/libitm/retry.cc
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright in libitm.rsandifo2013-02-031-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195697 138bc75d-0d04-0410-961f-82ee72b054a4
* Add HTM fastpath and use Intel RTM for it on x86.torvald2012-11-091-2/+15
| | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193369 138bc75d-0d04-0410-961f-82ee72b054a4
* Ask dispatch whether it requires serial mode.torvald2012-10-241-5/+2
| | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192777 138bc75d-0d04-0410-961f-82ee72b054a4
* libitm: Use ml_wt as default TM methods for >1 thread.torvald2012-02-241-1/+1
| | | | | | | | libitm/ * retry.cc (GTM::gtm_thread::number_of_threads_changed): Change default dispatch for more than 1 thread to ml_wt. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184547 138bc75d-0d04-0410-961f-82ee72b054a4
* libitm: Fix race condition in dispatch choice at transaction begin.torvald2012-02-201-30/+84
| | | | | | | | | | | | | | | libitm/ * beginend.cc (GTM::gtm_thread::begin_transaction): Move serial lock acquisition to ... * retry.cc (GTM::gtm_thread::decide_begin_dispatch): ... here. (default_dispatch): Make atomic. (GTM::gtm_thread::set_default_dispatch): Access atomically. (GTM::gtm_thread::decide_retry_strategy): Access atomically and use decide_begin_dispatch() if default_dispatch might have changed. (GTM::gtm_thread::number_of_threads_changed): Initialize default_dispatch here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184392 138bc75d-0d04-0410-961f-82ee72b054a4
* libitm: Add multi-lock, write-through TM method.torvald2012-02-141-0/+5
| | | | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184212 138bc75d-0d04-0410-961f-82ee72b054a4
* libitm: Improve method reinit and choice.torvald2012-02-141-13/+14
| | | | | | | | | | | libitm/ * dispatch.h (GTM::abi_dispatch::supports): New. (GTM::method_group::reinit): New. * retry.cc (GTM::gtm_thread::decide_retry_strategy): Use reinit(). (GTM::gtm_thread::number_of_threads_changed): Check that the method supports the current situation. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184211 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge from transactional-memory branch.aldyh2011-11-081-0/+265
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181154 138bc75d-0d04-0410-961f-82ee72b054a4