svn commit: r185580 - stable/7/share/man/man9
kib at FreeBSD.org
Wed Dec 3 07:07:17 PST 2008
Date: Wed Dec 3 15:07:17 2008
New Revision: 185580
Clarify the reason to not use the volatile string as an argument to CTR
macros. Note the logging of file and line.
Approved by: re (hrs)
stable/7/share/man/man9/ (props changed)
--- stable/7/share/man/man9/ktr.9 Wed Dec 3 14:53:59 2008 (r185579)
+++ stable/7/share/man/man9/ktr.9 Wed Dec 3 15:07:17 2008 (r185580)
@@ -24,7 +24,7 @@
-.Dd December 27, 2005
+.Dd November 30, 2008
.Dt KTR 9
@@ -84,9 +84,16 @@ Following the
string are zero to five arguments referenced by
.Fa format .
+Each event is logged with a file name and source line number of the
+originating CTR call, and a timestamp in addition to the log message.
+The event is stored in the circular buffer with supplied arguments as is,
+and formatting is done at the dump time.
+Do not use pointers to the objects with limited lifetime, for instance,
+strings, because the pointer may become invalid when buffer is printed.
Note that the different macros differ only in the number of arguments each
one takes, as indicated by its name.
-Each event is logged with a timestamp in addition to the log message.
@@ -121,13 +128,11 @@ mi_switch()
* Pick a new current process and record its start time.
- CTR3(KTR_PROC, "mi_switch: old proc %p (pid %d, %s)", p, p->p_pid,
+ CTR3(KTR_PROC, "mi_switch: old proc %p (pid %d)", p, p->p_pid);
- CTR3(KTR_PROC, "mi_switch: new proc %p (pid %d, %s)", p, p->p_pid,
+ CTR3(KTR_PROC, "mi_switch: new proc %p (pid %d)", p, p->p_pid);
More information about the svn-src-stable-7