mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-09 07:30:02 +00:00
Port improved pt-pmp
- Updated documentation for pt-eustack-resolver and pt-pmp - Added pt-eustack-resolver, pt-pmp and other missed tools into docs/percona-toolkit.pod - Removed quickstack support from pt-pmp. We do not need to port this improvement, because quickstack is not actively developed and does not create useful stack traces for Percona Server for MySQL 8.0.
This commit is contained in:
@@ -113,16 +113,20 @@ foreach $lwp (sort {$a<=>$b} keys %sf)
|
||||
# ############################################################################
|
||||
# Documentation
|
||||
# ############################################################################
|
||||
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
pt-eustack-resover - Get stack traces for a selected program with eu-stack and resolve symbols
|
||||
pt-eustack-resolver - Get stack traces for a selected program with C<eu-stack>
|
||||
and resolve symbols.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
Usage: pt-eustack-resolver <pid>
|
||||
|
||||
pt-eustack-resolver collects stack traces for the process with specified C<pid>.
|
||||
|
||||
=head1 RISKS
|
||||
|
||||
Percona Toolkit is mature, proven in the real world, and well tested,
|
||||
@@ -143,17 +147,17 @@ server. Before using this tool, please:
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
pt-eustack-resover is the tool that gets stack traces for a selected program
|
||||
with eu-stack and resolves symbols. This is companion tool for L<pt-pmp>, called
|
||||
when option --dumper=pteu is specified.
|
||||
pt-eustack-resolver is the tool that gets stack traces for a selected program
|
||||
with C<eu-stack> and resolves symbols. This is companion tool for L<pt-pmp|pt-pmp.html>, called
|
||||
when option C<--dumper=pteu> is specified.
|
||||
|
||||
eu-stack is a tool from elfutils package that prints a stack for each thread in
|
||||
a process or core file. eu-stack is faster than gdb and smaller overhead on the
|
||||
diagnosed process.
|
||||
C<eu-stack> is a tool from L<elfutils|https://sourceware.org/elfutils> package that
|
||||
prints a stack for each thread in a process or core file. C<eu-stack> is faster
|
||||
than gdb and have smaller overhead on the diagnosed process.
|
||||
|
||||
=head1 OUTPUT
|
||||
|
||||
Stack for each thread, formatted similarly to `gdb thread apply all bt` output.
|
||||
Stack for each thread, formatted similarly to C<gdb thread apply all bt> output.
|
||||
|
||||
=head1 ATTENTION
|
||||
|
||||
@@ -162,7 +166,7 @@ parameters are shown in the output.
|
||||
|
||||
=head1 SYSTEM REQUIREMENTS
|
||||
|
||||
You need eu-stack from the elfutils package.
|
||||
You need C<eu-stack> from the L<elfutils|https://sourceware.org/elfutils> package.
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
|
34
bin/pt-pmp
34
bin/pt-pmp
@@ -619,7 +619,7 @@ aggregate_stacktrace() {
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( dumper ~ /gdb/ || dumper ~ /qs/ ) {
|
||||
if ( dumper ~ /gdb/ ) {
|
||||
targ = substr(\$0, index(\$0, \" in \") + 4);
|
||||
if ( targ ~ / from / ) {
|
||||
targ = substr(targ, 1, index(targ, \" from \") - 1);
|
||||
@@ -735,14 +735,8 @@ main() {
|
||||
else
|
||||
die "Can't find eu-stack binary from elfutils or pt-eustack-resolver. Exiting"
|
||||
fi
|
||||
elif [ $OPT_DUMPER == "qs" ]; then
|
||||
if [ `_which quickstack` ]; then
|
||||
quickstack -l -f -p $OPT_PID >> "$output_file"
|
||||
else
|
||||
die "Can't find quickstack binary from https://github.com/yoshinorim/quickstack. Exiting"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
date +'TS %N.%s %F %T' >> "$output_file"
|
||||
sleep $OPT_INTERVAL
|
||||
done
|
||||
@@ -851,7 +845,7 @@ Which binary to trace.
|
||||
|
||||
short form: -d; type: string; default: gdb
|
||||
|
||||
Which dumper use to get stack traces(gdb: gdb, eu: eu-stack, pteu: pt-eustack-resolver, qs: quickstack).
|
||||
Which dumper use to get stack traces(gdb: gdb, eu: eu-stack, pteu: pt-eustack-resolver).
|
||||
|
||||
=item --tids
|
||||
|
||||
@@ -859,6 +853,28 @@ short form: -t; type: string; default: *
|
||||
|
||||
Extract traces only for specific tids.
|
||||
|
||||
This option uses regular expressions to select threads. For example, if the
|
||||
collected stack trace has data for threads:
|
||||
|
||||
[New Thread 0x52173940 (LWP 23846)]
|
||||
[New Thread 0x52132940 (LWP 23845)]
|
||||
[New Thread 0x520f1940 (LWP 23844)]
|
||||
[New Thread 0x520b0940 (LWP 23798)]
|
||||
[New Thread 0x5206f940 (LWP 23776)]
|
||||
[New Thread 0x5202e940 (LWP 23775)]
|
||||
[New Thread 0x51fed940 (LWP 23774)]
|
||||
[New Thread 0x51fac940 (LWP 23728)]
|
||||
[New Thread 0x51f6b940 (LWP 23727)]
|
||||
[New Thread 0x51f2a940 (LWP 21264)]
|
||||
[New Thread 0x51ee9940 (LWP 21263)]
|
||||
[New Thread 0x51ea8940 (LWP 21201)]
|
||||
|
||||
C<-t 21> will print stack traces for threads 21264, 21263, 21201
|
||||
|
||||
C<-t 21201,23846> will print stack traces for threads 21201, 23846
|
||||
|
||||
C<-t 21201,237.8> will print stack traces for threads 21201, 23798, 23728
|
||||
|
||||
=item --help
|
||||
|
||||
Show help and exit.
|
||||
|
Reference in New Issue
Block a user