Qihua Wu
2009-Apr-04  12:57 UTC
[dtrace-discuss] ustack. what''s the meaning of ---> mysqld`_Z12write_recordP3THDP8st_tableP12st_copy_info+0x53
I traced mysql using dtrace -n
''pid2218::my_malloc:entry{ustack()}'', the
result looks the following,
For the line mysqld`*_Z12*write_record*P3THDP8*st_table*P12*
st_copy_info+0x53,
What''s the meaning of _Z12, P3THDP8, P12? And why there are three
functions
in that line (write_record, st_table,st_copy_info)?
  0  59180                  my_malloc:entry
              mysqld`my_malloc
              mysqld`tree_insert+0x172
              mysqld`hp_rb_write_key+0x70
              mysqld`heap_write+0x93
              mysqld`_ZN7ha_heap9write_rowEPc+0x41
            *  mysqld`_Z12write_recordP3THDP8st_tableP12st_copy_info+0x53*
mysqld`_Z12mysql_insertP3THDP13st_table_listR4ListI4ItemERS3_IS5_ES6_S6_15enum_duplicatesb+0xaa6
              mysqld`_Z21mysql_execute_commandP3THD+0x2e95
              mysqld`_ZN13sp_instr_stmt9exec_coreEP3THDPj+0x1e
mysqld`_ZN13sp_lex_keeper23reset_lex_and_exec_coreEP3THDPjbP8sp_instr+0xa0
              mysqld`_ZN13sp_instr_stmt7executeEP3THDPj+0x4cd
              mysqld`_ZN7sp_head7executeEP3THD+0x38c
              mysqld`_ZN7sp_head17execute_procedureEP3THDP4ListI4ItemE+0x476
              mysqld`_Z21mysql_execute_commandP3THD+0x4783
              mysqld`_Z11mysql_parseP3THDPcj+0x163
              mysqld`_Z16dispatch_command19enum_server_commandP3THDPcj+0xe42
              mysqld`_Z10do_commandP3THD+0xbb
              mysqld`ep_thread_proc+0x184
              libc.so.1`_thr_setup+0x5b
              libc.so.1`_lwp_start
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20090404/52e706ac/attachment.html>
Jon Haslam
2009-Apr-04  13:15 UTC
[dtrace-discuss] ustack. what''s the meaning of ---> mysqld`_Z12write_recordP3THDP8st_tableP12st_copy_info+0x53
Hi, The process being traced is written in C++ and the symbols are mangled and we don''t do any auto-demangling in Solaris. The demangled version of the function looks like: $ dem _Z12write_recordP3THDP8st_tableP12st_copy_info _Z12write_recordP3THDP8st_tableP12st_copy_info == write_record(THD*, st_table*, st_copy_info*) If the application has been built with Sun Studio you can either use dem(1) or pipe the lot through c++filt(1) to make it prettier. Jon.> I traced mysql using dtrace -n ''pid2218::my_malloc:entry{ustack()}'', > the result looks the following, > > For the line > mysqld`*_Z12*write_record*P3THDP8*st_table*P12*st_copy_info+0x53, > What''s the meaning of _Z12, P3THDP8, P12? And why there are three > functions in that line (write_record, st_table,st_copy_info)? > > > 0 59180 my_malloc:entry > mysqld`my_malloc > mysqld`tree_insert+0x172 > mysqld`hp_rb_write_key+0x70 > mysqld`heap_write+0x93 > mysqld`_ZN7ha_heap9write_rowEPc+0x41 > * mysqld`_Z12write_recordP3THDP8st_tableP12st_copy_info+0x53* > > mysqld`_Z12mysql_insertP3THDP13st_table_listR4ListI4ItemERS3_IS5_ES6_S6_15enum_duplicatesb+0xaa6 > mysqld`_Z21mysql_execute_commandP3THD+0x2e95 > mysqld`_ZN13sp_instr_stmt9exec_coreEP3THDPj+0x1e > > mysqld`_ZN13sp_lex_keeper23reset_lex_and_exec_coreEP3THDPjbP8sp_instr+0xa0 > mysqld`_ZN13sp_instr_stmt7executeEP3THDPj+0x4cd > mysqld`_ZN7sp_head7executeEP3THD+0x38c > > mysqld`_ZN7sp_head17execute_procedureEP3THDP4ListI4ItemE+0x476 > mysqld`_Z21mysql_execute_commandP3THD+0x4783 > mysqld`_Z11mysql_parseP3THDPcj+0x163 > > mysqld`_Z16dispatch_command19enum_server_commandP3THDPcj+0xe42 > mysqld`_Z10do_commandP3THD+0xbb > mysqld`ep_thread_proc+0x184 > libc.so.1`_thr_setup+0x5b > libc.so.1`_lwp_start > ------------------------------------------------------------------------ > > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org >
Amit Saha
2009-Apr-05  02:37 UTC
[dtrace-discuss] ustack. what''s the meaning of ---> mysqld`_Z12write_recordP3THDP8st_tableP12st_copy_info+0x53
On Sat, Apr 4, 2009 at 6:45 PM, Jon Haslam <Jonathan.Haslam at sun.com> wrote:> Hi, > > The process being traced is written in C++ and the symbols are mangled > and we don''t do any auto-demangling in Solaris. The demangled version of > the function looks like: > > $ dem _Z12write_recordP3THDP8st_tableP12st_copy_info > _Z12write_recordP3THDP8st_tableP12st_copy_info == write_record(THD*, > st_table*, st_copy_info*) > > If the application has been built with Sun Studio you can either > use dem(1) or pipe the lot through c++filt(1) to make it prettier.For this and more basic treatment of DTracing MySQL, please head over to http://dev.mysql.com/tech-resources/articles/getting_started_dtrace_saha.html -Amit> > Jon. > >> I traced mysql using dtrace -n ''pid2218::my_malloc:entry{ustack()}'', the >> result looks the following, >> >> For the line >> mysqld`*_Z12*write_record*P3THDP8*st_table*P12*st_copy_info+0x53, >> What''s the meaning of _Z12, P3THDP8, P12? And why there are three >> functions in that line (write_record, st_table,st_copy_info)? >> >> >> ?0 ?59180 ? ? ? ? ? ? ? ? ?my_malloc:entry >> ? ? ? ? ? ? ?mysqld`my_malloc >> ? ? ? ? ? ? ?mysqld`tree_insert+0x172 >> ? ? ? ? ? ? ?mysqld`hp_rb_write_key+0x70 >> ? ? ? ? ? ? ?mysqld`heap_write+0x93 >> ? ? ? ? ? ? ?mysqld`_ZN7ha_heap9write_rowEPc+0x41 >> ? ? ? ? ? ?* ?mysqld`_Z12write_recordP3THDP8st_tableP12st_copy_info+0x53* >> >> ?mysqld`_Z12mysql_insertP3THDP13st_table_listR4ListI4ItemERS3_IS5_ES6_S6_15enum_duplicatesb+0xaa6 >> ? ? ? ? ? ? ?mysqld`_Z21mysql_execute_commandP3THD+0x2e95 >> ? ? ? ? ? ? ?mysqld`_ZN13sp_instr_stmt9exec_coreEP3THDPj+0x1e >> >> ?mysqld`_ZN13sp_lex_keeper23reset_lex_and_exec_coreEP3THDPjbP8sp_instr+0xa0 >> ? ? ? ? ? ? ?mysqld`_ZN13sp_instr_stmt7executeEP3THDPj+0x4cd >> ? ? ? ? ? ? ?mysqld`_ZN7sp_head7executeEP3THD+0x38c >> >> ?mysqld`_ZN7sp_head17execute_procedureEP3THDP4ListI4ItemE+0x476 >> ? ? ? ? ? ? ?mysqld`_Z21mysql_execute_commandP3THD+0x4783 >> ? ? ? ? ? ? ?mysqld`_Z11mysql_parseP3THDPcj+0x163 >> >> ?mysqld`_Z16dispatch_command19enum_server_commandP3THDPcj+0xe42 >> ? ? ? ? ? ? ?mysqld`_Z10do_commandP3THD+0xbb >> ? ? ? ? ? ? ?mysqld`ep_thread_proc+0x184 >> ? ? ? ? ? ? ?libc.so.1`_thr_setup+0x5b >> ? ? ? ? ? ? ?libc.so.1`_lwp_start >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> dtrace-discuss mailing list >> dtrace-discuss at opensolaris.org >> > > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org >-- http://amitksaha.blogspot.com http://amitsaha.in.googlepages.com/ *Bangalore Open Java Users Group*:http:www.bojug.in "Recursion is the basic iteration mechanism in Scheme" --- http://c2.com/cgi/wiki?TailRecursion