Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102546564
D36599.id110689.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D36599.id110689.diff
View Options
diff --git a/lib/libc/sys/ktrace.2 b/lib/libc/sys/ktrace.2
--- a/lib/libc/sys/ktrace.2
+++ b/lib/libc/sys/ktrace.2
@@ -109,7 +109,7 @@
pid_t ktr_pid; /* process id */
char ktr_comm[MAXCOMLEN+1]; /* command name */
struct timeval ktr_time; /* timestamp */
- intptr_t ktr_tid; /* was ktr_buffer */
+ long ktr_tid; /* thread id */
};
.Ed
.Pp
diff --git a/sys/sys/ktrace.h b/sys/sys/ktrace.h
--- a/sys/sys/ktrace.h
+++ b/sys/sys/ktrace.h
@@ -58,7 +58,7 @@
pid_t ktr_pid; /* process id */
char ktr_comm[MAXCOMLEN + 1];/* command name */
struct timeval ktr_time; /* timestamp */
- intptr_t ktr_tid; /* was ktr_buffer */
+ long ktr_tid; /* thread id */
};
struct ktr_header {
@@ -68,7 +68,8 @@
pid_t ktr_pid; /* process id */
char ktr_comm[MAXCOMLEN + 1];/* command name */
struct timespec ktr_time; /* timestamp */
- intptr_t ktr_tid; /* thread id */
+ /* XXX: make ktr_tid an lwpid_t on next ABI break */
+ long ktr_tid; /* thread id */
int ktr_cpu; /* cpu id */
};
diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c
--- a/usr.bin/kdump/kdump.c
+++ b/usr.bin/kdump/kdump.c
@@ -449,15 +449,15 @@
ktr_header.ktr_type &= ~KTR_DROP;
if (!drop_logged && threads) {
printf(
- "%6jd %6jd %-8.*s Events dropped.\n",
- (intmax_t)ktr_header.ktr_pid,
+ "%6d %6d %-8.*s Events dropped.\n",
+ ktr_header.ktr_pid,
ktr_header.ktr_tid > 0 ?
- (intmax_t)ktr_header.ktr_tid : 0,
+ (lwpid_t)ktr_header.ktr_tid : 0,
MAXCOMLEN, ktr_header.ktr_comm);
drop_logged = 1;
} else if (!drop_logged) {
- printf("%6jd %-8.*s Events dropped.\n",
- (intmax_t)ktr_header.ktr_pid, MAXCOMLEN,
+ printf("%6d %-8.*s Events dropped.\n",
+ ktr_header.ktr_pid, MAXCOMLEN,
ktr_header.ktr_comm);
drop_logged = 1;
}
@@ -724,12 +724,11 @@
* negative tid's as 0.
*/
if (threads)
- printf("%6jd %6jd %-8.*s ", (intmax_t)kth->ktr_pid,
- kth->ktr_tid > 0 ? (intmax_t)kth->ktr_tid : 0,
+ printf("%6d %6d %-8.*s ", kth->ktr_pid,
+ kth->ktr_tid > 0 ? (lwpid_t)kth->ktr_tid : 0,
MAXCOMLEN, kth->ktr_comm);
else
- printf("%6jd %-8.*s ", (intmax_t)kth->ktr_pid, MAXCOMLEN,
- kth->ktr_comm);
+ printf("%6d %-8.*s ", kth->ktr_pid, MAXCOMLEN, kth->ktr_comm);
if (timestamp) {
if (version == KTR_VERSION0)
dumptimeval((struct ktr_header_v0 *)kth);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 14, 9:37 PM (7 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14634021
Default Alt Text
D36599.id110689.diff (2 KB)
Attached To
Mode
D36599: ktrace: make ktr_tid a long not intptr_t (NFC)
Attached
Detach File
Event Timeline
Log In to Comment