[SERVER-13025] Stop profiler on regular system shutdown Created: 04/Mar/14  Updated: 06/Dec/22  Resolved: 03/Sep/20

Status: Closed
Project: Core Server
Component/s: Diagnostics
Affects Version/s: 2.6.0-rc0
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Alvin Richards (Inactive) Assignee: Backlog - Storage Execution Team
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Storage Execution
Participants:

 Description   

Problem:
If profiling has been enabled, during a regular shutdown the profiler is not turned off. This leads to profiling information that cannot be used by google-pprof because of an incomplete file writes.

Solution:
As part of the regular shutdown process call ::ProfilerStop() from dbexit().

This would preserve any profile collection that may have been running and this avoid the "darn it, did not stop the profiling before I terminated the mongod process".



 Comments   
Comment by Andy Schwerin [ 04/Mar/14 ]

The trick is that dbexit() is built on all platforms, but ::ProfilerStop() is only a valid function call on systems where we use tcmalloc for the allocator.

Generated at Thu Feb 08 03:30:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.