102.1.1
by kinoyasu
add header and rule, as the first step of the reordering patch for separate release |
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! |
|
106
by kinoyasu
Port Yasufumi maintaining patches to 5.1.50: |
8 |
diff -ruN a/storage/innodb_plugin/handler/ha_innodb.cc b/storage/innodb_plugin/handler/ha_innodb.cc
|
9 |
--- a/storage/innodb_plugin/handler/ha_innodb.cc 2010-08-27 16:29:12.539982446 +0900
|
|
10 |
+++ b/storage/innodb_plugin/handler/ha_innodb.cc 2010-08-27 16:29:24.322059309 +0900
|
|
215.1.1
by Yasufumi Kinoshita
fix bug733317 |
11 |
@@ -9323,8 +9323,8 @@
|
1
by kinoyasu
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7 |
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 |
||
215.1.1
by Yasufumi Kinoshita
fix bug733317 |
22 |
@@ -9339,9 +9339,8 @@
|
1
by kinoyasu
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7 |
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); |
|
215.1.1
by Yasufumi Kinoshita
fix bug733317 |
34 |
@@ -9370,8 +9369,8 @@
|
1
by kinoyasu
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7 |
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 |
||
215.1.1
by Yasufumi Kinoshita
fix bug733317 |
45 |
@@ -9385,9 +9384,8 @@
|
1
by kinoyasu
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7 |
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); |
|
106
by kinoyasu
Port Yasufumi maintaining patches to 5.1.50: |
57 |
diff -ruN a/storage/innodb_plugin/handler/innodb_patch_info.h b/storage/innodb_plugin/handler/innodb_patch_info.h
|
58 |
--- a/storage/innodb_plugin/handler/innodb_patch_info.h 2010-08-27 16:29:12.542982379 +0900
|
|
59 |
+++ b/storage/innodb_plugin/handler/innodb_patch_info.h 2010-08-27 16:29:24.323059066 +0900
|
|
1
by kinoyasu
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7 |
60 |
@@ -39,5 +39,6 @@
|
61 |
{"innodb_recovery_patches","Bugfixes and adjustments about recovery process","","http://www.percona.com/docs/wiki/percona-xtradb"}, |
|
62 |
{"innodb_purge_thread","Enable to use purge devoted thread","","http://www.percona.com/docs/wiki/percona-xtradb"}, |
|
63 |
{"innodb_admin_command_base","XtraDB specific command interface through i_s","","http://www.percona.com/docs/wiki/percona-xtradb"}, |
|
64 |
+{"innodb_show_lock_name","Show mutex/lock name instead of crated file/line","","http://www.percona.com/docs/wiki/percona-xtradb"},
|
|
65 |
{NULL, NULL, NULL, NULL} |
|
66 |
}; |
|
106
by kinoyasu
Port Yasufumi maintaining patches to 5.1.50: |
67 |
diff -ruN a/storage/innodb_plugin/include/sync0rw.h b/storage/innodb_plugin/include/sync0rw.h
|
68 |
--- a/storage/innodb_plugin/include/sync0rw.h 2010-08-04 02:24:19.000000000 +0900
|
|
69 |
+++ b/storage/innodb_plugin/include/sync0rw.h 2010-08-27 16:29:24.325059383 +0900
|
|
189.2.3
by Yasufumi Kinoshita
eliminate warnings from yasufumi patches; it is based on 5.1.54-fix_expand_import_and_dict_size_limit |
70 |
@@ -113,14 +113,14 @@
|
71 |
#ifdef UNIV_DEBUG |
|
72 |
# ifdef UNIV_SYNC_DEBUG |
|
73 |
# define rw_lock_create(L, level) \ |
|
74 |
- rw_lock_create_func((L), (level), #L, __FILE__, __LINE__)
|
|
75 |
+ rw_lock_create_func((L), (level), __FILE__, __LINE__, #L)
|
|
76 |
# else /* UNIV_SYNC_DEBUG */ |
|
77 |
# define rw_lock_create(L, level) \ |
|
78 |
- rw_lock_create_func((L), #L, __FILE__, __LINE__)
|
|
79 |
+ rw_lock_create_func((L), __FILE__, __LINE__, #L)
|
|
1
by kinoyasu
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7 |
80 |
# endif /* UNIV_SYNC_DEBUG */ |
81 |
#else /* UNIV_DEBUG */ |
|
82 |
# define rw_lock_create(L, level) \ |
|
83 |
- rw_lock_create_func((L), __FILE__, __LINE__)
|
|
189.2.3
by Yasufumi Kinoshita
eliminate warnings from yasufumi patches; it is based on 5.1.54-fix_expand_import_and_dict_size_limit |
84 |
+ rw_lock_create_func((L), #L)
|
1
by kinoyasu
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7 |
85 |
#endif /* UNIV_DEBUG */ |
86 |
||
87 |
/******************************************************************//** |
|
189.2.3
by Yasufumi Kinoshita
eliminate warnings from yasufumi patches; it is based on 5.1.54-fix_expand_import_and_dict_size_limit |
88 |
@@ -137,10 +137,10 @@
|
1
by kinoyasu
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7 |
89 |
# ifdef UNIV_SYNC_DEBUG |
90 |
ulint level, /*!< in: level */ |
|
91 |
# endif /* UNIV_SYNC_DEBUG */ |
|
92 |
- const char* cmutex_name, /*!< in: mutex name */
|
|
189.2.3
by Yasufumi Kinoshita
eliminate warnings from yasufumi patches; it is based on 5.1.54-fix_expand_import_and_dict_size_limit |
93 |
-#endif /* UNIV_DEBUG */
|
1
by kinoyasu
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7 |
94 |
const char* cfile_name, /*!< in: file name where created */ |
189.2.3
by Yasufumi Kinoshita
eliminate warnings from yasufumi patches; it is based on 5.1.54-fix_expand_import_and_dict_size_limit |
95 |
- ulint cline); /*!< in: file line where created */
|
96 |
+ ulint cline, /*!< in: file line where created */
|
|
97 |
+#endif /* UNIV_DEBUG */
|
|
98 |
+ const char* cmutex_name); /*!< in: mutex name */
|
|
1
by kinoyasu
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7 |
99 |
/******************************************************************//** |
189.2.3
by Yasufumi Kinoshita
eliminate warnings from yasufumi patches; it is based on 5.1.54-fix_expand_import_and_dict_size_limit |
100 |
Calling this function is obligatory only if the memory buffer containing |
101 |
the rw-lock is freed. Removes an rw-lock object from the global list. The |
|
208
by Yasufumi Kinoshita
Yasufumi patches and several are ported to 5.1.56; Note: option innodb_stats_method was removed from innodb_stats.patch, because implemented officially. And, bug733317 should be fixed before release |
102 |
@@ -542,7 +542,8 @@
|
1
by kinoyasu
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7 |
103 |
ulint level; /*!< Level in the global latching order. */ |
104 |
#endif /* UNIV_SYNC_DEBUG */ |
|
105 |
ulint count_os_wait; /*!< Count of os_waits. May not be accurate */ |
|
106 |
- const char* cfile_name;/*!< File name where lock created */
|
|
107 |
+ //const char* cfile_name;/*!< File name where lock created */
|
|
108 |
+ const char* lock_name;/*!< lock name */
|
|
109 |
/* last s-lock file/line is not guaranteed to be correct */ |
|
110 |
const char* last_s_file_name;/*!< File name where last s-locked */ |
|
111 |
const char* last_x_file_name;/*!< File name where last x-locked */ |
|
208
by Yasufumi Kinoshita
Yasufumi patches and several are ported to 5.1.56; Note: option innodb_stats_method was removed from innodb_stats.patch, because implemented officially. And, bug733317 should be fixed before release |
112 |
@@ -553,7 +554,7 @@
|
1
by kinoyasu
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7 |
113 |
are at the start of this struct, thus we can |
114 |
peek this field without causing much memory |
|
115 |
bus traffic */ |
|
116 |
- unsigned cline:14; /*!< Line where created */
|
|
117 |
+ //unsigned cline:14; /*!< Line where created */
|
|
118 |
unsigned last_s_line:14; /*!< Line number where last time s-locked */ |
|
119 |
unsigned last_x_line:14; /*!< Line number where last time x-locked */ |
|
77
by kinoyasu
port and adjust the part of the patches to 5.1.49: But query_cache_with_comments.patch, response-time-distribution.patch, mysql_remove_eol_carret.patch, log_connection_error.patch, status_wait_query_cache_mutex.patch and sql_no_fcache.patch were not ported yet. Please port them. |
120 |
#ifdef UNIV_DEBUG |
106
by kinoyasu
Port Yasufumi maintaining patches to 5.1.50: |
121 |
diff -ruN a/storage/innodb_plugin/include/sync0sync.h b/storage/innodb_plugin/include/sync0sync.h
|
122 |
--- a/storage/innodb_plugin/include/sync0sync.h 2010-08-27 16:13:11.087074844 +0900
|
|
123 |
+++ b/storage/innodb_plugin/include/sync0sync.h 2010-08-27 16:29:24.327059254 +0900
|
|
189.2.3
by Yasufumi Kinoshita
eliminate warnings from yasufumi patches; it is based on 5.1.54-fix_expand_import_and_dict_size_limit |
124 |
@@ -73,14 +73,14 @@
|
125 |
#ifdef UNIV_DEBUG |
|
126 |
# ifdef UNIV_SYNC_DEBUG |
|
127 |
# define mutex_create(M, level) \ |
|
128 |
- mutex_create_func((M), #M, (level), __FILE__, __LINE__)
|
|
129 |
+ mutex_create_func((M), (level), __FILE__, __LINE__, #M)
|
|
130 |
# else |
|
131 |
# define mutex_create(M, level) \ |
|
132 |
- mutex_create_func((M), #M, __FILE__, __LINE__)
|
|
133 |
+ mutex_create_func((M), __FILE__, __LINE__, #M)
|
|
1
by kinoyasu
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7 |
134 |
# endif |
135 |
#else |
|
136 |
# define mutex_create(M, level) \ |
|
137 |
- mutex_create_func((M), __FILE__, __LINE__)
|
|
189.2.3
by Yasufumi Kinoshita
eliminate warnings from yasufumi patches; it is based on 5.1.54-fix_expand_import_and_dict_size_limit |
138 |
+ mutex_create_func((M), #M)
|
1
by kinoyasu
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7 |
139 |
#endif |
140 |
||
141 |
/******************************************************************//** |
|
189.2.3
by Yasufumi Kinoshita
eliminate warnings from yasufumi patches; it is based on 5.1.54-fix_expand_import_and_dict_size_limit |
142 |
@@ -94,13 +94,13 @@
|
1
by kinoyasu
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7 |
143 |
/*==============*/ |
144 |
mutex_t* mutex, /*!< in: pointer to memory */ |
|
189.2.3
by Yasufumi Kinoshita
eliminate warnings from yasufumi patches; it is based on 5.1.54-fix_expand_import_and_dict_size_limit |
145 |
#ifdef UNIV_DEBUG |
146 |
- const char* cmutex_name, /*!< in: mutex name */
|
|
1
by kinoyasu
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7 |
147 |
# ifdef UNIV_SYNC_DEBUG |
148 |
ulint level, /*!< in: level */ |
|
149 |
# endif /* UNIV_SYNC_DEBUG */ |
|
189.2.3
by Yasufumi Kinoshita
eliminate warnings from yasufumi patches; it is based on 5.1.54-fix_expand_import_and_dict_size_limit |
150 |
-#endif /* UNIV_DEBUG */
|
151 |
const char* cfile_name, /*!< in: file name where created */ |
|
152 |
- ulint cline); /*!< in: file line where created */
|
|
153 |
+ ulint cline, /*!< in: file line where created */
|
|
154 |
+#endif /* UNIV_DEBUG */
|
|
155 |
+ const char* cmutex_name); /*!< in: mutex name */
|
|
156 |
||
157 |
#undef mutex_free /* Fix for MacOS X */ |
|
158 |
||
1
by kinoyasu
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7 |
159 |
@@ -536,9 +536,9 @@
|
160 |
ulint line; /*!< Line where the mutex was locked */ |
|
161 |
ulint level; /*!< Level in the global latching order */ |
|
162 |
#endif /* UNIV_SYNC_DEBUG */ |
|
163 |
+#ifdef UNIV_DEBUG
|
|
164 |
const char* cfile_name;/*!< File name where mutex created */ |
|
165 |
ulint cline; /*!< Line where created */ |
|
166 |
-#ifdef UNIV_DEBUG
|
|
167 |
os_thread_id_t thread_id; /*!< The thread id of the thread |
|
168 |
which locked the mutex. */ |
|
169 |
ulint magic_n; /*!< MUTEX_MAGIC_N */ |
|
170 |
@@ -553,9 +553,9 @@
|
|
171 |
ulong count_os_yield; /*!< count of os_wait */ |
|
172 |
ulonglong lspent_time; /*!< mutex os_wait timer msec */ |
|
173 |
ulonglong lmax_spent_time;/*!< mutex os_wait timer msec */ |
|
174 |
- const char* cmutex_name; /*!< mutex name */
|
|
175 |
ulint mutex_type; /*!< 0=usual mutex, 1=rw_lock mutex */ |
|
176 |
#endif /* UNIV_DEBUG */ |
|
177 |
+ const char* cmutex_name; /*!< mutex name */
|
|
178 |
}; |
|
179 |
||
180 |
/** The global array of wait cells for implementation of the databases own |
|
106
by kinoyasu
Port Yasufumi maintaining patches to 5.1.50: |
181 |
diff -ruN a/storage/innodb_plugin/sync/sync0arr.c b/storage/innodb_plugin/sync/sync0arr.c
|
182 |
--- a/storage/innodb_plugin/sync/sync0arr.c 2010-08-27 15:52:14.340059415 +0900
|
|
183 |
+++ b/storage/innodb_plugin/sync/sync0arr.c 2010-08-27 16:29:24.329058856 +0900
|
|
1
by kinoyasu
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7 |
184 |
@@ -482,12 +482,12 @@
|
185 |
mutex = cell->old_wait_mutex; |
|
186 |
||
187 |
fprintf(file, |
|
188 |
- "Mutex at %p created file %s line %lu, lock var %lu\n"
|
|
189 |
+ "Mutex at %p '%s', lock var %lu\n"
|
|
190 |
#ifdef UNIV_SYNC_DEBUG |
|
191 |
"Last time reserved in file %s line %lu, " |
|
192 |
#endif /* UNIV_SYNC_DEBUG */ |
|
193 |
"waiters flag %lu\n", |
|
194 |
- (void*) mutex, mutex->cfile_name, (ulong) mutex->cline,
|
|
195 |
+ (void*) mutex, mutex->cmutex_name,
|
|
196 |
(ulong) mutex->lock_word, |
|
197 |
#ifdef UNIV_SYNC_DEBUG |
|
198 |
mutex->file_name, (ulong) mutex->line, |
|
48
by kinoyasu
port for mysql-5.1.48 |
199 |
@@ -505,9 +505,8 @@
|
1
by kinoyasu
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7 |
200 |
rwlock = cell->old_wait_rw_lock; |
201 |
||
202 |
fprintf(file, |
|
203 |
- " RW-latch at %p created in file %s line %lu\n",
|
|
204 |
- (void*) rwlock, rwlock->cfile_name,
|
|
205 |
- (ulong) rwlock->cline);
|
|
206 |
+ " RW-latch at %p '%s'\n",
|
|
207 |
+ (void*) rwlock, rwlock->lock_name);
|
|
208 |
writer = rw_lock_get_writer(rwlock); |
|
209 |
if (writer != RW_LOCK_NOT_LOCKED) { |
|
210 |
fprintf(file, |
|
106
by kinoyasu
Port Yasufumi maintaining patches to 5.1.50: |
211 |
diff -ruN a/storage/innodb_plugin/sync/sync0rw.c b/storage/innodb_plugin/sync/sync0rw.c
|
212 |
--- a/storage/innodb_plugin/sync/sync0rw.c 2010-08-04 02:24:20.000000000 +0900
|
|
213 |
+++ b/storage/innodb_plugin/sync/sync0rw.c 2010-08-27 16:29:24.331058289 +0900
|
|
189.2.3
by Yasufumi Kinoshita
eliminate warnings from yasufumi patches; it is based on 5.1.54-fix_expand_import_and_dict_size_limit |
214 |
@@ -231,10 +231,10 @@
|
1
by kinoyasu
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7 |
215 |
# ifdef UNIV_SYNC_DEBUG |
216 |
ulint level, /*!< in: level */ |
|
217 |
# endif /* UNIV_SYNC_DEBUG */ |
|
218 |
- const char* cmutex_name, /*!< in: mutex name */
|
|
189.2.3
by Yasufumi Kinoshita
eliminate warnings from yasufumi patches; it is based on 5.1.54-fix_expand_import_and_dict_size_limit |
219 |
-#endif /* UNIV_DEBUG */
|
1
by kinoyasu
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7 |
220 |
const char* cfile_name, /*!< in: file name where created */ |
189.2.3
by Yasufumi Kinoshita
eliminate warnings from yasufumi patches; it is based on 5.1.54-fix_expand_import_and_dict_size_limit |
221 |
- ulint cline) /*!< in: file line where created */
|
222 |
+ ulint cline, /*!< in: file line where created */
|
|
223 |
+#endif /* UNIV_DEBUG */
|
|
224 |
+ const char* cmutex_name) /*!< in: mutex name */
|
|
1
by kinoyasu
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7 |
225 |
{ |
189.2.3
by Yasufumi Kinoshita
eliminate warnings from yasufumi patches; it is based on 5.1.54-fix_expand_import_and_dict_size_limit |
226 |
/* If this is the very first time a synchronization object is |
227 |
created, then the following call initializes the sync system. */ |
|
1
by kinoyasu
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7 |
228 |
@@ -242,14 +242,15 @@
|
229 |
#ifndef INNODB_RW_LOCKS_USE_ATOMICS |
|
230 |
mutex_create(rw_lock_get_mutex(lock), SYNC_NO_ORDER_CHECK); |
|
231 |
||
232 |
- lock->mutex.cfile_name = cfile_name;
|
|
233 |
- lock->mutex.cline = cline;
|
|
234 |
+ ut_d(lock->mutex.cfile_name = cfile_name);
|
|
235 |
+ ut_d(lock->mutex.cline = cline);
|
|
236 |
||
237 |
- ut_d(lock->mutex.cmutex_name = cmutex_name);
|
|
238 |
+ lock->mutex.cmutex_name = cmutex_name;
|
|
239 |
ut_d(lock->mutex.mutex_type = 1); |
|
240 |
#else /* INNODB_RW_LOCKS_USE_ATOMICS */ |
|
241 |
# ifdef UNIV_DEBUG |
|
242 |
- UT_NOT_USED(cmutex_name);
|
|
243 |
+ UT_NOT_USED(cfile_name);
|
|
244 |
+ UT_NOT_USED(cline);
|
|
245 |
# endif |
|
246 |
#endif /* INNODB_RW_LOCKS_USE_ATOMICS */ |
|
247 |
||
225
by kinoyasu
port Yasufumi patches to 5.1.57 |
248 |
@@ -272,8 +273,7 @@
|
1
by kinoyasu
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7 |
249 |
|
77
by kinoyasu
port and adjust the part of the patches to 5.1.49: But query_cache_with_comments.patch, response-time-distribution.patch, mysql_remove_eol_carret.patch, log_connection_error.patch, status_wait_query_cache_mutex.patch and sql_no_fcache.patch were not ported yet. Please port them. |
250 |
ut_d(lock->magic_n = RW_LOCK_MAGIC_N); |
1
by kinoyasu
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7 |
251 |
|
252 |
- lock->cfile_name = cfile_name;
|
|
253 |
- lock->cline = (unsigned int) cline;
|
|
254 |
+ lock->lock_name = cmutex_name;
|
|
255 |
||
256 |
lock->count_os_wait = 0; |
|
257 |
lock->last_s_file_name = "not yet reserved"; |
|
225
by kinoyasu
port Yasufumi patches to 5.1.57 |
258 |
@@ -393,10 +393,10 @@
|
1
by kinoyasu
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7 |
259 |
if (srv_print_latch_waits) { |
260 |
fprintf(stderr, |
|
261 |
"Thread %lu spin wait rw-s-lock at %p" |
|
262 |
- " cfile %s cline %lu rnds %lu\n",
|
|
263 |
+ " '%s' rnds %lu\n",
|
|
264 |
(ulong) os_thread_pf(os_thread_get_curr_id()), |
|
265 |
(void*) lock, |
|
266 |
- lock->cfile_name, (ulong) lock->cline, (ulong) i);
|
|
267 |
+ lock->lock_name, (ulong) i);
|
|
268 |
} |
|
269 |
||
270 |
/* We try once again to obtain the lock */ |
|
225
by kinoyasu
port Yasufumi patches to 5.1.57 |
271 |
@@ -429,10 +429,9 @@
|
1
by kinoyasu
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7 |
272 |
if (srv_print_latch_waits) { |
273 |
fprintf(stderr, |
|
274 |
"Thread %lu OS wait rw-s-lock at %p" |
|
275 |
- " cfile %s cline %lu\n",
|
|
276 |
+ " '%s'\n",
|
|
277 |
os_thread_pf(os_thread_get_curr_id()), |
|
278 |
- (void*) lock, lock->cfile_name,
|
|
279 |
- (ulong) lock->cline);
|
|
280 |
+ (void*) lock, lock->lock_name);
|
|
281 |
} |
|
282 |
||
283 |
/* these stats may not be accurate */ |
|
225
by kinoyasu
port Yasufumi patches to 5.1.57 |
284 |
@@ -651,9 +650,9 @@
|
1
by kinoyasu
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7 |
285 |
if (srv_print_latch_waits) { |
286 |
fprintf(stderr, |
|
287 |
"Thread %lu spin wait rw-x-lock at %p" |
|
288 |
- " cfile %s cline %lu rnds %lu\n",
|
|
289 |
+ " '%s' rnds %lu\n",
|
|
290 |
os_thread_pf(os_thread_get_curr_id()), (void*) lock, |
|
291 |
- lock->cfile_name, (ulong) lock->cline, (ulong) i);
|
|
292 |
+ lock->lock_name, (ulong) i);
|
|
293 |
} |
|
294 |
||
295 |
sync_array_reserve_cell(sync_primary_wait_array, |
|
225
by kinoyasu
port Yasufumi patches to 5.1.57 |
296 |
@@ -674,9 +673,9 @@
|
1
by kinoyasu
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7 |
297 |
if (srv_print_latch_waits) { |
298 |
fprintf(stderr, |
|
299 |
"Thread %lu OS wait for rw-x-lock at %p" |
|
300 |
- " cfile %s cline %lu\n",
|
|
301 |
+ " '%s'\n",
|
|
302 |
os_thread_pf(os_thread_get_curr_id()), (void*) lock, |
|
303 |
- lock->cfile_name, (ulong) lock->cline);
|
|
304 |
+ lock->lock_name);
|
|
305 |
} |
|
306 |
||
307 |
/* these stats may not be accurate */ |
|
106
by kinoyasu
Port Yasufumi maintaining patches to 5.1.50: |
308 |
diff -ruN a/storage/innodb_plugin/sync/sync0sync.c b/storage/innodb_plugin/sync/sync0sync.c
|
309 |
--- a/storage/innodb_plugin/sync/sync0sync.c 2010-08-27 16:13:11.113988290 +0900
|
|
310 |
+++ b/storage/innodb_plugin/sync/sync0sync.c 2010-08-27 16:29:24.333058256 +0900
|
|
189.2.3
by Yasufumi Kinoshita
eliminate warnings from yasufumi patches; it is based on 5.1.54-fix_expand_import_and_dict_size_limit |
311 |
@@ -239,13 +239,13 @@
|
1
by kinoyasu
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7 |
312 |
/*==============*/ |
313 |
mutex_t* mutex, /*!< in: pointer to memory */ |
|
189.2.3
by Yasufumi Kinoshita
eliminate warnings from yasufumi patches; it is based on 5.1.54-fix_expand_import_and_dict_size_limit |
314 |
#ifdef UNIV_DEBUG |
315 |
- const char* cmutex_name, /*!< in: mutex name */
|
|
1
by kinoyasu
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7 |
316 |
# ifdef UNIV_SYNC_DEBUG |
317 |
ulint level, /*!< in: level */ |
|
318 |
# endif /* UNIV_SYNC_DEBUG */ |
|
189.2.3
by Yasufumi Kinoshita
eliminate warnings from yasufumi patches; it is based on 5.1.54-fix_expand_import_and_dict_size_limit |
319 |
-#endif /* UNIV_DEBUG */
|
320 |
const char* cfile_name, /*!< in: file name where created */ |
|
321 |
- ulint cline) /*!< in: file line where created */
|
|
322 |
+ ulint cline, /*!< in: file line where created */
|
|
323 |
+#endif /* UNIV_DEBUG */
|
|
324 |
+ const char* cmutex_name) /*!< in: mutex name */
|
|
325 |
{ |
|
326 |
#if defined(HAVE_ATOMIC_BUILTINS) |
|
327 |
mutex_reset_lock_word(mutex); |
|
1
by kinoyasu
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7 |
328 |
@@ -263,11 +263,13 @@
|
329 |
mutex->file_name = "not yet reserved"; |
|
330 |
mutex->level = level; |
|
331 |
#endif /* UNIV_SYNC_DEBUG */ |
|
332 |
+#ifdef UNIV_DEBUG
|
|
333 |
mutex->cfile_name = cfile_name; |
|
334 |
mutex->cline = cline; |
|
335 |
+#endif /* UNIV_DEBUG */
|
|
336 |
mutex->count_os_wait = 0; |
|
337 |
-#ifdef UNIV_DEBUG
|
|
338 |
mutex->cmutex_name= cmutex_name; |
|
339 |
+#ifdef UNIV_DEBUG
|
|
340 |
mutex->count_using= 0; |
|
341 |
mutex->mutex_type= 0; |
|
342 |
mutex->lspent_time= 0; |
|
94
by Oleg Tsarev
fix bug 610525 |
343 |
@@ -520,9 +522,9 @@
|
1
by kinoyasu
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7 |
344 |
#ifdef UNIV_SRV_PRINT_LATCH_WAITS |
345 |
fprintf(stderr, |
|
346 |
"Thread %lu spin wait mutex at %p" |
|
347 |
- " cfile %s cline %lu rnds %lu\n",
|
|
348 |
+ " '%s' rnds %lu\n",
|
|
349 |
(ulong) os_thread_pf(os_thread_get_curr_id()), (void*) mutex, |
|
350 |
- mutex->cfile_name, (ulong) mutex->cline, (ulong) i);
|
|
351 |
+ mutex->cmutex_name, (ulong) i);
|
|
352 |
#endif |
|
353 |
||
354 |
mutex_spin_round_count += i; |
|
94
by Oleg Tsarev
fix bug 610525 |
355 |
@@ -597,9 +599,9 @@
|
1
by kinoyasu
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7 |
356 |
|
357 |
#ifdef UNIV_SRV_PRINT_LATCH_WAITS |
|
358 |
fprintf(stderr, |
|
359 |
- "Thread %lu OS wait mutex at %p cfile %s cline %lu rnds %lu\n",
|
|
360 |
+ "Thread %lu OS wait mutex at %p '%s' rnds %lu\n",
|
|
361 |
(ulong) os_thread_pf(os_thread_get_curr_id()), (void*) mutex, |
|
362 |
- mutex->cfile_name, (ulong) mutex->cline, (ulong) i);
|
|
363 |
+ mutex->cmutex_name, (ulong) i);
|
|
364 |
#endif |
|
365 |
||
366 |
mutex_os_wait_count++; |
|
94
by Oleg Tsarev
fix bug 610525 |
367 |
@@ -901,9 +903,8 @@
|
1
by kinoyasu
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7 |
368 |
|
369 |
if (mutex->magic_n == MUTEX_MAGIC_N) { |
|
370 |
fprintf(stderr, |
|
371 |
- "Mutex created at %s %lu\n",
|
|
372 |
- mutex->cfile_name,
|
|
373 |
- (ulong) mutex->cline);
|
|
374 |
+ "Mutex '%s'\n",
|
|
375 |
+ mutex->cmutex_name);
|
|
376 |
||
377 |
if (mutex_get_lock_word(mutex) != 0) { |
|
378 |
const char* file_name; |