Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F105801716
D20273.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D20273.id.diff
View Options
Index: head/sys/ddb/db_ps.c
===================================================================
--- head/sys/ddb/db_ps.c
+++ head/sys/ddb/db_ps.c
@@ -338,8 +338,8 @@
{
struct thread *td;
struct lock_object *lock;
+ u_int delta;
bool comma;
- int delta;
/* Determine which thread to examine. */
if (have_addr)
@@ -421,14 +421,14 @@
db_printf(" priority: %d\n", td->td_priority);
db_printf(" container lock: %s (%p)\n", lock->lo_name, lock);
if (td->td_swvoltick != 0) {
- delta = (u_int)ticks - (u_int)td->td_swvoltick;
- db_printf(" last voluntary switch: %d ms ago\n",
- 1000 * delta / hz);
+ delta = ticks - td->td_swvoltick;
+ db_printf(" last voluntary switch: %u.%03u s ago\n",
+ delta / hz, (delta % hz) * 1000 / hz);
}
if (td->td_swinvoltick != 0) {
- delta = (u_int)ticks - (u_int)td->td_swinvoltick;
- db_printf(" last involuntary switch: %d ms ago\n",
- 1000 * delta / hz);
+ delta = ticks - td->td_swinvoltick;
+ db_printf(" last involuntary switch: %u.%03u s ago\n",
+ delta / hz, (delta % hz) * 1000 / hz);
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 9:46 PM (15 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15547390
Default Alt Text
D20273.id.diff (1 KB)
Attached To
Mode
D20273: db show thread: avoid overlow in tick conversion
Attached
Detach File
Event Timeline
Log In to Comment