From d34a67b067606f61c9ec6700769770418d5bb47d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 19 Apr 2017 22:30:18 +0300 Subject: MDEV-12534 Use atomic operations whenever available Allow 64-bit atomic operations on 32-bit systems, only relying on HAVE_ATOMIC_BUILTINS_64, disregarding the width of the register file. Define UNIV_WORD_SIZE correctly on all systems, including Windows. In MariaDB 10.0 and 10.1, it was incorrectly defined as 4 on 64-bit Windows. Define HAVE_ATOMIC_BUILTINS_64 on Windows (64-bit atomics are available on both 32-bit and 64-bit Windows platforms; the operations were unnecessarily disabled even on 64-bit Windows). MONITOR_OS_PENDING_READS, MONITOR_OS_PENDING_WRITES: Enable by default. os_file_n_pending_preads, os_file_n_pending_pwrites, os_n_pending_reads, os_n_pending_writes: Remove. Use the monitor counters instead. os_file_count_mutex: Remove. On a system that does not support 64-bit atomics, monitor_mutex will be used instead. --- storage/xtradb/sync/sync0arr.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'storage/xtradb/sync') diff --git a/storage/xtradb/sync/sync0arr.cc b/storage/xtradb/sync/sync0arr.cc index e16eddae80c..7325cb49145 100644 --- a/storage/xtradb/sync/sync0arr.cc +++ b/storage/xtradb/sync/sync0arr.cc @@ -1161,9 +1161,10 @@ sync_array_print_long_waits( now the values of pending calls of these. */ fprintf(stderr, - "InnoDB: Pending preads %lu, pwrites %lu\n", - (ulong) os_file_n_pending_preads, - (ulong) os_file_n_pending_pwrites); + "InnoDB: Pending reads " UINT64PF + ", writes " UINT64PF "\n", + MONITOR_VALUE(MONITOR_OS_PENDING_READS), + MONITOR_VALUE(MONITOR_OS_PENDING_WRITES)); srv_print_innodb_monitor = TRUE; os_event_set(srv_monitor_event); -- cgit v1.2.1 From 7d0ac3ade7fb9f1276e87faa7099832d01329200 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Mon, 24 Apr 2017 13:02:08 +1000 Subject: MDEV-12488: Remove type mismatch in InnoDB printf-like calls To fix OSX error: /Users/travis/build/grooverdan/mariadb-server/storage/xtradb/sync/sync0arr.cc:530:5: warning: format specifies type 'unsigned long' but the argument has type 'os_thread_id_t' (aka '_opaque_pthread_t *') [-Wformat] mutex->thread_id, ^~~~~~~~~~~~~~~~ Signed-off-by: Daniel Black --- storage/xtradb/sync/sync0arr.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'storage/xtradb/sync') diff --git a/storage/xtradb/sync/sync0arr.cc b/storage/xtradb/sync/sync0arr.cc index ae8032da167..134d16ae58e 100644 --- a/storage/xtradb/sync/sync0arr.cc +++ b/storage/xtradb/sync/sync0arr.cc @@ -527,7 +527,7 @@ sync_array_cell_print( "waiters flag " ULINTPF "\n", (void*) mutex, mutex->cmutex_name, (ulong) mutex->lock_word, - mutex->thread_id, + os_thread_pf(mutex->thread_id), mutex->file_name, mutex->line, mutex->waiters); } -- cgit v1.2.1