Homec4science

Fix double-stops on profiler sampling

Authored by epriestley <git@epriestley.com> on Apr 2 2013, 15:26.

Description

Fix double-stops on profiler sampling

Summary:
For some time, we've stopped the profiler twice when it was invoked by the sampling mechanism. The first time it actually stops, and we write a profile. The second time it hadn't been started, so it returns empty and we write an invalid profile.

Instead, keep track of whether it is running or not, and don't stop it a second time.

Ref T2870.

Test Plan: Set sample rate to 1-in-3, observed valid sample profiles generate.

Reviewers: btrahan, chad

CC: aran

Maniphest Tasks: T2870

Differential Revision: https://secure.phabricator.com/D5534

Details

Committed
epriestley <git@epriestley.com>Apr 2 2013, 19:05
Pushed
aubortJan 31 2017, 17:16
Parents
rPHcde1416446f6: Guarantee the existence of the Phabricator access log
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHc13f9d157b12: Fix double-stops on profiler sampling (authored by epriestley <git@epriestley.com>).Apr 2 2013, 19:05