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
89ae5d7f
Commit
89ae5d7f
authored
Jan 22, 2018
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allocate mutex_monitor, create_tracker statically
parent
30f1d2f6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
26 deletions
+12
-26
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+5
-5
storage/innobase/include/ut0mutex.h
storage/innobase/include/ut0mutex.h
+1
-1
storage/innobase/sync/sync0debug.cc
storage/innobase/sync/sync0debug.cc
+5
-19
storage/innobase/sync/sync0sync.cc
storage/innobase/sync/sync0sync.cc
+1
-1
No files found.
storage/innobase/handler/ha_innodb.cc
View file @
89ae5d7f
...
...
@@ -16740,7 +16740,7 @@ innodb_show_mutex_status(
DBUG_ASSERT
(
hton
==
innodb_hton_ptr
);
mutex_monitor
->
iterate
(
collector
);
mutex_monitor
.
iterate
(
collector
);
if
(
!
collector
.
to_string
(
hton
,
thd
,
stat_print
))
{
DBUG_RETURN
(
1
);
...
...
@@ -18907,7 +18907,7 @@ innodb_monitor_set_option(
if
(
MONITOR_IS_ON
(
MONITOR_LATCHES
))
{
mutex_monitor
->
enable
();
mutex_monitor
.
enable
();
}
break
;
...
...
@@ -18922,7 +18922,7 @@ innodb_monitor_set_option(
if
(
!
MONITOR_IS_ON
(
MONITOR_LATCHES
))
{
mutex_monitor
->
disable
();
mutex_monitor
.
disable
();
}
break
;
...
...
@@ -18931,13 +18931,13 @@ innodb_monitor_set_option(
if
(
monitor_id
==
(
MONITOR_LATCHES
))
{
mutex_monitor
->
reset
();
mutex_monitor
.
reset
();
}
break
;
case
MONITOR_RESET_ALL_VALUE
:
srv_mon_reset_all
(
monitor_id
);
mutex_monitor
->
reset
();
mutex_monitor
.
reset
();
break
;
default:
...
...
storage/innobase/include/ut0mutex.h
View file @
89ae5d7f
...
...
@@ -164,7 +164,7 @@ class MutexMonitor {
};
/** Defined in sync0sync.cc */
extern
MutexMonitor
*
mutex_monitor
;
extern
MutexMonitor
mutex_monitor
;
/**
Creates, or rather, initializes a mutex object in a specified memory
...
...
storage/innobase/sync/sync0debug.cc
View file @
89ae5d7f
/*****************************************************************************
Copyright (c) 2014, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, MariaDB Corporation.
Copyright (c) 2017,
2018,
MariaDB Corporation.
Portions of this file contain modifications contributed and copyrighted by
Google, Inc. Those modifications are gratefully acknowledged and are described
...
...
@@ -1705,7 +1705,7 @@ struct CreateTracker {
};
/** Track latch creation location. For reducing the size of the latches */
static
CreateTracker
*
create_tracker
;
static
CreateTracker
create_tracker
;
/** Register a latch, called when it is created
@param[in] ptr Latch instance that was created
...
...
@@ -1717,7 +1717,7 @@ sync_file_created_register(
const
char
*
filename
,
uint16_t
line
)
{
create_tracker
->
register_latch
(
ptr
,
filename
,
line
);
create_tracker
.
register_latch
(
ptr
,
filename
,
line
);
}
/** Deregister a latch, called when it is destroyed
...
...
@@ -1725,7 +1725,7 @@ sync_file_created_register(
void
sync_file_created_deregister
(
const
void
*
ptr
)
{
create_tracker
->
deregister_latch
(
ptr
);
create_tracker
.
deregister_latch
(
ptr
);
}
/** Get the string where the file was created. Its format is "name:line"
...
...
@@ -1734,7 +1734,7 @@ sync_file_created_deregister(const void* ptr)
std
::
string
sync_file_created_get
(
const
void
*
ptr
)
{
return
(
create_tracker
->
get
(
ptr
));
return
(
create_tracker
.
get
(
ptr
));
}
/** Initializes the synchronization data structures. */
...
...
@@ -1744,12 +1744,6 @@ sync_check_init()
ut_ad
(
!
LatchDebug
::
s_initialized
);
ut_d
(
LatchDebug
::
s_initialized
=
true
);
/** For collecting latch statistic - SHOW ... MUTEX */
mutex_monitor
=
UT_NEW_NOKEY
(
MutexMonitor
());
/** For trcking mutex creation location */
create_tracker
=
UT_NEW_NOKEY
(
CreateTracker
());
sync_latch_meta_init
();
/* Init the rw-lock & mutex list and create the mutex to protect it. */
...
...
@@ -1773,14 +1767,6 @@ sync_check_close()
sync_array_close
();
UT_DELETE
(
mutex_monitor
);
mutex_monitor
=
NULL
;
UT_DELETE
(
create_tracker
);
create_tracker
=
NULL
;
sync_latch_meta_destroy
();
}
storage/innobase/sync/sync0sync.cc
View file @
89ae5d7f
...
...
@@ -118,7 +118,7 @@ mysql_pfs_key_t trx_purge_latch_key;
#endif
/* UNIV_PFS_RWLOCK */
/** For monitoring active mutexes */
MutexMonitor
*
mutex_monitor
;
MutexMonitor
mutex_monitor
;
/**
Prints wait info of the sync system.
...
...
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