"debugging valgrind internals monitor commands:\n"
" v.info gdbserver_status : show gdbserver status\n"
" v.info memory : show valgrind heap memory stats\n"
+" v.info scheduler : show valgrind thread state and stacktrace\n"
" v.set debuglog <level> : set valgrind debug log level to <level>\n"
" v.translate <addr> [<traceflags>] : debug translation of <addr> with <traceflags>\n"
" (default traceflags 0b00100000 : show after instrumentation)\n"
ret = 1;
wcmd = strtok_r (NULL, " ", &ssaveptr);
switch (kwdid = VG_(keyword_id)
- ("all_errors n_errs_found last_error gdbserver_status memory",
+ ("all_errors n_errs_found last_error gdbserver_status memory"
+ " scheduler",
wcmd, kwd_report_all)) {
case -2:
case -1:
VG_(print_arena_cc_analysis) ();
ret = 1;
break;
+ case 5: /* scheduler */
+ VG_(show_sched_status) ();
+ ret = 1;
+ break;
default:
vg_assert(0);
}
</para>
</listitem>
+ <listitem>
+ <para><varname>v.info scheduler</varname> shows the state and
+ stack trace for all threads, as known by Valgrind. This allows to
+ compare the stack traces produced by the Valgrind unwinder with
+ the stack traces produced by GDB+Valgrind gdbserver. Pay attention
+ that GDB and Valgrind scheduler status have their own thread
+ numbering scheme. To make the link between the GDB thread
+ number and the corresponding Valgrind scheduler thread number,
+ use the GDB command <computeroutput>info
+ threads</computeroutput>. The output of this command shows the
+ GDB thread number and the valgrind 'tid'. The 'tid' is the thread number
+ output by <computeroutput>v.info scheduler</computeroutput>.
+ When using the callgrind tool, the callgrind monitor command
+ <computeroutput>status</computeroutput> outputs internal callgrind
+ information about the stack/call graph it maintains.
+ </para>
+ </listitem>
+
<listitem>
<para><varname>v.set debuglog <intvalue></varname> sets the
Valgrind debug log level to <intvalue>. This allows to
debugging valgrind internals monitor commands:
v.info gdbserver_status : show gdbserver status
v.info memory : show valgrind heap memory stats
+ v.info scheduler : show valgrind thread state and stacktrace
v.set debuglog <level> : set valgrind debug log level to <level>
v.translate <addr> [<traceflags>] : debug translation of <addr> with <traceflags>
(default traceflags 0b00100000 : show after instrumentation)