michael@0: # Categorization rules for spacetrace michael@0: # michael@0: # This file defines the stack frame rules that will categorize michael@0: # allocations that spacetrace processes. The format of this file is michael@0: # michael@0: # michael@0: # initial string match for stack frame n michael@0: # initial string match for stack frame n+1 michael@0: # initial string match for stack frame n+2 michael@0: # michael@0: # The key in the matching rule is that for every rule, we provide a michael@0: # snippet of the stack frame - contiguous substring matches. michael@0: # categorynames and rules substring matches are case sensitive michael@0: # michael@0: # Predefined Categories michael@0: # "All" - All allocations [default] michael@0: # "uncategorized" - All allocations that don't match any category michael@0: # michael@0: # michael@0: # Suresh Duddi michael@0: ########################################################################### michael@0: # NOTE: This is still under definition michael@0: ########################################################################### michael@0: # General principle of categorization: michael@0: # michael@0: # - Each category, in general, denotes a module or feature. michael@0: # michael@0: # - We assign each allocation to the module/feature that directly michael@0: # caused the allocation irrespective of which higher level module michael@0: # caused the allocation. There are very few exceptions usually when michael@0: # an allocation belongs both to a feature-category and to a michael@0: # module-category. michael@0: # michael@0: # bookmarks michael@0: # Bookmarks. Mainly initialization. Does not include menu cost. michael@0: # css michael@0: # Cascading style sheets michael@0: # dom michael@0: # Memory held by DOM. michael@0: # font michael@0: # All font stuff michael@0: # global-history michael@0: # html michael@0: # html parsing and layout michael@0: # layout michael@0: # reflow, frames, line, view michael@0: # images michael@0: # All images. michael@0: # jar michael@0: # jar, zip michael@0: # js michael@0: # javascript michael@0: # necko michael@0: # All protocol and uri stuff. All urls created accounted here michael@0: # preferences michael@0: # Preferences stuff. All js cost for preferences is included here. michael@0: ## rdf michael@0: # Most of the rdf allocations. rdf cost from xul, chromeregistry, michael@0: # is assigned to xul. michael@0: # michael@0: # wallet michael@0: # Form cache. michael@0: # michael@0: # xbl michael@0: # xbl stuff. Includes js in xbl. michael@0: # xpcom michael@0: # xpcom, xpt. Allocations for creations of objects are assigned michael@0: # onto the respective modules michael@0: # xul michael@0: # XUL parsing and layout. Includes rdf overhead from xul like michael@0: # nsChromeRegistry michael@0: # michael@0: michael@0: michael@0: # michael@0: michael@0: # =========================================================================== michael@0: # Leaf rules. We categorize them out first. michael@0: # All allocations matching these rules DO belong to the category. michael@0: # =========================================================================== michael@0: michael@0: michael@0: nsXULPrototypeScript::Deserialize michael@0: michael@0: michael@0: XSupportsLocale michael@0: michael@0: michael@0: /usr/X11R6/lib/libX11.so michael@0: michael@0: michael@0: JS_Init michael@0: michael@0: michael@0: NS_NewPermanentAtom michael@0: michael@0: michael@0: gif_write michael@0: michael@0: michael@0: imgRequest::OnDataAvailable michael@0: michael@0: michael@0: imgLoader:: michael@0: michael@0: michael@0: jinit_master_decompress michael@0: michael@0: michael@0: jinit_marker_reader michael@0: michael@0: michael@0: jinit_marker_decompress michael@0: michael@0: michael@0: nsJPEGDecoder:: michael@0: michael@0: michael@0: nsGIFDecoder2:: michael@0: michael@0: michael@0: nsZipArchive::BuildFileList michael@0: michael@0: michael@0: nsZipArchive::ReadInit michael@0: michael@0: michael@0: nsJARChannel::Open michael@0: michael@0: michael@0: NS_InitXPCOM2 michael@0: michael@0: # xpt file loads michael@0: michael@0: xptiInterfaceInfoManager::LoadFile michael@0: michael@0: michael@0: nsGenericModule::Initialize michael@0: michael@0: michael@0: nsStringBundle michael@0: michael@0: michael@0: nsLocale:: michael@0: michael@0: michael@0: nsCharsetConverterManager:: michael@0: michael@0: michael@0: nsDiskCacheDevice::Init michael@0: michael@0: michael@0: nsCacheEntryDescriptor::nsTransportWrapper::OpenOutputStream michael@0: michael@0: michael@0: nsSocketTransport:: michael@0: michael@0: michael@0: nsCacheService:: michael@0: michael@0: michael@0: nsDiskCacheStreamIO:: michael@0: michael@0: michael@0: nsHttpResponseHead:: michael@0: michael@0: michael@0: WLLT michael@0: michael@0: michael@0: nsXULElement::Create michael@0: michael@0: michael@0: nsXULAttribute::Create michael@0: michael@0: michael@0: nsXULDocument::AddElementToMap michael@0: michael@0: michael@0: XULContentSinkImpl::AddAttributes michael@0: michael@0: michael@0: XULContentSinkImpl::CreateElement michael@0: michael@0: michael@0: nsXULElement::SetAttr michael@0: michael@0: michael@0: nsXULDocument::InsertElement michael@0: michael@0: michael@0: NS_NewXULContentBuilder michael@0: michael@0: michael@0: nsXULElement::AppendChildTo michael@0: michael@0: michael@0: nsXBLPrototypeHandler::AppendHandlerText( michael@0: michael@0: michael@0: FrameArena::AllocateFrame michael@0: michael@0: michael@0: nsGlobalHistory::OpenDB michael@0: michael@0: michael@0: nsFontCache:: michael@0: michael@0: michael@0: nsFont::nsFont michael@0: michael@0: michael@0: gtk_init michael@0: michael@0: michael@0: RDFServiceImpl::GetResource michael@0: michael@0: michael@0: RDFContentSinkImpl::AddProperties michael@0: michael@0: michael@0: RDFContainerImpl::AppendElement michael@0: michael@0: michael@0: RDFXMLDataSourceImpl::Assert michael@0: michael@0: michael@0: NS_NewRDFInMemoryDataSource michael@0: michael@0: michael@0: CSSLoaderImpl::ParseSheet michael@0: michael@0: michael@0: CSSParserImpl::Parse( michael@0: michael@0: michael@0: NS_NewCSS michael@0: michael@0: michael@0: RuleHash::AppendRule michael@0: michael@0: michael@0: nsRuleNode::GetStyleData michael@0: michael@0: michael@0: SelectorList:: michael@0: michael@0: michael@0: CSSRuleProcessor::RulesMatching michael@0: michael@0: michael@0: CSSStyleSheetImpl::Clone michael@0: michael@0: michael@0: nsHttpHeaderArray:: michael@0: michael@0: michael@0: nsScanner::Append michael@0: michael@0: michael@0: nsHTMLTokenizer:: michael@0: michael@0: michael@0: NS_NewHTMLTokenizer michael@0: michael@0: michael@0: nsSlidingString:: michael@0: michael@0: michael@0: nsParser:: michael@0: michael@0: michael@0: nsIParserService:: michael@0: michael@0: michael@0: nsCParserNode:: michael@0: michael@0: michael@0: CNavDTD::CNavDTD michael@0: michael@0: michael@0: nsHTMLDocument:: michael@0: michael@0: michael@0: IncrementalReflow::AddCommand michael@0: michael@0: michael@0: nsBlockFrame:: michael@0: michael@0: michael@0: nsBoxFrame:: michael@0: michael@0: michael@0: nsImageFrame:: michael@0: michael@0: michael@0: nsInlineFrame:: michael@0: michael@0: michael@0: nsLeafFrame:: michael@0: michael@0: michael@0: nsLineLayout:: michael@0: michael@0: michael@0: nsReflowPath::EnsureSubtreeFor michael@0: michael@0: michael@0: nsSliderFrame:: michael@0: michael@0: michael@0: nsScrollBoxFrame:: michael@0: michael@0: michael@0: nsTextFrame:: michael@0: michael@0: michael@0: nsTableRowFrame:: michael@0: michael@0: michael@0: nsTableRowGroupFrame:: michael@0: michael@0: michael@0: nsViewManager:: michael@0: michael@0: michael@0: PresShell::ProcessReflowCommands michael@0: michael@0: michael@0: # ====================================================================== michael@0: # Rules that match higher up on the stack michael@0: # These go later. michael@0: # ====================================================================== michael@0: michael@0: michael@0: PREF_ michael@0: michael@0: michael@0: nsBookmarksService:: michael@0: michael@0: michael@0: nsXBLService::LoadBindings michael@0: michael@0: michael@0: nsXBLBinding::ExecuteAttachedHandler michael@0: michael@0: michael@0: nsXULDocument::LoadScript michael@0: michael@0: michael@0: nsXULDocument::ExecuteScript michael@0: michael@0: michael@0: XULContentSinkImpl::Open michael@0: michael@0: michael@0: RDFContentSinkImpl::HandleEndElement michael@0: michael@0: michael@0: HTMLContentSink::AddAttributes michael@0: michael@0: michael@0: HTMLContentSink::OpenContainer michael@0: michael@0: michael@0: HTMLContentSink::CloseContainer michael@0: michael@0: # XXX whom to account LoadImage to? I am going with images. michael@0: michael@0: imgLoader::LoadImage michael@0: michael@0: michael@0: StackArena:: michael@0: michael@0: # ====================================================================== michael@0: # Even more genralized rules. There could be lots of activity that michael@0: # happens below them in the stack. But we are sure we have categorized michael@0: # a lot of them by using the rules above and know the category of the michael@0: # most of the rest. michael@0: # ====================================================================== michael@0: michael@0: michael@0: RDFContentSinkImpl:: michael@0: michael@0: michael@0: nsGenericDOMDataNode:: michael@0: michael@0: michael@0: nsDOMClassInfo:: michael@0: michael@0: michael@0: nsDOMSOFactory:: michael@0: michael@0: michael@0: nsXULTemplateBuilder:: michael@0: michael@0: michael@0: XULContentSinkImpl::HandleEndElement michael@0: michael@0: michael@0: nsChromeRegistry:: michael@0: michael@0: michael@0: nsJSContext::EvaluateString michael@0: michael@0: # Almost all of what is left with XULContentSink belongs to xul michael@0: # Also, this was roughly 0.3% of startup memory michael@0: michael@0: XULContentSinkImpl:: michael@0: michael@0: # XXX this is a wild guess -> html What remains here is about michael@0: # XXX 1.5% of startup footprint michael@0: michael@0: HTMLContentSink:: michael@0: michael@0: michael@0: nsXBLContentSink:: michael@0: michael@0: michael@0: nsXBLStreamListener::OnDataAvailable michael@0: michael@0: michael@0: nsIOService::NewURI michael@0: michael@0: michael@0: nsIOService::NewChannelFromURI michael@0: michael@0: michael@0: nsSegmentedBuffer::AppendNewSegment michael@0: michael@0: michael@0: nsHttpChannel:: michael@0: michael@0: # Catchalls to help categorize michael@0: # ---------------------------------------------------------------------- michael@0: michael@0: js_ michael@0: michael@0: # Everything else michael@0: # ---------------------------------------------------------------------- michael@0: # michael@0: # This is a predefined category. Don't create it yourself.