michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* vim: set ts=8 sts=2 et sw=2 tw=80: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef mozilla_nsMemoryInfoDumper_h michael@0: #define mozilla_nsMemoryInfoDumper_h michael@0: michael@0: #include "nsIMemoryInfoDumper.h" michael@0: michael@0: class nsACString; michael@0: michael@0: /** michael@0: * This class facilitates dumping information about our memory usage to disk. michael@0: * michael@0: * Its cpp file also has Linux-only code which watches various OS signals and michael@0: * dumps memory info upon receiving a signal. You can activate these listeners michael@0: * by calling Initialize(). michael@0: */ michael@0: class nsMemoryInfoDumper : public nsIMemoryInfoDumper michael@0: { michael@0: public: michael@0: NS_DECL_ISUPPORTS michael@0: NS_DECL_NSIMEMORYINFODUMPER michael@0: michael@0: nsMemoryInfoDumper(); michael@0: virtual ~nsMemoryInfoDumper(); michael@0: michael@0: public: michael@0: static void Initialize(); michael@0: michael@0: #ifdef MOZ_DMD michael@0: static nsresult DumpDMD(const nsAString &aIdentifier); michael@0: #endif michael@0: }; michael@0: michael@0: #define NS_MEMORY_INFO_DUMPER_CID \ michael@0: { 0x00bd71fb, 0x7f09, 0x4ec3, \ michael@0: { 0x96, 0xaf, 0xa0, 0xb5, 0x22, 0xb7, 0x79, 0x69 } } michael@0: michael@0: #endif