Bug 1867190 - Add prefs for PHC probablities r=glandium
[gecko.git] / xpcom / base / nsTraceRefcnt.h
blob23eeec0bdf104ada8b1e809893f627b1bbf76e57
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef nsTraceRefcnt_h
7 #define nsTraceRefcnt_h
9 #include "nscore.h"
11 class nsTraceRefcnt {
12 public:
13 static void Shutdown();
15 static nsresult DumpStatistics();
17 static void ResetStatistics();
19 /**
20 * Tell nsTraceRefcnt whether refcounting, allocation, and destruction
21 * activity is legal. This is used to trigger assertions for any such
22 * activity that occurs because of static constructors or destructors.
24 static void SetActivityIsLegal(bool aLegal);
26 /**
27 * Start refcount logging aClass. If refcount logging has not already begun,
28 * it will use the environment variable XPCOM_MEM_LATE_REFCNT_LOG to decide
29 * where to make the log, in a similar way as the other nsTraceRefcnt logs.
31 static void StartLoggingClass(const char* aClass);
33 #ifdef MOZ_ENABLE_FORKSERVER
34 static void ResetLogFiles(const char* aProcType = nullptr);
35 #endif
38 #endif // nsTraceRefcnt_h