Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153324018
D15101.id41538.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
D15101.id41538.diff
View Options
Index: sys/kern/subr_prof.c
===================================================================
--- sys/kern/subr_prof.c
+++ sys/kern/subr_prof.c
@@ -447,10 +447,9 @@
/*
* Collect user-level profiling statistics; called on a profiling tick,
* when a process is running in user-mode. This routine may be called
- * from an interrupt context. We try to update the user profiling buffers
- * cheaply with fuswintr() and suswintr(). If that fails, we revert to
- * an AST that will vector us to trap() with a context in which copyin
- * and copyout will work. Trap will then call addupc_task().
+ * from an interrupt context. We perform the update with an AST
+ * that will vector us to trap() with a context in which copyin and
+ * copyout will work. Trap will then call addupc_task().
*
* Note that we may (rarely) not get around to the AST soon enough, and
* lose profile ticks when the next tick overwrites this one, but in this
@@ -463,7 +462,6 @@
struct uprof *prof;
caddr_t addr;
u_int i;
- int v;
if (ticks == 0)
return;
@@ -477,14 +475,12 @@
addr = prof->pr_base + i;
PROC_PROFUNLOCK(td->td_proc);
- if ((v = fuswintr(addr)) == -1 || suswintr(addr, v + ticks) == -1) {
- td->td_profil_addr = pc;
- td->td_profil_ticks = ticks;
- td->td_pflags |= TDP_OWEUPC;
- thread_lock(td);
- td->td_flags |= TDF_ASTPENDING;
- thread_unlock(td);
- }
+ td->td_profil_addr = pc;
+ td->td_profil_ticks = ticks;
+ td->td_pflags |= TDP_OWEUPC;
+ thread_lock(td);
+ td->td_flags |= TDF_ASTPENDING;
+ thread_unlock(td);
}
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 21, 11:50 AM (16 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31908404
Default Alt Text
D15101.id41538.diff (1 KB)
Attached To
Mode
D15101: Stop using fuswintr() and suswintr() in the profiler.
Attached
Detach File
Event Timeline
Log In to Comment