Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
60105b33
Commit
60105b33
authored
5 years ago
by
Rye Mutt
Browse files
Options
Downloads
Patches
Plain Diff
Fix leaks and memory hoarding in fast timers
parent
8a0926ad
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/newview/llfasttimerview.cpp
+27
-14
27 additions, 14 deletions
indra/newview/llfasttimerview.cpp
indra/newview/llfasttimerview.h
+1
-0
1 addition, 0 deletions
indra/newview/llfasttimerview.h
with
28 additions
and
14 deletions
indra/newview/llfasttimerview.cpp
+
27
−
14
View file @
60105b33
...
...
@@ -253,6 +253,12 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask)
bar_index
<
end_index
;
++
bar_index
)
{
if
(
!
row
.
mBars
)
{
LL_WARNS
()
<<
"mTimerBarRows.mBars is null at index: "
<<
bar_index
<<
" bailing out"
<<
LL_ENDL
;
break
;
}
TimerBar
&
bar
=
row
.
mBars
[
bar_index
];
if
(
bar
.
mSelfStart
>
mouse_time_offset
)
{
...
...
@@ -426,21 +432,16 @@ void LLFastTimerView::draw()
void
LLFastTimerView
::
onOpen
(
const
LLSD
&
key
)
{
mTimerBarRows
.
resize
(
NUM_FRAMES_HISTORY
);
setPauseState
(
false
);
mRecording
.
reset
();
mRecording
.
appendPeriodicRecording
(
LLTrace
::
get_frame_recording
());
for
(
std
::
deque
<
TimerBarRow
>::
iterator
it
=
mTimerBarRows
.
begin
(),
end_it
=
mTimerBarRows
.
end
();
it
!=
end_it
;
++
it
)
{
delete
[]
it
->
mBars
;
it
->
mBars
=
NULL
;
}
}
void
LLFastTimerView
::
onClose
(
bool
app_quitting
)
{
setVisible
(
FALSE
);
mTimerBarRows
.
clear
();
}
void
saveChart
(
const
std
::
string
&
label
,
const
char
*
suffix
,
LLImageRaw
*
scratch
)
...
...
@@ -782,7 +783,7 @@ LLSD LLFastTimerView::analyzePerformanceLogDefault(std::istream& is)
stats_map_t
time_stats
;
stats_map_t
sample_stats
;
while
(
!
is
.
eof
()
&&
LLSDParser
::
PARSE_FAILURE
!=
LLSDSerialize
::
fromXML
(
cur
,
is
))
while
(
!
is
.
eof
()
&&
!
is
.
fail
()
&&
LLSDParser
::
PARSE_FAILURE
!=
LLSDSerialize
::
fromXML
(
cur
,
is
))
{
for
(
LLSD
::
map_iterator
iter
=
cur
.
beginMap
();
iter
!=
cur
.
endMap
();
++
iter
)
{
...
...
@@ -1514,6 +1515,8 @@ void LLFastTimerView::drawBars()
{
llassert
(
bar_index
<
mTimerBarRows
.
size
());
TimerBarRow
&
row
=
mTimerBarRows
[
bar_index
];
if
(
row
.
mBars
)
{
row
.
mTop
=
frame_bar_rect
.
mTop
;
row
.
mBottom
=
frame_bar_rect
.
mBottom
;
frame_bar_rect
.
mRight
=
frame_bar_rect
.
mLeft
...
...
@@ -1522,6 +1525,7 @@ void LLFastTimerView::drawBars()
frame_bar_rect
.
translate
(
0
,
-
(
bar_height
+
vpad
));
}
}
}
gGL
.
getTexUnit
(
0
)
->
unbind
(
LLTexUnit
::
TT_TEXTURE
);
...
...
@@ -1680,3 +1684,12 @@ S32 LLFastTimerView::drawBar(LLRect bar_rect, TimerBarRow& row, S32 image_width,
return
bar_index
;
}
LLFastTimerView
::
TimerBarRow
::~
TimerBarRow
()
{
if
(
mBars
!=
nullptr
)
{
delete
[]
mBars
;
mBars
=
nullptr
;
}
}
This diff is collapsed.
Click to expand it.
indra/newview/llfasttimerview.h
+
1
−
0
View file @
60105b33
...
...
@@ -110,6 +110,7 @@ class LLFastTimerView : public LLFloater
mTop
(
0
),
mBars
(
NULL
)
{}
~
TimerBarRow
();
S32
mBottom
,
mTop
;
TimerBar
*
mBars
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment