Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
d575f6ce
Commit
d575f6ce
authored
Nov 17, 2008
by
Mikael Ronstrom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added counter of number of missed wakeups of InnoDB threads
parent
8d162b44
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
1 deletion
+17
-1
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+2
-0
storage/innobase/include/srv0srv.h
storage/innobase/include/srv0srv.h
+4
-0
storage/innobase/srv/srv0srv.c
storage/innobase/srv/srv0srv.c
+1
-0
storage/innobase/sync/sync0arr.c
storage/innobase/sync/sync0arr.c
+10
-1
No files found.
storage/innobase/handler/ha_innodb.cc
View file @
d575f6ce
...
@@ -433,6 +433,8 @@ static SHOW_VAR innodb_status_variables[]= {
...
@@ -433,6 +433,8 @@ static SHOW_VAR innodb_status_variables[]= {
(
char
*
)
&
export_vars
.
innodb_rows_read
,
SHOW_LONG
},
(
char
*
)
&
export_vars
.
innodb_rows_read
,
SHOW_LONG
},
{
"rows_updated"
,
{
"rows_updated"
,
(
char
*
)
&
export_vars
.
innodb_rows_updated
,
SHOW_LONG
},
(
char
*
)
&
export_vars
.
innodb_rows_updated
,
SHOW_LONG
},
{
"wake_ups"
,
(
char
*
)
&
export_vars
.
innodb_wake_ups
,
SHOW_LONG
},
{
NullS
,
NullS
,
SHOW_LONG
}
{
NullS
,
NullS
,
SHOW_LONG
}
};
};
...
...
storage/innobase/include/srv0srv.h
View file @
d575f6ce
...
@@ -251,6 +251,9 @@ extern ulint srv_read_ahead_seq;
...
@@ -251,6 +251,9 @@ extern ulint srv_read_ahead_seq;
/* variable to count the number of random read-aheads were done */
/* variable to count the number of random read-aheads were done */
extern
ulint
srv_read_ahead_rnd
;
extern
ulint
srv_read_ahead_rnd
;
/* Number of threads that may have missed a lock wait wakeup */
extern
ulint
sync_wake_ups
;
/* In this structure we store status variables to be passed to MySQL */
/* In this structure we store status variables to be passed to MySQL */
typedef
struct
export_var_struct
export_struc
;
typedef
struct
export_var_struct
export_struc
;
...
@@ -545,6 +548,7 @@ struct export_var_struct{
...
@@ -545,6 +548,7 @@ struct export_var_struct{
ulint
innodb_rows_inserted
;
ulint
innodb_rows_inserted
;
ulint
innodb_rows_updated
;
ulint
innodb_rows_updated
;
ulint
innodb_rows_deleted
;
ulint
innodb_rows_deleted
;
ulint
innodb_wake_ups
;
};
};
/* The server system struct */
/* The server system struct */
...
...
storage/innobase/srv/srv0srv.c
View file @
d575f6ce
...
@@ -1939,6 +1939,7 @@ srv_export_innodb_status(void)
...
@@ -1939,6 +1939,7 @@ srv_export_innodb_status(void)
export_vars
.
innodb_rows_inserted
=
srv_n_rows_inserted
;
export_vars
.
innodb_rows_inserted
=
srv_n_rows_inserted
;
export_vars
.
innodb_rows_updated
=
srv_n_rows_updated
;
export_vars
.
innodb_rows_updated
=
srv_n_rows_updated
;
export_vars
.
innodb_rows_deleted
=
srv_n_rows_deleted
;
export_vars
.
innodb_rows_deleted
=
srv_n_rows_deleted
;
export_vars
.
innodb_wake_ups
=
sync_wake_ups
;
mutex_exit
(
&
srv_innodb_monitor_mutex
);
mutex_exit
(
&
srv_innodb_monitor_mutex
);
}
}
...
...
storage/innobase/sync/sync0arr.c
View file @
d575f6ce
...
@@ -110,6 +110,10 @@ struct sync_array_struct {
...
@@ -110,6 +110,10 @@ struct sync_array_struct {
since creation of the array */
since creation of the array */
};
};
/* Counts the number of times that sync_arr_wake_threads_if_sema_free has
* found a thread that can run because it may have missed a wakeup signal. */
ulint
sync_wake_ups
=
0
;
#ifdef UNIV_SYNC_DEBUG
#ifdef UNIV_SYNC_DEBUG
/**********************************************************************
/**********************************************************************
This function is called only in the debug version. Detects a deadlock
This function is called only in the debug version. Detects a deadlock
...
@@ -481,7 +485,11 @@ sync_array_cell_print(
...
@@ -481,7 +485,11 @@ sync_array_cell_print(
||
type
==
RW_LOCK_WAIT_EX
||
type
==
RW_LOCK_WAIT_EX
||
type
==
RW_LOCK_SHARED
)
{
||
type
==
RW_LOCK_SHARED
)
{
fputs
(
type
==
RW_LOCK_EX
?
"X-lock on"
:
"S-lock on"
,
file
);
switch
(
type
)
{
case
RW_LOCK_EX
:
fputs
(
"X-lock on"
,
file
);
break
;
case
RW_LOCK_WAIT_EX
:
fputs
(
"wait-X-lock on"
,
file
);
break
;
default:
fputs
(
"S-lock on"
,
file
);
break
;
}
rwlock
=
cell
->
old_wait_rw_lock
;
rwlock
=
cell
->
old_wait_rw_lock
;
...
@@ -884,6 +892,7 @@ sync_arr_wake_threads_if_sema_free(void)
...
@@ -884,6 +892,7 @@ sync_arr_wake_threads_if_sema_free(void)
event
=
sync_cell_get_event
(
cell
);
event
=
sync_cell_get_event
(
cell
);
os_event_set
(
event
);
os_event_set
(
event
);
sync_wake_ups
++
;
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment