diff options
author | jhb <jhb@FreeBSD.org> | 2012-04-20 15:32:36 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2012-04-20 15:32:36 +0000 |
commit | aa85973504e8ab2a6d5b1ab434c06030e5302f7c (patch) | |
tree | 210aa794e2e54dd698b7426768c3c9db3207febd /usr.bin/kdump | |
parent | 58d2e125c4d6dc16535d5d50b8fa3eab9b287353 (diff) | |
download | FreeBSD-src-aa85973504e8ab2a6d5b1ab434c06030e5302f7c.zip FreeBSD-src-aa85973504e8ab2a6d5b1ab434c06030e5302f7c.tar.gz |
Include the associated wait channel message for context switch ktrace
records. kdump supports both the old and new messages.
Submitted by: Andrey Zonov andrey zonov org
MFC after: 1 week
Diffstat (limited to 'usr.bin/kdump')
-rw-r--r-- | usr.bin/kdump/kdump.1 | 4 | ||||
-rw-r--r-- | usr.bin/kdump/kdump.c | 15 |
2 files changed, 15 insertions, 4 deletions
diff --git a/usr.bin/kdump/kdump.1 b/usr.bin/kdump/kdump.1 index c03985e..0b4bcf4 100644 --- a/usr.bin/kdump/kdump.1 +++ b/usr.bin/kdump/kdump.1 @@ -28,7 +28,7 @@ .\" @(#)kdump.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd April 5, 2012 +.Dd April 20, 2012 .Dt KDUMP 1 .Os .Sh NAME @@ -167,7 +167,7 @@ The possible operations are: .It Li NAMI Ta file name lookup Ta path to file .It Li GIO Ta general I/O Ta fd, read/write, number of bytes .It Li PSIG Ta signal Ta signal name, handler, mask, code -.It Li CSW Ta context switch Ta stop/resume user/kernel +.It Li CSW Ta context switch Ta stop/resume user/kernel wmesg .It Li USER Ta data from user process Ta the data .It Li STRU Ta various syscalls Ta structure .It Li SCTL Ta Xr sysctl 3 requests Ta MIB name diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c index 4d8e109..57f5ce2 100644 --- a/usr.bin/kdump/kdump.c +++ b/usr.bin/kdump/kdump.c @@ -95,6 +95,7 @@ void visdump(char *, int, int); void ktrgenio(struct ktr_genio *, int); void ktrpsig(struct ktr_psig *); void ktrcsw(struct ktr_csw *); +void ktrcsw_old(struct ktr_csw_old *); void ktruser_malloc(unsigned char *); void ktruser_rtld(int, unsigned char *); void ktruser(int, unsigned char *); @@ -298,7 +299,10 @@ main(int argc, char *argv[]) ktrpsig((struct ktr_psig *)m); break; case KTR_CSW: - ktrcsw((struct ktr_csw *)m); + if (ktrlen == sizeof(struct ktr_csw_old)) + ktrcsw_old((struct ktr_csw_old *)m); + else + ktrcsw((struct ktr_csw *)m); break; case KTR_USER: ktruser(ktrlen, m); @@ -1245,12 +1249,19 @@ ktrpsig(struct ktr_psig *psig) } void -ktrcsw(struct ktr_csw *cs) +ktrcsw_old(struct ktr_csw_old *cs) { printf("%s %s\n", cs->out ? "stop" : "resume", cs->user ? "user" : "kernel"); } +void +ktrcsw(struct ktr_csw *cs) +{ + printf("%s %s \"%s\"\n", cs->out ? "stop" : "resume", + cs->user ? "user" : "kernel", cs->wmesg); +} + #define UTRACE_DLOPEN_START 1 #define UTRACE_DLOPEN_STOP 2 #define UTRACE_DLCLOSE_START 3 |