I am trying to create a valgrind
(cachegrind) analysis of MySQL client connections.
I am running valgrind
with --trace-children=yes
.
What I want to find is one of the internal method calls, to see the call graph when it is being used...
After running valgrind
--trace-children=yes ./bin/mysqld_safe
I get many dump files that were written that moment.
I am waiting 5 minutes (for letting the new files that I expect to be created to have a different "last modified" date.
After these 5 minutes I open 30 sessions, and floud the system with small transactions, and when I am done - shutdown the MySQL.
Now the questions:
1. After running 30 transactions and shutting down the system, only 3 files are modified. I expected to see 30 files, cause I though MySQL spans processes. So first - can someone confirm MySQL spans threads and not processes for each session?
I see three different database log calls: one to a DUMMY, one to
binlog
, and one to theinnodb
log. Can someone explain why thebinlog
and the DUMMY are there, and what's the difference between them? (I guess the DUMMY is because of theinnodb
, but I don't understand why thebinlog
is there if my first guess is true).Is there a better way to do this analysis?
Is there a tool likekcachegrind
that can open multiple files and show the summery from all of them? (or is it possible somehow withinkcachegrind
?)
Thanks!!
btw - for people who extend and develop MySQL - there are many interesting things there that can be improved....