--- //depot/vendor/freebsd/src/usr.bin/kdump/kdump.1 2003/06/02 19:37:59 +++ //depot/projects/hammer/usr.bin/kdump/kdump.1 2003/12/02 18:47:17 @@ -40,7 +40,7 @@ .Nd display kernel trace data .Sh SYNOPSIS .Nm -.Op Fl dnlRT +.Op Fl dnlERT .Op Fl f Ar file .Op Fl m Ar maxdata .Op Fl p Ar pid @@ -89,6 +89,8 @@ .Ar pid . This may be useful when there are multiple processes recorded in the same trace file. +.It Fl E +Display elapsed timestamps (time since beginning of trace). .It Fl R Display relative timestamps (time since previous entry). .It Fl T --- //depot/vendor/freebsd/src/usr.bin/kdump/kdump.c 2003/06/02 19:37:59 +++ //depot/projects/hammer/usr.bin/kdump/kdump.c 2003/12/02 18:47:17 @@ -97,7 +97,7 @@ (void) setlocale(LC_CTYPE, ""); - while ((ch = getopt(argc,argv,"f:dlm:np:RTt:")) != -1) + while ((ch = getopt(argc,argv,"f:dlm:np:ERTt:")) != -1) switch((char)ch) { case 'f': tracefile = optarg; @@ -117,6 +117,9 @@ case 'p': pid = atoi(optarg); break; + case 'E': + timestamp = 3; /* elapsed timestamp */ + break; case 'R': timestamp = 2; /* relative timestamp */ break; @@ -249,6 +252,11 @@ (void)printf("%6d %-8.*s ", kth->ktr_pid, MAXCOMLEN, kth->ktr_comm); if (timestamp) { + if (timestamp == 3) { + if (prevtime.tv_sec == 0) + prevtime = kth->ktr_time; + timevalsub(&kth->ktr_time, &prevtime); + } if (timestamp == 2) { temp = kth->ktr_time; timevalsub(&kth->ktr_time, &prevtime);