folly::Singleton leak diagnostics utils
authorAndrii Grynenko <andrii@fb.com>
Fri, 6 Feb 2015 03:41:31 +0000 (19:41 -0800)
committerSara Golemon <sgolemon@fb.com>
Wed, 11 Feb 2015 02:02:00 +0000 (18:02 -0800)
commit9f502239a326050b68dc2fbd92bde579289b89fd
treed481f208b50b509c4f59952f9b6adcd7492419f9
parent8f7c257f327879b2cf824007958e33bd35347de4
folly::Singleton leak diagnostics utils

Summary: This adds different types of messages depending on whether Singleton was depending on other Singleton or just leaked. It also adds destruction stack trace for such Singletons (if they were ever destroyed) to help debug such leaks/broken dependencies.

Test Plan: unit test

Reviewed By: chip@fb.com

Subscribers: trunkagent, folly-diffs@, yfeldblum

FB internal diff: D1830526

Signature: t1:1830526:1423266462:ba328b0da0bf4030b1c4f686d8f7b609fd20683c
folly/experimental/Singleton-inl.h
folly/experimental/Singleton.cpp
folly/experimental/Singleton.h
folly/experimental/test/SingletonTest.cpp