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
e84dc567
Commit
e84dc567
authored
Feb 05, 2019
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.1 into 10.2
parents
625994b7
5eb3e4d8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
140 additions
and
96 deletions
+140
-96
storage/innobase/handler/i_s.cc
storage/innobase/handler/i_s.cc
+53
-36
storage/xtradb/handler/i_s.cc
storage/xtradb/handler/i_s.cc
+87
-60
No files found.
storage/innobase/handler/i_s.cc
View file @
e84dc567
/*****************************************************************************
Copyright (c) 2007, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2014, 201
8
, MariaDB Corporation.
Copyright (c) 2014, 201
9
, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
...
...
@@ -9084,10 +9084,12 @@ i_s_innodb_mutexes_fill_table(
}
OK
(
field_store_string
(
fields
[
MUTEXES_NAME
],
mutex
->
cmutex_name
));
OK
(
field_store_string
(
fields
[
MUTEXES_CREATE_FILE
],
innobase_basename
(
mutex
->
cfile_name
)));
OK
(
fields
[
MUTEXES_CREATE_LINE
]
->
store
(
mutex
->
cline
,
true
));
OK
(
field_store_string
(
fields
[
MUTEXES_CREATE_FILE
],
innobase_basename
(
mutex
->
cfile_name
)));
OK
(
fields
[
MUTEXES_CREATE_LINE
]
->
store
(
lock
->
cline
,
true
));
fields
[
MUTEXES_CREATE_LINE
]
->
set_notnull
();
OK
(
field_store_ulint
(
fields
[
MUTEXES_OS_WAITS
],
(
longlong
)
mutex
->
count_os_wait
));
OK
(
fields
[
MUTEXES_OS_WAITS
]
->
store
(
lock
->
count_os_wait
,
true
));
fields
[
MUTEXES_OS_WAITS
]
->
set_notnull
();
OK
(
schema_table_store_record
(
thd
,
tables
->
table
));
}
...
...
@@ -9108,44 +9110,59 @@ i_s_innodb_mutexes_fill_table(
mutex_exit
(
&
mutex_list_mutex
);
#endif
/* JAN_TODO_FIXME */
mutex_enter
(
&
rw_lock_list_mutex
);
{
struct
Locking
{
Locking
()
{
mutex_enter
(
&
rw_lock_list_mutex
);
}
~
Locking
()
{
mutex_exit
(
&
rw_lock_list_mutex
);
}
}
locking
;
for
(
lock
=
UT_LIST_GET_FIRST
(
rw_lock_list
);
lock
!=
NULL
;
lock
=
UT_LIST_GET_NEXT
(
list
,
lock
))
{
if
(
lock
->
count_os_wait
==
0
)
{
continue
;
}
for
(
lock
=
UT_LIST_GET_FIRST
(
rw_lock_list
);
lock
!=
NULL
;
lock
=
UT_LIST_GET_NEXT
(
list
,
lock
))
{
if
(
lock
->
count_os_wait
==
0
)
{
continue
;
}
if
(
buf_pool_is_block_lock
(
lock
))
{
block_lock
=
lock
;
block_lock_oswait_count
+=
lock
->
count_os_wait
;
continue
;
}
if
(
buf_pool_is_block_lock
(
lock
))
{
block_lock
=
lock
;
block_lock_oswait_count
+=
lock
->
count_os_wait
;
continue
;
//OK(field_store_string(fields[MUTEXES_NAME],
// lock->lock_name));
OK
(
field_store_string
(
fields
[
MUTEXES_CREATE_FILE
],
innobase_basename
(
lock
->
cfile_name
)));
OK
(
fields
[
MUTEXES_CREATE_LINE
]
->
store
(
lock
->
cline
,
true
));
fields
[
MUTEXES_CREATE_LINE
]
->
set_notnull
();
OK
(
fields
[
MUTEXES_OS_WAITS
]
->
store
(
lock
->
count_os_wait
,
true
));
fields
[
MUTEXES_OS_WAITS
]
->
set_notnull
();
OK
(
schema_table_store_record
(
thd
,
tables
->
table
));
}
//OK(field_store_string(fields[MUTEXES_NAME], lock->lock_name));
OK
(
field_store_string
(
fields
[
MUTEXES_CREATE_FILE
],
innobase_basename
(
lock
->
cfile_name
)));
OK
(
fields
[
MUTEXES_CREATE_LINE
]
->
store
(
lock
->
cline
,
true
));
fields
[
MUTEXES_CREATE_LINE
]
->
set_notnull
();
OK
(
field_store_ulint
(
fields
[
MUTEXES_OS_WAITS
],
(
longlong
)
lock
->
count_os_wait
));
OK
(
schema_table_store_record
(
thd
,
tables
->
table
));
}
if
(
block_lock
)
{
char
buf1
[
IO_SIZE
];
snprintf
(
buf1
,
sizeof
buf1
,
"combined %s"
,
innobase_basename
(
block_lock
->
cfile_name
));
//OK(field_store_string(fields[MUTEXES_NAME], block_lock->lock_name));
OK
(
field_store_string
(
fields
[
MUTEXES_CREATE_FILE
],
buf1
));
OK
(
fields
[
MUTEXES_CREATE_LINE
]
->
store
(
block_lock
->
cline
,
true
));
fields
[
MUTEXES_CREATE_LINE
]
->
set_notnull
();
OK
(
field_store_ulint
(
fields
[
MUTEXES_OS_WAITS
],
(
longlong
)
block_lock_oswait_count
));
OK
(
schema_table_store_record
(
thd
,
tables
->
table
));
if
(
block_lock
)
{
char
buf1
[
IO_SIZE
];
snprintf
(
buf1
,
sizeof
buf1
,
"combined %s"
,
innobase_basename
(
block_lock
->
cfile_name
));
//OK(field_store_string(fields[MUTEXES_NAME],
// block_lock->lock_name));
OK
(
field_store_string
(
fields
[
MUTEXES_CREATE_FILE
],
buf1
));
OK
(
fields
[
MUTEXES_CREATE_LINE
]
->
store
(
block_lock
->
cline
,
true
));
fields
[
MUTEXES_CREATE_LINE
]
->
set_notnull
();
OK
(
fields
[
MUTEXES_OS_WAITS
]
->
store
(
block_lock_oswait_count
,
true
));
fields
[
MUTEXES_OS_WAITS
]
->
set_notnull
();
OK
(
schema_table_store_record
(
thd
,
tables
->
table
));
}
}
mutex_exit
(
&
rw_lock_list_mutex
);
DBUG_RETURN
(
0
);
}
...
...
storage/xtradb/handler/i_s.cc
View file @
e84dc567
/*****************************************************************************
Copyright (c) 2007, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2014, 201
8
, MariaDB Corporation.
Copyright (c) 2014, 201
9
, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
...
...
@@ -9120,78 +9120,105 @@ i_s_innodb_mutexes_fill_table(
DBUG_RETURN
(
0
);
}
mutex_enter
(
&
mutex_list_mutex
);
{
struct
Locking
{
Locking
()
{
mutex_enter
(
&
mutex_list_mutex
);
}
~
Locking
()
{
mutex_exit
(
&
mutex_list_mutex
);
}
}
locking
;
for
(
mutex
=
UT_LIST_GET_FIRST
(
mutex_list
);
mutex
!=
NULL
;
mutex
=
UT_LIST_GET_NEXT
(
list
,
mutex
))
{
if
(
mutex
->
count_os_wait
==
0
)
{
continue
;
}
for
(
mutex
=
UT_LIST_GET_FIRST
(
mutex_list
);
mutex
!=
NULL
;
mutex
=
UT_LIST_GET_NEXT
(
list
,
mutex
))
{
if
(
mutex
->
count_os_wait
==
0
)
{
continue
;
}
if
(
buf_pool_is_block_mutex
(
mutex
))
{
block_mutex
=
mutex
;
block_mutex_oswait_count
+=
mutex
->
count_os_wait
;
continue
;
}
if
(
buf_pool_is_block_mutex
(
mutex
))
{
block_mutex
=
mutex
;
block_mutex_oswait_count
+=
mutex
->
count_os_wait
;
continue
;
OK
(
field_store_string
(
fields
[
MUTEXES_NAME
],
mutex
->
cmutex_name
));
OK
(
field_store_string
(
fields
[
MUTEXES_CREATE_FILE
],
innobase_basename
(
mutex
->
cfile_name
)));
OK
(
field_store_ulint
(
fields
[
MUTEXES_CREATE_LINE
],
mutex
->
cline
));
OK
(
field_store_ulint
(
fields
[
MUTEXES_OS_WAITS
],
mutex
->
count_os_wait
));
OK
(
schema_table_store_record
(
thd
,
tables
->
table
));
}
OK
(
field_store_string
(
fields
[
MUTEXES_NAME
],
mutex
->
cmutex_name
));
OK
(
field_store_string
(
fields
[
MUTEXES_CREATE_FILE
],
innobase_basename
(
mutex
->
cfile_name
)));
OK
(
field_store_ulint
(
fields
[
MUTEXES_CREATE_LINE
],
mutex
->
cline
));
OK
(
field_store_ulint
(
fields
[
MUTEXES_OS_WAITS
],
(
longlong
)
mutex
->
count_os_wait
));
OK
(
schema_table_store_record
(
thd
,
tables
->
table
));
}
if
(
block_mutex
)
{
char
buf1
[
IO_SIZE
];
my_snprintf
(
buf1
,
sizeof
buf1
,
"combined %s"
,
innobase_basename
(
block_mutex
->
cfile_name
));
OK
(
field_store_string
(
fields
[
MUTEXES_NAME
],
block_mutex
->
cmutex_name
));
OK
(
field_store_string
(
fields
[
MUTEXES_CREATE_FILE
],
buf1
));
OK
(
field_store_ulint
(
fields
[
MUTEXES_CREATE_LINE
],
block_mutex
->
cline
));
OK
(
field_store_ulint
(
fields
[
MUTEXES_OS_WAITS
],
(
longlong
)
block_mutex_oswait_count
));
OK
(
schema_table_store_record
(
thd
,
tables
->
table
));
if
(
block_mutex
)
{
char
buf1
[
IO_SIZE
];
my_snprintf
(
buf1
,
sizeof
buf1
,
"combined %s"
,
innobase_basename
(
block_mutex
->
cfile_name
));
OK
(
field_store_string
(
fields
[
MUTEXES_NAME
],
block_mutex
->
cmutex_name
));
OK
(
field_store_string
(
fields
[
MUTEXES_CREATE_FILE
],
buf1
));
OK
(
field_store_ulint
(
fields
[
MUTEXES_CREATE_LINE
],
block_mutex
->
cline
));
OK
(
field_store_ulint
(
fields
[
MUTEXES_OS_WAITS
],
block_mutex_oswait_count
));
OK
(
schema_table_store_record
(
thd
,
tables
->
table
));
}
}
mutex_exit
(
&
mutex_list_mutex
);
{
struct
Locking
{
Locking
()
{
mutex_enter
(
&
rw_lock_list_mutex
);
}
~
Locking
()
{
mutex_exit
(
&
rw_lock_list_mutex
);
}
}
locking
;
for
(
lock
=
UT_LIST_GET_FIRST
(
rw_lock_list
);
lock
!=
NULL
;
lock
=
UT_LIST_GET_NEXT
(
list
,
lock
))
{
if
(
lock
->
count_os_wait
==
0
)
{
continue
;
}
mutex_enter
(
&
rw_lock_list_mutex
);
if
(
buf_pool_is_block_lock
(
lock
))
{
block_lock
=
lock
;
block_lock_oswait_count
+=
lock
->
count_os_wait
;
continue
;
}
for
(
lock
=
UT_LIST_GET_FIRST
(
rw_lock_list
);
lock
!=
NULL
;
lock
=
UT_LIST_GET_NEXT
(
list
,
lock
))
{
if
(
lock
->
count_os_wait
==
0
)
{
continue
;
OK
(
field_store_string
(
fields
[
MUTEXES_NAME
],
lock
->
lock_name
));
OK
(
field_store_string
(
fields
[
MUTEXES_CREATE_FILE
],
innobase_basename
(
lock
->
cfile_name
)));
OK
(
field_store_ulint
(
fields
[
MUTEXES_CREATE_LINE
],
lock
->
cline
));
OK
(
field_store_ulint
(
fields
[
MUTEXES_OS_WAITS
],
lock
->
count_os_wait
));
OK
(
schema_table_store_record
(
thd
,
tables
->
table
));
}
if
(
buf_pool_is_block_lock
(
lock
))
{
block_lock
=
lock
;
block_lock_oswait_count
+=
lock
->
count_os_wait
;
continue
;
if
(
block_lock
)
{
char
buf1
[
IO_SIZE
];
my_snprintf
(
buf1
,
sizeof
buf1
,
"combined %s"
,
innobase_basename
(
block_lock
->
cfile_name
));
OK
(
field_store_string
(
fields
[
MUTEXES_NAME
],
block_lock
->
lock_name
));
OK
(
field_store_string
(
fields
[
MUTEXES_CREATE_FILE
],
buf1
));
OK
(
field_store_ulint
(
fields
[
MUTEXES_CREATE_LINE
],
block_lock
->
cline
));
OK
(
field_store_ulint
(
fields
[
MUTEXES_OS_WAITS
],
block_lock_oswait_count
));
OK
(
schema_table_store_record
(
thd
,
tables
->
table
));
}
OK
(
field_store_string
(
fields
[
MUTEXES_NAME
],
lock
->
lock_name
));
OK
(
field_store_string
(
fields
[
MUTEXES_CREATE_FILE
],
innobase_basename
(
lock
->
cfile_name
)));
OK
(
field_store_ulint
(
fields
[
MUTEXES_CREATE_LINE
],
lock
->
cline
));
OK
(
field_store_ulint
(
fields
[
MUTEXES_OS_WAITS
],
(
longlong
)
lock
->
count_os_wait
));
OK
(
schema_table_store_record
(
thd
,
tables
->
table
));
}
if
(
block_lock
)
{
char
buf1
[
IO_SIZE
];
my_snprintf
(
buf1
,
sizeof
buf1
,
"combined %s"
,
innobase_basename
(
block_lock
->
cfile_name
));
OK
(
field_store_string
(
fields
[
MUTEXES_NAME
],
block_lock
->
lock_name
));
OK
(
field_store_string
(
fields
[
MUTEXES_CREATE_FILE
],
buf1
));
OK
(
field_store_ulint
(
fields
[
MUTEXES_CREATE_LINE
],
block_lock
->
cline
));
OK
(
field_store_ulint
(
fields
[
MUTEXES_OS_WAITS
],
(
longlong
)
block_lock_oswait_count
));
OK
(
schema_table_store_record
(
thd
,
tables
->
table
));
}
mutex_exit
(
&
rw_lock_list_mutex
);
DBUG_RETURN
(
0
);
}
...
...
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