summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2021-10-28 18:06:21 +0000
committerDave Parks <davep@lindenlab.com>2021-10-28 18:06:21 +0000
commit8d20480c5f77fe1fab8149d3cda79bdd61e77656 (patch)
tree6ba8844d6e3b29451dc70213f8e7278db4943fa3 /indra/llui
parentaa7ca0aea134c9c40a0d4d1450cc64b7831d005f (diff)
SL-16148 SL-16244 SL-16270 SL-16253 Remove most BlockTimers, remove LLMemTracked, introduce alignas, hook most/all reamining allocs, disable synchronous occlusion, and convert frequently accessed LLSingletons to LLSimpleton
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llfloater.cpp17
-rw-r--r--indra/llui/llfolderview.cpp10
-rw-r--r--indra/llui/llfolderviewmodel.h6
-rw-r--r--indra/llui/lllayoutstack.cpp4
-rw-r--r--indra/llui/llpanel.cpp4
-rw-r--r--indra/llui/llscrolllistctrl.cpp7
-rw-r--r--indra/llui/lltextbase.cpp16
-rw-r--r--indra/llui/lluictrl.cpp17
-rw-r--r--indra/llui/lluictrlfactory.cpp15
-rw-r--r--indra/llui/lluictrlfactory.h16
-rw-r--r--indra/llui/llview.cpp13
-rw-r--r--indra/llui/llview.h3
-rw-r--r--indra/llui/llviewereventrecorder.cpp2
-rw-r--r--indra/llui/llviewereventrecorder.h10
-rw-r--r--indra/llui/llviewmodel.cpp20
-rw-r--r--indra/llui/llviewmodel.h3
16 files changed, 44 insertions, 119 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 0e42922543..03efd09689 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -3268,11 +3268,9 @@ boost::signals2::connection LLFloater::setCloseCallback( const commit_signal_t::
return mCloseSignal.connect(cb);
}
-LLTrace::BlockTimerStatHandle POST_BUILD("Floater Post Build");
-static LLTrace::BlockTimerStatHandle FTM_EXTERNAL_FLOATER_LOAD("Load Extern Floater Reference");
-
bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::string& filename, LLXMLNodePtr output_node)
{
+ LL_PROFILE_ZONE_SCOPED;
Params default_params(LLUICtrlFactory::getDefaultParams<LLFloater>());
Params params(default_params);
@@ -3299,7 +3297,6 @@ bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::str
LLUICtrlFactory::instance().pushFileName(xml_filename);
- LL_RECORD_BLOCK_TIME(FTM_EXTERNAL_FLOATER_LOAD);
if (!LLUICtrlFactory::getLayeredXMLNode(xml_filename, referenced_xml))
{
LL_WARNS() << "Couldn't parse panel from: " << xml_filename << LL_ENDL;
@@ -3375,12 +3372,8 @@ bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::str
}
BOOL result;
- {
- LL_RECORD_BLOCK_TIME(POST_BUILD);
-
- result = postBuild();
- }
-
+ result = postBuild();
+
if (!result)
{
LL_ERRS() << "Failed to construct floater " << getName() << LL_ENDL;
@@ -3424,11 +3417,9 @@ bool LLFloater::isVisible(const LLFloater* floater)
return floater && floater->getVisible();
}
-static LLTrace::BlockTimerStatHandle FTM_BUILD_FLOATERS("Build Floaters");
-
bool LLFloater::buildFromFile(const std::string& filename)
{
- LL_RECORD_BLOCK_TIME(FTM_BUILD_FLOATERS);
+ LL_PROFILE_ZONE_SCOPED;
LLXMLNodePtr root;
if (!LLUICtrlFactory::getLayeredXMLNode(filename, root))
diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp
index 622c9edba7..0996e82bf7 100644
--- a/indra/llui/llfolderview.cpp
+++ b/indra/llui/llfolderview.cpp
@@ -189,7 +189,6 @@ LLFolderView::LLFolderView(const Params& p)
mViewModel(p.view_model),
mGroupedItemModel(p.grouped_item_model)
{
- claimMem(mViewModel);
LLPanel* panel = p.parent_panel;
mParentPanel = panel->getHandle();
mViewModel->setFolderView(this);
@@ -337,11 +336,9 @@ S32 LLFolderView::arrange( S32* unused_width, S32* unused_height )
return ll_round(mTargetHeight);
}
-static LLTrace::BlockTimerStatHandle FTM_FILTER("Filter Folder View");
-
void LLFolderView::filter( LLFolderViewFilter& filter )
{
- LL_RECORD_BLOCK_TIME(FTM_FILTER);
+ LL_PROFILE_ZONE_SCOPED;
static LLCachedControl<S32> time_visible(*LLUI::getInstance()->mSettingGroups["config"], "FilterItemsMaxTimePerFrameVisible", 10);
static LLCachedControl<S32> time_invisible(*LLUI::getInstance()->mSettingGroups["config"], "FilterItemsMaxTimePerFrameUnvisible", 1);
filter.resetTime(llclamp((mParentPanel.get()->getVisible() ? time_visible() : time_invisible()), 1, 100));
@@ -503,10 +500,9 @@ BOOL LLFolderView::changeSelection(LLFolderViewItem* selection, BOOL selected)
return rv;
}
-static LLTrace::BlockTimerStatHandle FTM_SANITIZE_SELECTION("Sanitize Selection");
void LLFolderView::sanitizeSelection()
{
- LL_RECORD_BLOCK_TIME(FTM_SANITIZE_SELECTION);
+ LL_PROFILE_ZONE_SCOPED;
// store off current item in case it is automatically deselected
// and we want to preserve context
LLFolderViewItem* original_selected_item = getCurSelectedItem();
@@ -1621,7 +1617,6 @@ void LLFolderView::setShowSingleSelection(bool show)
}
}
-static LLTrace::BlockTimerStatHandle FTM_AUTO_SELECT("Open and Select");
static LLTrace::BlockTimerStatHandle FTM_INVENTORY("Inventory");
// Main idle routine
@@ -1657,7 +1652,6 @@ void LLFolderView::update()
// automatically show matching items, and select first one if we had a selection
if (mNeedsAutoSelect)
{
- LL_RECORD_BLOCK_TIME(FTM_AUTO_SELECT);
// select new item only if a filtered item not currently selected and there was a selection
LLFolderViewItem* selected_itemp = mSelectedItems.empty() ? NULL : mSelectedItems.back();
if (!mAutoSelectOverride && selected_itemp && !selected_itemp->getViewModelItem()->potentiallyVisible())
diff --git a/indra/llui/llfolderviewmodel.h b/indra/llui/llfolderviewmodel.h
index e62b2779dd..093e213be3 100644
--- a/indra/llui/llfolderviewmodel.h
+++ b/indra/llui/llfolderviewmodel.h
@@ -108,11 +108,10 @@ public:
virtual S32 getFirstRequiredGeneration() const = 0;
};
-class LLFolderViewModelInterface : public LLTrace::MemTrackable<LLFolderViewModelInterface>
+class LLFolderViewModelInterface
{
public:
LLFolderViewModelInterface()
- : LLTrace::MemTrackable<LLFolderViewModelInterface>("LLFolderViewModelInterface")
{}
virtual ~LLFolderViewModelInterface() {}
@@ -133,11 +132,10 @@ public:
// This is an abstract base class that users of the folderview classes
// would use to bridge the folder view with the underlying data
-class LLFolderViewModelItem : public LLRefCount, public LLTrace::MemTrackable<LLFolderViewModelItem>
+class LLFolderViewModelItem : public LLRefCount
{
public:
LLFolderViewModelItem()
- : LLTrace::MemTrackable<LLFolderViewModelItem>("LLFolderViewModelItem")
{}
virtual ~LLFolderViewModelItem() { }
diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp
index 29a156e933..528d2e70ad 100644
--- a/indra/llui/lllayoutstack.cpp
+++ b/indra/llui/lllayoutstack.cpp
@@ -340,8 +340,6 @@ void LLLayoutStack::collapsePanel(LLPanel* panel, BOOL collapsed)
mNeedsLayout = true;
}
-static LLTrace::BlockTimerStatHandle FTM_UPDATE_LAYOUT("Update LayoutStacks");
-
class LLImagePanel : public LLPanel
{
public:
@@ -369,7 +367,7 @@ private:
void LLLayoutStack::updateLayout()
{
- LL_RECORD_BLOCK_TIME(FTM_UPDATE_LAYOUT);
+ LL_PROFILE_ZONE_SCOPED;
if (!mNeedsLayout) return;
diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp
index 00da0f5fec..f770920c4a 100644
--- a/indra/llui/llpanel.cpp
+++ b/indra/llui/llpanel.cpp
@@ -800,14 +800,12 @@ boost::signals2::connection LLPanel::setVisibleCallback( const commit_signal_t::
return mVisibleSignal->connect(cb);
}
-static LLTrace::BlockTimerStatHandle FTM_BUILD_PANELS("Build Panels");
-
//-----------------------------------------------------------------------------
// buildPanel()
//-----------------------------------------------------------------------------
BOOL LLPanel::buildFromFile(const std::string& filename, const LLPanel::Params& default_params)
{
- LL_RECORD_BLOCK_TIME(FTM_BUILD_PANELS);
+ LL_PROFILE_ZONE_SCOPED;
BOOL didPost = FALSE;
LLXMLNodePtr root;
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index de644185fd..c70085b72f 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -3045,10 +3045,9 @@ LLScrollListColumn* LLScrollListCtrl::getColumn(const std::string& name)
return NULL;
}
-LLTrace::BlockTimerStatHandle FTM_ADD_SCROLLLIST_ELEMENT("Add Scroll List Item");
LLScrollListItem* LLScrollListCtrl::addElement(const LLSD& element, EAddPosition pos, void* userdata)
{
- LL_RECORD_BLOCK_TIME(FTM_ADD_SCROLLLIST_ELEMENT);
+ LL_PROFILE_ZONE_SCOPED;
LLScrollListItem::Params item_params;
LLParamSDParser parser;
parser.readSD(element, item_params);
@@ -3058,14 +3057,14 @@ LLScrollListItem* LLScrollListCtrl::addElement(const LLSD& element, EAddPosition
LLScrollListItem* LLScrollListCtrl::addRow(const LLScrollListItem::Params& item_p, EAddPosition pos)
{
- LL_RECORD_BLOCK_TIME(FTM_ADD_SCROLLLIST_ELEMENT);
+ LL_PROFILE_ZONE_SCOPED;
LLScrollListItem *new_item = new LLScrollListItem(item_p);
return addRow(new_item, item_p, pos);
}
LLScrollListItem* LLScrollListCtrl::addRow(LLScrollListItem *new_item, const LLScrollListItem::Params& item_p, EAddPosition pos)
{
- LL_RECORD_BLOCK_TIME(FTM_ADD_SCROLLLIST_ELEMENT);
+ LL_PROFILE_ZONE_SCOPED;
if (!item_p.validateBlock() || !new_item) return NULL;
new_item->setNumColumns(mColumns.size());
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 20bea7fe24..4274c81645 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -1484,11 +1484,9 @@ S32 LLTextBase::getLeftOffset(S32 width)
}
}
-
-static LLTrace::BlockTimerStatHandle FTM_TEXT_REFLOW ("Text Reflow");
void LLTextBase::reflow()
{
- LL_RECORD_BLOCK_TIME(FTM_TEXT_REFLOW);
+ LL_PROFILE_ZONE_SCOPED;
updateSegments();
@@ -1833,10 +1831,9 @@ void LLTextBase::removeDocumentChild(LLView* view)
}
-static LLTrace::BlockTimerStatHandle FTM_UPDATE_TEXT_SEGMENTS("Update Text Segments");
void LLTextBase::updateSegments()
{
- LL_RECORD_BLOCK_TIME(FTM_UPDATE_TEXT_SEGMENTS);
+ LL_PROFILE_ZONE_SCOPED;
createDefaultSegment();
}
@@ -2096,19 +2093,16 @@ static LLUIImagePtr image_from_icon_name(const std::string& icon_name)
}
}
-static LLTrace::BlockTimerStatHandle FTM_PARSE_HTML("Parse HTML");
-
-
void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Params& input_params)
{
+ LL_PROFILE_ZONE_SCOPED;
LLStyle::Params style_params(input_params);
style_params.fillFrom(getStyleParams());
S32 part = (S32)LLTextParser::WHOLE;
if (mParseHTML && !style_params.is_link) // Don't search for URLs inside a link segment (STORM-358).
{
- LL_RECORD_BLOCK_TIME(FTM_PARSE_HTML);
S32 start=0,end=0;
LLUrlMatch match;
std::string text = new_text;
@@ -2202,11 +2196,9 @@ void LLTextBase::setLastSegmentToolTip(const std::string &tooltip)
}
}
-static LLTrace::BlockTimerStatHandle FTM_APPEND_TEXT("Append Text");
-
void LLTextBase::appendText(const std::string &new_text, bool prepend_newline, const LLStyle::Params& input_params)
{
- LL_RECORD_BLOCK_TIME(FTM_APPEND_TEXT);
+ LL_PROFILE_ZONE_SCOPED;
if (new_text.empty())
return;
diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp
index 5924542a19..51391bb5e8 100644
--- a/indra/llui/lluictrl.cpp
+++ b/indra/llui/lluictrl.cpp
@@ -121,7 +121,6 @@ LLUICtrl::LLUICtrl(const LLUICtrl::Params& p, const LLViewModelPtr& viewmodel)
mDoubleClickSignal(NULL),
mTransparencyType(TT_DEFAULT)
{
- claimMem(viewmodel.get());
}
void LLUICtrl::initFromParams(const Params& p)
@@ -476,6 +475,7 @@ LLViewModel* LLUICtrl::getViewModel() const
//virtual
BOOL LLUICtrl::postBuild()
{
+ LL_PROFILE_ZONE_SCOPED;
//
// Find all of the children that want to be in front and move them to the front
//
@@ -781,12 +781,9 @@ BOOL LLUICtrl::getIsChrome() const
}
-
-LLTrace::BlockTimerStatHandle FTM_FOCUS_FIRST_ITEM("Focus First Item");
-
BOOL LLUICtrl::focusFirstItem(BOOL prefer_text_fields, BOOL focus_flash)
{
- LL_RECORD_BLOCK_TIME(FTM_FOCUS_FIRST_ITEM);
+ LL_PROFILE_ZONE_SCOPED;
// try to select default tab group child
LLViewQuery query = getTabOrderQuery();
child_list_t result = query(this);
@@ -1005,7 +1002,6 @@ boost::signals2::connection LLUICtrl::setCommitCallback( boost::function<void (L
boost::signals2::connection LLUICtrl::setValidateBeforeCommit( boost::function<bool (const LLSD& data)> cb )
{
if (!mValidateSignal) mValidateSignal = new enable_signal_t();
- claimMem(mValidateSignal);
return mValidateSignal->connect(boost::bind(cb, _2));
}
@@ -1070,7 +1066,6 @@ boost::signals2::connection LLUICtrl::setValidateCallback(const EnableCallbackPa
boost::signals2::connection LLUICtrl::setCommitCallback( const commit_signal_t::slot_type& cb )
{
if (!mCommitSignal) mCommitSignal = new commit_signal_t();
- claimMem(mCommitSignal);
return mCommitSignal->connect(cb);
}
@@ -1078,7 +1073,6 @@ boost::signals2::connection LLUICtrl::setCommitCallback( const commit_signal_t::
boost::signals2::connection LLUICtrl::setValidateCallback( const enable_signal_t::slot_type& cb )
{
if (!mValidateSignal) mValidateSignal = new enable_signal_t();
- claimMem(mValidateSignal);
return mValidateSignal->connect(cb);
}
@@ -1086,7 +1080,6 @@ boost::signals2::connection LLUICtrl::setValidateCallback( const enable_signal_t
boost::signals2::connection LLUICtrl::setMouseEnterCallback( const commit_signal_t::slot_type& cb )
{
if (!mMouseEnterSignal) mMouseEnterSignal = new commit_signal_t();
- claimMem(mMouseEnterSignal);
return mMouseEnterSignal->connect(cb);
}
@@ -1094,7 +1087,6 @@ boost::signals2::connection LLUICtrl::setMouseEnterCallback( const commit_signal
boost::signals2::connection LLUICtrl::setMouseLeaveCallback( const commit_signal_t::slot_type& cb )
{
if (!mMouseLeaveSignal) mMouseLeaveSignal = new commit_signal_t();
- claimMem(mMouseLeaveSignal);
return mMouseLeaveSignal->connect(cb);
}
@@ -1102,7 +1094,6 @@ boost::signals2::connection LLUICtrl::setMouseLeaveCallback( const commit_signal
boost::signals2::connection LLUICtrl::setMouseDownCallback( const mouse_signal_t::slot_type& cb )
{
if (!mMouseDownSignal) mMouseDownSignal = new mouse_signal_t();
- claimMem(mMouseDownSignal);
return mMouseDownSignal->connect(cb);
}
@@ -1110,7 +1101,6 @@ boost::signals2::connection LLUICtrl::setMouseDownCallback( const mouse_signal_t
boost::signals2::connection LLUICtrl::setMouseUpCallback( const mouse_signal_t::slot_type& cb )
{
if (!mMouseUpSignal) mMouseUpSignal = new mouse_signal_t();
- claimMem(mMouseUpSignal);
return mMouseUpSignal->connect(cb);
}
@@ -1118,7 +1108,6 @@ boost::signals2::connection LLUICtrl::setMouseUpCallback( const mouse_signal_t::
boost::signals2::connection LLUICtrl::setRightMouseDownCallback( const mouse_signal_t::slot_type& cb )
{
if (!mRightMouseDownSignal) mRightMouseDownSignal = new mouse_signal_t();
- claimMem(mRightMouseDownSignal);
return mRightMouseDownSignal->connect(cb);
}
@@ -1126,7 +1115,6 @@ boost::signals2::connection LLUICtrl::setRightMouseDownCallback( const mouse_sig
boost::signals2::connection LLUICtrl::setRightMouseUpCallback( const mouse_signal_t::slot_type& cb )
{
if (!mRightMouseUpSignal) mRightMouseUpSignal = new mouse_signal_t();
- claimMem(mRightMouseUpSignal);
return mRightMouseUpSignal->connect(cb);
}
@@ -1134,7 +1122,6 @@ boost::signals2::connection LLUICtrl::setRightMouseUpCallback( const mouse_signa
boost::signals2::connection LLUICtrl::setDoubleClickCallback( const mouse_signal_t::slot_type& cb )
{
if (!mDoubleClickSignal) mDoubleClickSignal = new mouse_signal_t();
- claimMem(mDoubleClickSignal);
return mDoubleClickSignal->connect(cb);
}
diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp
index fdefae01b1..2d0c0ea8aa 100644
--- a/indra/llui/lluictrlfactory.cpp
+++ b/indra/llui/lluictrlfactory.cpp
@@ -44,10 +44,6 @@
// this library includes
#include "llpanel.h"
-LLTrace::BlockTimerStatHandle FTM_WIDGET_CONSTRUCTION("Widget Construction");
-LLTrace::BlockTimerStatHandle FTM_INIT_FROM_PARAMS("Widget InitFromParams");
-LLTrace::BlockTimerStatHandle FTM_WIDGET_SETUP("Widget Setup");
-
//-----------------------------------------------------------------------------
// UI Ctrl class for padding
@@ -117,12 +113,10 @@ void LLUICtrlFactory::loadWidgetTemplate(const std::string& widget_tag, LLInitPa
}
}
-static LLTrace::BlockTimerStatHandle FTM_CREATE_CHILDREN("Create XUI Children");
-
//static
void LLUICtrlFactory::createChildren(LLView* viewp, LLXMLNodePtr node, const widget_registry_t& registry, LLXMLNodePtr output_node)
{
- LL_RECORD_BLOCK_TIME(FTM_CREATE_CHILDREN);
+ LL_PROFILE_ZONE_SCOPED;
if (node.isNull()) return;
for (LLXMLNodePtr child_node = node->getFirstChild(); child_node.notNull(); child_node = child_node->getNextSibling())
@@ -159,14 +153,13 @@ void LLUICtrlFactory::createChildren(LLView* viewp, LLXMLNodePtr node, const wid
}
-static LLTrace::BlockTimerStatHandle FTM_XML_PARSE("XML Reading/Parsing");
//-----------------------------------------------------------------------------
// getLayeredXMLNode()
//-----------------------------------------------------------------------------
bool LLUICtrlFactory::getLayeredXMLNode(const std::string &xui_filename, LLXMLNodePtr& root,
LLDir::ESkinConstraint constraint)
{
- LL_RECORD_BLOCK_TIME(FTM_XML_PARSE);
+ LL_PROFILE_ZONE_SCOPED;
std::vector<std::string> paths =
gDirUtilp->findSkinnedFilenames(LLDir::XUI, xui_filename, constraint);
@@ -191,11 +184,9 @@ S32 LLUICtrlFactory::saveToXML(LLView* viewp, const std::string& filename)
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-static LLTrace::BlockTimerStatHandle FTM_CREATE_FROM_XML("Create child widget");
-
LLView *LLUICtrlFactory::createFromXML(LLXMLNodePtr node, LLView* parent, const std::string& filename, const widget_registry_t& registry, LLXMLNodePtr output_node)
{
- LL_RECORD_BLOCK_TIME(FTM_CREATE_FROM_XML);
+ LL_PROFILE_ZONE_SCOPED;
std::string ctrl_type = node->getName()->mString;
LLStringUtil::toLower(ctrl_type);
diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h
index 135ed57a4f..3f24a3f1a5 100644
--- a/indra/llui/lluictrlfactory.h
+++ b/indra/llui/lluictrlfactory.h
@@ -79,10 +79,6 @@ class LLWidgetNameRegistry
// LLSINGLETON(LLDefaultParamBlockRegistry);
//};
-extern LLTrace::BlockTimerStatHandle FTM_WIDGET_SETUP;
-extern LLTrace::BlockTimerStatHandle FTM_WIDGET_CONSTRUCTION;
-extern LLTrace::BlockTimerStatHandle FTM_INIT_FROM_PARAMS;
-
// Build time optimization, generate this once in .cpp file
#ifndef LLUICTRLFACTORY_CPP
extern template class LLUICtrlFactory* LLSingleton<class LLUICtrlFactory>::getInstance();
@@ -213,6 +209,7 @@ private:
template<typename T>
static T* createWidgetImpl(const typename T::Params& params, LLView* parent = NULL)
{
+ LL_PROFILE_ZONE_SCOPED;
T* widget = NULL;
if (!params.validateBlock())
@@ -221,12 +218,9 @@ private:
//return NULL;
}
- { LL_RECORD_BLOCK_TIME(FTM_WIDGET_CONSTRUCTION);
- widget = new T(params);
- }
- { LL_RECORD_BLOCK_TIME(FTM_INIT_FROM_PARAMS);
- widget->initFromParams(params);
- }
+ widget = new T(params);
+
+ widget->initFromParams(params);
if (parent)
{
@@ -239,7 +233,7 @@ private:
template<typename T>
static T* defaultBuilder(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node)
{
- LL_RECORD_BLOCK_TIME(FTM_WIDGET_SETUP);
+ LL_PROFILE_ZONE_SCOPED;
typename T::Params params(getDefaultParams<T>());
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index b942be2a4a..bd0b9d3db2 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -140,8 +140,7 @@ LLView::Params::Params()
}
LLView::LLView(const LLView::Params& p)
-: LLTrace::MemTrackable<LLView>("LLView"),
- mVisible(p.visible),
+: mVisible(p.visible),
mInDraw(false),
mName(p.name),
mParentView(NULL),
@@ -1597,15 +1596,11 @@ LLView* LLView::getChildView(const std::string& name, BOOL recurse) const
return getChild<LLView>(name, recurse);
}
-static LLTrace::BlockTimerStatHandle FTM_FIND_VIEWS("Find Widgets");
-
LLView* LLView::findChildView(const std::string& name, BOOL recurse) const
{
- LL_RECORD_BLOCK_TIME(FTM_FIND_VIEWS);
- //richard: should we allow empty names?
- //if(name.empty())
- // return NULL;
- // Look for direct children *first*
+ LL_PROFILE_ZONE_SCOPED;
+
+ // Look for direct children *first*
BOOST_FOREACH(LLView* childp, mChildList)
{
llassert(childp);
diff --git a/indra/llui/llview.h b/indra/llui/llview.h
index c60dcf3344..bec45df78a 100644
--- a/indra/llui/llview.h
+++ b/indra/llui/llview.h
@@ -100,8 +100,7 @@ class LLView
: public LLMouseHandler, // handles mouse events
public LLFocusableElement, // handles keyboard events
public LLMortician, // lazy deletion
- public LLHandleProvider<LLView>, // passes out weak references to self
- public LLTrace::MemTrackable<LLView> // track memory usage
+ public LLHandleProvider<LLView> // passes out weak references to self
{
public:
diff --git a/indra/llui/llviewereventrecorder.cpp b/indra/llui/llviewereventrecorder.cpp
index cb000aef74..5a44ec947a 100644
--- a/indra/llui/llviewereventrecorder.cpp
+++ b/indra/llui/llviewereventrecorder.cpp
@@ -28,6 +28,8 @@
#include "llui.h"
#include "llleap.h"
+LLViewerEventRecorder* LLSimpleton<LLViewerEventRecorder>::sInstance = nullptr;
+
LLViewerEventRecorder::LLViewerEventRecorder() {
clear(UNDEFINED);
diff --git a/indra/llui/llviewereventrecorder.h b/indra/llui/llviewereventrecorder.h
index d1059d55de..d2c0780361 100644
--- a/indra/llui/llviewereventrecorder.h
+++ b/indra/llui/llviewereventrecorder.h
@@ -42,12 +42,12 @@
#include "llsingleton.h" // includes llerror which we need here so we can skip the include here
-class LLViewerEventRecorder : public LLSingleton<LLViewerEventRecorder>
+class LLViewerEventRecorder : public LLSimpleton<LLViewerEventRecorder>
{
- LLSINGLETON(LLViewerEventRecorder);
- ~LLViewerEventRecorder();
-
- public:
+public:
+ LLViewerEventRecorder();
+ ~LLViewerEventRecorder();
+
void updateMouseEventInfo(S32 local_x,S32 local_y, S32 global_x, S32 global_y, std::string mName);
void setMouseLocalCoords(S32 x,S32 y);
void setMouseGlobalCoords(S32 x,S32 y);
diff --git a/indra/llui/llviewmodel.cpp b/indra/llui/llviewmodel.cpp
index 282addf692..a400eb70c0 100644
--- a/indra/llui/llviewmodel.cpp
+++ b/indra/llui/llviewmodel.cpp
@@ -37,15 +37,13 @@
///
LLViewModel::LLViewModel()
-: LLTrace::MemTrackable<LLViewModel>("LLViewModel"),
- mDirty(false)
+: mDirty(false)
{
}
/// Instantiate an LLViewModel with an existing data value
LLViewModel::LLViewModel(const LLSD& value)
-: LLTrace::MemTrackable<LLViewModel>("LLViewModel"),
- mDirty(false)
+: mDirty(false)
{
setValue(value);
}
@@ -82,15 +80,9 @@ LLTextViewModel::LLTextViewModel(const LLSD& value)
void LLTextViewModel::setValue(const LLSD& value)
{
// approximate LLSD storage usage
- disclaimMem(mDisplay.size());
LLViewModel::setValue(value);
- disclaimMem(mDisplay);
mDisplay = utf8str_to_wstring(value.asString());
- claimMem(mDisplay);
- // approximate LLSD storage usage
- claimMem(mDisplay.size());
-
// mDisplay and mValue agree
mUpdateFromDisplay = false;
}
@@ -101,12 +93,8 @@ void LLTextViewModel::setDisplay(const LLWString& value)
// and do the utf8str_to_wstring() to get the corresponding mDisplay
// value. But a text editor might want to edit the display string
// directly, then convert back to UTF8 on commit.
- disclaimMem(mDisplay.size());
- disclaimMem(mDisplay);
- mDisplay = value;
- claimMem(mDisplay);
- claimMem(mDisplay.size());
- mDirty = true;
+ mDisplay = value;
+ mDirty = true;
// Don't immediately convert to UTF8 -- do it lazily -- we expect many
// more setDisplay() calls than getValue() calls. Just flag that it needs
// doing.
diff --git a/indra/llui/llviewmodel.h b/indra/llui/llviewmodel.h
index 49d7c322a3..e7dceb6c31 100644
--- a/indra/llui/llviewmodel.h
+++ b/indra/llui/llviewmodel.h
@@ -62,8 +62,7 @@ typedef LLPointer<LLListViewModel> LLListViewModelPtr;
* last referencing widget is destroyed.
*/
class LLViewModel
-: public LLRefCount,
- public LLTrace::MemTrackable<LLViewModel>
+: public LLRefCount
{
public:
LLViewModel();