1 2012-02-20 Torvald Riegel <triegel@redhat.com>
3 * method-gl.cc (gl_wt_dispatch::memtransfer_static): Add missing undo
4 for RfW src. Optimize number of calls to gtm_thr.
6 2012-02-20 Torvald Riegel <triegel@redhat.com>
8 * beginend.cc (GTM::gtm_thread::begin_transaction): Move serial lock
10 * retry.cc (GTM::gtm_thread::decide_begin_dispatch): ... here.
11 (default_dispatch): Make atomic.
12 (GTM::gtm_thread::set_default_dispatch): Access atomically.
13 (GTM::gtm_thread::decide_retry_strategy): Access atomically and
14 use decide_begin_dispatch() if default_dispatch might have changed.
15 (GTM::gtm_thread::number_of_threads_changed): Initialize
16 default_dispatch here.
18 2012-02-15 Iain Sandoe <iains@gcc.gnu.org>
19 Patrick Marlier <patrick.marlier@gmail.com>
22 * alloc_cpp.cc: No dummy definitions for darwin.
23 * eh_cpp.cc: Likewise.
25 2012-02-14 Richard Henderson <rth@redhat.com>
27 * config/x86/target.h (GTM_longjmp): Correct the .cfi corrections.
29 2012-02-14 Uros Bizjak <ubizjak@gmail.com>
31 * config/x86/target.h (GTM_longjmp): Correct .cfi directives.
33 2012-02-14 Torvald Riegel <triegel@redhat.com>
35 * libitm_i.h (GTM::gtm_rwlog_entry): New.
36 (GTM::gtm_thread): Add read and write logs.
37 (GTM::dispatch_ml_wt): Declare.
38 * retry.cc (parse_default_method): Support ml_wt.
39 * method-ml.cc: New file.
40 * Makefile.am: Add method-ml.cc.
41 * Makefile.in: Regenerate.
43 2012-02-14 Torvald Riegel <triegel@redhat.com>
45 * dispatch.h (GTM::abi_dispatch::supports): New.
46 (GTM::method_group::reinit): New.
47 * retry.cc (GTM::gtm_thread::decide_retry_strategy): Use reinit().
48 (GTM::gtm_thread::number_of_threads_changed): Check that the method
49 supports the current situation.
51 2012-02-14 Torvald Riegel <triegel@redhat.com>
53 * util.cc (GTM::xcalloc): New.
54 * common.h (GTM::xcalloc): Declare.
56 2012-02-14 Eric Botcazou <ebotcazou@adacore.com>
58 * config/sparc/target.h (cpu_relax): Read from CC register.
59 * config/sparc/sjlj.S (GTM_longjmp): Restore %fp atomically.
61 2012-02-14 Uros Bizjak <ubizjak@gmail.com>
63 * config/x86/target.h (GTM_longjmp): Jump indirect from memory address.
65 2012-02-13 Eric Botcazou <ebotcazou@adacore.com>
67 * configure.tgt (target_cpu): Handle sparc and sparc64/sparcv9.
68 * config/sparc/cacheline.h: New file.
69 * config/sparc/target.h: Likewise.
70 * config/sparc/sjlj.S: Likewise.
71 * config/linux/sparc/futex_bits.h: Likewise.
73 2012-02-13 Eric Botcazou <ebotcazou@adacore.com>
75 * configure.ac (link_itm): Fix comment.
76 * configure: Regenerate.
77 * testsuite/lib/libitm.exp: Do not pass -litm for the link.
79 2012-01-31 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
82 * testsuite/libitm.c++/c++.exp (lang_link_flags): Add -shared-libgcc.
83 Correct libgomp references.
85 2012-01-24 Torvald Riegel <triegel@redhat.com>
87 * config/linux/rwlock.cc (GTM::gtm_rwlock::write_unlock): Fix reader
90 2012-01-24 Uros Bizjak <ubizjak@gmail.com>
92 * config/x86/target.h (gtm_jmpbuf) [__x86_64__]: Move rip to the
94 * config/x86/sjlj.S (_ITM_beginTransaction) [__x86_64__]: Update
95 offset values. Do not copy return address. Decrement stack
97 (GTM_longjump) [__x86_64__]: Update offset values.
99 2012-01-23 Uros Bizjak <ubizjak@gmail.com>
102 * config/x86/sjlj.S (_ITM_beginTransaction) [!__x86_64__]: Load
103 the first function argument to %eax.
105 2012-01-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
107 * libitm.h (_ITM_getThreadnum): Remove.
108 * libitm.map (_ITM_getThreadnum): Remove from LIBITM_1.0.
110 2012-01-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
112 * clearcap.map: New file.
113 * acinclude.m4 (LIBITM_CHECK_LINKER_HWCAP): New test.
114 * configure.ac: Call it.
115 Clear HWCAP_LDFLAGS if defaulting to -mavx.
116 * Makefile.am (AM_LDFLAGS): Add $(HWCAP_LDFLAGS)
117 * configure: Regenerate.
118 * Makefile.in: Regenerate.
119 * testsuite/Makefile.in: Regenerate.
121 2012-01-17 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
124 * testsuite/libitm.c++/static_ctor.C: Skip test, note PR, remove
125 include, exclude options.
127 2012-01-14 Torvald Riegel <triegel@redhat.com>
129 * local.cc (GTM::gtm_undolog::rollback): Truncate undo log after
131 * containers.h (GTM::vector::set_size): New.
133 2012-01-14 Torvald Riegel <triegel@redhat.com>
136 * config/generic/tls.h (GTM::mask_stack_top): New.
137 (GTM::mask_stack_bottom): Declare.
138 * config/generic/tls.c (GTM::mask_stack_bottom): New.
139 * local.cc (gtm_undolog::rollback): Filter out any updates that
140 overlap the libitm stack. Add current transaction as parameter.
141 * libitm_i.h (GTM::gtm_undolog::rollback): Adapt.
142 * beginend.cc (GTM::gtm_thread::rollback): Adapt.
143 * testsuite/libitm.c/stackundo.c: New test.
145 2012-01-10 Richard Henderson <rth@redhat.com>
147 * libitm_i.h (_Unwind_DeleteException): Declare weak.
148 * eh_cpp.cc (_Unwind_DeleteException): Define for
149 !HAVE_ELF_STYLE_WEAKREF.
151 2012-01-08 Torvald Riegel <triegel@redhat.com>
153 * local.cc (GTM_LB): Use GTM::gtm_undolog.
154 (GTM::gtm_thread::drop_references_undolog): Remove.
155 (GTM::gtm_thread::commit_undolog,
156 GTM::gtm_thread::rollback_undolog): Move to ...
157 * libitm_i.h (GTM::gtm_undolog): ...here. New.
158 (GTM::gtm_undolog_entry): Remove.
159 (GTM::gtm_thread): Adapt.
160 * beginend.cc (GTM::gtm_thread::rollback): Adapt.
161 (GTM::gtm_thread::trycommit): Adapt.
162 * method-serial.cc (serial_dispatch::log): Adapt.
163 * method-gl.cc (gl_wt_dispatch::pre_write): Adapt.
164 (gl_wt_dispatch::store): Fix likely/unlikely.
165 * containers.h (GTM::vector::resize): Add additional_capacity
166 parameter and handle it.
167 (GTM::vector::resize_noinline): New/adapt.
168 (GTM::vector::push): New.
170 2012-01-06 Richard Henderson <rth@redhat.com>
172 * configure.tgt: Support powerpc-linux and powerpc-darwin.
173 * config/linux/powerpc/futex_bits.h: New file.
174 * config/powerpc/cacheline.h: New file.
175 * config/powerpc/sjlj.S: New file.
176 * config/powerpc/target.h: New file.
177 * config/generic/asmcfi.h (cfi_offset): New.
178 (cfi_restore, cfi_undefined): New.
180 2012-01-05 Aldy Hernandez <aldyh@redhat.com>
183 * testsuite/libitm.c/reentrant.c: Remove xfail.
184 (thread): Pass x to pure().
185 From Patrik Marlier <patrick.marlier@gmail.com>.
187 2011-12-24 Torvald Riegel <triegel@redhat.com>
189 * beginend.cc (GTM::gtm_thread::trycommit): Don't enforce
190 privatization safety if already in serial mode.
192 2011-12-24 Torvald Riegel <triegel@redhat.com>
194 * beginend.cc (GTM::gtm_thread::restart): Add and handle
195 finish_serial_upgrade parameter.
196 * libitm.h (GTM::gtm_thread::restart): Adapt declaration.
197 * config/linux/rwlock.cc (GTM::gtm_rwlock::write_lock_generic):
198 Don't unset reader flag.
199 (GTM::gtm_rwlock::write_upgrade_finish): New.
200 * config/posix/rwlock.cc: Same.
201 * config/linux/rwlock.h (GTM::gtm_rwlock::write_upgrade_finish):
203 * config/posix/rwlock.h: Same.
204 * method-serial.cc (GTM::gtm_thread::serialirr_mode): Unset reader
205 flag after commit or after rollback when restarting.
207 2011-12-24 Torvald Riegel <triegel@redhat.com>
209 * beginend.cc (GTM::gtm_thread::begin_transaction): Add comment.
210 (GTM::gtm_thread::try_commit): Changed memory order.
211 * config/linux/alpha/futex_bits.h (sys_futex0): Take atomic int
213 * config/linux/x86/futex_bits.h (sys_futex0): Same.
214 * config/linux/sh/futex_bits.h (sys_futex0): Same.
215 * config/linux/futex_bits.h (sys_futex0): Same.
216 * config/linux/futex.cc (futex_wait, futex_wake): Same.
217 * config/linux/futex.h (futex_wait, futex_wake): Same.
218 * config/linux/rwlock.h (gtm_rwlock::writers,
219 gtm_rwlock::writer_readers, gtm_rwlock::readers): Change to atomic
221 * config/linux/rwlock.cc (gtm_rwlock::read_lock,
222 gtm_rwlock::write_lock_generic, gtm_rwlock::read_unlock,
223 gtm_rwlock::write_unlock): Fix memory orders and fences.
224 * config/posix/rwlock.cc (gtm_rwlock::read_lock,
225 gtm_rwlock::write_lock_generic, gtm_rwlock::read_unlock,
226 gtm_rwlock::write_unlock): Same.
227 * config/linux/rwlock.h (gtm_rwlock::summary): Change to atomic int.
228 * method-gl.cc (gl_mg::init, gl_wt_dispatch::memtransfer_static,
229 gl_wt_dispatch::memset_static, gl_wt_dispatch::begin_or_restart):
231 (gl_wt_dispatch::pre_write, gl_wt_dispatch::validate,
232 gl_wt_dispatch::load, gl_wt_dispatch::store,
233 gl_wt_dispatch::try_commit, gl_wt_dispatch::rollback): Fix memory
234 orders and fences. Add comments.
236 2011-12-21 Jakub Jelinek <jakub@redhat.com>
238 * Makefile.am (AM_CXXFLAGS): Put $(XCFLAGS) first.
239 * Makefile.in: Regenerated.
241 2011-12-17 Kaz Kojima <kkojima@gcc.gnu.org>
243 * configure.tgt: Add sh* case.
244 * config/sh/target.h: New file.
245 * config/sh/sjlj.S: New file.
246 * config/linux/sh/futex_bits.h: New file.
248 2011-12-14 Richard Henderson <rth@redhat.com>
250 * config/arm/hwcap.h, config/arm/hwcap.cc: New files.
251 * config/arm/sjlj.S, config/arm/target.h: New files.
252 * config/generic/asmcfi.h (cfi_adjust_cfa_offset): New.
253 (cfi_rel_offset): New.
254 * config/linux/futex_bits.h: New file.
255 * config/linux/futex.cc: Include futex_bits.h here...
256 * config/linux/futex.h: ... not here.
257 * Makefile.am (libitm_la_SOURCES) <ARCH_ARM>: Add hwcap.cc.
258 * configure.ac (ARCH_AM): New conditional.
259 * Makefile.in, configure: Rebuild.
260 * configure.tgt: Handle ARM.
262 2011-12-13 Richard Henderson <rth@redhat.com>
264 * config/posix/rwlock.cc (gtm_rwlock::write_lock_generic): Fix
265 signed/unsigned comparison werror.
267 * local_atomic: New file.
268 * libitm_i.h: Include it.
269 (gtm_thread::shared_state): Use atomic template.
270 * beginend.cc (GTM::gtm_clock): Use atomic template.
271 (global_tid): Use atomic template if 64-bit atomics available.
272 (gtm_thread::gtm_thread): Update shared_state access.
273 (gtm_thread::trycommit): Likewise.
274 (choose_code_path): Update global_tid access.
275 * method-gl.cc (gl_mg::orec): Use atomic template. Update all users.
276 * stmlock.h (GTM::gtm_clock): Use atomic template.
277 (gtm_get_clock, gtm_inc_clock): Update accesses.
278 * config/linux/rwlock.cc (gtm_rwlock::read_lock): Remove
279 redundant __sync_synchronize after atomic shared_state access.
280 * config/posix/rwlock.cc (gtm_rwlock::read_lock): Likewise.
281 (gtm_rwlock::write_lock_generic): Likewise.
282 (gtm_rwlock::read_unlock): Likewise.
283 * config/alpha/target.h (atomic_read_barrier): Remove.
284 (atomic_write_barrier): Remove.
285 * config/x86/target.h (atomic_read_barrier): Remove.
286 (atomic_write_barrier): Remove.
288 2011-11-30 Richard Henderson <rth@redhat.com>
290 * libitm_i.h (GTM_longjmp): Swap first and second arguments.
291 * beginend.c (_ITM_abortTransaction): Update to match.
292 (GTM::gtm_thread::restart): Likewise.
293 * config/alpha/sjlj.S (GTM_longjmp): Likewise.
294 * config/x86/sjlj.S (GTM_longjmp): Likewise.
296 2011-11-23 Iain Sandoe <iains@gcc.gnu.org>
298 * Makefile.am (libitm_la_LDFLAGS): Remove "-no-undefined".
299 * Makefile.in: Regenerate.
301 2011-11-22 Iain Sandoe <iains@gcc.gnu.org>
303 * configure.ac: Use GCC_CHECK_ELF_STYLE_WEAKREF.
304 * alloc_cpp.cc: Generate dummy functions if we don't
305 HAVE_ELF_STYLE_WEAKREF.
306 * eh_cpp.cc: Likewise.
307 * configure: Regenerate.
308 * aclocal.m4: Likewise.
309 * config.h.in: Likewise.
310 * Makefile.in: Likewise.
311 * testsuite/Makefile.in: Likewise.
313 2011-11-22 Iain Sandoe <iains@gcc.gnu.org>
315 * config/x86/sjlj.S (CONCAT1, CONCAT2, SYM): Respond to
316 __USER_LABEL_PREFIX__ for targets that use it.
317 (TYPE, SIZE, HIDDEN): New macros to assist on non-elf targets.
318 (_ITM_beginTransaction): Use SYM, TYPE, SIZE macros to assist
319 in portability to non-elf targets.
320 (GTM_longjmp): Likewise.
321 * libitm_i.h (begin_transaction): Apply __USER_LABEL_PREFIX__
324 2011-11-22 Iain Sandoe <iains@gcc.gnu.org>
326 * testsuite/libitm.c/memcpy-1.c: Allow for MAP_ANON spelling.
327 * testsuite/libitm.c/memset-1.c: Likewise.
329 2011-11-21 Andreas Tobler <andreast@fgznet.ch>
331 * configure: Regenerate.
333 2011-11-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
335 * acinclude.m4 (LIBITM_CHECK_LINKER_FEATURES): Handle gold.
336 (LIBITM_ENABLE_SYMVERS): Handle sun style.
337 * Makefile.am: Handle sun style versioning.
338 (libitm_la_LINK): Add $(libitm_la_LDFLAGS).
339 * configure: Regenerate.
340 * Makefile.in: Regenerate.
342 2011-11-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
344 * config/generic/asmcfi.h: Fix comment.
345 * config/x86/sjlj.S (_ITM_beginTransaction): Provide ELF PIC code
346 sequence without .hidden support, error for non-ELF targets.
347 (GTM_longjmp) [__ELF__]: Only use .hidden if
348 HAVE_ATTRIBUTE_VISIBILITY.
350 2011-11-17 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
352 * alloc_cpp.cc [__osf__] (_ZnwX, _ZdlPv, _ZnaX, _ZdaPv,
353 _ZnwXRKSt9nothrow_t, _ZdlPvRKSt9nothrow_t, _ZdaPvRKSt9nothrow_t):
355 * eh_cpp.cc [__osf__] (__cxa_allocate_exception, __cxa_throw,
356 __cxa_begin_catch, __cxa_end_catch, __cxa_tm_cleanup): Likewise.
358 2011-11-16 Uros Bizjak <ubizjak@gmail.com>
361 * acinclude.m4 (LIBITM_CHECK_AS_AVX): Fix target selector.
362 * configure: Regenerate.
364 2011-11-14 H.J. Lu <hongjiu.lu@intel.com>
366 * testsuite/lib/libitm.exp: Check ia32 instead of ilp32.
368 2011-11-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
370 * config/alpha/sjlj.S (_ITM_beginTransaction) [!__ELF__]: Don't use
372 (.note.GNU-stack): Only use if __linux__.
373 * alloc_cpp.cc [!__osf__] (_ZnaXRKSt9nothrow_t): Dummy function.
374 * testsuite/libitm.c/notx.c: Use dg-options "-pthread".
375 * testsuite/libitm.c/reentrant.c: Likewise.
376 * testsuite/libitm.c/simple-2.c: Likewise.
377 * testsuite/libitm.c/txrelease.c: Likewise.
378 * testsuite/libitm.c++/static_ctor.C: Likewise.
380 2011-11-10 Richard Henderson <rth@redhat.com>
382 * config/x86/x86_avx.cc: Remove #undef __AVX__ hack. Tidy comments.
383 * Makefile.am (x86_avx.lo): Only add -mavx if ARCH_X86_AVX.
384 * configure.ac (ARCH_X86_AVX): New conditional.
385 * Makefile.in, configure: Rebuild.
387 2011-11-09 Richard Henderson <rth@redhat.com>
389 * acinclude.m4 (LIBITM_CHECK_AS_AVX): New.
390 * configure.ac: Use it.
391 * config.h.in, configure: Rebuild.
392 * config/x86/x86_avx.cc: Handle !HAVE_AS_AVX.
394 2011-11-09 Richard Henderson <rth@redhat.com>
396 * barrier.tpl, memcpy.cc, memset.cc, method-wbetl.cc: Remove file.
397 * config/alpha/unaligned.h: Remove file.
398 * config/generic/unaligned.h: Remove file.
399 * config/x86/unaligned.h: Remove file.
400 * config/generic/cachepage.h: Remove file.
401 * config/posix/cachepage.cc: Remove file.
402 * config/generic/cacheline.cc: Remove file.
403 * config/x86/cacheline.cc: Remove file.
404 * config/generic/cacheline.h (gtm_cacheline): Remove the
405 store_mask, copy_mask, copy_mask_wb methods.
406 * config/x86/cacheline.h: Likewise.
407 * config/alpha/cacheline.h: Fall back to generic after setting size.
408 * config/generic/tls.cc (gtm_mask_stack): Remove.
409 * config/x86/x86_avx.cc (GTM_vpperm_shift): Remove.
410 (GTM_vpalignr_table): Remove.
411 * config/x86/x86_sse.cc (GTM_palignr_table): Remove.
412 (GTM_pshift_table): Remove.
413 * config/libitm_i.h: Don't include cachepage.h.
414 * Makefile.am (libitm_la_SOURCES): Remove cacheline.cc, cachepage.cc
415 * Makefile.in, testsuite/Makefile.in: Rebuild.
417 2011-11-09 Richard Henderson <rth@redhat.com>
419 * config/x86/cacheline.h (gtm_cacheline::store_mask): Use .byte
420 to emit branch prediction hint.
422 * config/x86/sjlj.S: Protect elf directives with __ELF__.
423 Protect .note.GNU-stack with __linux__.
425 * configure.ac (GCC_AS_CFI_PSEUDO_OP): Test it.
426 * configure, aclocal.m4, config.h.in: Rebuild.
427 * config/generic/asmcfi.h: New file.
428 * config/x86/sjlj.S: Use it.
430 2011-11-08 Richard Henderson <rth@redhat.com>
432 * local.cc (_ITM_LB): Use a normal call, not a function alias.
434 2011-11-08 Richard Henderson <rth@redhat.com>
436 * configure.tgt: Test correct directory for supported cpus.
438 * configure.ac: Exit if unsupported.
439 * configure: Rebuild.
440 * configure.tgt: Delete boilerplate from libgomp for unsupported
441 targets. Set UNSUPPORTED for unsupported targets.
443 2011-11-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
445 * configure.tgt: Handle i386 like i[456]86.
446 * config/generic/tls.h [!HAVE_ARCH_GTM_THREAD] (gtm_thr): Don't
448 * config/generic/tls.cc [!HAVE_ARCH_GTM_THREAD ||
449 !HAVE_ARCH_GTM_THREAD_DISP] (_gtm_thr_tls): New variable.
451 2011-11-05 Aldy Hernandez <aldyh@redhat.com>
453 * method-wbetl.cc: Update copyright notice.
460 * useraction.cc: Same.
464 * config/generic/tls.cc: Same.
465 * config/generic/cacheline.h: Same.
466 * config/generic/cachepage.h: Same.
467 * config/generic/cacheline.cc: Same.
468 * config/generic/unaligned.h: Same.
469 * config/x86/cacheline.h: Same.
470 * config/x86/cacheline.cc: Same.
471 * config/x86/unaligned.h: Same.
472 * config/alpha/cacheline.h: Same.
473 * config/alpha/unaligned.h: Same.
474 * config/alpha/sjlj.S: Same.
475 * config/posix/cachepage.cc: Same.
476 * config/linux/futex.h: Same.
477 * config/linux/alpha/futex_bits.h: Same.
479 2011-11-04 Torvald Riegel <triegel@redhat.com>
481 * libitm.texi: No cover text and invariant sections.
483 2011-11-03 Richard Henderson <rth@redhat.com>
485 * local_type_traits: New file.
486 * libitm_i.h: Use it. Use C headers, not C++ wrappers.
488 2011-11-03 Richard Henderson <rth@redhat.com>
490 * configure.ac: Don't test for gfortran.
491 * configure: Rebuild.
493 * testsuite/lib/libitm.exp: Don't include gfortran-dg.exp.
494 * testsuite/libitm.c++/c++.exp: Don't use gfortran-dg-runtest.
496 2011-11-03 Aldy Hernandez <aldyh@redhat.com>
498 * testsuite/libitm.c/memcpy-1.c: Add copyright notice.
499 * testsuite/libitm.c/memset-1.c: Same.
500 * testsuite/libitm.c/c.exp: Same.
501 * testsuite/lib/libitm-dg.exp: Same.
502 * testsuite/lib/libitm.exp: Same.
503 * testsuite/libitm.c++/c++.exp: Same.
505 2011-11-03 Aldy Hernandez <aldyh@redhat.com>
507 * testsuite/config/default.exp: Update copyright date.
508 * configure.ac: Add copyright info.
509 * configure.tgt: Same.
511 2011-11-03 Aldy Hernandez <aldyh@redhat.com>
513 * testsuite/libitm.c/reentrant.c: XFAIL.
514 * testsuite/libitm.c++/static_ctor.C: XFAIL.
516 2011-10-29 Torvald Riegel <triegel@redhat.com>
518 * beginend.cc (GTM::gtm_thread::rollback): Add aborting flag and
520 (_ITM_abortTransaction): Handle aborts of outer transactions.
522 * eh_cpp.cc (GTM::gtm_thread::revert_cpp_exceptions): Fix assertion.
523 * libitm.texi: Document aborts of outer transactions.
524 * testsuite/libitm.c/cancel.c: New file.
526 2011-10-19 Torvald Riegel <triegel@redhat.com>
528 * testsuite/*: Change __transaction to __transaction_atomic or
529 __transaction_relaxed.
531 2011-10-19 Torvald Riegel <triegel@redhat.com>
533 * config/linux/x86/tls.h (abi_disp): Make TLS slot read volatile.
536 2011-10-19 Torvald Riegel <triegel@redhat.com>
538 * libitm_i.h: Add gl_wt dispatch.
539 * retry.cc (parse_default_method): Same.
540 * method-gl.cc: New file.
541 * Makefile.am: Use method-gl.cc.
542 * Makefile.in: Rebuild.
544 2011-10-19 Torvald Riegel <triegel@redhat.com>
546 * beginend.cc (GTM::gtm_thread::trycommit): Ensure privatization
547 safety if requested by a TM method.
548 * dispatch.h (GTM::abi_dispatch::trycommit): Add parameter for
549 privatization safety.
550 * method-serial.cc: Same.
552 2011-10-19 Torvald Riegel <triegel@redhat.com>
554 * libitm_i.h: Renamed gtm_local_undo to gtm_undolog_entry.
555 (GTM::gtm_thread): Renamed local_undo to undolog. Renamed
556 undolog-related member functions from *_local to *_undolog.
557 * local.cc (gtm_thread::commit_undolog): Same.
558 * beginend.cc (GTM::gtm_thread::trycommit): Same.
559 (GTM::gtm_thread::rollback): Roll back undolog before
560 dispatch-specific rollback.
562 2011-10-19 Torvald Riegel <triegel@redhat.com>
564 * retry.cc (GTM::gtm_thread::decide_retry_strategy): Handle
565 re-initialization of the current method group.
566 * libitm_i.h (GTM::gtm_restart_reason): Add restart reason for this.
568 2011-10-19 Torvald Riegel <triegel@redhat.com>
570 * alloc.cc (commit_allocations_2): Do not free transaction-local
571 memory when committing a nested transaction.
573 2011-10-19 Torvald Riegel <triegel@redhat.com>
575 * method-serial.cc (GTM::gtm_thread::serialirr_mode): Fixed: Use
576 serial-irrevocable dispatch, not serial.
578 2011-10-19 Torvald Riegel <triegel@redhat.com>
580 * libitm_i.h (GTM::gtm_restart_reason): Re-arrange and clean up
582 * dispatch.h (GTM::abi_dispatch::begin_or_restart): New.
583 * method-serial.cc: Implement begin_or_restart().
584 * beginend.cc (GTM::gtm_thread::begin_transaction): Call
585 dispatch-specific begin_or_restart().
586 (GTM::gtm_thread::restart): Same.
588 2011-08-23 Torvald Riegel <triegel@redhat.com>
590 * retry.cc (GTM::gtm_thread::decide_retry_strategy): Cleanup. Fix
591 restarting without switching to serial mode.
592 (GTM::gtm_thread::decide_begin_dispatch): Let the caller set the
593 transaction state. Choose closed-nesting alternative if available.
594 (GTM::gtm_thread::set_default_dispatch): New.
595 (parse_default_method): New.
596 (GTM::gtm_thread::number_of_threads_changed): New.
597 * method-serial.cc (GTM::serial_mg): New method group class.
598 (GTM::serialirr_dispatch): Belongs to serial_mg. Remove reinit and
600 (GTM::serial_dispatch): Same.
601 (GTM::serialirr_onwrite_dispatch): Same.
602 (GTM::gtm_thread::serialirr_mode): Remove calls to fini.
603 * beginend.cc (GTM::gtm_thread::~gtm_thread): Maintain number of
605 (GTM::gtm_thread::gtm_thread): Same.
606 (_ITM_abortTransaction): Remove calls to abi_dispatch::fini().
607 (GTM::gtm_thread::trycommit): Same. Reset number of restarts.
608 (GTM::gtm_thread::begin_transaction): Let decide_begin_dispatch()
609 choose dispatch but set state according to dispatch here.
610 * dispatch.h (GTM::abi_dispatch::fini): Move to method group.
611 (GTM::method_group): New class.
612 (GTM::abi_dispatch): Add comments. Maintain pointer to method_group.
613 * libitm_i.h (GTM::gtm_thread): Add declarations for new members.
614 * libitm.texi: Document TM methods, method groups, method life cycle.
615 Rename method sets to method groups.
617 2011-08-23 Torvald Riegel <triegel@redhat.com>
619 * config/x86/tls.h: Moved to ...
620 * config/linux/x86/tls.h: ... here.
622 2011-08-23 Torvald Riegel <triegel@redhat.com>
624 * config/x86/tls.h: Use __x86_64__ instead of __LP64__.
626 * config/x86/sjlj.S: Same.
628 2011-08-19 Torvald Riegel <triegel@redhat.com>
630 * config/linux/rwlock.h: New file.
631 * config/linux/rwlock.c: New file.
632 * configure.ac: Reenable futex support (undo SVN rev 157758).
634 * configure.tgt: Same.
635 * config/linux/alpha/futex_bits.h: Same.
636 * config/linux/futex.h: Same. Return number of woken processes.
637 * config/linux/futex.cc: Same.
638 (futex_wait): Remove spinning.
639 * config/linux/x86/futex_bits.h: Same. Set futex timeout to zero.
640 Use __x86_64__ instead of __LP64__.
641 * aclocal.m4: Include generic futex checks.
642 * configure: Rebuild.
643 * Makefile.in: Rebuild.
644 * testsuite/Makefile.in: Rebuild.
645 * beginend.cc: Include pthread.h.
646 * config/posix/cachepage.cc: Same.
648 2011-08-12 Torvald Riegel <triegel@redhat.com>
650 * config/x86/tls.h (gtm_tx, set_gtm_tx, setup_gtm_thr): Removed.
651 (abi_disp, set_abi_disp): Move to tx's TLS slot.
653 * config/generic/tls.h (gtm_tx, set_gtm_tx, setup_gtm_thr): Removed.
655 (GTM::gtm_thread::thread_num): Removed.
656 (GTM::gtm_thread): Renamed to GTM::gtm_thread_tls.
657 * libitm_i.h (GTM::gtm_transaction): Renamed to GTM::gtm_thread. More
658 tx-to-thread renaming.
659 * beginend.cc: Adapted to tx-to-thread renaming.
660 (GTM::gtm_thread::~gtm_thread): Extracted from thread_exit_handler().
661 (GTM::gtm_thread::gtm_thread): Extracted from begin_transaction().
662 * query.cc (_ITM_getTransactionId, _ITM_inTransaction): Renamed
663 gtm_transaction to gtm_thread.
664 (_ITM_getThreadnum): Removed. Not supported anymore.
665 * testsuite/libitm.c/notx.c (main): Removed _ITM_getThreadnum call.
666 * libitm.texi: Documented that _ITM_getThreadnum is not supported.
667 * useraction.cc: Renamed gtm_transaction to gtm_thread. Adapted to
668 gtm_tx-to-gtm_thr renaming if necessary.
675 * alloc_cpp.cc: Same.
676 * method-serial.cc: Same.
677 * config/generic/tls.cc: Same.
678 * config/posix/rwlock.h (gtm_rwlock): Same.
679 * config/posix/rwlock.cc: Same. Adapted to more tx-to-thread renaming.
681 2011-08-12 Torvald Riegel <triegel@redhat.com>
683 * config/posix/rwlock.cc (gtm_rwlock::read_lock): Changed locking
685 (gtm_rwlock::read_unlock): Same.
686 (gtm_rwlock::write_lock_generic): New. Generalized from ...
687 (gtm_rwlock::write_lock, gtm_rwlock::write_upgrade): ... these.
688 * libitm_i.h (GTM::gtm_transaction): Added shared_state.
689 * config/posix/rwlock.h (GTM::gtm_rwlock): Removed a_reader and
690 w_upgrade. Replaced by per-transaction flags (in shared_state).
691 Added c_confirmed_writers.
692 (GTM::gtm_rwlock::read_lock, GTM::gtm_rwlock::read_unlock,
693 GTM::gtm_rwlock::write_upgrade): Add tx parameter.
694 * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Same.
695 * method-serial.cc (GTM::gtm_transaction::serialirr_mode): Same.
696 * beginend.cc (GTM::gtm_transaction::begin_transaction,
697 _ITM_abortTransaction, GTM::gtm_transaction::trycommit): Same.
698 * libitm.texi: Document locking conventions and implementations in
701 2011-08-12 Torvald Riegel <triegel@redhat.com>
703 * libitm_i.h (next_tx): Add list of all threads' transaction.
704 * beginend.cc (GTM::gtm_transaction::begin_transaction): Register
705 transaction with list of transactions and ...
706 (thread_exit_handler): ... deregister here.
707 * config/alpha/target.h: Add HW_CACHELINE_SIZE setting.
708 * config/x86/target.h: Same.
710 2011-08-12 Torvald Riegel <triegel@redhat.com>
712 * testsuite/libitm.c++/static_ctor.C: New file.
714 2011-08-12 Torvald Riegel <triegel@redhat.com>
716 * testsuite/libitm.c/reentrant.c: New file.
718 2011-08-12 Torvald Riegel <triegel@redhat.com>
720 * config/generic/tls.h: Remove the free list for transactions and ...
721 * beginend.cc (GTM::gtm_transaction::operator new): ... allocate ...
722 (GTM::gtm_transaction::operator delete): ... and release here.
723 (thread_exit_handler): New. Delete tx when thread terminates.
724 (thread_exit_init): New.
725 (GTM::gtm_transaction::begin_transaction): Set up on-exit handler.
726 * testsuite/libitm.c/txrelease.c: New file.
728 2011-08-12 Torvald Riegel <triegel@redhat.com>
730 * query.cc (_ITM_getThreadnum): Set up gtm_thread if necessary.
731 * testsuite/libitm.c/notx.c: New file.
733 2011-08-12 Torvald Riegel <triegel@redhat.com>
735 * config/generic/tls.h (gtm_thread): Move local_tid from here ...
736 * libitm_i.h (local_tid): ... to here.
737 * beginend.cc (GTM::gtm_transaction::begin_transaction): Same.
738 (GTM::gtm_transaction::operator new): Set up gtm_thread if necessary.
740 2011-08-12 Torvald Riegel <triegel@redhat.com>
742 * retry.cc (GTM::gtm_transaction::decide_begin_dispatch): Use
743 serialirr_onwrite_dispatch as new default for now.
744 * method-serial.cc (serialirr_onwrite_dispatch): New.
745 (GTM::dispatch_serialirr_onwrite): New.
748 2011-08-12 Torvald Riegel <triegel@redhat.com>
750 * beginend.cc (GTM::gtm_transaction::rollback): Roll back tx id as well.
751 * query.cc (_ITM_getTransactionId): There is no active transaction if
752 the current nesting level is zero.
754 2011-07-28 Torvald Riegel <triegel@redhat.com>
756 * beginend.cc (GTM::gtm_transaction::rollback): Fix nesting level
759 2011-07-28 Torvald Riegel <triegel@redhat.com>
761 * retry.cc (GTM::gtm_transaction::decide_begin_dispatch): Get
762 transaction properties from the caller instead of from the
765 * beginend.cc (GTM::gtm_transaction::begin_transaction): Same.
767 2011-07-28 Torvald Riegel <triegel@redhat.com>
769 * local.cc (gtm_transaction::rollback_local): Support closed nesting.
770 * eh_cpp.cc (GTM::gtm_transaction::revert_cpp_exceptions): Same.
772 * method-serial.cc: Same.
773 * beginend.cc (GTM::gtm_transaction::begin_transaction): Change to
774 flat nesting as default, and closed nesting on demand.
775 (GTM::gtm_transaction::rollback): Same.
776 (_ITM_abortTransaction): Same.
777 (GTM::gtm_transaction::restart): Same.
778 (GTM::gtm_transaction::trycommit): Same.
779 (GTM::gtm_transaction::trycommit_and_finalize): Removed.
780 (choose_code_path): New.
781 (GTM::gtm_transaction_cp::save): New.
782 (GTM::gtm_transaction_cp::commit): New.
783 * query.cc (_ITM_inTransaction): Support flat nesting.
784 * libitm_i.h (GTM::gtm_transaction_cp): New helper struct for nesting.
785 (GTM::gtm_transaction): Support flat and closed nesting.
786 * alloc.cc (commit_allocations_2): New.
787 (commit_cb_data): New helper struct.
788 (GTM::gtm_transaction::commit_allocations): Handle nested
790 * libitm.texi: Update user action section, add description of nesting.
792 2011-07-28 Torvald Riegel <triegel@redhat.com>
794 * libitm_i.h: Add closed nesting as restart reason.
795 * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Same.
797 2011-07-28 Torvald Riegel <triegel@redhat.com>
799 * useraction.cc: Use vector instead of list to store actions.
800 Also support partial rollbacks for closed nesting.
801 * libitm_i.h (GTM::gtm_transaction::user_action): Same.
804 2011-07-28 Torvald Riegel <triegel@redhat.com>
806 * dispatch.h (GTM::abi_dispatch): Add can_run_uninstrumented_code and
807 closed_nesting flags, as well as a closed nesting alternative.
808 * method-serial.cc: Same.
809 (serial_dispatch): Renamed to serialirr_dispatch.
810 (GTM::dispatch_serialirr): Same.
811 (serial_dispatch_ul): Renamed to serial_dispatch.
812 (GTM::dispatch_serial): Same.
814 2011-07-28 Torvald Riegel <triegel@redhat.com>
816 * libitm.h (_ITM_codeProperties): Change pr_hasElse to the ABI's value.
818 2011-07-28 Torvald Riegel <triegel@redhat.com>
820 * aatree.h (aa_tree::remove): New.
821 (aa_tree::operator new): Add placement new.
823 2011-07-02 Torvald Riegel <triegel@redhat.com>
825 * containers.h: New file.
826 * util.cc (xmalloc, xrealloc): Accept cacheline-alloc flag.
827 * libitm_i.h (xmalloc, xrealloc): Moved declarations from here ...
828 * common.h: ... to here.
829 (local_undo): Use GTM::vector for gtm_transaction::local_undo.
832 2011-06-30 Torvald Riegel <triegel@redhat.com>
834 * libitm_i.h (STATE_ABORTING): Remove.
835 * beginend.cc (_ITM_abortTransaction): Same.
836 (GTM::gtm_transaction::trycommit_and_finalize): Same.
837 * libitm.h (_ITM_registerThrownObject, _ITM_tryCommitTransaction): Remove.
838 (_ITM_rollbackTransaction): Remove.
841 * libitm.texi: Document these ABI changes.
843 2011-06-30 Torvald Riegel <triegel@redhat.com>
845 * libitm.texi: New file.
846 * Makefile.am: Add libitm.texi.
847 * Makefile.in: Rebuild.
849 2011-06-30 Torvald Riegel <triegel@redhat.com>
851 * libitm_i.h: Move parts to common.h and dispatch.h.
852 * common.h: New file.
853 * dispatch.h: New file, new dispatch class.
854 Rename GTM::abi_dispatch::lock_type to ls_modifier.
855 RenameGTM::abi_dispatch::NOLOCK to NONTXNAL.
856 * beginend.cc (GTM::gtm_transaction::begin_transaction): Delegate mode
857 decision to retry.cc.
858 * retry.cc (GTM::gtm_transaction::decide_retry_strategy): Use serial mode
860 (GTM::gtm_transaction::decide_begin_dispatch): Same.
861 * method-serial.cc: Adapt to new dispatch. Add serial mode with undo
863 * barrier.cc: Use new barriers definitions.
864 (abi_dispatch::memmove_overlap_check): New.
865 * config/x86/x86_sse.cc: Same.
866 * config/x86/x86_avx.cc: Same.
867 * Makefile.am: Don't build readonly and wbetl methods, memset.cc and
869 * Makefile.in: Rebuild.
870 * method-readonly.cc: Remove.
871 * method-wbetl.cc: Rename GTM::abi_dispatch::lock_type to ls_modifier.
872 Rename GTM::abi_dispatch::NOLOCK to NONTXNAL.
874 2011-06-30 Torvald Riegel <triegel@redhat.com>
876 * alloc_c.cc (_ITM_dropReferences): Don't support it anymore.
877 * testsuite/libitm.c++/dropref.C: _ITM_dropReferences is expected to fail.
878 * testsuite/libitm.c/dropref-2.c: Same.
879 * testsuite/libitm.c/dropref.c: Same.
881 2011-06-30 Torvald Riegel <triegel@redhat.com>
883 * config/generic/tls.h (gtm_disp): Rename to abi_disp.
884 * config/generic/tls.h (set_gtm_disp): Rename to set_abi_disp.
885 * libitm_i.h: Rename gtm_dispatch to abi_dispatch.
889 * config/generic/tls.h: Same.
890 * config/x86/tls.h: Same.
894 * method-readonly.cc: Same.
895 * method-serial.cc: Same.
896 * method-wbetl.cc: Same.
899 2011-03-03 Richard Henderson <rth@redhat.com>
901 * config/posix/rwlock.cc (write_upgrade): Add missing case.
902 From Patrik Marlier <patrick.marlier@unine.ch>.
904 2011-02-03 Richard Henderson <rth@redhat.com>
906 * acinclude.m4 (LIBITM_CHECK_SIZE_T_MANGLING): New.
907 * configure.ac: Use it.
908 * configure, config.h.in: Rebuild.
909 * alloc_cpp.cc (_ZnwX): Use MANGLE_SIZE_T in constructing the name.
910 (_ZnaX, _ZnwXRKSt9nothrow_t, _ZnaXRKSt9nothrow_t, _ZGTtnwX,
911 _ZGTtnaX, _ZGTtnwXRKSt9nothrow_t, _ZGTtnaXRKSt9nothrow_t): Likewise.
912 * libitm.map: Use wildcards to match size_t mangling.
914 2010-12-14 Richard Henderson <rth@redhat.com>
916 * beginend.cc (GTM::gtm_transaction::begin_transaction): Allocate
917 blocks of TIDs per thread.
918 * config/generic/tls.h (struct gtm_thread): Add local_tid member.
919 (setup_gtm_thr): Return the thread structure.
920 * config/x86/tls.h (setup_gtm_thr): Likewise.
922 2010-12-14 Richard Henderson <rth@redhat.com>
924 * clone.cc (table_lock): Remove.
925 (find_clone): Don't take it.
926 (ExcludeTransaction): New helper class.
927 (_ITM_registerTMCloneTable): Use it.
928 (_ITM_deregisterTMCloneTable): Likewise.
930 2010-12-14 Richard Henderson <rth@redhat.com>
932 * config/x86/tls.h: New file.
934 2010-07-15 Richard Henderson <rth@redhat.com>
936 * Makefile.am (AM_CXXFLAGS): Add -funwind-tables.
937 * Makefile.in: Rebuild.
939 2010-07-13 Aldy Hernandez <aldyh@redhat.com>
941 * method-wbetl.cc (trydropreference): Fix source line.
943 2010-07-13 Aldy Hernandez <aldyh@redhat.com>
945 * libitm.h: Add comment.
946 * libitm_i.h (begin_transaction): Add ITM_REGPARM.
948 2010-07-07 Aldy Hernandez <aldyh@redhat.com>
950 * configure.ac: Call LIBITM_CHECK_64BIT_SYNC_BUILTINS.
951 * beginend.cc (begin_transaction): If 64-bit sync builtins are not
952 available, use pthread mutexes.
953 * acinclude.m4 (LIBITM_CHECK_64BIT_SYNC_BUILTINS): New.
954 * config.h.in: Regenerate.
955 * configure: Regenerate.
957 2010-07-06 Aldy Hernandez <aldyh@redhat.com>
959 * libitm.h (ITM_PURE): Define.
960 Declare _ITM_malloc, _ITM_calloc, and _ITM_free.
962 2010-06-28 Aldy Hernandez <aldyh@redhat.com>
964 * method-wbetl.cc (class wbetl_dispatch): Add trydropreference.
965 (validate): Add comment.
966 (trydropreference): New.
967 * method-readonly.cc (class readonly_dispatch): Add
969 * alloc_c.cc (_ITM_dropReferences): Remove const attribute.
970 Call trydropreference().
971 * libitm.h (_ITM_dropReferences): Remove const attribute.
972 * method-serial.cc (class serial_dispatch): Add trydropreference.
973 * libitm_i.h (struct gtm_dispatch): Add trydropreference.
975 2010-06-28 Aldy Hernandez <aldyh@redhat.com>
977 * memcpy.cc (do_memcpy): Comment.
979 2010-06-25 Aldy Hernandez <aldyh@redhat.com>
981 * barrier.tpl: Add comments throughout.
983 2010-06-24 Aldy Hernandez <aldyh@redhat.com>
985 * method-wbetl.cc (struct w_entry): Add comments.
989 2010-06-24 Aldy Hernandez <aldyh@redhat.com>
991 * alloc_c.cc (_ITM_dropReferences): New.
992 * libitm.map (_ITM_dropReferences): Add.
993 * libitm.h (_ITM_dropReferences): Add transaction_pure attribute.
994 * libitm_i.h (struct gtm_transaction): Declare
995 drop_references_allocations and drop_references_local.
996 * local.cc (rollback_local): Ignore memory when applicable.
997 (drop_references_local): New.
999 2010-06-23 Richard Henderson <rth@redhat.com>
1001 * barrier.tpl, beginend.cc, clone.cc, tls.h, memcpy.cc,
1002 memset.cc, method-serial.cc: Revert the 2010-06-16 change.
1003 * config/x86/target.h (struct gtm_jmpbuf): Change CFA type to void*.
1004 * config/alpha/target.h: Likewise.
1005 * config/generic/tls.cc (gtm_mask_stack): Use it.
1007 2010-06-23 Richard Henderson <rth@redhat.com>
1009 * config/posix/cachepage.cc (gtm_cacheline_page::operator new): Use
1010 a mutex instead of trying a lock-free compare-and-swap on the list.
1011 (gtm_cacheline_page::operator delete): Likewise.
1013 2010-06-16 Richard Henderson <rth@redhat.com>
1015 * method-wbetl.cc (wbetl_dispatch::trycommit): Discard changes
1016 that overlap the libitm stack.
1017 * barrier.tpl: Mark incoming stack.
1018 * beginend.cc (_ITM_rollbackTransaction, _ITM_abortTransaction,
1019 _ITM_commitTransaction, _ITM_commitTransactionEH): Likewise.
1020 * clone.cc (_ITM_getTMCloneOrIrrevocable): Likewise.
1021 * memcpy.cc, memset.cc: Likewise.
1022 * method-serial.cc (_ITM_changeTransactionMode): Likewise.
1023 * config/generic/tls.h (gtm_thread): Add stack_top member.
1024 (gtm_stack_top, set_gtm_stack_top, struct gtm_stack_marker): New.
1025 * libitm_i.h (gtm_mask_stack): Declare.
1026 * config/generic/tls.cc: New file.
1027 * Makefile.am (libitm_la_SOURCES): Add it.
1028 (AM_CXXFLAGS): Turn off exceptions.
1029 * Makefile.in: Rebuild.
1031 2010-06-16 Richard Henderson <rth@redhat.com>
1033 * alloc.cc (struct gtm_alloc_action): Move definition ...
1034 * libitm_i.h: ... here.
1035 (class gtm_transaction): Declare new and delete.
1036 * beginend.cc (alloc_tx): Reformulate as operator new.
1037 (free_tx): Reformulate as operator delete.
1038 * config/generic/tls.h (gtm_thread): Change free_tx member to void *.
1040 2010-06-11 Richard Henderson <rth@redhat.com>
1042 * clone.cc (clone_entry_compare): Fix typo.
1043 From Patrik Marlier <patrick.marlier@unine.ch>.
1045 2010-05-13 Richard Henderson <rth@redhat.com>
1047 * alloc_c.cc (_ITM_malloc, _ITM_calloc, _ITM_free): Wrap functions
1050 2010-05-07 Aldy Hernandez <aldyh@redhat.com>
1052 * libitm_i.h (struct gtm_transaction): Remove
1053 get_allocation_size.
1054 (record_allocation): Remove size parameter.
1055 * libitm.map (_ITM_realloc): Remove.
1056 * alloc_c.cc (_ITM_realloc): Remove.
1057 (_ITM_malloc): Remove size argument to record_allocation.
1058 (_ITM_calloc): Same.
1059 * alloc_cpp.cc (_ZGTtnwm): Same.
1060 (_ZGTtnwmRKSt9nothrow_t): Same.
1062 (_ZGTtnamRKSt9nothrow_t): Same.
1063 * alloc.cc (struct gtm_alloc_action): Remove size.
1064 (get_allocation_size): Remove.
1065 (commit_allocations): Add comment.
1066 (record_allocation): Remove size parameter.
1067 (forget_allocation): Remove set of size.
1069 2010-04-19 Aldy Hernandez <aldyh@redhat.com>
1071 * Makefile.am (abi_version): New.
1072 (AM_CXXFLAGS): Pass abi_version.
1073 * Makefile.in: Regenerate.
1074 * config/x86/unaligned.h: Remove always_inline kludge for vectors.
1076 2010-04-06 Aldy Hernandez <aldyh@redhat.com>
1078 * clone.cc (_ITM_getTMCloneOrIrrevocable): Rename from
1079 _ITM_getTMCloneOrIrrevokable.
1080 * libitm.h (_ITM_getTMCloneOrIrrevocable): Same.
1081 * libitm.map (_ITM_getTMCloneOrIrrevocable): Same.
1083 2010-03-26 Aldy Hernandez <aldyh@redhat.com>
1085 * configure.ac: Remove Linux futex support.
1086 * configure.tgt (config_path): Same.
1087 * Makefile.am: Same.
1088 * config/linux: Remove entire directory.
1089 * configure: Rebuild.
1090 * Makefile.in: Rebuild.
1091 * testsuite/Makefile.in: Rebuild.
1093 2010-03-09 Aldy Hernandez <aldyh@redhat.com>
1095 * retry.cc (decide_retry_strategy): Set state to STATE_SERIAL when
1096 switching to serial mode.
1097 * beginend.cc (trycommit_and_finalize): Unlock serial_lock.
1099 2010-03-03 Aldy Hernandez <aldyh@redhat.com>
1101 * configure.tgt: Add emacs -*- tags.
1102 * barrier.tpl: Same.
1104 2010-02-23 Aldy Hernandez <aldyh@redhat.com>
1106 * Makefile.am: Rename serial.cc to method-serial.cc.
1107 * Makefile.in: Regenerate with automake 1.11.1.
1108 * testsuite/Makefile.in: Same.
1109 * aclocal.m4: Regenerate with aclocal 1.11.1.
1110 * method-serial.cc: Rename from serial.cc.
1111 * libitm_i.h (struct gtm_transaction): Update comment on
1114 2010-02-22 Aldy Hernandez <aldyh@redhat.com>
1116 * libitm_i.h (GTM_longjmp): Add ITM_REGPARM.
1117 * config/linux/rwlock.h (class gtm_rwlock): Add comments.
1119 2010-02-11 Aldy Hernandez <aldyh@redhat.com>
1121 * configure: Rebuild.
1123 2009-11-12 Richard Henderson <rth@redhat.com>
1125 * Rewrite everything in C++.
1127 2009-11-03 Richard Henderson <rth@redhat.com>
1129 * config/x86/x86_sse.c, config/x86/x86_avx.c: New files.
1130 * Makefile.am (libitm_la_SOURCES): Add them.
1131 * configure.ac (ARCH_X86): New conditional.
1132 * Makefile.in, configure: Rebuild.
1133 * configure.tgt: Set up ARCH; do cflags setup at the same time.
1134 Move futex setup into "other system configury" case.
1135 * local.c (rollback_local): Merge into ...
1136 (GTM_rollback_local): ... here.
1137 (GTM_LB): Rename from GTM_alloc_local; do the memcpy here.
1138 (_ITM_LB): Define as an alias to GTM_LB.
1140 2009-11-03 Richard Henderson <rth@redhat.com>
1142 * method-readonly.c: New file.
1143 * Makefile.am (libitm_la_SOURCES): Add it.
1144 * Makefile.in: Rebuild.
1145 * beginend.c (gtm_stmlock_array, gtm_clock): New.
1146 (GTM_begin_transaction): Use dispatch_readonly for read-only txn.
1147 * libitm_i.h (gtm_stmlock, gtm_version): Move from method-wbetl.c.
1148 (GTM_VERSION_MAX, GTM_VERSION_INVALID, gtm_stmlock_owned_p,
1149 gtm_stmlock_set_owned, gtm_stmlock_get_addr,
1150 gtm_stmlock_get_version, gtm_stmlock_set_version, LOCK_ARRAY_SIZE,
1151 gtm_stmlock_array, gtm_get_stmlock, gtm_clock, RESTART_NOT_READONLY,
1152 gtm_get_clock, gtm_inc_clock): New.
1153 * method-wbetl.c (gtm_version, gtm_stmlock, OWNED_MASK, VERSION_MAX,
1154 LOCK_GET_OWNED, LOCK_SET_ADDR, LOCK_GET_ADDR, LOCK_GET_TIMESTAMP,
1155 LOCK_SET_TIMESTAMP, LOCK_ARRAY_SIZE, LOCK_MASK, LOCK_IDX, GET_LOCK,
1156 locks, gclock, CLOCK, GET_CLOCK, FETCH_AND_INC_CLOCK): Remove and
1157 replace uses with new libitm_i.h symbols.
1158 (dispatch_wbetl): Rename from wbetl_dispatch.
1159 * retry.c (GTM_decide_retry_strategy): If RESTART_NOT_READONLY, move
1160 away from dispatch_readonly; abort if the beginTransaction call
1161 asserted that the transaction was readonly.
1163 2009-11-03 Richard Henderson <rth@redhat.com>
1165 * memset.c: New file.
1166 * Makefile.am (libitm_la_SOURCES): Add it.
1167 * Makefile.in: Rebuild.
1168 * testsuite/libitm.c/memset-1.c: New.
1170 2009-11-03 Richard Henderson <rth@redhat.com>
1172 * dispatch.c: Remove file.
1173 * useraction.c (struct gtm_user_action): Move from libitm.h.
1174 * serial.c (GTM_null_read_lock, GTM_null_write_lock): New.
1175 (serial_memset, serial_memmove, serial_memcpy): Remove.
1176 (serial_W*, serial_R*): Remove.
1177 (serial_dispatch): Update to match.
1178 * configure.ac: Move Werror down below configure checks. Don't
1179 check for sys/loadavg.h, do check for malloc.h. Don't check for
1180 getloadavg and clock_gettime; do check for memalign, posix_memalign.
1181 Use GCC_AC_FUNC_MMAP_BLACKLIST
1182 * libitm.h: Split out all internal items to...
1183 * libitm_i.h: ... here. New file.
1184 * copymask.c: New file.
1185 * local.c (struct gtm_local_undo): Move from libitm.h.
1186 (GTM_alloc_local): Rename from alloc_local; export.
1187 * memcpy.c: New file.
1188 * alloc_c.c (_ITM_realloc): Use _ITM_memcpyRnWt directly.
1189 * config/posix/page.c: New file.
1190 * config/posix/target_tls.h: Remove file.
1191 * barrier.c: New file.
1192 * Makefile.am (libitm_la_SOURCES): Add barrier.c, memcpy.c,
1194 * alloc.c (struct gtm_alloc_action): Move from libitm.h.
1195 * method-wbetl.c: Rewrite for new cacheline methods.
1196 * Makefile.in, configure, testsuite/Makefile.in, config.h.in: Rebuild.
1198 * config/alpha/sjlj.S: Fix typo.
1199 * config/alpha/target_i.h: Copy functions from alpha/target.h.
1200 * config/alpha/copymask.c: New file.
1201 * config/alpha/target.h (CACHELINE_SIZE): New.
1202 (STRICT_ALIGNMENT, PAGE_SIZE, FIXED_PAGE_SIZE): New.
1204 * config/x86/target_i.h: Copy functions from x86/target.h.
1205 * config/x86/copymask.c: New file.
1206 * config/x86/target.h (_ITM_ALL_TARGET_TYPES): Remove.
1207 (CACHELINE_SIZE, STRICT_ALIGNMENT): New.
1208 (PAGE_SIZE, FIXED_PAGE_SIZE): New.
1209 * config/x86/target_tls.h: Move contents to target_i.h.
1211 * testsuite/libitm.c/clone-1.c: Include libitm.h.
1212 * testsuite/libitm.c/memcpy-1.c: New.
1214 2009-10-22 Richard Henderson <rth@redhat.com>
1216 * Makefile.am (CCAS, CCASFLAGS, LTCCASCOMPILE): Remove.
1217 (AM_CCASFLAGS): New.
1218 * configure.ac: Add AM_PROG_AS. Use m4_rename_force for
1219 saving/restoring _AC_ARG_VAR_PRECIOUS.
1220 * Makefile.in, aclocal.m4, config.h.in, configure,
1221 testsuite/Makefile.in: Rebuild with automake 1.11; autoconf 2.64.
1223 2009-10-22 Richard Henderson <rth@redhat.com>
1225 * testsuite/*: Update for new compiler syntax.
1227 2009-10-21 Richard Henderson <rth@redhat.com>
1229 * libitm.h (_ITM_abortReason): Add outerAbort.
1231 2009-08-03 Richard Henderson <rth@redhat.com>
1233 * libitm.map (_ITM_commitTransactionEH, _ITM_cxa_allocate_exception,
1234 _ITM_cxa_begin_catch, _ITM_cxa_end_catch, _ITM_cxa_throw): Export.
1235 * method-wbetl.c (struct w_entry): Remove mask.
1236 (wbetl_write, wbetl_load): Return pointer to word containing the data;
1239 2009-07-22 Richard Henderson <rth@redhat.com>
1241 * eh_cpp.c: New file.
1242 * Makefile.am (libitm_la_SOURCES): Add it.
1243 * Makefile.in: Rebuild.
1244 * beginend.c (GTM_rollback_transaction): Undo exception state.
1245 (GTM_trycommit_transaction): Mark inline.
1246 (GTM_trycommit_and_finalize_transaction): Split out from ...
1247 (_ITM_commitTransaction): ... here.
1248 (_ITM_commitTransactionEH): New function.
1249 * libitm.h (struct gtm_transaction): Add cxa_catch_count,
1250 cxa_unthrown, eh_in_flight; reorder.
1252 * testsuite/libitm.c++/c++.exp: New.
1253 * testsuite/libitm.c++/eh-1.C: New.
1255 * aatree.c (aa_free): Remove REGPARM.
1256 * aatree.h: Remove all REGPARM.
1258 2009-07-18 Richard Henderson <rth@redhat.com>
1260 * aatree.c, aatree.h, alloc.c, alloc_c.c, alloc_cpp.c: New files.
1261 * Makefile.am (libitm_la_SOURCES): Add them.
1262 * Makefile.in: Rebuild.
1263 * beginend.c (GTM_rollback_transaction): Use GTM_commit_allocations.
1264 (GTM_trycommit_transaction): Likewise.
1265 * libitm.h: Include aatree.h
1266 (struct gtm_alloc_action): New.
1267 (struct gtm_transaction): Add alloc_actions.
1268 (GTM_record_allocation, GTM_forget_allocation): Declare.
1269 (GTM_get_allocation_size, GTM_commit_allocations): Declare.
1270 * libitm.map (_ITM_malloc, _ITM_calloc, _ITM_realloc, _ITM_free,
1271 _ZGTtnwm, _ZGTtnam, _ZGTtdlPv, _ZGTtdaPv, _ZGTtnwmRKSt9nothrow_t,
1272 _ZGTtnamRKSt9nothrow_t, _ZGTtdlPvRKSt9nothrow_t,
1273 _ZGTtdaPvRKSt9nothrow_t): Export.
1275 2009-07-18 Richard Henderson <rth@redhat.com>
1277 * target_tls.h: Move ...
1278 * config/posix/target_tls.h: ... here.
1280 2009-07-07 Richard Henderson <rth@redhat.com>
1282 * config/x86/target.h (atomic_write_barrier): Use sfence if available.
1284 2009-07-07 Richard Henderson <rth@redhat.com>
1288 2009-07-07 Richard Henderson <rth@redhat.com>
1290 * libitm.h (struct gtm_transaction): Widen id to _ITM_transactionId_t.
1291 * beginend.c (global_tid): Widen to _ITM_transactionId_t.
1293 * configure.tgt: Don't use -ftls-model for x86 linux.
1294 * libitm.h: Include target.h after standard includes.
1295 (_gtm_thr): Rename from gtm_thr.
1296 (setup_gtm_thr, gtm_thr, gtm_tx, set_gtm_tx): New.
1297 (gtm_disp, set_gtm_disp): New.
1298 * beginend.c, dispatch.c, local.c, method-wbetl.c, query.c,
1299 retry.c, serial.c, useraction.c: Use accessor functions throughout.
1300 * config/alpha/target_tls.h, config/x86/target_tls.h: New files.
1302 2009-07-07 Richard Henderson <rth@redhat.com>
1304 * config/linux/rwlock.c (EZ): New define. Use it throughout.
1306 2009-07-06 Richard Henderson <rth@redhat.com>
1308 * libitm.h (_ITM_SRCLOCATION_DECL_1, _ITM_SRCLOCATION_DECL_2): Remove.
1309 (_ITM_SRCLOCATION_DEFN_1, _ITM_SRCLOCATION_DEFN_2): Remove.
1310 (_ITM_beginTransaction): Take variadic arguments.
1311 (_ITM_registerThrownObject): Declare.
1312 * beginend.c, serial.c: Update.
1313 * libitm.map: Add _ITM_registerThrownObject.
1315 2009-01-28 Richard Henderson <rth@redhat.com>
1317 * Makefile.am (libitm_la_SOURCES): Add clone.c.
1318 * Makefile.in: Rebuild.
1319 * beginend.c (_ITM_abortTransaction): Abort if irrevokable.
1320 (GTM_restart_transaction): Fix uninstrumented code check.
1321 * retry.c (GTM_decide_retry_strategy): Add serial check.
1322 * serial.c (GTM_serialmode): Add irrevokable variable. Don't
1323 automatically go irrevokable when in serial mode.
1324 * clone.c: New file.
1325 * libitm.h, libitm.map: Update.
1327 2009-01-27 Richard Henderson <rth@redhat.com>
1329 * Makefile.am (LTCCASCOMPILE): Define.
1330 (libitm_la_SOURCES): Add methid-wbetl.c.
1331 * testsuite/Makefile.am: New
1332 * configure.ac: Add testsuite/Makefile.
1333 * Makefile.in, testsuite/Makefile.in, configure: Regenerate.
1334 * beginend.c (GTM_begin_transaction): Install wbetl_dispatch.
1335 (_ITM_abortTransaction): Finalize implementation method; pass
1336 transaction properties to longjmp.
1337 (GTM_restart_transaction): Split out from ...
1338 (_ITM_commitTransaction): ... here.
1339 * config/linux/x86/futex_bits.h (cpu_relax, atomic_write_barrier):
1340 Move to config/x86/target.h.
1341 * config/linux/alpha/futex_bits.h: New.
1342 * config/x86/sjlj.S (GTM_longjmp): Fix 64-bit input register.
1343 * config/x86/target.h: Disable target types for 32-bit.
1344 * config/alpha/sjlj.S, config/alpha/target.h: New.
1345 * libitm.h (struct gtm_dispatch): Add init, fini.
1346 (enum restart_reason): New.
1347 (struct gtm_transaction): Add method and restarts.
1348 * retry.c (GTM_decide_retry_strategy): Implement.
1349 * serial.c (serial_init, serial_fini): New.
1350 (GTM_serialmode): Finialize outgoing method.
1351 * method-wbetl.c: New.
1353 2008-12-09 Richard Henderson <rth@redhat.com>
1355 * config/x86/target.h (_ITM_ALL_TARGET_TYPES, _ITM_TYPE_ATTR): New.
1356 * configure.tgt (i386-*, x86_64-*): Don't force SSE.
1357 * dispatch.c (_ITM_##R##T, _ITM_##W##T): Use _ITM_TYPE_ATTR.
1358 * libitm.h (_ITM_ALL_TARGET_TYPES, _ITM_TYPE_ATTR): Provide default.
1359 (_ITM_TYPE_M64, _ITM_TYPE_M128, _ITM_TYPE_M256): Move to x86 header.
1360 (_ITM_ALL_TYPES): Use _ITM_ALL_TARGET_TYPES.
1361 * local.c (_ITM_L##T): Use _ITM_TYPE_ATTR.
1362 * serial.c (serial_R##T, serial_W##T): Likewise.
1364 2008-11-21 Richard Henderson <rth@redhat.com>