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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
ebc4c333
Commit
ebc4c333
authored
Jan 27, 2010
by
Marc Alff
Browse files
Options
Browse Files
Download
Plain Diff
local merge
parents
af37c866
5cbc2ec9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
18 deletions
+34
-18
include/mysql/psi/psi.h
include/mysql/psi/psi.h
+6
-1
include/mysql/psi/psi_abi_v1.h.pp
include/mysql/psi/psi_abi_v1.h.pp
+2
-0
mysys/my_init.c
mysys/my_init.c
+18
-17
storage/perfschema/pfs.cc
storage/perfschema/pfs.cc
+8
-0
No files found.
include/mysql/psi/psi.h
View file @
ebc4c333
/* Copyright (C) 2008-20
09
Sun Microsystems, Inc
/* Copyright (C) 2008-20
10
Sun Microsystems, Inc
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
...
...
@@ -614,6 +614,9 @@ typedef void (*set_thread_v1_t)(struct PSI_thread *thread);
/** Delete the current thread instrumentation. */
typedef
void
(
*
delete_current_thread_v1_t
)(
void
);
/** Delete a thread instrumentation. */
typedef
void
(
*
delete_thread_v1_t
)(
struct
PSI_thread
*
thread
);
/**
Get a mutex instrumentation locker.
@param mutex the instrumented mutex to lock
...
...
@@ -890,6 +893,8 @@ struct PSI_v1
set_thread_v1_t
set_thread
;
/** @sa delete_current_thread_v1_t. */
delete_current_thread_v1_t
delete_current_thread
;
/** @sa delete_thread_v1_t. */
delete_thread_v1_t
delete_thread
;
/** @sa get_thread_mutex_locker_v1_t. */
get_thread_mutex_locker_v1_t
get_thread_mutex_locker
;
/** @sa get_thread_rwlock_locker_v1_t. */
...
...
include/mysql/psi/psi_abi_v1.h.pp
View file @
ebc4c333
...
...
@@ -127,6 +127,7 @@ typedef void (*set_thread_id_v1_t)(struct PSI_thread *thread,
typedef
struct
PSI_thread
*
(
*
get_thread_v1_t
)(
void
);
typedef
void
(
*
set_thread_v1_t
)(
struct
PSI_thread
*
thread
);
typedef
void
(
*
delete_current_thread_v1_t
)(
void
);
typedef
void
(
*
delete_thread_v1_t
)(
struct
PSI_thread
*
thread
);
typedef
struct
PSI_mutex_locker
*
(
*
get_thread_mutex_locker_v1_t
)
(
struct
PSI_mutex
*
mutex
,
enum
PSI_mutex_operation
op
);
typedef
struct
PSI_rwlock_locker
*
(
*
get_thread_rwlock_locker_v1_t
)
...
...
@@ -204,6 +205,7 @@ struct PSI_v1
get_thread_v1_t
get_thread
;
set_thread_v1_t
set_thread
;
delete_current_thread_v1_t
delete_current_thread
;
delete_thread_v1_t
delete_thread
;
get_thread_mutex_locker_v1_t
get_thread_mutex_locker
;
get_thread_rwlock_locker_v1_t
get_thread_rwlock_locker
;
get_thread_cond_locker_v1_t
get_thread_cond_locker
;
...
...
mysys/my_init.c
View file @
ebc4c333
...
...
@@ -74,6 +74,8 @@ static MYSQL_FILE instrumented_stdin;
*/
my_bool
my_basic_init
(
void
)
{
char
*
str
;
if
(
my_basic_init_done
)
return
0
;
my_basic_init_done
=
1
;
...
...
@@ -82,6 +84,19 @@ my_bool my_basic_init(void)
my_umask
=
0660
;
/* Default umask for new files */
my_umask_dir
=
0700
;
/* Default umask for new directories */
#ifndef VMS
/* Default creation of new files */
if
((
str
=
getenv
(
"UMASK"
))
!=
0
)
my_umask
=
(
int
)
(
atoi_octal
(
str
)
|
0600
);
/* Default creation of new dir's */
if
((
str
=
getenv
(
"UMASK_DIR"
))
!=
0
)
my_umask_dir
=
(
int
)
(
atoi_octal
(
str
)
|
0700
);
#endif
/* $HOME is needed early to parse configuration files located in ~/ */
if
((
home_dir
=
getenv
(
"HOME"
))
!=
0
)
home_dir
=
intern_filename
(
home_dir_buff
,
home_dir
);
init_glob_errs
();
instrumented_stdin
.
m_file
=
stdin
;
...
...
@@ -124,7 +139,6 @@ my_bool my_basic_init(void)
my_bool
my_init
(
void
)
{
char
*
str
;
if
(
my_init_done
)
return
0
;
my_init_done
=
1
;
...
...
@@ -142,24 +156,11 @@ my_bool my_init(void)
{
DBUG_ENTER
(
"my_init"
);
DBUG_PROCESS
((
char
*
)
(
my_progname
?
my_progname
:
"unknown"
));
if
(
!
home_dir
)
{
/* Don't initialize twice */
my_win_init
();
if
((
home_dir
=
getenv
(
"HOME"
))
!=
0
)
home_dir
=
intern_filename
(
home_dir_buff
,
home_dir
);
#ifndef VMS
/* Default creation of new files */
if
((
str
=
getenv
(
"UMASK"
))
!=
0
)
my_umask
=
(
int
)
(
atoi_octal
(
str
)
|
0600
);
/* Default creation of new dir's */
if
((
str
=
getenv
(
"UMASK_DIR"
))
!=
0
)
my_umask_dir
=
(
int
)
(
atoi_octal
(
str
)
|
0700
);
#endif
my_win_init
();
#ifdef VMS
init_ctype
();
/* Stupid linker don't link _ctype.c */
init_ctype
();
/* Stupid linker don't link _ctype.c */
#endif
DBUG_PRINT
(
"exit"
,(
"home: '%s'"
,
home_dir
));
}
DBUG_PRINT
(
"exit"
,
(
"home: '%s'"
,
home_dir
));
#ifdef __WIN__
win32_init_tcp_ip
();
#endif
...
...
storage/perfschema/pfs.cc
View file @
ebc4c333
...
...
@@ -1081,6 +1081,13 @@ static void delete_current_thread_v1(void)
}
}
static
void
delete_thread_v1
(
PSI_thread
*
thread
)
{
PFS_thread
*
pfs
=
reinterpret_cast
<
PFS_thread
*>
(
thread
);
if
(
pfs
!=
NULL
)
destroy_thread
(
pfs
);
}
static
PSI_mutex_locker
*
get_thread_mutex_locker_v1
(
PSI_mutex
*
mutex
,
PSI_mutex_operation
op
)
{
...
...
@@ -2007,6 +2014,7 @@ PSI_v1 PFS_v1=
get_thread_v1
,
set_thread_v1
,
delete_current_thread_v1
,
delete_thread_v1
,
get_thread_mutex_locker_v1
,
get_thread_rwlock_locker_v1
,
get_thread_cond_locker_v1
,
...
...
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