]> git.pld-linux.org Git - packages/mysql.git/blame - innodb_show_lock_name.patch
- more mysqld.conf changes: skip-locking, default-character-set
[packages/mysql.git] / innodb_show_lock_name.patch
CommitLineData
b4e1fa2c
AM
1# name : innodb_show_lock_name.patch
2# introduced : 11 or before
3# maintainer : Yasufumi
4#
5#!!! notice !!!
6# Any small change to this file in the main branch
7# should be done or reviewed by the maintainer!
8diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
9--- a/storage/innobase/handler/ha_innodb.cc 2010-12-03 17:34:35.285040381 +0900
10+++ b/storage/innobase/handler/ha_innodb.cc 2010-12-03 17:35:12.974975252 +0900
d8778560 11@@ -9498,8 +9498,8 @@
b4e1fa2c
AM
12 rw_lock_wait_time += mutex->lspent_time;
13 }
14 #else /* UNIV_DEBUG */
15- buf1len= (uint) my_snprintf(buf1, sizeof(buf1), "%s:%lu",
16- mutex->cfile_name, (ulong) mutex->cline);
17+ buf1len= (uint) my_snprintf(buf1, sizeof(buf1), "%s",
18+ mutex->cmutex_name);
19 buf2len= (uint) my_snprintf(buf2, sizeof(buf2), "os_waits=%lu",
20 (ulong) mutex->count_os_wait);
21
d8778560 22@@ -9514,9 +9514,8 @@
b4e1fa2c
AM
23
24 if (block_mutex) {
25 buf1len = (uint) my_snprintf(buf1, sizeof buf1,
26- "combined %s:%lu",
27- block_mutex->cfile_name,
28- (ulong) block_mutex->cline);
29+ "combined %s",
30+ block_mutex->cmutex_name);
31 buf2len = (uint) my_snprintf(buf2, sizeof buf2,
32 "os_waits=%lu",
33 (ulong) block_mutex_oswait_count);
d8778560 34@@ -9545,8 +9544,8 @@
b4e1fa2c
AM
35 continue;
36 }
37
38- buf1len = my_snprintf(buf1, sizeof buf1, "%s:%lu",
39- lock->cfile_name, (ulong) lock->cline);
40+ buf1len = my_snprintf(buf1, sizeof buf1, "%s",
41+ lock->lock_name);
42 buf2len = my_snprintf(buf2, sizeof buf2, "os_waits=%lu",
43 (ulong) lock->count_os_wait);
44
d8778560 45@@ -9560,9 +9559,8 @@
b4e1fa2c
AM
46
47 if (block_lock) {
48 buf1len = (uint) my_snprintf(buf1, sizeof buf1,
49- "combined %s:%lu",
50- block_lock->cfile_name,
51- (ulong) block_lock->cline);
52+ "combined %s",
53+ block_lock->lock_name);
54 buf2len = (uint) my_snprintf(buf2, sizeof buf2,
55 "os_waits=%lu",
56 (ulong) block_lock_oswait_count);
57diff -ruN a/storage/innobase/include/sync0rw.h b/storage/innobase/include/sync0rw.h
58--- a/storage/innobase/include/sync0rw.h 2010-12-03 15:49:59.225953164 +0900
59+++ b/storage/innobase/include/sync0rw.h 2010-12-03 17:35:12.978024458 +0900
d8778560
AM
60@@ -138,14 +138,14 @@
61 # ifdef UNIV_DEBUG
62 # ifdef UNIV_SYNC_DEBUG
63 # define rw_lock_create(K, L, level) \
64- rw_lock_create_func((L), (level), #L, __FILE__, __LINE__)
65+ rw_lock_create_func((L), (level), __FILE__, __LINE__, #L)
66 # else /* UNIV_SYNC_DEBUG */
67 # define rw_lock_create(K, L, level) \
68- rw_lock_create_func((L), #L, __FILE__, __LINE__)
69+ rw_lock_create_func((L), __FILE__, __LINE__, #L)
b4e1fa2c
AM
70 # endif/* UNIV_SYNC_DEBUG */
71 # else /* UNIV_DEBUG */
72 # define rw_lock_create(K, L, level) \
73- rw_lock_create_func((L), __FILE__, __LINE__)
d8778560 74+ rw_lock_create_func((L), #L)
b4e1fa2c
AM
75 # endif /* UNIV_DEBUG */
76
77 /**************************************************************//**
d8778560
AM
78@@ -191,14 +191,14 @@
79 # ifdef UNIV_DEBUG
80 # ifdef UNIV_SYNC_DEBUG
81 # define rw_lock_create(K, L, level) \
82- pfs_rw_lock_create_func((K), (L), (level), #L, __FILE__, __LINE__)
83+ pfs_rw_lock_create_func((K), (L), (level), __FILE__, __LINE__, #L)
84 # else /* UNIV_SYNC_DEBUG */
85 # define rw_lock_create(K, L, level) \
86- pfs_rw_lock_create_func((K), (L), #L, __FILE__, __LINE__)
87+ pfs_rw_lock_create_func((K), (L), __FILE__, __LINE__, #L)
b4e1fa2c
AM
88 # endif/* UNIV_SYNC_DEBUG */
89 # else /* UNIV_DEBUG */
90 # define rw_lock_create(K, L, level) \
91- pfs_rw_lock_create_func((K), (L), __FILE__, __LINE__)
d8778560 92+ pfs_rw_lock_create_func((K), (L), #L)
b4e1fa2c
AM
93 # endif /* UNIV_DEBUG */
94
95 /******************************************************************
d8778560 96@@ -256,10 +256,10 @@
b4e1fa2c
AM
97 # ifdef UNIV_SYNC_DEBUG
98 ulint level, /*!< in: level */
99 # endif /* UNIV_SYNC_DEBUG */
100- const char* cmutex_name, /*!< in: mutex name */
d8778560 101-#endif /* UNIV_DEBUG */
b4e1fa2c 102 const char* cfile_name, /*!< in: file name where created */
d8778560
AM
103- ulint cline); /*!< in: file line where created */
104+ ulint cline, /*!< in: file line where created */
105+#endif /* UNIV_DEBUG */
106+ const char* cmutex_name); /*!< in: mutex name */
b4e1fa2c 107 /******************************************************************//**
d8778560
AM
108 Calling this function is obligatory only if the memory buffer containing
109 the rw-lock is freed. Removes an rw-lock object from the global list. The
110@@ -610,7 +610,8 @@
b4e1fa2c
AM
111 struct PSI_rwlock *pfs_psi;/*!< The instrumentation hook */
112 #endif
113 ulint count_os_wait; /*!< Count of os_waits. May not be accurate */
114- const char* cfile_name;/*!< File name where lock created */
115+ //const char* cfile_name;/*!< File name where lock created */
116+ const char* lock_name;/*!< lock name */
117 /* last s-lock file/line is not guaranteed to be correct */
118 const char* last_s_file_name;/*!< File name where last s-locked */
119 const char* last_x_file_name;/*!< File name where last x-locked */
d8778560 120@@ -621,7 +622,7 @@
b4e1fa2c
AM
121 are at the start of this struct, thus we can
122 peek this field without causing much memory
123 bus traffic */
124- unsigned cline:14; /*!< Line where created */
125+ //unsigned cline:14; /*!< Line where created */
126 unsigned last_s_line:14; /*!< Line number where last time s-locked */
127 unsigned last_x_line:14; /*!< Line number where last time x-locked */
128 #ifdef UNIV_DEBUG
d8778560 129@@ -691,10 +692,10 @@
b4e1fa2c
AM
130 # ifdef UNIV_SYNC_DEBUG
131 ulint level, /*!< in: level */
132 # endif /* UNIV_SYNC_DEBUG */
133- const char* cmutex_name, /*!< in: mutex name */
d8778560 134-#endif /* UNIV_DEBUG */
b4e1fa2c 135 const char* cfile_name, /*!< in: file name where created */
d8778560
AM
136- ulint cline); /*!< in: file line where created */
137+ ulint cline, /*!< in: file line where created */
138+#endif /* UNIV_DEBUG */
139+ const char* cmutex_name); /*!< in: mutex name */
b4e1fa2c 140
d8778560
AM
141 /******************************************************************//**
142 Performance schema instrumented wrap function for rw_lock_x_lock_func()
b4e1fa2c
AM
143diff -ruN a/storage/innobase/include/sync0rw.ic b/storage/innobase/include/sync0rw.ic
144--- a/storage/innobase/include/sync0rw.ic 2010-11-03 07:01:13.000000000 +0900
145+++ b/storage/innobase/include/sync0rw.ic 2010-12-03 17:35:12.980024605 +0900
d8778560 146@@ -640,10 +640,10 @@
b4e1fa2c
AM
147 # ifdef UNIV_SYNC_DEBUG
148 ulint level, /*!< in: level */
149 # endif /* UNIV_SYNC_DEBUG */
150- const char* cmutex_name, /*!< in: mutex name */
d8778560 151-# endif /* UNIV_DEBUG */
b4e1fa2c 152 const char* cfile_name, /*!< in: file name where created */
d8778560
AM
153- ulint cline) /*!< in: file line where created */
154+ ulint cline, /*!< in: file line where created */
155+# endif /* UNIV_DEBUG */
156+ const char* cmutex_name) /*!< in: mutex name */
b4e1fa2c 157 {
d8778560
AM
158 /* Initialize the rwlock for performance schema */
159 lock->pfs_psi = (PSI_server && PFS_IS_INSTRUMENTED(key))
160@@ -656,10 +656,10 @@
b4e1fa2c
AM
161 # ifdef UNIV_SYNC_DEBUG
162 level,
163 # endif /* UNIV_SYNC_DEBUG */
164- cmutex_name,
d8778560 165-# endif /* UNIV_DEBUG */
b4e1fa2c 166 cfile_name,
d8778560
AM
167- cline);
168+ cline,
169+# endif /* UNIV_DEBUG */
170+ cmutex_name);
b4e1fa2c 171 }
d8778560
AM
172 /******************************************************************//**
173 Performance schema instrumented wrap function for rw_lock_x_lock_func()
b4e1fa2c
AM
174diff -ruN a/storage/innobase/include/sync0sync.h b/storage/innobase/include/sync0sync.h
175--- a/storage/innobase/include/sync0sync.h 2010-12-03 15:49:59.227955503 +0900
176+++ b/storage/innobase/include/sync0sync.h 2010-12-03 17:35:12.982023946 +0900
d8778560
AM
177@@ -159,14 +159,14 @@
178 # ifdef UNIV_DEBUG
179 # ifdef UNIV_SYNC_DEBUG
180 # define mutex_create(K, M, level) \
181- pfs_mutex_create_func((K), (M), #M, (level), __FILE__, __LINE__)
182+ pfs_mutex_create_func((K), (M), (level), __FILE__, __LINE__, #M)
183 # else
184 # define mutex_create(K, M, level) \
185- pfs_mutex_create_func((K), (M), #M, __FILE__, __LINE__)
186+ pfs_mutex_create_func((K), (M), __FILE__, __LINE__, #M)
b4e1fa2c
AM
187 # endif/* UNIV_SYNC_DEBUG */
188 # else
189 # define mutex_create(K, M, level) \
190- pfs_mutex_create_func((K), (M), __FILE__, __LINE__)
d8778560 191+ pfs_mutex_create_func((K), (M), #M)
b4e1fa2c
AM
192 # endif /* UNIV_DEBUG */
193
194 # define mutex_enter(M) \
d8778560
AM
195@@ -186,14 +186,14 @@
196 # ifdef UNIV_DEBUG
197 # ifdef UNIV_SYNC_DEBUG
198 # define mutex_create(K, M, level) \
199- mutex_create_func((M), #M, (level), __FILE__, __LINE__)
200+ mutex_create_func((M), (level), __FILE__, __LINE__, #M)
201 # else /* UNIV_SYNC_DEBUG */
202 # define mutex_create(K, M, level) \
203- mutex_create_func((M), #M, __FILE__, __LINE__)
204+ mutex_create_func((M), __FILE__, __LINE__, #M)
b4e1fa2c
AM
205 # endif /* UNIV_SYNC_DEBUG */
206 # else /* UNIV_DEBUG */
207 # define mutex_create(K, M, level) \
208- mutex_create_func((M), __FILE__, __LINE__)
d8778560 209+ mutex_create_func((M), #M)
b4e1fa2c
AM
210 # endif /* UNIV_DEBUG */
211
212 # define mutex_enter(M) mutex_enter_func((M), __FILE__, __LINE__)
d8778560 213@@ -218,13 +218,13 @@
b4e1fa2c
AM
214 /*==============*/
215 mutex_t* mutex, /*!< in: pointer to memory */
d8778560
AM
216 #ifdef UNIV_DEBUG
217- const char* cmutex_name, /*!< in: mutex name */
b4e1fa2c
AM
218 # ifdef UNIV_SYNC_DEBUG
219 ulint level, /*!< in: level */
220 # endif /* UNIV_SYNC_DEBUG */
d8778560
AM
221-#endif /* UNIV_DEBUG */
222 const char* cfile_name, /*!< in: file name where created */
223- ulint cline); /*!< in: file line where created */
224+ ulint cline, /*!< in: file line where created */
225+#endif /* UNIV_DEBUG */
226+ const char* cmutex_name); /*!< in: mutex name */
227
228 /******************************************************************//**
229 NOTE! Use the corresponding macro mutex_free(), not directly this function!
230@@ -292,13 +292,13 @@
b4e1fa2c
AM
231 PSI_mutex_key key, /*!< in: Performance Schema key */
232 mutex_t* mutex, /*!< in: pointer to memory */
d8778560
AM
233 # ifdef UNIV_DEBUG
234- const char* cmutex_name, /*!< in: mutex name */
b4e1fa2c
AM
235 # ifdef UNIV_SYNC_DEBUG
236 ulint level, /*!< in: level */
237 # endif /* UNIV_SYNC_DEBUG */
d8778560
AM
238-# endif /* UNIV_DEBUG */
239 const char* cfile_name, /*!< in: file name where created */
240- ulint cline); /*!< in: file line where created */
241+ ulint cline, /*!< in: file line where created */
242+# endif /* UNIV_DEBUG */
243+ const char* cmutex_name);
244 /******************************************************************//**
245 NOTE! Please use the corresponding macro mutex_enter(), not directly
246 this function!
b4e1fa2c
AM
247@@ -723,9 +723,9 @@
248 ulint line; /*!< Line where the mutex was locked */
249 ulint level; /*!< Level in the global latching order */
250 #endif /* UNIV_SYNC_DEBUG */
251+#ifdef UNIV_DEBUG
252 const char* cfile_name;/*!< File name where mutex created */
253 ulint cline; /*!< Line where created */
254-#ifdef UNIV_DEBUG
255 os_thread_id_t thread_id; /*!< The thread id of the thread
256 which locked the mutex. */
257 ulint magic_n; /*!< MUTEX_MAGIC_N */
258@@ -740,9 +740,9 @@
259 ulong count_os_yield; /*!< count of os_wait */
260 ulonglong lspent_time; /*!< mutex os_wait timer msec */
261 ulonglong lmax_spent_time;/*!< mutex os_wait timer msec */
262- const char* cmutex_name; /*!< mutex name */
263 ulint mutex_type; /*!< 0=usual mutex, 1=rw_lock mutex */
264 #endif /* UNIV_DEBUG */
265+ const char* cmutex_name; /*!< mutex name */
266 #ifdef UNIV_PFS_MUTEX
267 struct PSI_mutex* pfs_psi; /*!< The performance schema
268 instrumentation hook */
269diff -ruN a/storage/innobase/include/sync0sync.ic b/storage/innobase/include/sync0sync.ic
270--- a/storage/innobase/include/sync0sync.ic 2010-11-03 07:01:13.000000000 +0900
271+++ b/storage/innobase/include/sync0sync.ic 2010-12-03 17:35:12.984024599 +0900
d8778560 272@@ -321,13 +321,13 @@
b4e1fa2c
AM
273 mysql_pfs_key_t key, /*!< in: Performance Schema key */
274 mutex_t* mutex, /*!< in: pointer to memory */
d8778560
AM
275 # ifdef UNIV_DEBUG
276- const char* cmutex_name, /*!< in: mutex name */
b4e1fa2c
AM
277 # ifdef UNIV_SYNC_DEBUG
278 ulint level, /*!< in: level */
279 # endif /* UNIV_SYNC_DEBUG */
d8778560
AM
280-# endif /* UNIV_DEBUG */
281 const char* cfile_name, /*!< in: file name where created */
282- ulint cline) /*!< in: file line where created */
283+ ulint cline, /*!< in: file line where created */
284+# endif /* UNIV_DEBUG */
285+ const char* cmutex_name) /*!< in: mutex name */
286 {
287 mutex->pfs_psi = (PSI_server && PFS_IS_INSTRUMENTED(key))
288 ? PSI_server->init_mutex(key, mutex)
289@@ -335,13 +335,13 @@
b4e1fa2c
AM
290
291 mutex_create_func(mutex,
d8778560
AM
292 # ifdef UNIV_DEBUG
293- cmutex_name,
b4e1fa2c
AM
294 # ifdef UNIV_SYNC_DEBUG
295 level,
296 # endif /* UNIV_SYNC_DEBUG */
d8778560
AM
297-# endif /* UNIV_DEBUG */
298 cfile_name,
299- cline);
300+ cline,
301+# endif /* UNIV_DEBUG */
302+ cmutex_name);
303 }
304 /******************************************************************//**
305 NOTE! Please use the corresponding macro mutex_free(), not directly
b4e1fa2c
AM
306diff -ruN a/storage/innobase/sync/sync0arr.c b/storage/innobase/sync/sync0arr.c
307--- a/storage/innobase/sync/sync0arr.c 2010-12-03 15:09:51.304953409 +0900
308+++ b/storage/innobase/sync/sync0arr.c 2010-12-03 17:35:12.985024561 +0900
309@@ -488,12 +488,12 @@
310 mutex = cell->old_wait_mutex;
311
312 fprintf(file,
313- "Mutex at %p created file %s line %lu, lock var %lu\n"
314+ "Mutex at %p '%s', lock var %lu\n"
315 #ifdef UNIV_SYNC_DEBUG
316 "Last time reserved in file %s line %lu, "
317 #endif /* UNIV_SYNC_DEBUG */
318 "waiters flag %lu\n",
319- (void*) mutex, mutex->cfile_name, (ulong) mutex->cline,
320+ (void*) mutex, mutex->cmutex_name,
321 (ulong) mutex->lock_word,
322 #ifdef UNIV_SYNC_DEBUG
323 mutex->file_name, (ulong) mutex->line,
324@@ -511,9 +511,8 @@
325 rwlock = cell->old_wait_rw_lock;
326
327 fprintf(file,
328- " RW-latch at %p created in file %s line %lu\n",
329- (void*) rwlock, rwlock->cfile_name,
330- (ulong) rwlock->cline);
331+ " RW-latch at %p '%s'\n",
332+ (void*) rwlock, rwlock->lock_name);
333 writer = rw_lock_get_writer(rwlock);
334 if (writer != RW_LOCK_NOT_LOCKED) {
335 fprintf(file,
336diff -ruN a/storage/innobase/sync/sync0rw.c b/storage/innobase/sync/sync0rw.c
337--- a/storage/innobase/sync/sync0rw.c 2010-11-03 07:01:13.000000000 +0900
338+++ b/storage/innobase/sync/sync0rw.c 2010-12-03 17:35:12.987029059 +0900
d8778560 339@@ -241,10 +241,10 @@
b4e1fa2c
AM
340 # ifdef UNIV_SYNC_DEBUG
341 ulint level, /*!< in: level */
342 # endif /* UNIV_SYNC_DEBUG */
343- const char* cmutex_name, /*!< in: mutex name */
d8778560 344-#endif /* UNIV_DEBUG */
b4e1fa2c 345 const char* cfile_name, /*!< in: file name where created */
d8778560
AM
346- ulint cline) /*!< in: file line where created */
347+ ulint cline, /*!< in: file line where created */
348+#endif /* UNIV_DEBUG */
349+ const char* cmutex_name) /*!< in: mutex name */
b4e1fa2c 350 {
d8778560
AM
351 /* If this is the very first time a synchronization object is
352 created, then the following call initializes the sync system. */
b4e1fa2c
AM
353@@ -253,14 +253,15 @@
354 mutex_create(rw_lock_mutex_key, rw_lock_get_mutex(lock),
355 SYNC_NO_ORDER_CHECK);
356
357- lock->mutex.cfile_name = cfile_name;
358- lock->mutex.cline = cline;
359+ ut_d(lock->mutex.cfile_name = cfile_name);
360+ ut_d(lock->mutex.cline = cline);
361
362- ut_d(lock->mutex.cmutex_name = cmutex_name);
363+ lock->mutex.cmutex_name = cmutex_name;
364 ut_d(lock->mutex.mutex_type = 1);
365 #else /* INNODB_RW_LOCKS_USE_ATOMICS */
366 # ifdef UNIV_DEBUG
367- UT_NOT_USED(cmutex_name);
368+ UT_NOT_USED(cfile_name);
369+ UT_NOT_USED(cline);
370 # endif
371 #endif /* INNODB_RW_LOCKS_USE_ATOMICS */
372
373@@ -280,8 +281,7 @@
374
375 ut_d(lock->magic_n = RW_LOCK_MAGIC_N);
376
377- lock->cfile_name = cfile_name;
378- lock->cline = (unsigned int) cline;
379+ lock->lock_name = cmutex_name;
380
381 lock->count_os_wait = 0;
382 lock->last_s_file_name = "not yet reserved";
383@@ -401,10 +401,10 @@
384 if (srv_print_latch_waits) {
385 fprintf(stderr,
386 "Thread %lu spin wait rw-s-lock at %p"
387- " cfile %s cline %lu rnds %lu\n",
388+ " '%s' rnds %lu\n",
389 (ulong) os_thread_pf(os_thread_get_curr_id()),
390 (void*) lock,
391- lock->cfile_name, (ulong) lock->cline, (ulong) i);
392+ lock->lock_name, (ulong) i);
393 }
394
395 /* We try once again to obtain the lock */
396@@ -437,10 +437,9 @@
397 if (srv_print_latch_waits) {
398 fprintf(stderr,
399 "Thread %lu OS wait rw-s-lock at %p"
400- " cfile %s cline %lu\n",
401+ " '%s'\n",
402 os_thread_pf(os_thread_get_curr_id()),
403- (void*) lock, lock->cfile_name,
404- (ulong) lock->cline);
405+ (void*) lock, lock->lock_name);
406 }
407
408 /* these stats may not be accurate */
409@@ -659,9 +658,9 @@
410 if (srv_print_latch_waits) {
411 fprintf(stderr,
412 "Thread %lu spin wait rw-x-lock at %p"
413- " cfile %s cline %lu rnds %lu\n",
414+ " '%s' rnds %lu\n",
415 os_thread_pf(os_thread_get_curr_id()), (void*) lock,
416- lock->cfile_name, (ulong) lock->cline, (ulong) i);
417+ lock->lock_name, (ulong) i);
418 }
419
420 sync_array_reserve_cell(sync_primary_wait_array,
421@@ -682,9 +681,9 @@
422 if (srv_print_latch_waits) {
423 fprintf(stderr,
424 "Thread %lu OS wait for rw-x-lock at %p"
425- " cfile %s cline %lu\n",
426+ " '%s'\n",
427 os_thread_pf(os_thread_get_curr_id()), (void*) lock,
428- lock->cfile_name, (ulong) lock->cline);
429+ lock->lock_name);
430 }
431
432 /* these stats may not be accurate */
433diff -ruN a/storage/innobase/sync/sync0sync.c b/storage/innobase/sync/sync0sync.c
434--- a/storage/innobase/sync/sync0sync.c 2010-12-03 15:49:59.233955565 +0900
435+++ b/storage/innobase/sync/sync0sync.c 2010-12-03 17:35:12.989024400 +0900
d8778560 436@@ -250,13 +250,13 @@
b4e1fa2c
AM
437 /*==============*/
438 mutex_t* mutex, /*!< in: pointer to memory */
d8778560
AM
439 #ifdef UNIV_DEBUG
440- const char* cmutex_name, /*!< in: mutex name */
b4e1fa2c
AM
441 # ifdef UNIV_SYNC_DEBUG
442 ulint level, /*!< in: level */
443 # endif /* UNIV_SYNC_DEBUG */
d8778560
AM
444-#endif /* UNIV_DEBUG */
445 const char* cfile_name, /*!< in: file name where created */
446- ulint cline) /*!< in: file line where created */
447+ ulint cline, /*!< in: file line where created */
448+#endif /* UNIV_DEBUG */
449+ const char* cmutex_name) /*!< in: mutex name */
450 {
451 #if defined(HAVE_ATOMIC_BUILTINS)
452 mutex_reset_lock_word(mutex);
b4e1fa2c
AM
453@@ -274,11 +274,13 @@
454 mutex->file_name = "not yet reserved";
455 mutex->level = level;
456 #endif /* UNIV_SYNC_DEBUG */
457+#ifdef UNIV_DEBUG
458 mutex->cfile_name = cfile_name;
459 mutex->cline = cline;
460+#endif /* UNIV_DEBUG */
461 mutex->count_os_wait = 0;
462-#ifdef UNIV_DEBUG
463 mutex->cmutex_name= cmutex_name;
464+#ifdef UNIV_DEBUG
465 mutex->count_using= 0;
466 mutex->mutex_type= 0;
467 mutex->lspent_time= 0;
468@@ -532,9 +534,9 @@
469 #ifdef UNIV_SRV_PRINT_LATCH_WAITS
470 fprintf(stderr,
471 "Thread %lu spin wait mutex at %p"
472- " cfile %s cline %lu rnds %lu\n",
473+ " '%s' rnds %lu\n",
474 (ulong) os_thread_pf(os_thread_get_curr_id()), (void*) mutex,
475- mutex->cfile_name, (ulong) mutex->cline, (ulong) i);
476+ mutex->cmutex_name, (ulong) i);
477 #endif
478
479 mutex_spin_round_count += i;
480@@ -609,9 +611,9 @@
481
482 #ifdef UNIV_SRV_PRINT_LATCH_WAITS
483 fprintf(stderr,
484- "Thread %lu OS wait mutex at %p cfile %s cline %lu rnds %lu\n",
485+ "Thread %lu OS wait mutex at %p '%s' rnds %lu\n",
486 (ulong) os_thread_pf(os_thread_get_curr_id()), (void*) mutex,
487- mutex->cfile_name, (ulong) mutex->cline, (ulong) i);
488+ mutex->cmutex_name, (ulong) i);
489 #endif
490
491 mutex_os_wait_count++;
492@@ -913,9 +915,8 @@
493
494 if (mutex->magic_n == MUTEX_MAGIC_N) {
495 fprintf(stderr,
496- "Mutex created at %s %lu\n",
497- mutex->cfile_name,
498- (ulong) mutex->cline);
499+ "Mutex '%s'\n",
500+ mutex->cmutex_name);
501
502 if (mutex_get_lock_word(mutex) != 0) {
503 const char* file_name;
This page took 0.099803 seconds and 4 git commands to generate.