summaryrefslogtreecommitdiff
path: root/storage/perfschema
Commit message (Collapse)AuthorAgeFilesLines
...
| | | | | * Bug#56521 Assertion failed: (m_state == 2), function allocated_to_free, ↵Marc Alff2010-09-091-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pfs_lock.h (138) Before this fix, it was possible to build the server: - with the performance schema - with a dummy implementation of my_atomic (MY_ATOMIC_MODE_DUMMY). In this case, the resulting binary will just crash, as this configuration is not supported. This fix enforces that the build will fail with a compilation error in this configuration, instead of resulting in a broken binary.
| | | | | * local mergeMarc Alff2010-08-272-19/+72
| | | | | |\
| | | | | | * Bug# 53874 "SETUP_INSTRUMENTS.TIMED='NO' should not change TIMER_WAITChristopher Powers2010-08-262-19/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handle combined instrument states of ENABLED and/or TIMED: ENABLED TIMED 1 1 Aggregate stats, increment counter 1 0 Increment counter 0 1 Do nothing 0 0 Do nothing
| | | | | * | Bug#55576 Two perfschema tests failed on mysql-next-mr-innodb PB2 testsMarc Alff2010-08-241-3/+3
| | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this fix, some tests failed due to lack of instrumentation slots in the performance schema, because the default sizing was too low. Now that more code has been instrumented, the default sizing has to be adjusted to match the current instrumentation consumption. This change: - increases the number of rwlock classes from 20 to 30, - increases the number of rwlock and mutex instances to 1 million. Both are to account for the volume of data instrumented when the innodb storage engine is used (because of the innodb buffer pool). Adjusted the test output accordingly.
| | | | | * Bug#53874, "SETUP_INSTRUMENTS.TIMED='NO' should not change TIMER_WAIT in ↵Christopher Powers2010-08-191-22/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | aggregations" end_*_wait() functions now honor TIMER_STATE_UNTIMED
| | | | | * Bug#55416 Renaming of performance_schema tables for 5.5Marc Alff2010-08-1211-641/+298
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed table SETUP_OBJECTS. Renamed table PROCESSLIST to THREADS. Renamed table EVENTS_WAITS_SUMMARY_BY_EVENT_NAME to EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME. Adjusted Makefiles, code and tests accordingly.
| | | | | * Bug#55462 Performance schema: reduce the overhead of ↵Marc Alff2010-08-124-39/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PFS_events_waits::m_wait_class This is a performance improvement fix. Removed the "volatile" property of PFS_events_waits::m_wait_class. Simplified the code accordingly.
| | | | | * WL#5498: Remove dead and unused source codeDavi Arnaut2010-07-231-3/+2
| | | | | | | | | | | | | | | | | | Remove workarounds for ancient systems.
| | | | | * WL#5498: Remove dead and unused source codeDavi Arnaut2010-07-231-1/+0
| | | | | | | | | | | | | | | | | | Remove unused variables.
| | | | | * Bug#52134 performance schema file io, symlink in pathMarc Alff2010-07-151-6/+48
| | | | | | | | | | | | | | | | | | | | | | | | Backport from mysql-next-mr (5.6) to mysql-trunk (5.5)
| | | | | * Bug#53617 Missing performance schema tables not reported in the server log ↵Marc Alff2010-07-151-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | at startup Backport from mysql-next-mr (5.6) to mysql-trunk (5.5)
| | | | | * Bug#52502 Performance schema does not start with large mutex_instance buffersMarc Alff2010-07-153-79/+202
| | | | | | | | | | | | | | | | | | Backport from mysql-next-mr (5.6) to mysql-trunk (5.5)
| | | | | * Bug#52586 Misleading error message on attempt to access a P_S table using a ↵Marc Alff2010-07-151-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wrong name Backport from mysql-next-mr (5.6) to mysql-trunk (5.5)
| | | | | * Bug#53566 SHOW ENGINE PERFORMANCE_SCHEMA STATUS reports less memory than ↵Marc Alff2010-07-153-11/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | really used Backporting the fix from myql-next-mr (5.6) to mysql-trunk (5.5)
| | | | | * Bug#53148 Remove PFS_readonly_tableMarc Alff2010-07-1518-114/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fix is for cleanup, to resolve a remaining code review item. Backport from mysql-next-mr (5.6) to mysql-trunk (5.5).
| | | | | * Fixed Copyright headers in storage/perfschemaMarc Alff2010-07-1539-144/+135
| | | | | | | | | | | | | | | | | | | | | | | | Fixed minor merge issues with #includes
| | | | | * Bug#55087 Performance schema: optimization of the instrumentation interfaceMarc Alff2010-07-092-46/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change is for performance optimization. Fixed the performance schema instrumentation interface as follows: - simplified mysql_unlock_mutex() - simplified mysql_unlock_rwlock() - simplified mysql_cond_signal() - simplified mysql_cond_broadcast() Changed the get_thread_XXX_locker apis to have one extra parameter, to provide memory to the instrumentation implementation. This API change allows to use memory provided by the caller, to avoid having to use thread local storage. Using this extra parameter will be done in a separate fix, this change is for the interface only. Adjusted all the code and unit tests accordingly.
| | | | | * Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabledDavi Arnaut2010-07-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Essentially, the problem is that safemalloc is excruciatingly slow as it checks all allocated blocks for overrun at each memory management primitive, yielding a almost exponential slowdown for the memory management functions (malloc, realloc, free). The overrun check basically consists of verifying some bytes of a block for certain magic keys, which catches some simple forms of overrun. Another minor problem is violation of aliasing rules and that its own internal list of blocks is prone to corruption. Another issue with safemalloc is rather the maintenance cost as the tool has a significant impact on the server code. Given the magnitude of memory debuggers available nowadays, especially those that are provided with the platform malloc implementation, maintenance of a in-house and largely obsolete memory debugger becomes a burden that is not worth the effort due to its slowness and lack of support for detecting more common forms of heap corruption. Since there are third-party tools that can provide the same functionality at a lower or comparable performance cost, the solution is to simply remove safemalloc. Third-party tools can provide the same functionality at a lower or comparable performance cost. The removal of safemalloc also allows a simplification of the malloc wrappers, removing quite a bit of kludge: redefinition of my_malloc, my_free and the removal of the unused second argument of my_free. Since free() always check whether the supplied pointer is null, redudant checks are also removed. Also, this patch adds unit testing for my_malloc and moves my_realloc implementation into the same file as the other memory allocation primitives.
| | | | | * Bug#53445: Build with -Wall and fix warnings that it generatesDavi Arnaut2010-05-314-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix various mismatches between function's language linkage. Any particular function that is declared in C++ but should be callable from C must have C linkage. Note that function types with different linkages are also distinct. Thus, if a function type is declared in C code, it will have C linkage (same if declared in a extern "C" block).
| | | | | * Fix perfschema unittests build on WindowsVladislav Vaintroub2010-04-135-1/+7
| | | | | | | | | | | | | | | | | | pthread_t is not defined unless my_pthread.h is included.
| | | | | * Bug#52754 Build break in mysql-trunk, performance schema unit testMarc Alff2010-04-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tree cleaup after the last major merges in mysql-trunk: The files sql/lex_hash.h and sql/sql_yacc.h are automatically generated, and should not be checked in the configuration management system. These files are now removed. No changes are required for .bzrignore, which already listed these files (and similar files in libmysqld/). The file storage/perfschema/unittest/pfs_timer-t.cc did not build after the header files refactoring affecting mysql_priv.h The file now builds properly using sql_priv.h
| | | | | * WL#5030: Splitting mysql_priv.hMats Kindahl2010-04-061-0/+1
| | | | | | | | | | | | | | | | | | Adding include to build on Windows.
| | | | | * WL#5030: Splitting mysql_priv.hMats Kindahl2010-04-062-0/+2
| | | | | | | | | | | | | | | | | | Adding includes of my_global.h that seems to be necessary on Windows.
| | | | | * WL#5030: Split and remove mysql_priv.hMats Kindahl2010-03-3130-26/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch: - Moves all definitions from the mysql_priv.h file into header files for the component where the variable is defined - Creates header files if the component lacks one - Eliminates all include directives from mysql_priv.h - Eliminates all circular include cycles - Rename time.cc to sql_time.cc - Rename mysql_priv.h to sql_priv.h
| | | | | * local mergeMarc Alff2010-03-071-1/+21
| | | | | |\
| | | | | | * Bug#51738 Unit test pfs_instr-t crashesMarc Alff2010-03-041-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unit test pfs_instr-t: - generates a very long (10,000) bytes file name - calls find_or_create_file. This leads to a buffer overflow in mysys in my_realpath(), because my_realpath and mysys file APIs in general do not test for input parameters: mysys assumes every file name is less that FN_REFLEN in length. Calling find_or_create_file with a very long file name is likely to happen when instrumenting third party code that does not use mysys, so this test is legitimate. The fix is to make find_or_create_file in the performance schema more robust in this case.
| | | | | * | Bug#51741 Unit test pfs-t failing in mysql-next-mr-bugfixingMarc Alff2010-03-041-2/+13
| | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The root cause of the failure is that when Bug#51447 performance schema evil twin files was fixed, instrumented file names got normalized. The pfs-t unit test depends on this file normalization, but it was not updated. This fix aligns pfs-t.cc lookup_file_by_name() with the logic in pfs_instr.cc find_or_create_file().
| | | | | * Bug#51612 Un initialized locker_lost variable in pfs_instr.ccMarc Alff2010-03-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed the missing initialization of locker_lost. This fix is not strictly necessary, but is desirable to re-align the code from 5.5 and 6.0, and reduce the spurious code differences. This will facilitate maintenance and help to apply patches cleanly, for merges.
| | | | | * Bug#51447 performance schema evil twin filesMarc Alff2010-02-261-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this fix, the performance schema file instrumentation would treat: - a relative path to a file - an absolute path to the same file as two different files. This would lead to: - separate aggregation counters - file leaks when a file is removed. With this fix, a relative and absolute path are resolved to the same file instrument.
| | | | | * Followup to Bug#45225 Locking: hang if drop table with no timeoutJon Olav Hauglid2010-02-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch prevents system threads and system table accesses from using user-specified values for "lock_wait_timeout". Instead all such accesses are done using the default value (1 year). This prevents background tasks (such as replication, events, accessing stored function definitions, logging, reading time-zone information, etc.) from failing in cases where the global value of "lock_wait_timeout" is set very low. The patch also simplifies the open tables API. Rather than adding another convenience function for opening and locking system tables, this patch removes most of the existing convenience functions for open_and_lock_tables_derived(). Before, open_and_lock_tables() was a convenience function that enforced derived tables handling, while open_and_lock_tables_derived() was the main function where derived tables handling was optional. Now, this convencience function is gone and the main function is renamed to open_and_lock_tables(). No test case added as it would have required the use of --sleep to check that system threads and system tables have a different timeout value from the user-specified "lock_wait_timeout" system variable.
| | | | | * mergeVladislav Vaintroub2010-02-161-0/+2
| | | | | |\
| | | | | | * Manual merge from mysql-next-mr.Alexander Nozdrin2010-02-152-2/+10
| | | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: - sql/log_event.cc - sql/sql_class.h
| | | | | | * | Merge next-mr -> next-4284-merge.Konstantin Osipov2010-02-041-0/+2
| | | | | | | |
| | | | | * | | mergeVladislav Vaintroub2010-02-132-2/+10
| | | | | |\ \ \ | | | | | | | |/ | | | | | | |/|
| | | | | | * | Bug#44210 Performance schema: pool-of-threads threads instrumentation is missingMarc Alff2010-01-261-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WL#5136 Pool of threads Added an explicit delete_thread() API in the instrumentation, to be used by the pool of threads implementations.
| | | | | | * | Bug#50478 perfschema.tampered_perfschema_table1 fails sporadically onMarc Alff2010-01-221-2/+2
| | | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows and Solaris Reviewed every call to my_error() using the va_args parameters, to make sure the arguments type are ok. Fixed the broken calls to my_error() to pass a strings as 'char *', not LEX_STRING.
| | | | | * | Cleanup casing in MYSQL_ADD_PLUGIN, patch provided by KentVladislav Vaintroub2010-02-011-1/+1
| | | | | | |
| | | | | * | Post-merge fixes , define HAVE_RWLOCK_T on Solaris defineVladislav Vaintroub2010-01-142-14/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | DISABLE_MYSQL_THREAD_H for strings Also, enable unittests for perfschema
| | | | | * | mergeVladislav Vaintroub2010-01-141-3/+1
| | | | | |/
| | | | | * WL#2360 Performance schemaMarc Alff2010-01-1164-0/+16877
| | | | | | | | | | | | | | | | | | | | Part V: performance schema implementation
| * | | | Merge branch '10.2' into 10.3Oleksandr Byelkin2019-05-125-19/+20
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.1 into 10.2Marko Mäkelä2019-05-105-19/+20
| | |\ \ \ | | | |/ /
| | | * | MDEV-19399 do not call slow my_timer_init() several timesEugene Kosov2019-05-105-19/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No functional change. Call my_timer_init() only once and then reuse it from InnoDB and perfschema storage engines. This patch speeds up empty test for me like this: ./mtr -mem innodb.kevg,xtradb 1.21s user 0.84s system 34% cpu 5.999 total ./mtr -mem innodb.kevg,xtradb 1.12s user 0.60s system 31% cpu 5.385 total
| | | * | Revert "MDEV-19399 do not call slow my_timer_init() several times"Marko Mäkelä2019-05-063-16/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8dc670a5e8d322d8e1871b8c2ae8695a8779f739. The symbol sys_timer_info was not being exported correctly, which caused linking failures on some platforms.
| | | * | MDEV-19399 do not call slow my_timer_init() several timesEugene Kosov2019-05-063-19/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No functional change. Call my_timer_init() only once and then reuse it from InnoDB and perfschema storage engines. This patch speeds up empty test for me like this: ./mtr -mem innodb.kevg,xtradb 1.21s user 0.84s system 34% cpu 5.999 total ./mtr -mem innodb.kevg,xtradb 1.12s user 0.60s system 31% cpu 5.385 total
* | | | | Merge 10.3 into 10.4Marko Mäkelä2019-04-252-23/+23
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | In is_eits_usable(), we disable an assertion that fails due to MDEV-19334.
| * | | | Merge 10.2 into 10.3Marko Mäkelä2019-04-252-23/+23
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.1 into 10.2Marko Mäkelä2019-04-252-23/+23
| | |\ \ \ | | | |/ /
| | | * | MDEV-19172 Reorder fields in PFS_events and PFS_events_waits to speed up ↵Eugene Kosov2019-04-052-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | memcpy() before: (gdb) p sizeof(PFS_events_waits) $1 = 184 after: (gdb) p sizeof(PFS_events_waits) $1 = 160 no functional changes
* | | | | MDEV-18400 - Move shutdown handling to main threadSergey Vojtovich2019-01-291-2/+0
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signal handler is now respoinsible for setting abort_loop and breaking poll() in main thread. The rest is handled by main thread itself. Removed redundant LOCK_error_log init/destroy wrappers. Removed redundant unireg_end(): it is trivial and it has only one caller. Removed unused ready_to_exit from PFS. Removed kill_in_progress: duplicates abort_loop. Removed shutdown_in_progress: duplicates abort_loop. Removed ready_to_exit: was used to make sure main thread waits for cleanups, which are now done by main thread itself. Removed SIGNALS_DONT_BREAK_READ, MAYBE_BROKEN_SYSCALL, kill_broken_server: never defined/used. Make clean_up() static.