Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F97906601
D41521.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
803 B
Referenced Files
None
Subscribers
None
D41521.diff
View Options
diff --git a/sys/dev/hwpmc/hwpmc_mod.c b/sys/dev/hwpmc/hwpmc_mod.c
--- a/sys/dev/hwpmc/hwpmc_mod.c
+++ b/sys/dev/hwpmc/hwpmc_mod.c
@@ -4989,13 +4989,13 @@
}
PMC_EPOCH_EXIT();
- if (!is_using_hwpmcs)
- return;
-
PMC_GET_SX_XLOCK();
PMCDBG3(PRC,EXT,1,"process-exit proc=%p (%d, %s)", p, p->p_pid,
p->p_comm);
+ if (!is_using_hwpmcs)
+ goto out;
+
/*
* Since this code is invoked by the last thread in an exiting process,
* we would have context switched IN at some prior point. However, with
@@ -5116,6 +5116,8 @@
* If the process owned PMCs, free them up and free up memory.
*/
if ((po = pmc_find_owner_descriptor(p)) != NULL) {
+ if ((po->po_flags & PMC_PO_OWNS_LOGFILE) != 0)
+ pmclog_close(po);
pmc_remove_owner(po);
pmc_destroy_owner_descriptor(po);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Oct 2, 5:01 PM (6 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
13370174
Default Alt Text
D41521.diff (803 B)
Attached To
Mode
D41521: hwpmc: on process exit, ensure that the owned log is closed
Attached
Detach File
Event Timeline
Log In to Comment