LibreOffice Module onlineupdate (master) 1
nsTraceRefcnt.h
Go to the documentation of this file.
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___
8
9#include <stdio.h> // for FILE
10#include "nscore.h"
11
13{
14public:
15 static void Shutdown();
16
20 };
21
22 static nsresult DumpStatistics(StatisticsType aType = ALL_STATS,
23 FILE* aOut = 0);
24
25 static void ResetStatistics();
26
27 static void DemangleSymbol(const char* aSymbol, char* aBuffer, int aBufLen);
28
29 static void WalkTheStack(FILE* aStream);
30
39 static void WalkTheStackCached(FILE* aStream);
40
46 static void SetActivityIsLegal(bool aLegal);
47};
48
49#define NS_TRACE_REFCNT_CONTRACTID "@mozilla.org/xpcom/trace-refcnt;1"
50#define NS_TRACE_REFCNT_CID \
51{ /* e3e7511e-a395-4924-94b1-d527861cded4 */ \
52 0xe3e7511e, \
53 0xa395, \
54 0x4924, \
55 {0x94, 0xb1, 0xd5, 0x27, 0x86, 0x1c, 0xde, 0xd4} \
56} \
57
59// And now for that utility that you've all been asking for...
60
61extern "C" void
62NS_MeanAndStdDev(double aNumberOfValues,
63 double aSumOfValues, double aSumOfSquaredValues,
64 double* aMeanResult, double* aStdDevResult);
65
67#endif
static void WalkTheStack(FILE *aStream)
static void ResetStatistics()
static nsresult DumpStatistics(StatisticsType aType=ALL_STATS, FILE *aOut=0)
static void Shutdown()
static void SetActivityIsLegal(bool aLegal)
Tell nsTraceRefcnt whether refcounting, allocation, and destruction activity is legal.
static void DemangleSymbol(const char *aSymbol, char *aBuffer, int aBufLen)
static void WalkTheStackCached(FILE *aStream)
This is a variant of |WalkTheStack| that uses |CodeAddressService| to cache the results of |NS_Descri...
void NS_MeanAndStdDev(double aNumberOfValues, double aSumOfValues, double aSumOfSquaredValues, double *aMeanResult, double *aStdDevResult)