diff options
author | Ptolemy <ptolemy@lindenlab.com> | 2022-01-13 13:00:10 -0800 |
---|---|---|
committer | Ptolemy <ptolemy@lindenlab.com> | 2022-01-14 11:50:21 -0800 |
commit | b70614bd87414e1eb3206765ec5e0cfb3ba7fab7 (patch) | |
tree | 0d3049e0ba24d6111caada1f661c1b21c1e1716e | |
parent | b504c692554d492113a10ef45427fe0ab0d8a85d (diff) |
SL-16606: Add profiler category UI
-rw-r--r-- | indra/llrender/llfontgl.cpp | 10 | ||||
-rw-r--r-- | indra/llrender/llrender2dutils.cpp | 6 | ||||
-rw-r--r-- | indra/llui/llfolderview.cpp | 6 | ||||
-rw-r--r-- | indra/llui/lllayoutstack.cpp | 2 | ||||
-rw-r--r-- | indra/llui/llscrolllistctrl.cpp | 6 | ||||
-rw-r--r-- | indra/llui/lltextbase.cpp | 8 | ||||
-rw-r--r-- | indra/llui/lltrans.cpp | 8 | ||||
-rw-r--r-- | indra/llui/lluictrl.cpp | 4 | ||||
-rw-r--r-- | indra/llui/lluictrlfactory.cpp | 6 | ||||
-rw-r--r-- | indra/llui/lluictrlfactory.h | 4 | ||||
-rw-r--r-- | indra/llui/llview.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llhudnametag.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llviewerdisplay.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 4 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 4 |
15 files changed, 41 insertions, 41 deletions
diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index 7f734e41f3..1bf061bc8d 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -145,7 +145,7 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, const LLRectf& rec S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, const LLColor4 &color, HAlign halign, VAlign valign, U8 style, ShadowType shadow, S32 max_chars, S32 max_pixels, F32* right_x, BOOL use_ellipses) const { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; if(!sDisplayFont) //do not display texts { @@ -547,7 +547,7 @@ F32 LLFontGL::getWidthF32(const llwchar* wchars, S32 begin_offset, S32 max_chars void LLFontGL::generateASCIIglyphs() { - LL_PROFILE_ZONE_SCOPED + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI for (U32 i = 32; (i < 127); i++) { mFontFreetype->getGlyphInfo(i); @@ -557,7 +557,7 @@ void LLFontGL::generateASCIIglyphs() // Returns the max number of complete characters from text (up to max_chars) that can be drawn in max_pixels S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_chars, EWordWrapStyle end_on_word_boundary) const { - LL_PROFILE_ZONE_SCOPED + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI if (!wchars || !wchars[0] || max_chars == 0) { return 0; @@ -848,7 +848,7 @@ void LLFontGL::initClass(F32 screen_dpi, F32 x_scale, F32 y_scale, const std::st // static bool LLFontGL::loadDefaultFonts() { - LL_PROFILE_ZONE_SCOPED + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI bool succ = true; succ &= (NULL != getFontSansSerifSmall()); succ &= (NULL != getFontSansSerif()); @@ -861,7 +861,7 @@ bool LLFontGL::loadDefaultFonts() void LLFontGL::loadCommonFonts() { - LL_PROFILE_ZONE_SCOPED + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI getFont(LLFontDescriptor("SansSerif", "Small", BOLD)); getFont(LLFontDescriptor("SansSerif", "Large", BOLD)); getFont(LLFontDescriptor("SansSerif", "Huge", BOLD)); diff --git a/indra/llrender/llrender2dutils.cpp b/indra/llrender/llrender2dutils.cpp index ad0c6262a4..5cb1dc6b25 100644 --- a/indra/llrender/llrender2dutils.cpp +++ b/indra/llrender/llrender2dutils.cpp @@ -989,7 +989,7 @@ void gl_segmented_rect_2d_tex(const S32 left, const S32 border_size, const U32 edges) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; S32 width = llabs(right - left); S32 height = llabs(top - bottom); @@ -1148,7 +1148,7 @@ void gl_segmented_rect_2d_fragment_tex(const LLRect& rect, const F32 end_fragment, const U32 edges) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; const S32 left = rect.mLeft; const S32 right = rect.mRight; const S32 top = rect.mTop; @@ -1335,7 +1335,7 @@ void gl_segmented_rect_2d_fragment_tex(const LLRect& rect, void gl_segmented_rect_3d_tex(const LLRectf& clip_rect, const LLRectf& center_uv_rect, const LLRectf& center_draw_rect, const LLVector3& width_vec, const LLVector3& height_vec) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; gGL.begin(LLRender::QUADS); { diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 0996e82bf7..a685924d99 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -338,7 +338,7 @@ S32 LLFolderView::arrange( S32* unused_width, S32* unused_height ) void LLFolderView::filter( LLFolderViewFilter& filter ) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; 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)); @@ -502,7 +502,7 @@ BOOL LLFolderView::changeSelection(LLFolderViewItem* selection, BOOL selected) void LLFolderView::sanitizeSelection() { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; // store off current item in case it is automatically deselected // and we want to preserve context LLFolderViewItem* original_selected_item = getCurSelectedItem(); @@ -1624,7 +1624,7 @@ void LLFolderView::update() { // If this is associated with the user's inventory, don't do anything // until that inventory is loaded up. - LL_RECORD_BLOCK_TIME(FTM_INVENTORY); + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; //LL_RECORD_BLOCK_TIME(FTM_INVENTORY); // If there's no model, the view is in suspended state (being deleted) and shouldn't be updated if (getFolderViewModel() == NULL) diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index 528d2e70ad..aac28e04b9 100644 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -367,7 +367,7 @@ private: void LLLayoutStack::updateLayout() { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; if (!mNeedsLayout) return; diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index c70085b72f..f6071e12e5 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -3047,7 +3047,7 @@ LLScrollListColumn* LLScrollListCtrl::getColumn(const std::string& name) LLScrollListItem* LLScrollListCtrl::addElement(const LLSD& element, EAddPosition pos, void* userdata) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; LLScrollListItem::Params item_params; LLParamSDParser parser; parser.readSD(element, item_params); @@ -3057,14 +3057,14 @@ LLScrollListItem* LLScrollListCtrl::addElement(const LLSD& element, EAddPosition LLScrollListItem* LLScrollListCtrl::addRow(const LLScrollListItem::Params& item_p, EAddPosition pos) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; 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_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; 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 3b0789892f..2827888b53 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1492,7 +1492,7 @@ S32 LLTextBase::getLeftOffset(S32 width) void LLTextBase::reflow() { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; updateSegments(); @@ -1839,7 +1839,7 @@ void LLTextBase::removeDocumentChild(LLView* view) void LLTextBase::updateSegments() { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; createDefaultSegment(); } @@ -2102,7 +2102,7 @@ static LLUIImagePtr image_from_icon_name(const std::string& icon_name) void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Params& input_params) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; LLStyle::Params style_params(input_params); style_params.fillFrom(getStyleParams()); @@ -2204,7 +2204,7 @@ void LLTextBase::setLastSegmentToolTip(const std::string &tooltip) void LLTextBase::appendText(const std::string &new_text, bool prepend_newline, const LLStyle::Params& input_params) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; if (new_text.empty()) return; diff --git a/indra/llui/lltrans.cpp b/indra/llui/lltrans.cpp index a1a8feedaa..a1ef34159d 100644 --- a/indra/llui/lltrans.cpp +++ b/indra/llui/lltrans.cpp @@ -147,7 +147,7 @@ std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil:: { // Don't care about time as much as call count. Make sure we're not // calling LLTrans::getString() in an inner loop. JC - LL_RECORD_BLOCK_TIME(FTM_GET_TRANS); + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; if (def_string) { @@ -196,7 +196,7 @@ std::string LLTrans::getString(const std::string &xml_desc, const LLSD& msg_args { // Don't care about time as much as call count. Make sure we're not // calling LLTrans::getString() in an inner loop. JC - LL_RECORD_BLOCK_TIME(FTM_GET_TRANS); + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; if (def_string) { @@ -237,7 +237,7 @@ std::string LLTrans::getDefString(const std::string &xml_desc, const LLSD& msg_a //static bool LLTrans::findString(std::string &result, const std::string &xml_desc, const LLStringUtil::format_map_t& msg_args) { - LL_RECORD_BLOCK_TIME(FTM_GET_TRANS); + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; template_map_t::iterator iter = sStringTemplates.find(xml_desc); if (iter != sStringTemplates.end()) @@ -259,7 +259,7 @@ bool LLTrans::findString(std::string &result, const std::string &xml_desc, const //static bool LLTrans::findString(std::string &result, const std::string &xml_desc, const LLSD& msg_args) { - LL_RECORD_BLOCK_TIME(FTM_GET_TRANS); + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; template_map_t::iterator iter = sStringTemplates.find(xml_desc); if (iter != sStringTemplates.end()) diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp index 51391bb5e8..2196ba201b 100644 --- a/indra/llui/lluictrl.cpp +++ b/indra/llui/lluictrl.cpp @@ -475,7 +475,7 @@ LLViewModel* LLUICtrl::getViewModel() const //virtual BOOL LLUICtrl::postBuild() { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; // // Find all of the children that want to be in front and move them to the front // @@ -783,7 +783,7 @@ BOOL LLUICtrl::getIsChrome() const BOOL LLUICtrl::focusFirstItem(BOOL prefer_text_fields, BOOL focus_flash) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; // try to select default tab group child LLViewQuery query = getTabOrderQuery(); child_list_t result = query(this); diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp index 2d0c0ea8aa..a85db17c7f 100644 --- a/indra/llui/lluictrlfactory.cpp +++ b/indra/llui/lluictrlfactory.cpp @@ -116,7 +116,7 @@ void LLUICtrlFactory::loadWidgetTemplate(const std::string& widget_tag, LLInitPa //static void LLUICtrlFactory::createChildren(LLView* viewp, LLXMLNodePtr node, const widget_registry_t& registry, LLXMLNodePtr output_node) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; if (node.isNull()) return; for (LLXMLNodePtr child_node = node->getFirstChild(); child_node.notNull(); child_node = child_node->getNextSibling()) @@ -159,7 +159,7 @@ void LLUICtrlFactory::createChildren(LLView* viewp, LLXMLNodePtr node, const wid bool LLUICtrlFactory::getLayeredXMLNode(const std::string &xui_filename, LLXMLNodePtr& root, LLDir::ESkinConstraint constraint) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; std::vector<std::string> paths = gDirUtilp->findSkinnedFilenames(LLDir::XUI, xui_filename, constraint); @@ -186,7 +186,7 @@ S32 LLUICtrlFactory::saveToXML(LLView* viewp, const std::string& filename) LLView *LLUICtrlFactory::createFromXML(LLXMLNodePtr node, LLView* parent, const std::string& filename, const widget_registry_t& registry, LLXMLNodePtr output_node) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; std::string ctrl_type = node->getName()->mString; LLStringUtil::toLower(ctrl_type); diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h index 3f24a3f1a5..6e585abfc0 100644 --- a/indra/llui/lluictrlfactory.h +++ b/indra/llui/lluictrlfactory.h @@ -209,7 +209,7 @@ private: template<typename T> static T* createWidgetImpl(const typename T::Params& params, LLView* parent = NULL) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; T* widget = NULL; if (!params.validateBlock()) @@ -233,7 +233,7 @@ private: template<typename T> static T* defaultBuilder(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node) { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; typename T::Params params(getDefaultParams<T>()); diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index bd0b9d3db2..9ba71913d0 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -1598,7 +1598,7 @@ LLView* LLView::getChildView(const std::string& name, BOOL recurse) const LLView* LLView::findChildView(const std::string& name, BOOL recurse) const { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; // Look for direct children *first* BOOST_FOREACH(LLView* childp, mChildList) diff --git a/indra/newview/llhudnametag.cpp b/indra/newview/llhudnametag.cpp index 8e296321d2..952fbf8e4b 100644 --- a/indra/newview/llhudnametag.cpp +++ b/indra/newview/llhudnametag.cpp @@ -224,7 +224,7 @@ BOOL LLHUDNameTag::lineSegmentIntersect(const LLVector4a& start, const LLVector4 void LLHUDNameTag::render() { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; if (sDisplayText) { LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE); @@ -730,7 +730,7 @@ void LLHUDNameTag::updateSize() void LLHUDNameTag::updateAll() { - LL_PROFILE_ZONE_SCOPED; + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; // iterate over all text objects, calculate their restoration forces, // and add them to the visible set if they are on screen and close enough sVisibleTextObjects.clear(); diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index e2c831bb1c..b5d3dc5d30 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -1242,7 +1242,7 @@ bool setup_hud_matrices(const LLRect& screen_region) void render_ui(F32 zoom_factor, int subfield) { - LL_RECORD_BLOCK_TIME(FTM_RENDER_UI); + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; //LL_RECORD_BLOCK_TIME(FTM_RENDER_UI); LLGLState::checkStates(); @@ -1274,7 +1274,7 @@ void render_ui(F32 zoom_factor, int subfield) // 1. Use a new scope // 2. Use named zones // 3. Use transient zones - LL_RECORD_BLOCK_TIME(FTM_RENDER_HUD); + LL_PROFILE_ZONE_NAMED_CATEGORY_UI("HUD"); //LL_RECORD_BLOCK_TIME(FTM_RENDER_HUD); render_hud_elements(); render_hud_attachments(); @@ -1290,7 +1290,7 @@ void render_ui(F32 zoom_factor, int subfield) { if (!gDisconnected) { - LL_RECORD_BLOCK_TIME(FTM_RENDER_UI_3D); + LL_PROFILE_ZONE_NAMED_CATEGORY_UI("UI 3D"); //LL_RECORD_BLOCK_TIME(FTM_RENDER_UI_3D); render_ui_3d(); LLGLState::checkStates(); } @@ -1299,7 +1299,7 @@ void render_ui(F32 zoom_factor, int subfield) render_disconnected_background(); } - LL_RECORD_BLOCK_TIME(FTM_RENDER_UI_2D); + LL_PROFILE_ZONE_NAMED_CATEGORY_UI("UI 2D"); //LL_RECORD_BLOCK_TIME(FTM_RENDER_UI_2D); render_ui_2d(); LLGLState::checkStates(); } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 8d749c41cc..2fc4e9d0bd 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -3333,7 +3333,7 @@ static LLTrace::BlockTimerStatHandle ftm("Update UI"); // event processing. void LLViewerWindow::updateUI() { - LL_RECORD_BLOCK_TIME(ftm); + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; //LL_RECORD_BLOCK_TIME(ftm); static std::string last_handle_msg; @@ -5384,7 +5384,7 @@ void LLViewerWindow::setup3DRender() void LLViewerWindow::setup3DViewport(S32 x_offset, S32 y_offset) { - LL_PROFILE_ZONE_SCOPED + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI gGLViewport[0] = mWorldViewRectRaw.mLeft + x_offset; gGLViewport[1] = mWorldViewRectRaw.mBottom + y_offset; gGLViewport[2] = mWorldViewRectRaw.getWidth(); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index c7dc710dd1..a17efecf2d 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -3973,8 +3973,8 @@ void LLPipeline::postSort(LLCamera& camera) void render_hud_elements() { - LL_RECORD_BLOCK_TIME(FTM_RENDER_UI); - gPipeline.disableLights(); + LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; //LL_RECORD_BLOCK_TIME(FTM_RENDER_UI); + gPipeline.disableLights(); LLGLDisable fog(GL_FOG); LLGLSUIDefault gls_ui; |