OSDN Git Service

33a45f7fbd3567f00041e23b32b657717985cda6
[pf3gnuchains/gcc-fork.git] / libitm / ChangeLog
1 2011-11-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2
3         * configure.tgt: Handle i386 like i[456]86.
4         * config/generic/tls.h [!HAVE_ARCH_GTM_THREAD] (gtm_thr): Don't
5         take address.
6         * config/generic/tls.cc [!HAVE_ARCH_GTM_THREAD ||
7         !HAVE_ARCH_GTM_THREAD_DISP] (_gtm_thr_tls): New variable.
8
9 2011-11-05  Aldy Hernandez  <aldyh@redhat.com>
10
11         * method-wbetl.cc: Update copyright notice.
12         * aatree.cc: Same.
13         * util.cc: Same.
14         * libitm.h: Same.
15         * memset.cc: Same.
16         * eh_cpp.cc: Same.
17         * barrier.tpl: Same.
18         * useraction.cc: Same.
19         * stmlock.h: Same.
20         * memcpy.cc: Same.
21         * common.h: Same.
22         * config/generic/tls.cc: Same.
23         * config/generic/cacheline.h: Same.
24         * config/generic/cachepage.h: Same.
25         * config/generic/cacheline.cc: Same.
26         * config/generic/unaligned.h: Same.
27         * config/x86/cacheline.h: Same.
28         * config/x86/cacheline.cc: Same.
29         * config/x86/unaligned.h: Same.
30         * config/alpha/cacheline.h: Same.
31         * config/alpha/unaligned.h: Same.
32         * config/alpha/sjlj.S: Same.
33         * config/posix/cachepage.cc: Same.
34         * config/linux/futex.h: Same.
35         * config/linux/alpha/futex_bits.h: Same.
36
37 2011-11-04  Torvald Riegel  <triegel@redhat.com>
38
39         * libitm.texi: No cover text and invariant sections.
40
41 2011-11-03  Richard Henderson  <rth@redhat.com>
42
43         * local_type_traits: New file.
44         * libitm_i.h: Use it.  Use C headers, not C++ wrappers.
45
46 2011-11-03  Richard Henderson  <rth@redhat.com>
47
48         * configure.ac: Don't test for gfortran.
49         * configure: Rebuild.
50
51         * testsuite/lib/libitm.exp: Don't include gfortran-dg.exp.
52         * testsuite/libitm.c++/c++.exp: Don't use gfortran-dg-runtest.
53
54 2011-11-03  Aldy Hernandez  <aldyh@redhat.com>
55
56         * testsuite/libitm.c/memcpy-1.c: Add copyright notice.
57         * testsuite/libitm.c/memset-1.c: Same.
58         * testsuite/libitm.c/c.exp: Same.
59         * testsuite/lib/libitm-dg.exp: Same.
60         * testsuite/lib/libitm.exp: Same.
61         * testsuite/libitm.c++/c++.exp: Same.
62
63 2011-11-03  Aldy Hernandez  <aldyh@redhat.com>
64
65         * testsuite/config/default.exp: Update copyright date.
66         * configure.ac: Add copyright info.
67         * configure.tgt: Same.
68
69 2011-11-03  Aldy Hernandez  <aldyh@redhat.com>
70
71         * testsuite/libitm.c/reentrant.c: XFAIL.
72         * testsuite/libitm.c++/static_ctor.C: XFAIL.
73
74 2011-10-29  Torvald Riegel  <triegel@redhat.com>
75
76         * beginend.cc (GTM::gtm_thread::rollback): Add aborting flag and
77         handle aborts.
78         (_ITM_abortTransaction): Handle aborts of outer transactions.
79         * libitm_i.h: Same.
80         * eh_cpp.cc (GTM::gtm_thread::revert_cpp_exceptions): Fix assertion.
81         * libitm.texi: Document aborts of outer transactions.
82         * testsuite/libitm.c/cancel.c: New file.
83
84 2011-10-19  Torvald Riegel  <triegel@redhat.com>
85
86         * testsuite/*: Change __transaction to __transaction_atomic or
87         __transaction_relaxed.
88
89 2011-10-19  Torvald Riegel  <triegel@redhat.com>
90
91         * config/linux/x86/tls.h (abi_disp): Make TLS slot read volatile.
92         (gtm_thr): Same.
93
94 2011-10-19  Torvald Riegel  <triegel@redhat.com>
95
96         * libitm_i.h: Add gl_wt dispatch.
97         * retry.cc (parse_default_method): Same.
98         * method-gl.cc: New file.
99         * Makefile.am: Use method-gl.cc.
100         * Makefile.in: Rebuild.
101
102 2011-10-19  Torvald Riegel  <triegel@redhat.com>
103
104         * beginend.cc (GTM::gtm_thread::trycommit): Ensure privatization
105         safety if requested by a TM method.
106         * dispatch.h (GTM::abi_dispatch::trycommit): Add parameter for
107         privatization safety.
108         * method-serial.cc: Same.
109
110 2011-10-19  Torvald Riegel  <triegel@redhat.com>
111
112         * libitm_i.h: Renamed gtm_local_undo to gtm_undolog_entry.
113         (GTM::gtm_thread): Renamed local_undo to undolog. Renamed
114         undolog-related member functions from *_local to *_undolog.
115         * local.cc (gtm_thread::commit_undolog): Same.
116         * beginend.cc (GTM::gtm_thread::trycommit): Same.
117         (GTM::gtm_thread::rollback): Roll back undolog before
118         dispatch-specific rollback.
119
120 2011-10-19  Torvald Riegel  <triegel@redhat.com>
121
122         * retry.cc (GTM::gtm_thread::decide_retry_strategy): Handle
123         re-initialization of the current method group.
124         * libitm_i.h (GTM::gtm_restart_reason): Add restart reason for this.
125
126 2011-10-19  Torvald Riegel  <triegel@redhat.com>
127
128         * alloc.cc (commit_allocations_2): Do not free transaction-local
129         memory when committing a nested transaction.
130
131 2011-10-19  Torvald Riegel  <triegel@redhat.com>
132
133         * method-serial.cc (GTM::gtm_thread::serialirr_mode): Fixed: Use
134         serial-irrevocable dispatch, not serial.
135
136 2011-10-19  Torvald Riegel  <triegel@redhat.com>
137
138         * libitm_i.h (GTM::gtm_restart_reason): Re-arrange and clean up
139         declarations.
140         * dispatch.h (GTM::abi_dispatch::begin_or_restart): New.
141         * method-serial.cc: Implement begin_or_restart().
142         * beginend.cc (GTM::gtm_thread::begin_transaction): Call
143         dispatch-specific begin_or_restart().
144         (GTM::gtm_thread::restart): Same.
145
146 2011-08-23  Torvald Riegel  <triegel@redhat.com>
147
148         * retry.cc (GTM::gtm_thread::decide_retry_strategy): Cleanup. Fix
149         restarting without switching to serial mode.
150         (GTM::gtm_thread::decide_begin_dispatch): Let the caller set the
151         transaction state. Choose closed-nesting alternative if available.
152         (GTM::gtm_thread::set_default_dispatch): New.
153         (parse_default_method): New.
154         (GTM::gtm_thread::number_of_threads_changed): New.
155         * method-serial.cc (GTM::serial_mg): New method group class.
156         (GTM::serialirr_dispatch): Belongs to serial_mg. Remove reinit and
157         fini.
158         (GTM::serial_dispatch): Same.
159         (GTM::serialirr_onwrite_dispatch): Same.
160         (GTM::gtm_thread::serialirr_mode): Remove calls to fini.
161         * beginend.cc (GTM::gtm_thread::~gtm_thread): Maintain number of
162         registered threads.
163         (GTM::gtm_thread::gtm_thread): Same.
164         (_ITM_abortTransaction): Remove calls to abi_dispatch::fini().
165         (GTM::gtm_thread::trycommit): Same. Reset number of restarts.
166         (GTM::gtm_thread::begin_transaction): Let decide_begin_dispatch()
167         choose dispatch but set state according to dispatch here.
168         * dispatch.h (GTM::abi_dispatch::fini): Move to method group.
169         (GTM::method_group): New class.
170         (GTM::abi_dispatch): Add comments. Maintain pointer to method_group.
171         * libitm_i.h (GTM::gtm_thread): Add declarations for new members.
172         * libitm.texi: Document TM methods, method groups, method life cycle.
173         Rename method sets to method groups.
174
175 2011-08-23  Torvald Riegel  <triegel@redhat.com>
176
177         * config/x86/tls.h: Moved to ...
178         * config/linux/x86/tls.h: ... here.
179
180 2011-08-23  Torvald Riegel  <triegel@redhat.com>
181
182         * config/x86/tls.h: Use __x86_64__ instead of __LP64__.
183         Add X32 support.
184         * config/x86/sjlj.S: Same.
185
186 2011-08-19  Torvald Riegel  <triegel@redhat.com>
187
188         * config/linux/rwlock.h: New file.
189         * config/linux/rwlock.c: New file.
190         * configure.ac: Reenable futex support (undo SVN rev 157758).
191         * Makefile.am: Same.
192         * configure.tgt: Same.
193         * config/linux/alpha/futex_bits.h: Same.
194         * config/linux/futex.h: Same. Return number of woken processes.
195         * config/linux/futex.cc: Same.
196         (futex_wait): Remove spinning.
197         * config/linux/x86/futex_bits.h: Same. Set futex timeout to zero.
198         Use __x86_64__ instead of __LP64__.
199         * aclocal.m4: Include generic futex checks.
200         * configure: Rebuild.
201         * Makefile.in: Rebuild.
202         * testsuite/Makefile.in: Rebuild.
203         * beginend.cc: Include pthread.h.
204         * config/posix/cachepage.cc: Same.
205
206 2011-08-12  Torvald Riegel  <triegel@redhat.com>
207
208         * config/x86/tls.h (gtm_tx, set_gtm_tx, setup_gtm_thr): Removed.
209         (abi_disp, set_abi_disp): Move to tx's TLS slot.
210         (set_gtm_thr): New.
211         * config/generic/tls.h (gtm_tx, set_gtm_tx, setup_gtm_thr): Removed.
212         (set_gtm_thr): New.
213         (GTM::gtm_thread::thread_num): Removed.
214         (GTM::gtm_thread): Renamed to GTM::gtm_thread_tls.
215         * libitm_i.h (GTM::gtm_transaction): Renamed to GTM::gtm_thread. More
216         tx-to-thread renaming.
217         * beginend.cc: Adapted to tx-to-thread renaming.
218         (GTM::gtm_thread::~gtm_thread): Extracted from thread_exit_handler().
219         (GTM::gtm_thread::gtm_thread): Extracted from begin_transaction().
220         * query.cc (_ITM_getTransactionId, _ITM_inTransaction): Renamed
221         gtm_transaction to gtm_thread.
222         (_ITM_getThreadnum): Removed. Not supported anymore.
223         * testsuite/libitm.c/notx.c (main): Removed _ITM_getThreadnum call.
224         * libitm.texi: Documented that _ITM_getThreadnum is not supported.
225         * useraction.cc: Renamed gtm_transaction to gtm_thread. Adapted to
226         gtm_tx-to-gtm_thr renaming if necessary.
227         * eh_cpp.cc: Same.
228         * local.cc: Same.
229         * retry.cc: Same.
230         * clone.cc: Same.
231         * alloc.cc: Same.
232         * alloc_c.cc: Same.
233         * alloc_cpp.cc: Same.
234         * method-serial.cc: Same.
235         * config/generic/tls.cc: Same.
236         * config/posix/rwlock.h (gtm_rwlock): Same.
237         * config/posix/rwlock.cc: Same. Adapted to more tx-to-thread renaming.
238
239 2011-08-12  Torvald Riegel  <triegel@redhat.com>
240
241         * config/posix/rwlock.cc (gtm_rwlock::read_lock): Changed locking
242         implementation.
243         (gtm_rwlock::read_unlock): Same.
244         (gtm_rwlock::write_lock_generic): New. Generalized from ...
245         (gtm_rwlock::write_lock, gtm_rwlock::write_upgrade): ... these.
246         * libitm_i.h (GTM::gtm_transaction): Added shared_state.
247         * config/posix/rwlock.h (GTM::gtm_rwlock): Removed a_reader and
248         w_upgrade. Replaced by per-transaction flags (in shared_state).
249         Added c_confirmed_writers.
250         (GTM::gtm_rwlock::read_lock, GTM::gtm_rwlock::read_unlock,
251         GTM::gtm_rwlock::write_upgrade): Add tx parameter.
252         * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Same.
253         * method-serial.cc (GTM::gtm_transaction::serialirr_mode): Same.
254         * beginend.cc (GTM::gtm_transaction::begin_transaction,
255         _ITM_abortTransaction, GTM::gtm_transaction::trycommit): Same.
256         * libitm.texi: Document locking conventions and implementations in
257         libitm.
258
259 2011-08-12  Torvald Riegel  <triegel@redhat.com>
260
261         * libitm_i.h (next_tx): Add list of all threads' transaction.
262         * beginend.cc (GTM::gtm_transaction::begin_transaction): Register
263         transaction with list of transactions and ...
264         (thread_exit_handler): ... deregister here.
265         * config/alpha/target.h: Add HW_CACHELINE_SIZE setting.
266         * config/x86/target.h: Same.
267
268 2011-08-12  Torvald Riegel  <triegel@redhat.com>
269
270         * testsuite/libitm.c++/static_ctor.C: New file.
271
272 2011-08-12  Torvald Riegel  <triegel@redhat.com>
273
274         * testsuite/libitm.c/reentrant.c: New file.
275
276 2011-08-12  Torvald Riegel  <triegel@redhat.com>
277
278         * config/generic/tls.h: Remove the free list for transactions and ...
279         * beginend.cc (GTM::gtm_transaction::operator new): ... allocate ...
280         (GTM::gtm_transaction::operator delete): ... and release here.
281         (thread_exit_handler): New. Delete tx when thread terminates.
282         (thread_exit_init): New.
283         (GTM::gtm_transaction::begin_transaction): Set up on-exit handler.
284         * testsuite/libitm.c/txrelease.c: New file.
285
286 2011-08-12  Torvald Riegel  <triegel@redhat.com>
287
288         * query.cc (_ITM_getThreadnum): Set up gtm_thread if necessary.
289         * testsuite/libitm.c/notx.c: New file.
290
291 2011-08-12  Torvald Riegel  <triegel@redhat.com>
292
293         * config/generic/tls.h (gtm_thread): Move local_tid from here ...
294         * libitm_i.h (local_tid): ... to here.
295         * beginend.cc (GTM::gtm_transaction::begin_transaction): Same.
296         (GTM::gtm_transaction::operator new): Set up gtm_thread if necessary.
297
298 2011-08-12  Torvald Riegel  <triegel@redhat.com>
299
300         * retry.cc (GTM::gtm_transaction::decide_begin_dispatch): Use
301         serialirr_onwrite_dispatch as new default for now.
302         * method-serial.cc (serialirr_onwrite_dispatch): New.
303         (GTM::dispatch_serialirr_onwrite): New.
304         * libitm_i.h: Same.
305
306 2011-08-12  Torvald Riegel  <triegel@redhat.com>
307
308         * beginend.cc (GTM::gtm_transaction::rollback): Roll back tx id as well.
309         * query.cc (_ITM_getTransactionId): There is no active transaction if
310         the current nesting level is zero.
311
312 2011-07-28  Torvald Riegel  <triegel@redhat.com>
313
314         * beginend.cc (GTM::gtm_transaction::rollback): Fix nesting level
315         rollback.
316
317 2011-07-28  Torvald Riegel  <triegel@redhat.com>
318
319         * retry.cc (GTM::gtm_transaction::decide_begin_dispatch): Get
320         transaction properties from the caller instead of from the
321         transaction object.
322         * libitm_i.h: Same.
323         * beginend.cc (GTM::gtm_transaction::begin_transaction): Same.
324
325 2011-07-28  Torvald Riegel  <triegel@redhat.com>
326
327         * local.cc (gtm_transaction::rollback_local): Support closed nesting.
328         * eh_cpp.cc (GTM::gtm_transaction::revert_cpp_exceptions): Same.
329         * dispatch.h: Same.
330         * method-serial.cc: Same.
331         * beginend.cc (GTM::gtm_transaction::begin_transaction): Change to
332         flat nesting as default, and closed nesting on demand.
333         (GTM::gtm_transaction::rollback): Same.
334         (_ITM_abortTransaction): Same.
335         (GTM::gtm_transaction::restart): Same.
336         (GTM::gtm_transaction::trycommit): Same.
337         (GTM::gtm_transaction::trycommit_and_finalize): Removed.
338         (choose_code_path): New.
339         (GTM::gtm_transaction_cp::save): New.
340         (GTM::gtm_transaction_cp::commit): New.
341         * query.cc (_ITM_inTransaction): Support flat nesting.
342         * libitm_i.h (GTM::gtm_transaction_cp): New helper struct for nesting.
343         (GTM::gtm_transaction): Support flat and closed nesting.
344         * alloc.cc (commit_allocations_2): New.
345         (commit_cb_data): New helper struct.
346         (GTM::gtm_transaction::commit_allocations): Handle nested
347         commits/rollbacks.
348         * libitm.texi: Update user action section, add description of nesting.
349
350 2011-07-28  Torvald Riegel  <triegel@redhat.com>
351
352         * libitm_i.h: Add closed nesting as restart reason.
353         * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Same.
354
355 2011-07-28  Torvald Riegel  <triegel@redhat.com>
356
357         * useraction.cc: Use vector instead of list to store actions.
358         Also support partial rollbacks for closed nesting.
359         * libitm_i.h (GTM::gtm_transaction::user_action): Same.
360         * beginend.cc: Same.
361
362 2011-07-28  Torvald Riegel  <triegel@redhat.com>
363
364         * dispatch.h (GTM::abi_dispatch): Add can_run_uninstrumented_code and
365         closed_nesting flags, as well as a closed nesting alternative.
366         * method-serial.cc: Same.
367         (serial_dispatch): Renamed to serialirr_dispatch.
368         (GTM::dispatch_serialirr): Same.
369         (serial_dispatch_ul): Renamed to serial_dispatch.
370         (GTM::dispatch_serial): Same.
371
372 2011-07-28  Torvald Riegel  <triegel@redhat.com>
373
374         * libitm.h (_ITM_codeProperties): Change pr_hasElse to the ABI's value.
375
376 2011-07-28  Torvald Riegel  <triegel@redhat.com>
377
378         * aatree.h (aa_tree::remove): New.
379         (aa_tree::operator new): Add placement new.
380
381 2011-07-02  Torvald Riegel  <triegel@redhat.com>
382
383         * containers.h: New file.
384         * util.cc (xmalloc, xrealloc): Accept cacheline-alloc flag.
385         * libitm_i.h (xmalloc, xrealloc): Moved declarations from here ...
386         * common.h: ... to here.
387         (local_undo): Use GTM::vector for gtm_transaction::local_undo.
388         * local.cc: Same.
389
390 2011-06-30  Torvald Riegel  <triegel@redhat.com>
391
392         * libitm_i.h (STATE_ABORTING): Remove.
393         * beginend.cc (_ITM_abortTransaction): Same.
394         (GTM::gtm_transaction::trycommit_and_finalize): Same.
395         * libitm.h (_ITM_registerThrownObject, _ITM_tryCommitTransaction): Remove.
396         (_ITM_rollbackTransaction): Remove.
397         * beginend.cc: Same.
398         * libitm.map: Same.
399         * libitm.texi: Document these ABI changes.
400
401 2011-06-30  Torvald Riegel  <triegel@redhat.com>
402
403         * libitm.texi: New file.
404         * Makefile.am: Add libitm.texi.
405         * Makefile.in: Rebuild.
406
407 2011-06-30  Torvald Riegel  <triegel@redhat.com>
408
409         * libitm_i.h: Move parts to common.h and dispatch.h.
410         * common.h: New file.
411         * dispatch.h: New file, new dispatch class.
412         Rename GTM::abi_dispatch::lock_type to ls_modifier.
413         RenameGTM::abi_dispatch::NOLOCK to NONTXNAL.
414         * beginend.cc (GTM::gtm_transaction::begin_transaction): Delegate mode
415         decision to retry.cc.
416         * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Use serial mode
417         only.
418         (GTM::gtm_transaction::decide_begin_dispatch): Same.
419         * method-serial.cc: Adapt to new dispatch. Add serial mode with undo
420         logging.
421         * barrier.cc: Use new barriers definitions.
422         (abi_dispatch::memmove_overlap_check): New.
423         * config/x86/x86_sse.cc: Same.
424         * config/x86/x86_avx.cc: Same.
425         * Makefile.am: Don't build readonly and wbetl methods, memset.cc and
426         memcpy.cc.
427         * Makefile.in: Rebuild.
428         * method-readonly.cc: Remove.
429         * method-wbetl.cc: Rename GTM::abi_dispatch::lock_type to ls_modifier.
430         Rename GTM::abi_dispatch::NOLOCK to NONTXNAL.
431
432 2011-06-30  Torvald Riegel  <triegel@redhat.com>
433
434         * alloc_c.cc (_ITM_dropReferences): Don't support it anymore.
435         * testsuite/libitm.c++/dropref.C: _ITM_dropReferences is expected to fail.
436         * testsuite/libitm.c/dropref-2.c: Same.
437         * testsuite/libitm.c/dropref.c: Same.
438
439 2011-06-30  Torvald Riegel  <triegel@redhat.com>
440
441         * config/generic/tls.h (gtm_disp): Rename to abi_disp.
442         * config/generic/tls.h (set_gtm_disp): Rename to set_abi_disp.
443         * libitm_i.h: Rename gtm_dispatch to abi_dispatch.
444         * alloc_c.cc: Same.
445         * barrier.tpl: Same.
446         * beginend.c: Same.
447         * config/generic/tls.h: Same.
448         * config/x86/tls.h: Same.
449         * libitm_i.h: Same.
450         * memcpy.cc: Same.
451         * memset.cc: Same.
452         * method-readonly.cc: Same.
453         * method-serial.cc: Same.
454         * method-wbetl.cc: Same.
455         * retry.cc: Same.
456
457 2011-03-03  Richard Henderson  <rth@redhat.com>
458
459         * config/posix/rwlock.cc (write_upgrade): Add missing case.
460         From Patrik Marlier <patrick.marlier@unine.ch>.
461
462 2011-02-03  Richard Henderson  <rth@redhat.com>
463
464         * acinclude.m4 (LIBITM_CHECK_SIZE_T_MANGLING): New.
465         * configure.ac: Use it.
466         * configure, config.h.in: Rebuild.
467         * alloc_cpp.cc (_ZnwX): Use MANGLE_SIZE_T in constructing the name.
468         (_ZnaX, _ZnwXRKSt9nothrow_t, _ZnaXRKSt9nothrow_t, _ZGTtnwX,
469         _ZGTtnaX, _ZGTtnwXRKSt9nothrow_t, _ZGTtnaXRKSt9nothrow_t): Likewise.
470         * libitm.map: Use wildcards to match size_t mangling.
471
472 2010-12-14  Richard Henderson  <rth@redhat.com>
473
474         * beginend.cc (GTM::gtm_transaction::begin_transaction): Allocate
475         blocks of TIDs per thread.
476         * config/generic/tls.h (struct gtm_thread): Add local_tid member.
477         (setup_gtm_thr): Return the thread structure.
478         * config/x86/tls.h (setup_gtm_thr): Likewise.
479
480 2010-12-14  Richard Henderson  <rth@redhat.com>
481
482         * clone.cc (table_lock): Remove.
483         (find_clone): Don't take it.
484         (ExcludeTransaction): New helper class.
485         (_ITM_registerTMCloneTable): Use it.
486         (_ITM_deregisterTMCloneTable): Likewise.
487
488 2010-12-14  Richard Henderson  <rth@redhat.com>
489
490         * config/x86/tls.h: New file.
491
492 2010-07-15  Richard Henderson  <rth@redhat.com>
493
494         * Makefile.am (AM_CXXFLAGS): Add -funwind-tables.
495         * Makefile.in: Rebuild.
496
497 2010-07-13  Aldy Hernandez  <aldyh@redhat.com>
498
499         * method-wbetl.cc (trydropreference): Fix source line.
500
501 2010-07-13  Aldy Hernandez  <aldyh@redhat.com>
502
503         * libitm.h: Add comment.
504         * libitm_i.h (begin_transaction): Add ITM_REGPARM.
505
506 2010-07-07  Aldy Hernandez  <aldyh@redhat.com>
507
508         * configure.ac: Call LIBITM_CHECK_64BIT_SYNC_BUILTINS.
509         * beginend.cc (begin_transaction): If 64-bit sync builtins are not
510         available, use pthread mutexes.
511         * acinclude.m4 (LIBITM_CHECK_64BIT_SYNC_BUILTINS): New.
512         * config.h.in: Regenerate.
513         * configure: Regenerate.
514
515 2010-07-06  Aldy Hernandez  <aldyh@redhat.com>
516
517         * libitm.h (ITM_PURE): Define.
518         Declare _ITM_malloc, _ITM_calloc, and _ITM_free.
519
520 2010-06-28  Aldy Hernandez  <aldyh@redhat.com>
521
522         * method-wbetl.cc (class wbetl_dispatch): Add trydropreference.
523         (validate): Add comment.
524         (trydropreference): New.
525         * method-readonly.cc (class readonly_dispatch): Add
526         trydropreference.
527         * alloc_c.cc (_ITM_dropReferences): Remove const attribute.
528         Call trydropreference().
529         * libitm.h (_ITM_dropReferences): Remove const attribute.
530         * method-serial.cc (class serial_dispatch): Add trydropreference.
531         * libitm_i.h (struct gtm_dispatch): Add trydropreference.
532
533 2010-06-28  Aldy Hernandez  <aldyh@redhat.com>
534
535         * memcpy.cc (do_memcpy): Comment.
536
537 2010-06-25  Aldy Hernandez  <aldyh@redhat.com>
538
539         * barrier.tpl: Add comments throughout.
540
541 2010-06-24  Aldy Hernandez  <aldyh@redhat.com>
542
543         * method-wbetl.cc (struct w_entry): Add comments.
544         (trycommit): Same.
545         (rollback): Same.
546
547 2010-06-24  Aldy Hernandez  <aldyh@redhat.com>
548
549         * alloc_c.cc (_ITM_dropReferences): New.
550         * libitm.map (_ITM_dropReferences): Add.
551         * libitm.h (_ITM_dropReferences): Add transaction_pure attribute.
552         * libitm_i.h (struct gtm_transaction): Declare
553         drop_references_allocations and drop_references_local.
554         * local.cc (rollback_local): Ignore memory when applicable.
555         (drop_references_local): New.
556
557 2010-06-23  Richard Henderson  <rth@redhat.com>
558
559         * barrier.tpl, beginend.cc, clone.cc, tls.h, memcpy.cc,
560         memset.cc, method-serial.cc: Revert the 2010-06-16 change.
561         * config/x86/target.h (struct gtm_jmpbuf): Change CFA type to void*.
562         * config/alpha/target.h: Likewise.
563         * config/generic/tls.cc (gtm_mask_stack): Use it.
564
565 2010-06-23  Richard Henderson  <rth@redhat.com>
566
567         * config/posix/cachepage.cc (gtm_cacheline_page::operator new): Use
568         a mutex instead of trying a lock-free compare-and-swap on the list.
569         (gtm_cacheline_page::operator delete): Likewise.
570
571 2010-06-16  Richard Henderson  <rth@redhat.com>
572
573         * method-wbetl.cc (wbetl_dispatch::trycommit): Discard changes
574         that overlap the libitm stack.
575         * barrier.tpl: Mark incoming stack.
576         * beginend.cc (_ITM_rollbackTransaction, _ITM_abortTransaction,
577         _ITM_commitTransaction, _ITM_commitTransactionEH): Likewise.
578         * clone.cc (_ITM_getTMCloneOrIrrevocable): Likewise.
579         * memcpy.cc, memset.cc: Likewise.
580         * method-serial.cc (_ITM_changeTransactionMode): Likewise.
581         * config/generic/tls.h (gtm_thread): Add stack_top member.
582         (gtm_stack_top, set_gtm_stack_top, struct gtm_stack_marker): New.
583         * libitm_i.h (gtm_mask_stack): Declare.
584         * config/generic/tls.cc: New file.
585         * Makefile.am (libitm_la_SOURCES): Add it.
586         (AM_CXXFLAGS): Turn off exceptions.
587         * Makefile.in: Rebuild.
588
589 2010-06-16  Richard Henderson  <rth@redhat.com>
590
591         * alloc.cc (struct gtm_alloc_action): Move definition ...
592         * libitm_i.h: ... here.
593         (class gtm_transaction): Declare new and delete.
594         * beginend.cc (alloc_tx): Reformulate as operator new.
595         (free_tx): Reformulate as operator delete.
596         * config/generic/tls.h (gtm_thread): Change free_tx member to void *.
597
598 2010-06-11  Richard Henderson  <rth@redhat.com>
599
600         * clone.cc (clone_entry_compare): Fix typo.
601         From Patrik Marlier <patrick.marlier@unine.ch>.
602
603 2010-05-13  Richard Henderson  <rth@redhat.com>
604
605         * alloc_c.cc (_ITM_malloc, _ITM_calloc, _ITM_free): Wrap functions
606         in extern "C".
607
608 2010-05-07  Aldy Hernandez  <aldyh@redhat.com>
609
610         * libitm_i.h (struct gtm_transaction): Remove
611         get_allocation_size.
612         (record_allocation): Remove size parameter.
613         * libitm.map (_ITM_realloc): Remove.
614         * alloc_c.cc (_ITM_realloc): Remove.
615         (_ITM_malloc): Remove size argument to record_allocation.
616         (_ITM_calloc): Same.
617         * alloc_cpp.cc (_ZGTtnwm): Same.
618         (_ZGTtnwmRKSt9nothrow_t): Same.
619         (_ZGTtnam): Same.
620         (_ZGTtnamRKSt9nothrow_t): Same.
621         * alloc.cc (struct gtm_alloc_action): Remove size.
622         (get_allocation_size): Remove.
623         (commit_allocations): Add comment.
624         (record_allocation): Remove size parameter.
625         (forget_allocation): Remove set of size.
626
627 2010-04-19  Aldy Hernandez  <aldyh@redhat.com>
628
629         * Makefile.am (abi_version): New.
630         (AM_CXXFLAGS): Pass abi_version.
631         * Makefile.in: Regenerate.
632         * config/x86/unaligned.h: Remove always_inline kludge for vectors.
633
634 2010-04-06  Aldy Hernandez  <aldyh@redhat.com>
635
636         * clone.cc (_ITM_getTMCloneOrIrrevocable): Rename from
637         _ITM_getTMCloneOrIrrevokable.
638         * libitm.h (_ITM_getTMCloneOrIrrevocable): Same.
639         * libitm.map (_ITM_getTMCloneOrIrrevocable): Same.
640
641 2010-03-26  Aldy Hernandez  <aldyh@redhat.com>
642
643         * configure.ac: Remove Linux futex support.
644         * configure.tgt (config_path): Same.
645         * Makefile.am: Same.
646         * config/linux: Remove entire directory.
647         * configure: Rebuild.
648         * Makefile.in: Rebuild.
649         * testsuite/Makefile.in: Rebuild.
650
651 2010-03-09  Aldy Hernandez  <aldyh@redhat.com>
652
653         * retry.cc (decide_retry_strategy): Set state to STATE_SERIAL when
654         switching to serial mode.
655         * beginend.cc (trycommit_and_finalize): Unlock serial_lock.
656
657 2010-03-03  Aldy Hernandez  <aldyh@redhat.com>
658
659         * configure.tgt: Add emacs -*- tags.
660         * barrier.tpl: Same.
661
662 2010-02-23  Aldy Hernandez  <aldyh@redhat.com>
663
664         * Makefile.am: Rename serial.cc to method-serial.cc.
665         * Makefile.in: Regenerate with automake 1.11.1.
666         * testsuite/Makefile.in: Same.
667         * aclocal.m4: Regenerate with aclocal 1.11.1.
668         * method-serial.cc: Rename from serial.cc.
669         * libitm_i.h (struct gtm_transaction): Update comment on
670         serialirr_mode.
671
672 2010-02-22  Aldy Hernandez  <aldyh@redhat.com>
673
674         * libitm_i.h (GTM_longjmp): Add ITM_REGPARM.
675         * config/linux/rwlock.h (class gtm_rwlock): Add comments.
676
677 2010-02-11  Aldy Hernandez  <aldyh@redhat.com>
678
679         * configure: Rebuild.
680
681 2009-11-12  Richard Henderson  <rth@redhat.com>
682
683         * Rewrite everything in C++.
684
685 2009-11-03  Richard Henderson  <rth@redhat.com>
686
687         * config/x86/x86_sse.c, config/x86/x86_avx.c: New files.
688         * Makefile.am (libitm_la_SOURCES): Add them.
689         * configure.ac (ARCH_X86): New conditional.
690         * Makefile.in, configure: Rebuild.
691         * configure.tgt: Set up ARCH; do cflags setup at the same time.
692         Move futex setup into "other system configury" case.
693         * local.c (rollback_local): Merge into ...
694         (GTM_rollback_local): ... here.
695         (GTM_LB): Rename from GTM_alloc_local; do the memcpy here.
696         (_ITM_LB): Define as an alias to GTM_LB.
697
698 2009-11-03  Richard Henderson  <rth@redhat.com>
699
700         * method-readonly.c: New file.
701         * Makefile.am (libitm_la_SOURCES): Add it.
702         * Makefile.in: Rebuild.
703         * beginend.c (gtm_stmlock_array, gtm_clock): New.
704         (GTM_begin_transaction): Use dispatch_readonly for read-only txn.
705         * libitm_i.h (gtm_stmlock, gtm_version): Move from method-wbetl.c.
706         (GTM_VERSION_MAX, GTM_VERSION_INVALID, gtm_stmlock_owned_p,
707         gtm_stmlock_set_owned, gtm_stmlock_get_addr,
708         gtm_stmlock_get_version, gtm_stmlock_set_version, LOCK_ARRAY_SIZE,
709         gtm_stmlock_array, gtm_get_stmlock, gtm_clock, RESTART_NOT_READONLY,
710         gtm_get_clock, gtm_inc_clock): New.
711         * method-wbetl.c (gtm_version, gtm_stmlock, OWNED_MASK, VERSION_MAX,
712         LOCK_GET_OWNED, LOCK_SET_ADDR, LOCK_GET_ADDR, LOCK_GET_TIMESTAMP,
713         LOCK_SET_TIMESTAMP, LOCK_ARRAY_SIZE, LOCK_MASK, LOCK_IDX, GET_LOCK,
714         locks, gclock, CLOCK, GET_CLOCK, FETCH_AND_INC_CLOCK): Remove and
715         replace uses with new libitm_i.h symbols.
716         (dispatch_wbetl): Rename from wbetl_dispatch.
717         * retry.c (GTM_decide_retry_strategy): If RESTART_NOT_READONLY, move
718         away from dispatch_readonly; abort if the beginTransaction call
719         asserted that the transaction was readonly.
720
721 2009-11-03  Richard Henderson  <rth@redhat.com>
722
723         * memset.c: New file.
724         * Makefile.am (libitm_la_SOURCES): Add it.
725         * Makefile.in: Rebuild.
726         * testsuite/libitm.c/memset-1.c: New.
727
728 2009-11-03  Richard Henderson  <rth@redhat.com>
729
730         * dispatch.c: Remove file.
731         * useraction.c (struct gtm_user_action): Move from libitm.h.
732         * serial.c (GTM_null_read_lock, GTM_null_write_lock): New.
733         (serial_memset, serial_memmove, serial_memcpy): Remove.
734         (serial_W*, serial_R*): Remove.
735         (serial_dispatch): Update to match.
736         * configure.ac: Move Werror down below configure checks.  Don't
737         check for sys/loadavg.h, do check for malloc.h.  Don't check for
738         getloadavg and clock_gettime; do check for memalign, posix_memalign.
739         Use GCC_AC_FUNC_MMAP_BLACKLIST
740         * libitm.h: Split out all internal items to...
741         * libitm_i.h: ... here.  New file.
742         * copymask.c: New file.
743         * local.c (struct gtm_local_undo): Move from libitm.h.
744         (GTM_alloc_local): Rename from alloc_local; export.
745         * memcpy.c: New file.
746         * alloc_c.c (_ITM_realloc): Use _ITM_memcpyRnWt directly.
747         * config/posix/page.c: New file.
748         * config/posix/target_tls.h: Remove file.
749         * barrier.c: New file.
750         * Makefile.am (libitm_la_SOURCES): Add barrier.c, memcpy.c,
751         copymask.c, page.c.
752         * alloc.c (struct gtm_alloc_action): Move from libitm.h.
753         * method-wbetl.c: Rewrite for new cacheline methods.
754         * Makefile.in, configure, testsuite/Makefile.in, config.h.in: Rebuild.
755
756         * config/alpha/sjlj.S: Fix typo.
757         * config/alpha/target_i.h: Copy functions from alpha/target.h.
758         * config/alpha/copymask.c: New file.
759         * config/alpha/target.h (CACHELINE_SIZE): New.
760         (STRICT_ALIGNMENT, PAGE_SIZE, FIXED_PAGE_SIZE): New.
761
762         * config/x86/target_i.h: Copy functions from x86/target.h.
763         * config/x86/copymask.c: New file.
764         * config/x86/target.h (_ITM_ALL_TARGET_TYPES): Remove.
765         (CACHELINE_SIZE, STRICT_ALIGNMENT): New.
766         (PAGE_SIZE, FIXED_PAGE_SIZE): New.
767         * config/x86/target_tls.h: Move contents to target_i.h.
768
769         * testsuite/libitm.c/clone-1.c: Include libitm.h.
770         * testsuite/libitm.c/memcpy-1.c: New.
771
772 2009-10-22  Richard Henderson  <rth@redhat.com>
773
774         * Makefile.am (CCAS, CCASFLAGS, LTCCASCOMPILE): Remove.
775         (AM_CCASFLAGS): New.
776         * configure.ac: Add AM_PROG_AS.  Use m4_rename_force for
777         saving/restoring _AC_ARG_VAR_PRECIOUS.
778         * Makefile.in, aclocal.m4, config.h.in, configure,
779         testsuite/Makefile.in: Rebuild with automake 1.11; autoconf 2.64.
780
781 2009-10-22  Richard Henderson  <rth@redhat.com>
782
783         * testsuite/*: Update for new compiler syntax.
784
785 2009-10-21  Richard Henderson  <rth@redhat.com>
786
787         * libitm.h (_ITM_abortReason): Add outerAbort.
788
789 2009-08-03  Richard Henderson  <rth@redhat.com>
790
791         * libitm.map (_ITM_commitTransactionEH, _ITM_cxa_allocate_exception,
792         _ITM_cxa_begin_catch, _ITM_cxa_end_catch, _ITM_cxa_throw): Export.
793         * method-wbetl.c (struct w_entry): Remove mask.
794         (wbetl_write, wbetl_load): Return pointer to word containing the data;
795         adjust all callers.
796
797 2009-07-22  Richard Henderson  <rth@redhat.com>
798
799         * eh_cpp.c: New file.
800         * Makefile.am (libitm_la_SOURCES): Add it.
801         * Makefile.in: Rebuild.
802         * beginend.c (GTM_rollback_transaction): Undo exception state.
803         (GTM_trycommit_transaction): Mark inline.
804         (GTM_trycommit_and_finalize_transaction): Split out from ...
805         (_ITM_commitTransaction): ... here.
806         (_ITM_commitTransactionEH): New function.
807         * libitm.h (struct gtm_transaction): Add cxa_catch_count,
808         cxa_unthrown, eh_in_flight; reorder.
809
810         * testsuite/libitm.c++/c++.exp: New.
811         * testsuite/libitm.c++/eh-1.C: New.
812
813         * aatree.c (aa_free): Remove REGPARM.
814         * aatree.h: Remove all REGPARM.
815
816 2009-07-18  Richard Henderson  <rth@redhat.com>
817
818         * aatree.c, aatree.h, alloc.c, alloc_c.c, alloc_cpp.c: New files.
819         * Makefile.am (libitm_la_SOURCES): Add them.
820         * Makefile.in: Rebuild.
821         * beginend.c (GTM_rollback_transaction): Use GTM_commit_allocations.
822         (GTM_trycommit_transaction): Likewise.
823         * libitm.h: Include aatree.h
824         (struct gtm_alloc_action): New.
825         (struct gtm_transaction): Add alloc_actions.
826         (GTM_record_allocation, GTM_forget_allocation): Declare.
827         (GTM_get_allocation_size, GTM_commit_allocations): Declare.
828         * libitm.map (_ITM_malloc, _ITM_calloc, _ITM_realloc, _ITM_free,
829         _ZGTtnwm, _ZGTtnam, _ZGTtdlPv, _ZGTtdaPv, _ZGTtnwmRKSt9nothrow_t,
830         _ZGTtnamRKSt9nothrow_t, _ZGTtdlPvRKSt9nothrow_t,
831         _ZGTtdaPvRKSt9nothrow_t): Export.
832
833 2009-07-18  Richard Henderson  <rth@redhat.com>
834
835         * target_tls.h: Move ...
836         * config/posix/target_tls.h: ... here.
837
838 2009-07-07  Richard Henderson  <rth@redhat.com>
839
840         * config/x86/target.h (atomic_write_barrier): Use sfence if available.
841
842 2009-07-07  Richard Henderson  <rth@redhat.com>
843
844         * Update to GPL3.
845
846 2009-07-07  Richard Henderson  <rth@redhat.com>
847
848         * libitm.h (struct gtm_transaction): Widen id to _ITM_transactionId_t.
849         * beginend.c (global_tid): Widen to _ITM_transactionId_t.
850
851         * configure.tgt: Don't use -ftls-model for x86 linux.
852         * libitm.h: Include target.h after standard includes.
853         (_gtm_thr): Rename from gtm_thr.
854         (setup_gtm_thr, gtm_thr, gtm_tx, set_gtm_tx): New.
855         (gtm_disp, set_gtm_disp): New.
856         * beginend.c, dispatch.c, local.c, method-wbetl.c, query.c,
857         retry.c, serial.c, useraction.c: Use accessor functions throughout.
858         * config/alpha/target_tls.h, config/x86/target_tls.h: New files.
859
860 2009-07-07  Richard Henderson  <rth@redhat.com>
861
862         * config/linux/rwlock.c (EZ): New define.  Use it throughout.
863
864 2009-07-06  Richard Henderson  <rth@redhat.com>
865
866         * libitm.h (_ITM_SRCLOCATION_DECL_1, _ITM_SRCLOCATION_DECL_2): Remove.
867         (_ITM_SRCLOCATION_DEFN_1, _ITM_SRCLOCATION_DEFN_2): Remove.
868         (_ITM_beginTransaction): Take variadic arguments.
869         (_ITM_registerThrownObject): Declare.
870         * beginend.c, serial.c: Update.
871         * libitm.map: Add _ITM_registerThrownObject.
872
873 2009-01-28  Richard Henderson  <rth@redhat.com>
874
875         * Makefile.am (libitm_la_SOURCES): Add clone.c.
876         * Makefile.in: Rebuild.
877         * beginend.c (_ITM_abortTransaction): Abort if irrevokable.
878         (GTM_restart_transaction): Fix uninstrumented code check.
879         * retry.c (GTM_decide_retry_strategy): Add serial check.
880         * serial.c (GTM_serialmode): Add irrevokable variable.  Don't
881         automatically go irrevokable when in serial mode.
882         * clone.c: New file.
883         * libitm.h, libitm.map: Update.
884
885 2009-01-27  Richard Henderson  <rth@redhat.com>
886
887         * Makefile.am (LTCCASCOMPILE): Define.
888         (libitm_la_SOURCES): Add methid-wbetl.c.
889         * testsuite/Makefile.am: New
890         * configure.ac: Add testsuite/Makefile.
891         * Makefile.in, testsuite/Makefile.in, configure: Regenerate.
892         * beginend.c (GTM_begin_transaction): Install wbetl_dispatch.
893         (_ITM_abortTransaction): Finalize implementation method; pass
894         transaction properties to longjmp.
895         (GTM_restart_transaction): Split out from ...
896         (_ITM_commitTransaction): ... here.
897         * config/linux/x86/futex_bits.h (cpu_relax, atomic_write_barrier):
898         Move to config/x86/target.h.
899         * config/linux/alpha/futex_bits.h: New.
900         * config/x86/sjlj.S (GTM_longjmp): Fix 64-bit input register.
901         * config/x86/target.h: Disable target types for 32-bit.
902         * config/alpha/sjlj.S, config/alpha/target.h: New.
903         * libitm.h (struct gtm_dispatch): Add init, fini.
904         (enum restart_reason): New.
905         (struct gtm_transaction): Add method and restarts.
906         * retry.c (GTM_decide_retry_strategy): Implement.
907         * serial.c (serial_init, serial_fini): New.
908         (GTM_serialmode): Finialize outgoing method.
909         * method-wbetl.c: New.
910
911 2008-12-09  Richard Henderson  <rth@redhat.com>
912
913         * config/x86/target.h (_ITM_ALL_TARGET_TYPES, _ITM_TYPE_ATTR): New.
914         * configure.tgt (i386-*, x86_64-*): Don't force SSE.
915         * dispatch.c (_ITM_##R##T, _ITM_##W##T): Use _ITM_TYPE_ATTR.
916         * libitm.h (_ITM_ALL_TARGET_TYPES, _ITM_TYPE_ATTR): Provide default.
917         (_ITM_TYPE_M64, _ITM_TYPE_M128, _ITM_TYPE_M256): Move to x86 header.
918         (_ITM_ALL_TYPES): Use _ITM_ALL_TARGET_TYPES.
919         * local.c (_ITM_L##T): Use _ITM_TYPE_ATTR.
920         * serial.c (serial_R##T, serial_W##T): Likewise.
921
922 2008-11-21  Richard Henderson  <rth@redhat.com>
923
924         * Initial commit.