📄 ptt_view.1
字号:
.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.3.\".\" Standard preamble:.\" ========================================================================.de Sh \" Subsection heading.br.if t .Sp.ne 5.PP\fB\\$1\fR.PP...de Sp \" Vertical space (when we can't use .PP).if t .sp .5v.if n .sp...de Vb \" Begin verbatim text.ft CW.nf.ne \\$1...de Ve \" End verbatim text.ft R.fi...\" Set up some character translations and predefined strings. \*(-- will.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left.\" double quote, and \*(R" will give a right double quote. | will give a.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'.\" expand to `' in nroff, nothing in troff, for use with C<>..tr \(*W-|\(bv\*(Tr.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'.ie n \{\. ds -- \(*W-. ds PI pi. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch. ds L" "". ds R" "". ds C` "". ds C' ""'br\}.el\{\. ds -- \|\(em\|. ds PI \(*p. ds L" ``. ds R" '''br\}.\".\" If the F register is turned on, we'll generate index entries on stderr for.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index.\" entries marked with X<> in POD. Of course, you'll have to process the.\" output yourself in some meaningful fashion..if \nF \{\. de IX. tm Index:\\$1\t\\n%\t"\\$2"... nr % 0. rr F.\}.\".\" For nroff, turn off justification. Always turn off hyphenation; it makes.\" way too many mistakes in technical documents..hy 0.if n .na.\".\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2)..\" Fear. Run. Save yourself. No user-serviceable parts.. \" fudge factors for nroff and troff.if n \{\. ds #H 0. ds #V .8m. ds #F .3m. ds #[ \f1. ds #] \fP.\}.if t \{\. ds #H ((1u-(\\\\n(.fu%2u))*.13m). ds #V .6m. ds #F 0. ds #[ \&. ds #] \&.\}. \" simple accents for nroff and troff.if n \{\. ds ' \&. ds ` \&. ds ^ \&. ds , \&. ds ~ ~. ds /.\}.if t \{\. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u". ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'.\}. \" troff and (daisy-wheel) nroff accents.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'.ds 8 \h'\*(#H'\(*b\h'-\*(#H'.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#].ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#].ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#].ds ae a\h'-(\w'a'u*4/10)'e.ds Ae A\h'-(\w'A'u*4/10)'E. \" corrections for vroff.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'. \" for low resolution devices (crt and lpr).if \n(.H>23 .if \n(.V>19 \\{\. ds : e. ds 8 ss. ds o a. ds d- d\h'-1'\(ga. ds D- D\h'-1'\(hy. ds th \o'bp'. ds Th \o'LP'. ds ae ae. ds Ae AE.\}.rm #[ #] #H #V #F C.\" ========================================================================.\".IX Title "PTT_VIEW 1".TH PTT_VIEW 1 "2006-05-15" "PTT 1.0" "PTT - POSIX Thread Trace Toolkit".SH "NAME"ptt_view \- PTT raw and textual decoder.SH "SYNOPSIS".IX Header "SYNOPSIS"ptt_view [options] input_file.SH "DESCRIPTION".IX Header "DESCRIPTION"Its primary function is to decodethe binary data collected by \fIptt_trace\fR\|(1)in a raw or textual format..SH "OPTIONS".IX Header "OPTIONS".Sh "Input options".IX Subsection "Input options".IP "\fB\-i file\fR" 4.IX Item "-i file"input file name.The input file can also be the last command line option..Sh "Output options".IX Subsection "Output options".IP "\fB\-o file\fR" 4.IX Item "-o file"output file name.If it is `\-' or not set, stdin will be used..IP "\fB\-r\fR" 4.IX Item "-r"raw export.This format can easily be parsed by external toolslike \fIgrep\fR, \fIawk\fR, \fIcut\fR....IP "\fB\-t\fR" 4.IX Item "-t"text export.This format is more human friendlyby providing the meaning of the arguments..IP "\fB\-s {pid,pidx,tid}\fR" 4.IX Item "-s {pid,pidx,tid}"split output by pid or tid..RS 4.IP "\fBpid\fR: each pid has its own file. The file pattern is \fIfilename-pid\fR." 4.IX Item "pid: each pid has its own file. The file pattern is filename-pid.".PD 0.IP "\fBpidx\fR: each pid has its own file and the history of the parent process is copied (doesn't work well as threads are deleted after a \fIfork\fR...) after a \fIfork\fR. The file pattern is \fIfilename-pid\fR." 4.IX Item "pidx: each pid has its own file and the history of the parent process is copied (doesn't work well as threads are deleted after a fork...) after a fork. The file pattern is filename-pid.".IP "\fBtid\fR: each (pid, tid) couple has its own file. The file pattern is \fIfilename-pid-tid\fR." 4.IX Item "tid: each (pid, tid) couple has its own file. The file pattern is filename-pid-tid.".RE.RS 4.PD.Sp\&\fIWarning\fR: \fIfork\fR is problematic....RE.IP "\fB\-a alias_file\fR" 4.IX Item "-a alias_file"\&\fIalias_file\fR contains couples (address, name).In \fIptt_view\fR\|(1) output,objects that have an address existing in \fIalias_file\fRwill be replaced by the corresponding name.To create an alias file,include <alias.h> in the program sourceand use the following macros:alias_init, new_thread_alias and new_object_alias(for mutex, sem, cond_var, barrier)..SpFor example, at runtime,the following program will create a file called \fIalias\fRwith aliases for the 2 threads and the mutex:.Sp.Vb 3\& #include <alias.h>\& #include <stdio.h>\& #include <pthread.h>.Ve.Sp.Vb 2\& pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;\& FILE *fd;.Ve.Sp.Vb 6\& void *func () {\& new_thread_alias (fd, "func");\& pthread_mutex_lock (&mutex);\& pthread_mutex_unlock (&mutex);\& return NULL;\& }.Ve.Sp.Vb 3\& int main () {\& pthread_t thread;\& int ret;.Ve.Sp.Vb 3\& fd = alias_init ("alias");\& new_thread_alias (fd, "main");\& new_object_alias (fd, &mutex, "my_mutex");.Ve.Sp.Vb 2\& if (ret = pthread_create (&thread, NULL, func, NULL))\& printf("Thread creation failed: %d\en", ret);.Ve.Sp.Vb 3\& pthread_join (thread, NULL);\& return 0;\& }.Ve.Sh "Filter options".IX Subsection "Filter options".IP "\fB\-e pattern[,pattern...]\fR" 4.IX Item "-e pattern[,pattern...]"search for pattern* events..SpIt allows you to match the beginning of the event nameand select a category of object.For example, you can selectall the events related to mutexes with `\-e \s-1MUTEX\s0'. .SpThe comma separator acts like an \fBor\fR,so you can filter multiple objects.For example, if you want mutex and cond\-var,use `\-e \s-1MUTEX\s0,COND'..SpYou can repeat the option and the command line,but the result is a \fBand\fR,so only the names that are repeated will be displayed..SpUse \fBptt_view \-l\fR to see the list of event..IP "\fB\-E pattern[,pattern...]\fR" 4.IX Item "-E pattern[,pattern...]"search for *pattern events.SpIt allows you to match the end of the event name.Like \fB\-e\fR, the comma separator acts like an \fBor\fR. .SpFor example, to select input/output, you can use `\-E _IN,_OUT'..SpUse \fBptt-view \-l\fR to see the list of event..IP "\fB\-l\fR" 4.IX Item "-l"list events that can be filtered by \fB\-e\fR and \fB\-E\fR options..IP "\fB\-p pid[,pid...]\fR" 4.IX Item "-p pid[,pid...]"search for pid.Select only events of the given pids..SpThe comma acts like an \fBor\fR..Sp\&\fIWarning\fR: some mutex, cond-var could be initialisedin another process (not a selected pid)or some object could be shared between process.So you could see strange results..IP "\fB\-n name[,name...]\fR" 4.IX Item "-n name[,name...]"select the objects by their name (actually address).SpThe comma acts like an \fBor\fR..Sp\&\fIWarning\fR: sometimes you could get strange results.It selects only the name of the current object and its properties,but sometimes there are some consistency problems.For example, if you select a mutex namethat is used by cond\-var,you will see all the mutex operations,but not all the cond-var operations.This could be resolved by extending the functionthat gives a name to an object in order to manage more than one name,but it's not currently planned.A workaround is to selected all the object's names(here mutex + cond var)..SpThere a similar problem after a forkfor few events of the child.For example, we could wait for a cond wait, then fork.For the father there will be no problem,but the child won't have the cond wait out with a name..IP "\fB\-z start:end\fR" 4.IX Item "-z start:end"event filter.This filter only displays \f(CW\*(C`end \- start\*(C'\fR events skipping \f(CW\*(C`start\*(C'\fR events.The syntax \fB\-z :end\fR or \fB\-z start:\fRis also supported and implies start=0 or end=infinity..Sp\&\fIWarning\fR: the filter is applied to a group of eventsfor performance issue, so the count is not always exact.You can have up to 3 more events than requested..IP "\fB\-Z start:end\fR" 4.IX Item "-Z start:end"time filter.This filter only displays events that occurredafter \f(CW\*(C`start\*(C'\fR microseconds and before \f(CW\*(C`end\*(C'\fR microseconds.The syntax \fB\-Z :end\fR or \fB\-Z start:\fRis also supported and imply start=0 or end=infinity..Sh "Display options".IX Subsection "Display options".IP "\fB\-m\fR" 4.IX Item "-m"don't display the pid.IP "\fB\-d\fR" 4.IX Item "-d"display the pid (this is the default option).IP "\fB\-h\fR" 4.IX Item "-h"display the help (all the \fIptt_view\fR\|(1) commands).Sh "Multiple file support".IX Subsection "Multiple file support"If you split your file with \fIptt_trace\fR\|(1),hopefully you will be able to merge them.Just pass the first file you want to start with,and \fIptt_view\fR\|(1) will decode the following files.If you don't want to decode up to the end,you can use \fB\-z\fR and \fB\-Z\fR options.You can use \fIptt_seq\fR\|(1) in order to knowthe timestamp of the first element of a series of files..SH "LIMITATIONS".IX Header "LIMITATIONS"Traces can be collected on a machineand visualize on an otherprovided that they have the same architecture size(32 or 64 bits)..SH "SEE ALSO".IX Header "SEE ALSO"\&\fIptt_trace\fR\|(1), \fIptt_paje\fR\|(1), \fIptt_stat\fR\|(1), \fIptt_seq\fR\|(1).SH "AUTHOR".IX Header "AUTHOR"Matthieu \s-1CASTET\s0, Guillaume \s-1DURANCEAU\s0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -