8
8
diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
9
9
--- a/storage/innobase/handler/ha_innodb.cc 2010-12-03 17:34:35.285040381 +0900
10
10
+++ b/storage/innobase/handler/ha_innodb.cc 2010-12-03 17:35:12.974975252 +0900
12
12
rw_lock_wait_time += mutex->lspent_time;
14
14
#else /* UNIV_DEBUG */
15
15
- buf1len= (uint) my_snprintf(buf1, sizeof(buf1), "%s:%lu",
16
- mutex->cfile_name, (ulong) mutex->cline);
16
- innobase_basename(mutex->cfile_name),
17
- (ulong) mutex->cline);
17
18
+ buf1len= (uint) my_snprintf(buf1, sizeof(buf1), "%s",
18
19
+ mutex->cmutex_name);
19
20
buf2len= (uint) my_snprintf(buf2, sizeof(buf2), "os_waits=%lu",
20
21
(ulong) mutex->count_os_wait);
23
@@ -9605,10 +9604,8 @@
25
26
buf1len = (uint) my_snprintf(buf1, sizeof buf1,
26
27
- "combined %s:%lu",
27
- block_mutex->cfile_name,
29
- block_mutex->cfile_name),
28
30
- (ulong) block_mutex->cline);
30
32
+ block_mutex->cmutex_name);
31
33
buf2len = (uint) my_snprintf(buf2, sizeof buf2,
33
35
(ulong) block_mutex_oswait_count);
38
40
- buf1len = my_snprintf(buf1, sizeof buf1, "%s:%lu",
39
- lock->cfile_name, (ulong) lock->cline);
41
- innobase_basename(lock->cfile_name),
42
- (ulong) lock->cline);
40
43
+ buf1len = my_snprintf(buf1, sizeof buf1, "%s",
41
44
+ lock->lock_name);
42
45
buf2len = my_snprintf(buf2, sizeof buf2, "os_waits=%lu",
43
46
(ulong) lock->count_os_wait);
48
@@ -9653,10 +9649,8 @@
48
51
buf1len = (uint) my_snprintf(buf1, sizeof buf1,
49
52
- "combined %s:%lu",
50
- block_lock->cfile_name,
54
- block_lock->cfile_name),
51
55
- (ulong) block_lock->cline);
53
57
+ block_lock->lock_name);
174
178
diff -ruN a/storage/innobase/include/sync0sync.h b/storage/innobase/include/sync0sync.h
175
179
--- a/storage/innobase/include/sync0sync.h 2010-12-03 15:49:59.227955503 +0900
176
180
+++ b/storage/innobase/include/sync0sync.h 2010-12-03 17:35:12.982023946 +0900
177
@@ -159,14 +159,14 @@
181
@@ -158,14 +158,14 @@
178
182
# ifdef UNIV_DEBUG
179
183
# ifdef UNIV_SYNC_DEBUG
180
184
# define mutex_create(K, M, level) \
228
232
/******************************************************************//**
229
233
NOTE! Use the corresponding macro mutex_free(), not directly this function!
230
@@ -292,13 +292,13 @@
234
@@ -291,13 +291,13 @@
231
235
PSI_mutex_key key, /*!< in: Performance Schema key */
232
236
mutex_t* mutex, /*!< in: pointer to memory */
233
237
# ifdef UNIV_DEBUG
244
248
/******************************************************************//**
245
249
NOTE! Please use the corresponding macro mutex_enter(), not directly
248
252
ulint line; /*!< Line where the mutex was locked */
249
253
ulint level; /*!< Level in the global latching order */
250
254
#endif /* UNIV_SYNC_DEBUG */
255
259
os_thread_id_t thread_id; /*!< The thread id of the thread
256
260
which locked the mutex. */
257
261
ulint magic_n; /*!< MUTEX_MAGIC_N */
259
263
ulong count_os_yield; /*!< count of os_wait */
260
264
ulonglong lspent_time; /*!< mutex os_wait timer msec */
261
265
ulonglong lmax_spent_time;/*!< mutex os_wait timer msec */
316
320
"Last time reserved in file %s line %lu, "
317
321
#endif /* UNIV_SYNC_DEBUG */
318
322
"waiters flag %lu\n",
319
- (void*) mutex, mutex->cfile_name, (ulong) mutex->cline,
323
- (void*) mutex, innobase_basename(mutex->cfile_name),
324
- (ulong) mutex->cline,
320
325
+ (void*) mutex, mutex->cmutex_name,
321
326
(ulong) mutex->lock_word,
322
327
#ifdef UNIV_SYNC_DEBUG
323
328
mutex->file_name, (ulong) mutex->line,
325
330
rwlock = cell->old_wait_rw_lock;
328
333
- " RW-latch at %p created in file %s line %lu\n",
329
- (void*) rwlock, rwlock->cfile_name,
334
- (void*) rwlock, innobase_basename(rwlock->cfile_name),
330
335
- (ulong) rwlock->cline);
331
336
+ " RW-latch at %p '%s'\n",
332
337
+ (void*) rwlock, rwlock->lock_name);
336
341
diff -ruN a/storage/innobase/sync/sync0rw.c b/storage/innobase/sync/sync0rw.c
337
342
--- a/storage/innobase/sync/sync0rw.c 2010-11-03 07:01:13.000000000 +0900
338
343
+++ b/storage/innobase/sync/sync0rw.c 2010-12-03 17:35:12.987029059 +0900
339
@@ -241,10 +241,10 @@
344
@@ -242,10 +242,10 @@
340
345
# ifdef UNIV_SYNC_DEBUG
341
346
ulint level, /*!< in: level */
342
347
# endif /* UNIV_SYNC_DEBUG */
388
393
+ " '%s' rnds %lu\n",
389
394
(ulong) os_thread_pf(os_thread_get_curr_id()),
391
- lock->cfile_name, (ulong) lock->cline, (ulong) i);
396
- innobase_basename(lock->cfile_name),
397
- (ulong) lock->cline, (ulong) i);
392
398
+ lock->lock_name, (ulong) i);
395
401
/* We try once again to obtain the lock */
397
403
if (srv_print_latch_waits) {
399
405
"Thread %lu OS wait rw-s-lock at %p"
400
406
- " cfile %s cline %lu\n",
402
408
os_thread_pf(os_thread_get_curr_id()),
403
- (void*) lock, lock->cfile_name,
410
- innobase_basename(lock->cfile_name),
404
411
- (ulong) lock->cline);
405
412
+ (void*) lock, lock->lock_name);
408
415
/* these stats may not be accurate */
410
417
if (srv_print_latch_waits) {
412
419
"Thread %lu spin wait rw-x-lock at %p"
413
420
- " cfile %s cline %lu rnds %lu\n",
414
421
+ " '%s' rnds %lu\n",
415
422
os_thread_pf(os_thread_get_curr_id()), (void*) lock,
416
- lock->cfile_name, (ulong) lock->cline, (ulong) i);
423
- innobase_basename(lock->cfile_name),
424
- (ulong) lock->cline, (ulong) i);
417
425
+ lock->lock_name, (ulong) i);
420
428
sync_array_reserve_cell(sync_primary_wait_array,
422
430
if (srv_print_latch_waits) {
424
432
"Thread %lu OS wait for rw-x-lock at %p"
425
433
- " cfile %s cline %lu\n",
427
435
os_thread_pf(os_thread_get_curr_id()), (void*) lock,
428
- lock->cfile_name, (ulong) lock->cline);
436
- innobase_basename(lock->cfile_name),
437
- (ulong) lock->cline);
429
438
+ lock->lock_name);
465
474
mutex->count_using= 0;
466
475
mutex->mutex_type= 0;
467
476
mutex->lspent_time= 0;
469
478
#ifdef UNIV_SRV_PRINT_LATCH_WAITS
471
480
"Thread %lu spin wait mutex at %p"
472
481
- " cfile %s cline %lu rnds %lu\n",
473
482
+ " '%s' rnds %lu\n",
474
483
(ulong) os_thread_pf(os_thread_get_curr_id()), (void*) mutex,
475
- mutex->cfile_name, (ulong) mutex->cline, (ulong) i);
484
- innobase_basename(mutex->cfile_name),
485
- (ulong) mutex->cline, (ulong) i);
476
486
+ mutex->cmutex_name, (ulong) i);
479
489
mutex_spin_round_count += i;
482
492
#ifdef UNIV_SRV_PRINT_LATCH_WAITS
484
494
- "Thread %lu OS wait mutex at %p cfile %s cline %lu rnds %lu\n",
485
495
+ "Thread %lu OS wait mutex at %p '%s' rnds %lu\n",
486
496
(ulong) os_thread_pf(os_thread_get_curr_id()), (void*) mutex,
487
- mutex->cfile_name, (ulong) mutex->cline, (ulong) i);
497
- innobase_basename(mutex->cfile_name),
498
- (ulong) mutex->cline, (ulong) i);
488
499
+ mutex->cmutex_name, (ulong) i);
491
502
mutex_os_wait_count++;
494
505
if (mutex->magic_n == MUTEX_MAGIC_N) {
496
507
- "Mutex created at %s %lu\n",
497
- mutex->cfile_name, (ulong) mutex->cline);
508
- innobase_basename(mutex->cfile_name),
509
- (ulong) mutex->cline);
498
510
+ "Mutex '%s'\n",
499
511
+ mutex->cmutex_name);