Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/sys Sync documentation of struct ktr_header with re...
details: https://anonhg.NetBSD.org/src/rev/9e8d3877915f
branches: trunk
changeset: 344277:9e8d3877915f
user: dholland <dholland%NetBSD.org@localhost>
date: Sat Mar 19 17:15:13 2016 +0000
description:
Sync documentation of struct ktr_header with reality:
- there is a ktr_version field
- the ordering of ktr_type and ktr_version is byte-order dependent
- ktr_time is now a timespec, not a timeval
- there's now a ktr_lid field
- there is no such thing as a ktr_buf field and it's certainly not
a caddr_t.
XXX: I would appreciate it if someone who knows how this stuff works
XXX: could review this file in case it's still lying in some more
XXX: subtle way.
diffstat:
lib/libc/sys/ktrace.2 | 26 +++++++++++++++-----------
1 files changed, 15 insertions(+), 11 deletions(-)
diffs (60 lines):
diff -r c249a3956903 -r 9e8d3877915f lib/libc/sys/ktrace.2
--- a/lib/libc/sys/ktrace.2 Sat Mar 19 17:05:36 2016 +0000
+++ b/lib/libc/sys/ktrace.2 Sat Mar 19 17:15:13 2016 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: ktrace.2,v 1.19 2016/03/19 17:05:36 dholland Exp $
+.\" $NetBSD: ktrace.2,v 1.20 2016/03/19 17:15:13 dholland Exp $
.\"
.\" Copyright (c) 1993
.\" The Regents of the University of California. All rights reserved.
@@ -104,36 +104,40 @@
struct ktr_header {
int ktr_len; /* length of buf */
short ktr_type; /* trace record type */
+ short ktr_version; /* trace record version */
pid_t ktr_pid; /* process id */
char ktr_comm[MAXCOMLEN+1]; /* command name */
- struct timeval ktr_time; /* timestamp */
- caddr_t ktr_buf;
+ struct timespec ktr_time; /* timestamp */
+ lwpid_t ktr_lid;
};
.Ed
.Pp
The
.Nm ktr_len
-field specifies the length of the
+field specifies the length of the data that follows this header.
+The
.Nm ktr_type
-data that follows this header.
+and
+.Nm ktr_version
+fields (whose ordering in the structure depends on byte order)
+specify the format of this data.
The
-.Nm ktr_pid
+.Nm ktr_pid ,
+.Nm ktr_lid ,
and
.Nm ktr_comm
fields specify the process and command generating the record.
The
.Nm ktr_time
-field gives the time (with microsecond resolution)
+field gives the time (with nanosecond resolution)
that the record was generated.
-The
-.Nm ktr_buf
-is an internal kernel pointer and is not useful.
.Pp
The generic header is followed by
.Nm ktr_len
bytes of a
.Nm ktr_type
-record.
+record of version
+.Nm ktr_version .
The type specific records are defined in the
.Pa \*[Lt]sys/ktrace.h\*[Gt]
include file.
Home |
Main Index |
Thread Index |
Old Index