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