summaryrefslogtreecommitdiff
path: root/storage/heap/hp_static.c
diff options
context:
space:
mode:
authorMarc Alff <marc.alff@sun.com>2009-12-04 18:26:15 -0700
committerMarc Alff <marc.alff@sun.com>2009-12-04 18:26:15 -0700
commit04fe40393d9d0ef81cc6a770bda67ab67fe4154e (patch)
tree9ca152d7f2ac50cfd8b7fca83f87cb06148d97a0 /storage/heap/hp_static.c
parent560e76c567c3551f5a4320acfc954200e8330ad8 (diff)
downloadmariadb-git-04fe40393d9d0ef81cc6a770bda67ab67fe4154e.tar.gz
WL#2360 Performance schema
Part II, engines instrumentation
Diffstat (limited to 'storage/heap/hp_static.c')
-rw-r--r--storage/heap/hp_static.c33
1 files changed, 32 insertions, 1 deletions
diff --git a/storage/heap/hp_static.c b/storage/heap/hp_static.c
index a501ba7e359..e1ca7d1f445 100644
--- a/storage/heap/hp_static.c
+++ b/storage/heap/hp_static.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2001 MySQL AB
+/* Copyright (C) 2000-2001 MySQL AB, 2008-2009 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
@@ -23,3 +23,34 @@
#endif
LIST *heap_open_list=0,*heap_share_list=0;
+
+#ifdef HAVE_PSI_INTERFACE
+#ifdef THREAD
+PSI_mutex_key hp_key_mutex_HP_SHARE_intern_lock;
+
+static PSI_mutex_info all_heap_mutexes[]=
+{
+ { & hp_key_mutex_HP_SHARE_intern_lock, "HP_SHARE::intern_lock", 0}
+ /*
+ Note:
+ THR_LOCK_heap is part of mysys, not storage/heap.
+ */
+};
+#endif /* THREAD */
+
+void init_heap_psi_keys()
+{
+#ifdef THREAD
+ const char* category= "memory";
+ int count;
+
+ if (PSI_server == NULL)
+ return;
+
+ count= array_elements(all_heap_mutexes);
+ PSI_server->register_mutex(category, all_heap_mutexes, count);
+#endif /* THREAD */
+}
+#endif /* HAVE_PSI_INTERFACE */
+
+