1 2011-11-17 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3 * alloc_cpp.cc [__osf__] (_ZnwX, _ZdlPv, _ZnaX, _ZdaPv,
4 _ZnwXRKSt9nothrow_t, _ZdlPvRKSt9nothrow_t, _ZdaPvRKSt9nothrow_t):
6 * eh_cpp.cc [__osf__] (__cxa_allocate_exception, __cxa_throw,
7 __cxa_begin_catch, __cxa_end_catch, __cxa_tm_cleanup): Likewise.
9 2011-11-16 Uros Bizjak <ubizjak@gmail.com>
12 * acinclude.m4 (LIBITM_CHECK_AS_AVX): Fix target selector.
13 * configure: Regenerate.
15 2011-11-14 H.J. Lu <hongjiu.lu@intel.com>
17 * testsuite/lib/libitm.exp: Check ia32 instead of ilp32.
19 2011-11-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
21 * config/alpha/sjlj.S (_ITM_beginTransaction) [!__ELF__]: Don't use
23 (.note.GNU-stack): Only use if __linux__.
24 * alloc_cpp.cc [!__osf__] (_ZnaXRKSt9nothrow_t): Dummy function.
25 * testsuite/libitm.c/notx.c: Use dg-options "-pthread".
26 * testsuite/libitm.c/reentrant.c: Likewise.
27 * testsuite/libitm.c/simple-2.c: Likewise.
28 * testsuite/libitm.c/txrelease.c: Likewise.
29 * testsuite/libitm.c++/static_ctor.C: Likewise.
31 2011-11-10 Richard Henderson <rth@redhat.com>
33 * config/x86/x86_avx.cc: Remove #undef __AVX__ hack. Tidy comments.
34 * Makefile.am (x86_avx.lo): Only add -mavx if ARCH_X86_AVX.
35 * configure.ac (ARCH_X86_AVX): New conditional.
36 * Makefile.in, configure: Rebuild.
38 2011-11-09 Richard Henderson <rth@redhat.com>
40 * acinclude.m4 (LIBITM_CHECK_AS_AVX): New.
41 * configure.ac: Use it.
42 * config.h.in, configure: Rebuild.
43 * config/x86/x86_avx.cc: Handle !HAVE_AS_AVX.
45 2011-11-09 Richard Henderson <rth@redhat.com>
47 * barrier.tpl, memcpy.cc, memset.cc, method-wbetl.cc: Remove file.
48 * config/alpha/unaligned.h: Remove file.
49 * config/generic/unaligned.h: Remove file.
50 * config/x86/unaligned.h: Remove file.
51 * config/generic/cachepage.h: Remove file.
52 * config/posix/cachepage.cc: Remove file.
53 * config/generic/cacheline.cc: Remove file.
54 * config/x86/cacheline.cc: Remove file.
55 * config/generic/cacheline.h (gtm_cacheline): Remove the
56 store_mask, copy_mask, copy_mask_wb methods.
57 * config/x86/cacheline.h: Likewise.
58 * config/alpha/cacheline.h: Fall back to generic after setting size.
59 * config/generic/tls.cc (gtm_mask_stack): Remove.
60 * config/x86/x86_avx.cc (GTM_vpperm_shift): Remove.
61 (GTM_vpalignr_table): Remove.
62 * config/x86/x86_sse.cc (GTM_palignr_table): Remove.
63 (GTM_pshift_table): Remove.
64 * config/libitm_i.h: Don't include cachepage.h.
65 * Makefile.am (libitm_la_SOURCES): Remove cacheline.cc, cachepage.cc
66 * Makefile.in, testsuite/Makefile.in: Rebuild.
68 2011-11-09 Richard Henderson <rth@redhat.com>
70 * config/x86/cacheline.h (gtm_cacheline::store_mask): Use .byte
71 to emit branch prediction hint.
73 * config/x86/sjlj.S: Protect elf directives with __ELF__.
74 Protect .note.GNU-stack with __linux__.
76 * configure.ac (GCC_AS_CFI_PSEUDO_OP): Test it.
77 * configure, aclocal.m4, config.h.in: Rebuild.
78 * config/generic/asmcfi.h: New file.
79 * config/x86/sjlj.S: Use it.
81 2011-11-08 Richard Henderson <rth@redhat.com>
83 * local.cc (_ITM_LB): Use a normal call, not a function alias.
85 2011-11-08 Richard Henderson <rth@redhat.com>
87 * configure.tgt: Test correct directory for supported cpus.
89 * configure.ac: Exit if unsupported.
91 * configure.tgt: Delete boilerplate from libgomp for unsupported
92 targets. Set UNSUPPORTED for unsupported targets.
94 2011-11-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
96 * configure.tgt: Handle i386 like i[456]86.
97 * config/generic/tls.h [!HAVE_ARCH_GTM_THREAD] (gtm_thr): Don't
99 * config/generic/tls.cc [!HAVE_ARCH_GTM_THREAD ||
100 !HAVE_ARCH_GTM_THREAD_DISP] (_gtm_thr_tls): New variable.
102 2011-11-05 Aldy Hernandez <aldyh@redhat.com>
104 * method-wbetl.cc: Update copyright notice.
111 * useraction.cc: Same.
115 * config/generic/tls.cc: Same.
116 * config/generic/cacheline.h: Same.
117 * config/generic/cachepage.h: Same.
118 * config/generic/cacheline.cc: Same.
119 * config/generic/unaligned.h: Same.
120 * config/x86/cacheline.h: Same.
121 * config/x86/cacheline.cc: Same.
122 * config/x86/unaligned.h: Same.
123 * config/alpha/cacheline.h: Same.
124 * config/alpha/unaligned.h: Same.
125 * config/alpha/sjlj.S: Same.
126 * config/posix/cachepage.cc: Same.
127 * config/linux/futex.h: Same.
128 * config/linux/alpha/futex_bits.h: Same.
130 2011-11-04 Torvald Riegel <triegel@redhat.com>
132 * libitm.texi: No cover text and invariant sections.
134 2011-11-03 Richard Henderson <rth@redhat.com>
136 * local_type_traits: New file.
137 * libitm_i.h: Use it. Use C headers, not C++ wrappers.
139 2011-11-03 Richard Henderson <rth@redhat.com>
141 * configure.ac: Don't test for gfortran.
142 * configure: Rebuild.
144 * testsuite/lib/libitm.exp: Don't include gfortran-dg.exp.
145 * testsuite/libitm.c++/c++.exp: Don't use gfortran-dg-runtest.
147 2011-11-03 Aldy Hernandez <aldyh@redhat.com>
149 * testsuite/libitm.c/memcpy-1.c: Add copyright notice.
150 * testsuite/libitm.c/memset-1.c: Same.
151 * testsuite/libitm.c/c.exp: Same.
152 * testsuite/lib/libitm-dg.exp: Same.
153 * testsuite/lib/libitm.exp: Same.
154 * testsuite/libitm.c++/c++.exp: Same.
156 2011-11-03 Aldy Hernandez <aldyh@redhat.com>
158 * testsuite/config/default.exp: Update copyright date.
159 * configure.ac: Add copyright info.
160 * configure.tgt: Same.
162 2011-11-03 Aldy Hernandez <aldyh@redhat.com>
164 * testsuite/libitm.c/reentrant.c: XFAIL.
165 * testsuite/libitm.c++/static_ctor.C: XFAIL.
167 2011-10-29 Torvald Riegel <triegel@redhat.com>
169 * beginend.cc (GTM::gtm_thread::rollback): Add aborting flag and
171 (_ITM_abortTransaction): Handle aborts of outer transactions.
173 * eh_cpp.cc (GTM::gtm_thread::revert_cpp_exceptions): Fix assertion.
174 * libitm.texi: Document aborts of outer transactions.
175 * testsuite/libitm.c/cancel.c: New file.
177 2011-10-19 Torvald Riegel <triegel@redhat.com>
179 * testsuite/*: Change __transaction to __transaction_atomic or
180 __transaction_relaxed.
182 2011-10-19 Torvald Riegel <triegel@redhat.com>
184 * config/linux/x86/tls.h (abi_disp): Make TLS slot read volatile.
187 2011-10-19 Torvald Riegel <triegel@redhat.com>
189 * libitm_i.h: Add gl_wt dispatch.
190 * retry.cc (parse_default_method): Same.
191 * method-gl.cc: New file.
192 * Makefile.am: Use method-gl.cc.
193 * Makefile.in: Rebuild.
195 2011-10-19 Torvald Riegel <triegel@redhat.com>
197 * beginend.cc (GTM::gtm_thread::trycommit): Ensure privatization
198 safety if requested by a TM method.
199 * dispatch.h (GTM::abi_dispatch::trycommit): Add parameter for
200 privatization safety.
201 * method-serial.cc: Same.
203 2011-10-19 Torvald Riegel <triegel@redhat.com>
205 * libitm_i.h: Renamed gtm_local_undo to gtm_undolog_entry.
206 (GTM::gtm_thread): Renamed local_undo to undolog. Renamed
207 undolog-related member functions from *_local to *_undolog.
208 * local.cc (gtm_thread::commit_undolog): Same.
209 * beginend.cc (GTM::gtm_thread::trycommit): Same.
210 (GTM::gtm_thread::rollback): Roll back undolog before
211 dispatch-specific rollback.
213 2011-10-19 Torvald Riegel <triegel@redhat.com>
215 * retry.cc (GTM::gtm_thread::decide_retry_strategy): Handle
216 re-initialization of the current method group.
217 * libitm_i.h (GTM::gtm_restart_reason): Add restart reason for this.
219 2011-10-19 Torvald Riegel <triegel@redhat.com>
221 * alloc.cc (commit_allocations_2): Do not free transaction-local
222 memory when committing a nested transaction.
224 2011-10-19 Torvald Riegel <triegel@redhat.com>
226 * method-serial.cc (GTM::gtm_thread::serialirr_mode): Fixed: Use
227 serial-irrevocable dispatch, not serial.
229 2011-10-19 Torvald Riegel <triegel@redhat.com>
231 * libitm_i.h (GTM::gtm_restart_reason): Re-arrange and clean up
233 * dispatch.h (GTM::abi_dispatch::begin_or_restart): New.
234 * method-serial.cc: Implement begin_or_restart().
235 * beginend.cc (GTM::gtm_thread::begin_transaction): Call
236 dispatch-specific begin_or_restart().
237 (GTM::gtm_thread::restart): Same.
239 2011-08-23 Torvald Riegel <triegel@redhat.com>
241 * retry.cc (GTM::gtm_thread::decide_retry_strategy): Cleanup. Fix
242 restarting without switching to serial mode.
243 (GTM::gtm_thread::decide_begin_dispatch): Let the caller set the
244 transaction state. Choose closed-nesting alternative if available.
245 (GTM::gtm_thread::set_default_dispatch): New.
246 (parse_default_method): New.
247 (GTM::gtm_thread::number_of_threads_changed): New.
248 * method-serial.cc (GTM::serial_mg): New method group class.
249 (GTM::serialirr_dispatch): Belongs to serial_mg. Remove reinit and
251 (GTM::serial_dispatch): Same.
252 (GTM::serialirr_onwrite_dispatch): Same.
253 (GTM::gtm_thread::serialirr_mode): Remove calls to fini.
254 * beginend.cc (GTM::gtm_thread::~gtm_thread): Maintain number of
256 (GTM::gtm_thread::gtm_thread): Same.
257 (_ITM_abortTransaction): Remove calls to abi_dispatch::fini().
258 (GTM::gtm_thread::trycommit): Same. Reset number of restarts.
259 (GTM::gtm_thread::begin_transaction): Let decide_begin_dispatch()
260 choose dispatch but set state according to dispatch here.
261 * dispatch.h (GTM::abi_dispatch::fini): Move to method group.
262 (GTM::method_group): New class.
263 (GTM::abi_dispatch): Add comments. Maintain pointer to method_group.
264 * libitm_i.h (GTM::gtm_thread): Add declarations for new members.
265 * libitm.texi: Document TM methods, method groups, method life cycle.
266 Rename method sets to method groups.
268 2011-08-23 Torvald Riegel <triegel@redhat.com>
270 * config/x86/tls.h: Moved to ...
271 * config/linux/x86/tls.h: ... here.
273 2011-08-23 Torvald Riegel <triegel@redhat.com>
275 * config/x86/tls.h: Use __x86_64__ instead of __LP64__.
277 * config/x86/sjlj.S: Same.
279 2011-08-19 Torvald Riegel <triegel@redhat.com>
281 * config/linux/rwlock.h: New file.
282 * config/linux/rwlock.c: New file.
283 * configure.ac: Reenable futex support (undo SVN rev 157758).
285 * configure.tgt: Same.
286 * config/linux/alpha/futex_bits.h: Same.
287 * config/linux/futex.h: Same. Return number of woken processes.
288 * config/linux/futex.cc: Same.
289 (futex_wait): Remove spinning.
290 * config/linux/x86/futex_bits.h: Same. Set futex timeout to zero.
291 Use __x86_64__ instead of __LP64__.
292 * aclocal.m4: Include generic futex checks.
293 * configure: Rebuild.
294 * Makefile.in: Rebuild.
295 * testsuite/Makefile.in: Rebuild.
296 * beginend.cc: Include pthread.h.
297 * config/posix/cachepage.cc: Same.
299 2011-08-12 Torvald Riegel <triegel@redhat.com>
301 * config/x86/tls.h (gtm_tx, set_gtm_tx, setup_gtm_thr): Removed.
302 (abi_disp, set_abi_disp): Move to tx's TLS slot.
304 * config/generic/tls.h (gtm_tx, set_gtm_tx, setup_gtm_thr): Removed.
306 (GTM::gtm_thread::thread_num): Removed.
307 (GTM::gtm_thread): Renamed to GTM::gtm_thread_tls.
308 * libitm_i.h (GTM::gtm_transaction): Renamed to GTM::gtm_thread. More
309 tx-to-thread renaming.
310 * beginend.cc: Adapted to tx-to-thread renaming.
311 (GTM::gtm_thread::~gtm_thread): Extracted from thread_exit_handler().
312 (GTM::gtm_thread::gtm_thread): Extracted from begin_transaction().
313 * query.cc (_ITM_getTransactionId, _ITM_inTransaction): Renamed
314 gtm_transaction to gtm_thread.
315 (_ITM_getThreadnum): Removed. Not supported anymore.
316 * testsuite/libitm.c/notx.c (main): Removed _ITM_getThreadnum call.
317 * libitm.texi: Documented that _ITM_getThreadnum is not supported.
318 * useraction.cc: Renamed gtm_transaction to gtm_thread. Adapted to
319 gtm_tx-to-gtm_thr renaming if necessary.
326 * alloc_cpp.cc: Same.
327 * method-serial.cc: Same.
328 * config/generic/tls.cc: Same.
329 * config/posix/rwlock.h (gtm_rwlock): Same.
330 * config/posix/rwlock.cc: Same. Adapted to more tx-to-thread renaming.
332 2011-08-12 Torvald Riegel <triegel@redhat.com>
334 * config/posix/rwlock.cc (gtm_rwlock::read_lock): Changed locking
336 (gtm_rwlock::read_unlock): Same.
337 (gtm_rwlock::write_lock_generic): New. Generalized from ...
338 (gtm_rwlock::write_lock, gtm_rwlock::write_upgrade): ... these.
339 * libitm_i.h (GTM::gtm_transaction): Added shared_state.
340 * config/posix/rwlock.h (GTM::gtm_rwlock): Removed a_reader and
341 w_upgrade. Replaced by per-transaction flags (in shared_state).
342 Added c_confirmed_writers.
343 (GTM::gtm_rwlock::read_lock, GTM::gtm_rwlock::read_unlock,
344 GTM::gtm_rwlock::write_upgrade): Add tx parameter.
345 * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Same.
346 * method-serial.cc (GTM::gtm_transaction::serialirr_mode): Same.
347 * beginend.cc (GTM::gtm_transaction::begin_transaction,
348 _ITM_abortTransaction, GTM::gtm_transaction::trycommit): Same.
349 * libitm.texi: Document locking conventions and implementations in
352 2011-08-12 Torvald Riegel <triegel@redhat.com>
354 * libitm_i.h (next_tx): Add list of all threads' transaction.
355 * beginend.cc (GTM::gtm_transaction::begin_transaction): Register
356 transaction with list of transactions and ...
357 (thread_exit_handler): ... deregister here.
358 * config/alpha/target.h: Add HW_CACHELINE_SIZE setting.
359 * config/x86/target.h: Same.
361 2011-08-12 Torvald Riegel <triegel@redhat.com>
363 * testsuite/libitm.c++/static_ctor.C: New file.
365 2011-08-12 Torvald Riegel <triegel@redhat.com>
367 * testsuite/libitm.c/reentrant.c: New file.
369 2011-08-12 Torvald Riegel <triegel@redhat.com>
371 * config/generic/tls.h: Remove the free list for transactions and ...
372 * beginend.cc (GTM::gtm_transaction::operator new): ... allocate ...
373 (GTM::gtm_transaction::operator delete): ... and release here.
374 (thread_exit_handler): New. Delete tx when thread terminates.
375 (thread_exit_init): New.
376 (GTM::gtm_transaction::begin_transaction): Set up on-exit handler.
377 * testsuite/libitm.c/txrelease.c: New file.
379 2011-08-12 Torvald Riegel <triegel@redhat.com>
381 * query.cc (_ITM_getThreadnum): Set up gtm_thread if necessary.
382 * testsuite/libitm.c/notx.c: New file.
384 2011-08-12 Torvald Riegel <triegel@redhat.com>
386 * config/generic/tls.h (gtm_thread): Move local_tid from here ...
387 * libitm_i.h (local_tid): ... to here.
388 * beginend.cc (GTM::gtm_transaction::begin_transaction): Same.
389 (GTM::gtm_transaction::operator new): Set up gtm_thread if necessary.
391 2011-08-12 Torvald Riegel <triegel@redhat.com>
393 * retry.cc (GTM::gtm_transaction::decide_begin_dispatch): Use
394 serialirr_onwrite_dispatch as new default for now.
395 * method-serial.cc (serialirr_onwrite_dispatch): New.
396 (GTM::dispatch_serialirr_onwrite): New.
399 2011-08-12 Torvald Riegel <triegel@redhat.com>
401 * beginend.cc (GTM::gtm_transaction::rollback): Roll back tx id as well.
402 * query.cc (_ITM_getTransactionId): There is no active transaction if
403 the current nesting level is zero.
405 2011-07-28 Torvald Riegel <triegel@redhat.com>
407 * beginend.cc (GTM::gtm_transaction::rollback): Fix nesting level
410 2011-07-28 Torvald Riegel <triegel@redhat.com>
412 * retry.cc (GTM::gtm_transaction::decide_begin_dispatch): Get
413 transaction properties from the caller instead of from the
416 * beginend.cc (GTM::gtm_transaction::begin_transaction): Same.
418 2011-07-28 Torvald Riegel <triegel@redhat.com>
420 * local.cc (gtm_transaction::rollback_local): Support closed nesting.
421 * eh_cpp.cc (GTM::gtm_transaction::revert_cpp_exceptions): Same.
423 * method-serial.cc: Same.
424 * beginend.cc (GTM::gtm_transaction::begin_transaction): Change to
425 flat nesting as default, and closed nesting on demand.
426 (GTM::gtm_transaction::rollback): Same.
427 (_ITM_abortTransaction): Same.
428 (GTM::gtm_transaction::restart): Same.
429 (GTM::gtm_transaction::trycommit): Same.
430 (GTM::gtm_transaction::trycommit_and_finalize): Removed.
431 (choose_code_path): New.
432 (GTM::gtm_transaction_cp::save): New.
433 (GTM::gtm_transaction_cp::commit): New.
434 * query.cc (_ITM_inTransaction): Support flat nesting.
435 * libitm_i.h (GTM::gtm_transaction_cp): New helper struct for nesting.
436 (GTM::gtm_transaction): Support flat and closed nesting.
437 * alloc.cc (commit_allocations_2): New.
438 (commit_cb_data): New helper struct.
439 (GTM::gtm_transaction::commit_allocations): Handle nested
441 * libitm.texi: Update user action section, add description of nesting.
443 2011-07-28 Torvald Riegel <triegel@redhat.com>
445 * libitm_i.h: Add closed nesting as restart reason.
446 * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Same.
448 2011-07-28 Torvald Riegel <triegel@redhat.com>
450 * useraction.cc: Use vector instead of list to store actions.
451 Also support partial rollbacks for closed nesting.
452 * libitm_i.h (GTM::gtm_transaction::user_action): Same.
455 2011-07-28 Torvald Riegel <triegel@redhat.com>
457 * dispatch.h (GTM::abi_dispatch): Add can_run_uninstrumented_code and
458 closed_nesting flags, as well as a closed nesting alternative.
459 * method-serial.cc: Same.
460 (serial_dispatch): Renamed to serialirr_dispatch.
461 (GTM::dispatch_serialirr): Same.
462 (serial_dispatch_ul): Renamed to serial_dispatch.
463 (GTM::dispatch_serial): Same.
465 2011-07-28 Torvald Riegel <triegel@redhat.com>
467 * libitm.h (_ITM_codeProperties): Change pr_hasElse to the ABI's value.
469 2011-07-28 Torvald Riegel <triegel@redhat.com>
471 * aatree.h (aa_tree::remove): New.
472 (aa_tree::operator new): Add placement new.
474 2011-07-02 Torvald Riegel <triegel@redhat.com>
476 * containers.h: New file.
477 * util.cc (xmalloc, xrealloc): Accept cacheline-alloc flag.
478 * libitm_i.h (xmalloc, xrealloc): Moved declarations from here ...
479 * common.h: ... to here.
480 (local_undo): Use GTM::vector for gtm_transaction::local_undo.
483 2011-06-30 Torvald Riegel <triegel@redhat.com>
485 * libitm_i.h (STATE_ABORTING): Remove.
486 * beginend.cc (_ITM_abortTransaction): Same.
487 (GTM::gtm_transaction::trycommit_and_finalize): Same.
488 * libitm.h (_ITM_registerThrownObject, _ITM_tryCommitTransaction): Remove.
489 (_ITM_rollbackTransaction): Remove.
492 * libitm.texi: Document these ABI changes.
494 2011-06-30 Torvald Riegel <triegel@redhat.com>
496 * libitm.texi: New file.
497 * Makefile.am: Add libitm.texi.
498 * Makefile.in: Rebuild.
500 2011-06-30 Torvald Riegel <triegel@redhat.com>
502 * libitm_i.h: Move parts to common.h and dispatch.h.
503 * common.h: New file.
504 * dispatch.h: New file, new dispatch class.
505 Rename GTM::abi_dispatch::lock_type to ls_modifier.
506 RenameGTM::abi_dispatch::NOLOCK to NONTXNAL.
507 * beginend.cc (GTM::gtm_transaction::begin_transaction): Delegate mode
508 decision to retry.cc.
509 * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Use serial mode
511 (GTM::gtm_transaction::decide_begin_dispatch): Same.
512 * method-serial.cc: Adapt to new dispatch. Add serial mode with undo
514 * barrier.cc: Use new barriers definitions.
515 (abi_dispatch::memmove_overlap_check): New.
516 * config/x86/x86_sse.cc: Same.
517 * config/x86/x86_avx.cc: Same.
518 * Makefile.am: Don't build readonly and wbetl methods, memset.cc and
520 * Makefile.in: Rebuild.
521 * method-readonly.cc: Remove.
522 * method-wbetl.cc: Rename GTM::abi_dispatch::lock_type to ls_modifier.
523 Rename GTM::abi_dispatch::NOLOCK to NONTXNAL.
525 2011-06-30 Torvald Riegel <triegel@redhat.com>
527 * alloc_c.cc (_ITM_dropReferences): Don't support it anymore.
528 * testsuite/libitm.c++/dropref.C: _ITM_dropReferences is expected to fail.
529 * testsuite/libitm.c/dropref-2.c: Same.
530 * testsuite/libitm.c/dropref.c: Same.
532 2011-06-30 Torvald Riegel <triegel@redhat.com>
534 * config/generic/tls.h (gtm_disp): Rename to abi_disp.
535 * config/generic/tls.h (set_gtm_disp): Rename to set_abi_disp.
536 * libitm_i.h: Rename gtm_dispatch to abi_dispatch.
540 * config/generic/tls.h: Same.
541 * config/x86/tls.h: Same.
545 * method-readonly.cc: Same.
546 * method-serial.cc: Same.
547 * method-wbetl.cc: Same.
550 2011-03-03 Richard Henderson <rth@redhat.com>
552 * config/posix/rwlock.cc (write_upgrade): Add missing case.
553 From Patrik Marlier <patrick.marlier@unine.ch>.
555 2011-02-03 Richard Henderson <rth@redhat.com>
557 * acinclude.m4 (LIBITM_CHECK_SIZE_T_MANGLING): New.
558 * configure.ac: Use it.
559 * configure, config.h.in: Rebuild.
560 * alloc_cpp.cc (_ZnwX): Use MANGLE_SIZE_T in constructing the name.
561 (_ZnaX, _ZnwXRKSt9nothrow_t, _ZnaXRKSt9nothrow_t, _ZGTtnwX,
562 _ZGTtnaX, _ZGTtnwXRKSt9nothrow_t, _ZGTtnaXRKSt9nothrow_t): Likewise.
563 * libitm.map: Use wildcards to match size_t mangling.
565 2010-12-14 Richard Henderson <rth@redhat.com>
567 * beginend.cc (GTM::gtm_transaction::begin_transaction): Allocate
568 blocks of TIDs per thread.
569 * config/generic/tls.h (struct gtm_thread): Add local_tid member.
570 (setup_gtm_thr): Return the thread structure.
571 * config/x86/tls.h (setup_gtm_thr): Likewise.
573 2010-12-14 Richard Henderson <rth@redhat.com>
575 * clone.cc (table_lock): Remove.
576 (find_clone): Don't take it.
577 (ExcludeTransaction): New helper class.
578 (_ITM_registerTMCloneTable): Use it.
579 (_ITM_deregisterTMCloneTable): Likewise.
581 2010-12-14 Richard Henderson <rth@redhat.com>
583 * config/x86/tls.h: New file.
585 2010-07-15 Richard Henderson <rth@redhat.com>
587 * Makefile.am (AM_CXXFLAGS): Add -funwind-tables.
588 * Makefile.in: Rebuild.
590 2010-07-13 Aldy Hernandez <aldyh@redhat.com>
592 * method-wbetl.cc (trydropreference): Fix source line.
594 2010-07-13 Aldy Hernandez <aldyh@redhat.com>
596 * libitm.h: Add comment.
597 * libitm_i.h (begin_transaction): Add ITM_REGPARM.
599 2010-07-07 Aldy Hernandez <aldyh@redhat.com>
601 * configure.ac: Call LIBITM_CHECK_64BIT_SYNC_BUILTINS.
602 * beginend.cc (begin_transaction): If 64-bit sync builtins are not
603 available, use pthread mutexes.
604 * acinclude.m4 (LIBITM_CHECK_64BIT_SYNC_BUILTINS): New.
605 * config.h.in: Regenerate.
606 * configure: Regenerate.
608 2010-07-06 Aldy Hernandez <aldyh@redhat.com>
610 * libitm.h (ITM_PURE): Define.
611 Declare _ITM_malloc, _ITM_calloc, and _ITM_free.
613 2010-06-28 Aldy Hernandez <aldyh@redhat.com>
615 * method-wbetl.cc (class wbetl_dispatch): Add trydropreference.
616 (validate): Add comment.
617 (trydropreference): New.
618 * method-readonly.cc (class readonly_dispatch): Add
620 * alloc_c.cc (_ITM_dropReferences): Remove const attribute.
621 Call trydropreference().
622 * libitm.h (_ITM_dropReferences): Remove const attribute.
623 * method-serial.cc (class serial_dispatch): Add trydropreference.
624 * libitm_i.h (struct gtm_dispatch): Add trydropreference.
626 2010-06-28 Aldy Hernandez <aldyh@redhat.com>
628 * memcpy.cc (do_memcpy): Comment.
630 2010-06-25 Aldy Hernandez <aldyh@redhat.com>
632 * barrier.tpl: Add comments throughout.
634 2010-06-24 Aldy Hernandez <aldyh@redhat.com>
636 * method-wbetl.cc (struct w_entry): Add comments.
640 2010-06-24 Aldy Hernandez <aldyh@redhat.com>
642 * alloc_c.cc (_ITM_dropReferences): New.
643 * libitm.map (_ITM_dropReferences): Add.
644 * libitm.h (_ITM_dropReferences): Add transaction_pure attribute.
645 * libitm_i.h (struct gtm_transaction): Declare
646 drop_references_allocations and drop_references_local.
647 * local.cc (rollback_local): Ignore memory when applicable.
648 (drop_references_local): New.
650 2010-06-23 Richard Henderson <rth@redhat.com>
652 * barrier.tpl, beginend.cc, clone.cc, tls.h, memcpy.cc,
653 memset.cc, method-serial.cc: Revert the 2010-06-16 change.
654 * config/x86/target.h (struct gtm_jmpbuf): Change CFA type to void*.
655 * config/alpha/target.h: Likewise.
656 * config/generic/tls.cc (gtm_mask_stack): Use it.
658 2010-06-23 Richard Henderson <rth@redhat.com>
660 * config/posix/cachepage.cc (gtm_cacheline_page::operator new): Use
661 a mutex instead of trying a lock-free compare-and-swap on the list.
662 (gtm_cacheline_page::operator delete): Likewise.
664 2010-06-16 Richard Henderson <rth@redhat.com>
666 * method-wbetl.cc (wbetl_dispatch::trycommit): Discard changes
667 that overlap the libitm stack.
668 * barrier.tpl: Mark incoming stack.
669 * beginend.cc (_ITM_rollbackTransaction, _ITM_abortTransaction,
670 _ITM_commitTransaction, _ITM_commitTransactionEH): Likewise.
671 * clone.cc (_ITM_getTMCloneOrIrrevocable): Likewise.
672 * memcpy.cc, memset.cc: Likewise.
673 * method-serial.cc (_ITM_changeTransactionMode): Likewise.
674 * config/generic/tls.h (gtm_thread): Add stack_top member.
675 (gtm_stack_top, set_gtm_stack_top, struct gtm_stack_marker): New.
676 * libitm_i.h (gtm_mask_stack): Declare.
677 * config/generic/tls.cc: New file.
678 * Makefile.am (libitm_la_SOURCES): Add it.
679 (AM_CXXFLAGS): Turn off exceptions.
680 * Makefile.in: Rebuild.
682 2010-06-16 Richard Henderson <rth@redhat.com>
684 * alloc.cc (struct gtm_alloc_action): Move definition ...
685 * libitm_i.h: ... here.
686 (class gtm_transaction): Declare new and delete.
687 * beginend.cc (alloc_tx): Reformulate as operator new.
688 (free_tx): Reformulate as operator delete.
689 * config/generic/tls.h (gtm_thread): Change free_tx member to void *.
691 2010-06-11 Richard Henderson <rth@redhat.com>
693 * clone.cc (clone_entry_compare): Fix typo.
694 From Patrik Marlier <patrick.marlier@unine.ch>.
696 2010-05-13 Richard Henderson <rth@redhat.com>
698 * alloc_c.cc (_ITM_malloc, _ITM_calloc, _ITM_free): Wrap functions
701 2010-05-07 Aldy Hernandez <aldyh@redhat.com>
703 * libitm_i.h (struct gtm_transaction): Remove
705 (record_allocation): Remove size parameter.
706 * libitm.map (_ITM_realloc): Remove.
707 * alloc_c.cc (_ITM_realloc): Remove.
708 (_ITM_malloc): Remove size argument to record_allocation.
710 * alloc_cpp.cc (_ZGTtnwm): Same.
711 (_ZGTtnwmRKSt9nothrow_t): Same.
713 (_ZGTtnamRKSt9nothrow_t): Same.
714 * alloc.cc (struct gtm_alloc_action): Remove size.
715 (get_allocation_size): Remove.
716 (commit_allocations): Add comment.
717 (record_allocation): Remove size parameter.
718 (forget_allocation): Remove set of size.
720 2010-04-19 Aldy Hernandez <aldyh@redhat.com>
722 * Makefile.am (abi_version): New.
723 (AM_CXXFLAGS): Pass abi_version.
724 * Makefile.in: Regenerate.
725 * config/x86/unaligned.h: Remove always_inline kludge for vectors.
727 2010-04-06 Aldy Hernandez <aldyh@redhat.com>
729 * clone.cc (_ITM_getTMCloneOrIrrevocable): Rename from
730 _ITM_getTMCloneOrIrrevokable.
731 * libitm.h (_ITM_getTMCloneOrIrrevocable): Same.
732 * libitm.map (_ITM_getTMCloneOrIrrevocable): Same.
734 2010-03-26 Aldy Hernandez <aldyh@redhat.com>
736 * configure.ac: Remove Linux futex support.
737 * configure.tgt (config_path): Same.
739 * config/linux: Remove entire directory.
740 * configure: Rebuild.
741 * Makefile.in: Rebuild.
742 * testsuite/Makefile.in: Rebuild.
744 2010-03-09 Aldy Hernandez <aldyh@redhat.com>
746 * retry.cc (decide_retry_strategy): Set state to STATE_SERIAL when
747 switching to serial mode.
748 * beginend.cc (trycommit_and_finalize): Unlock serial_lock.
750 2010-03-03 Aldy Hernandez <aldyh@redhat.com>
752 * configure.tgt: Add emacs -*- tags.
755 2010-02-23 Aldy Hernandez <aldyh@redhat.com>
757 * Makefile.am: Rename serial.cc to method-serial.cc.
758 * Makefile.in: Regenerate with automake 1.11.1.
759 * testsuite/Makefile.in: Same.
760 * aclocal.m4: Regenerate with aclocal 1.11.1.
761 * method-serial.cc: Rename from serial.cc.
762 * libitm_i.h (struct gtm_transaction): Update comment on
765 2010-02-22 Aldy Hernandez <aldyh@redhat.com>
767 * libitm_i.h (GTM_longjmp): Add ITM_REGPARM.
768 * config/linux/rwlock.h (class gtm_rwlock): Add comments.
770 2010-02-11 Aldy Hernandez <aldyh@redhat.com>
772 * configure: Rebuild.
774 2009-11-12 Richard Henderson <rth@redhat.com>
776 * Rewrite everything in C++.
778 2009-11-03 Richard Henderson <rth@redhat.com>
780 * config/x86/x86_sse.c, config/x86/x86_avx.c: New files.
781 * Makefile.am (libitm_la_SOURCES): Add them.
782 * configure.ac (ARCH_X86): New conditional.
783 * Makefile.in, configure: Rebuild.
784 * configure.tgt: Set up ARCH; do cflags setup at the same time.
785 Move futex setup into "other system configury" case.
786 * local.c (rollback_local): Merge into ...
787 (GTM_rollback_local): ... here.
788 (GTM_LB): Rename from GTM_alloc_local; do the memcpy here.
789 (_ITM_LB): Define as an alias to GTM_LB.
791 2009-11-03 Richard Henderson <rth@redhat.com>
793 * method-readonly.c: New file.
794 * Makefile.am (libitm_la_SOURCES): Add it.
795 * Makefile.in: Rebuild.
796 * beginend.c (gtm_stmlock_array, gtm_clock): New.
797 (GTM_begin_transaction): Use dispatch_readonly for read-only txn.
798 * libitm_i.h (gtm_stmlock, gtm_version): Move from method-wbetl.c.
799 (GTM_VERSION_MAX, GTM_VERSION_INVALID, gtm_stmlock_owned_p,
800 gtm_stmlock_set_owned, gtm_stmlock_get_addr,
801 gtm_stmlock_get_version, gtm_stmlock_set_version, LOCK_ARRAY_SIZE,
802 gtm_stmlock_array, gtm_get_stmlock, gtm_clock, RESTART_NOT_READONLY,
803 gtm_get_clock, gtm_inc_clock): New.
804 * method-wbetl.c (gtm_version, gtm_stmlock, OWNED_MASK, VERSION_MAX,
805 LOCK_GET_OWNED, LOCK_SET_ADDR, LOCK_GET_ADDR, LOCK_GET_TIMESTAMP,
806 LOCK_SET_TIMESTAMP, LOCK_ARRAY_SIZE, LOCK_MASK, LOCK_IDX, GET_LOCK,
807 locks, gclock, CLOCK, GET_CLOCK, FETCH_AND_INC_CLOCK): Remove and
808 replace uses with new libitm_i.h symbols.
809 (dispatch_wbetl): Rename from wbetl_dispatch.
810 * retry.c (GTM_decide_retry_strategy): If RESTART_NOT_READONLY, move
811 away from dispatch_readonly; abort if the beginTransaction call
812 asserted that the transaction was readonly.
814 2009-11-03 Richard Henderson <rth@redhat.com>
816 * memset.c: New file.
817 * Makefile.am (libitm_la_SOURCES): Add it.
818 * Makefile.in: Rebuild.
819 * testsuite/libitm.c/memset-1.c: New.
821 2009-11-03 Richard Henderson <rth@redhat.com>
823 * dispatch.c: Remove file.
824 * useraction.c (struct gtm_user_action): Move from libitm.h.
825 * serial.c (GTM_null_read_lock, GTM_null_write_lock): New.
826 (serial_memset, serial_memmove, serial_memcpy): Remove.
827 (serial_W*, serial_R*): Remove.
828 (serial_dispatch): Update to match.
829 * configure.ac: Move Werror down below configure checks. Don't
830 check for sys/loadavg.h, do check for malloc.h. Don't check for
831 getloadavg and clock_gettime; do check for memalign, posix_memalign.
832 Use GCC_AC_FUNC_MMAP_BLACKLIST
833 * libitm.h: Split out all internal items to...
834 * libitm_i.h: ... here. New file.
835 * copymask.c: New file.
836 * local.c (struct gtm_local_undo): Move from libitm.h.
837 (GTM_alloc_local): Rename from alloc_local; export.
838 * memcpy.c: New file.
839 * alloc_c.c (_ITM_realloc): Use _ITM_memcpyRnWt directly.
840 * config/posix/page.c: New file.
841 * config/posix/target_tls.h: Remove file.
842 * barrier.c: New file.
843 * Makefile.am (libitm_la_SOURCES): Add barrier.c, memcpy.c,
845 * alloc.c (struct gtm_alloc_action): Move from libitm.h.
846 * method-wbetl.c: Rewrite for new cacheline methods.
847 * Makefile.in, configure, testsuite/Makefile.in, config.h.in: Rebuild.
849 * config/alpha/sjlj.S: Fix typo.
850 * config/alpha/target_i.h: Copy functions from alpha/target.h.
851 * config/alpha/copymask.c: New file.
852 * config/alpha/target.h (CACHELINE_SIZE): New.
853 (STRICT_ALIGNMENT, PAGE_SIZE, FIXED_PAGE_SIZE): New.
855 * config/x86/target_i.h: Copy functions from x86/target.h.
856 * config/x86/copymask.c: New file.
857 * config/x86/target.h (_ITM_ALL_TARGET_TYPES): Remove.
858 (CACHELINE_SIZE, STRICT_ALIGNMENT): New.
859 (PAGE_SIZE, FIXED_PAGE_SIZE): New.
860 * config/x86/target_tls.h: Move contents to target_i.h.
862 * testsuite/libitm.c/clone-1.c: Include libitm.h.
863 * testsuite/libitm.c/memcpy-1.c: New.
865 2009-10-22 Richard Henderson <rth@redhat.com>
867 * Makefile.am (CCAS, CCASFLAGS, LTCCASCOMPILE): Remove.
869 * configure.ac: Add AM_PROG_AS. Use m4_rename_force for
870 saving/restoring _AC_ARG_VAR_PRECIOUS.
871 * Makefile.in, aclocal.m4, config.h.in, configure,
872 testsuite/Makefile.in: Rebuild with automake 1.11; autoconf 2.64.
874 2009-10-22 Richard Henderson <rth@redhat.com>
876 * testsuite/*: Update for new compiler syntax.
878 2009-10-21 Richard Henderson <rth@redhat.com>
880 * libitm.h (_ITM_abortReason): Add outerAbort.
882 2009-08-03 Richard Henderson <rth@redhat.com>
884 * libitm.map (_ITM_commitTransactionEH, _ITM_cxa_allocate_exception,
885 _ITM_cxa_begin_catch, _ITM_cxa_end_catch, _ITM_cxa_throw): Export.
886 * method-wbetl.c (struct w_entry): Remove mask.
887 (wbetl_write, wbetl_load): Return pointer to word containing the data;
890 2009-07-22 Richard Henderson <rth@redhat.com>
892 * eh_cpp.c: New file.
893 * Makefile.am (libitm_la_SOURCES): Add it.
894 * Makefile.in: Rebuild.
895 * beginend.c (GTM_rollback_transaction): Undo exception state.
896 (GTM_trycommit_transaction): Mark inline.
897 (GTM_trycommit_and_finalize_transaction): Split out from ...
898 (_ITM_commitTransaction): ... here.
899 (_ITM_commitTransactionEH): New function.
900 * libitm.h (struct gtm_transaction): Add cxa_catch_count,
901 cxa_unthrown, eh_in_flight; reorder.
903 * testsuite/libitm.c++/c++.exp: New.
904 * testsuite/libitm.c++/eh-1.C: New.
906 * aatree.c (aa_free): Remove REGPARM.
907 * aatree.h: Remove all REGPARM.
909 2009-07-18 Richard Henderson <rth@redhat.com>
911 * aatree.c, aatree.h, alloc.c, alloc_c.c, alloc_cpp.c: New files.
912 * Makefile.am (libitm_la_SOURCES): Add them.
913 * Makefile.in: Rebuild.
914 * beginend.c (GTM_rollback_transaction): Use GTM_commit_allocations.
915 (GTM_trycommit_transaction): Likewise.
916 * libitm.h: Include aatree.h
917 (struct gtm_alloc_action): New.
918 (struct gtm_transaction): Add alloc_actions.
919 (GTM_record_allocation, GTM_forget_allocation): Declare.
920 (GTM_get_allocation_size, GTM_commit_allocations): Declare.
921 * libitm.map (_ITM_malloc, _ITM_calloc, _ITM_realloc, _ITM_free,
922 _ZGTtnwm, _ZGTtnam, _ZGTtdlPv, _ZGTtdaPv, _ZGTtnwmRKSt9nothrow_t,
923 _ZGTtnamRKSt9nothrow_t, _ZGTtdlPvRKSt9nothrow_t,
924 _ZGTtdaPvRKSt9nothrow_t): Export.
926 2009-07-18 Richard Henderson <rth@redhat.com>
928 * target_tls.h: Move ...
929 * config/posix/target_tls.h: ... here.
931 2009-07-07 Richard Henderson <rth@redhat.com>
933 * config/x86/target.h (atomic_write_barrier): Use sfence if available.
935 2009-07-07 Richard Henderson <rth@redhat.com>
939 2009-07-07 Richard Henderson <rth@redhat.com>
941 * libitm.h (struct gtm_transaction): Widen id to _ITM_transactionId_t.
942 * beginend.c (global_tid): Widen to _ITM_transactionId_t.
944 * configure.tgt: Don't use -ftls-model for x86 linux.
945 * libitm.h: Include target.h after standard includes.
946 (_gtm_thr): Rename from gtm_thr.
947 (setup_gtm_thr, gtm_thr, gtm_tx, set_gtm_tx): New.
948 (gtm_disp, set_gtm_disp): New.
949 * beginend.c, dispatch.c, local.c, method-wbetl.c, query.c,
950 retry.c, serial.c, useraction.c: Use accessor functions throughout.
951 * config/alpha/target_tls.h, config/x86/target_tls.h: New files.
953 2009-07-07 Richard Henderson <rth@redhat.com>
955 * config/linux/rwlock.c (EZ): New define. Use it throughout.
957 2009-07-06 Richard Henderson <rth@redhat.com>
959 * libitm.h (_ITM_SRCLOCATION_DECL_1, _ITM_SRCLOCATION_DECL_2): Remove.
960 (_ITM_SRCLOCATION_DEFN_1, _ITM_SRCLOCATION_DEFN_2): Remove.
961 (_ITM_beginTransaction): Take variadic arguments.
962 (_ITM_registerThrownObject): Declare.
963 * beginend.c, serial.c: Update.
964 * libitm.map: Add _ITM_registerThrownObject.
966 2009-01-28 Richard Henderson <rth@redhat.com>
968 * Makefile.am (libitm_la_SOURCES): Add clone.c.
969 * Makefile.in: Rebuild.
970 * beginend.c (_ITM_abortTransaction): Abort if irrevokable.
971 (GTM_restart_transaction): Fix uninstrumented code check.
972 * retry.c (GTM_decide_retry_strategy): Add serial check.
973 * serial.c (GTM_serialmode): Add irrevokable variable. Don't
974 automatically go irrevokable when in serial mode.
976 * libitm.h, libitm.map: Update.
978 2009-01-27 Richard Henderson <rth@redhat.com>
980 * Makefile.am (LTCCASCOMPILE): Define.
981 (libitm_la_SOURCES): Add methid-wbetl.c.
982 * testsuite/Makefile.am: New
983 * configure.ac: Add testsuite/Makefile.
984 * Makefile.in, testsuite/Makefile.in, configure: Regenerate.
985 * beginend.c (GTM_begin_transaction): Install wbetl_dispatch.
986 (_ITM_abortTransaction): Finalize implementation method; pass
987 transaction properties to longjmp.
988 (GTM_restart_transaction): Split out from ...
989 (_ITM_commitTransaction): ... here.
990 * config/linux/x86/futex_bits.h (cpu_relax, atomic_write_barrier):
991 Move to config/x86/target.h.
992 * config/linux/alpha/futex_bits.h: New.
993 * config/x86/sjlj.S (GTM_longjmp): Fix 64-bit input register.
994 * config/x86/target.h: Disable target types for 32-bit.
995 * config/alpha/sjlj.S, config/alpha/target.h: New.
996 * libitm.h (struct gtm_dispatch): Add init, fini.
997 (enum restart_reason): New.
998 (struct gtm_transaction): Add method and restarts.
999 * retry.c (GTM_decide_retry_strategy): Implement.
1000 * serial.c (serial_init, serial_fini): New.
1001 (GTM_serialmode): Finialize outgoing method.
1002 * method-wbetl.c: New.
1004 2008-12-09 Richard Henderson <rth@redhat.com>
1006 * config/x86/target.h (_ITM_ALL_TARGET_TYPES, _ITM_TYPE_ATTR): New.
1007 * configure.tgt (i386-*, x86_64-*): Don't force SSE.
1008 * dispatch.c (_ITM_##R##T, _ITM_##W##T): Use _ITM_TYPE_ATTR.
1009 * libitm.h (_ITM_ALL_TARGET_TYPES, _ITM_TYPE_ATTR): Provide default.
1010 (_ITM_TYPE_M64, _ITM_TYPE_M128, _ITM_TYPE_M256): Move to x86 header.
1011 (_ITM_ALL_TYPES): Use _ITM_ALL_TARGET_TYPES.
1012 * local.c (_ITM_L##T): Use _ITM_TYPE_ATTR.
1013 * serial.c (serial_R##T, serial_W##T): Likewise.
1015 2008-11-21 Richard Henderson <rth@redhat.com>