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
2cdfb170
Commit
2cdfb170
authored
12 years ago
by
Richard Linden
Browse files
Options
Downloads
Patches
Plain Diff
SH-3275 WIP Run viewer metrics for object update messages
renamed some variables in lltrace
parent
6814906f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/llcommon/lltrace.h
+15
-15
15 additions, 15 deletions
indra/llcommon/lltrace.h
with
15 additions
and
15 deletions
indra/llcommon/lltrace.h
+
15
−
15
View file @
2cdfb170
...
@@ -51,18 +51,18 @@ namespace LLTrace
...
@@ -51,18 +51,18 @@ namespace LLTrace
struct
Accumulator
struct
Accumulator
{
{
U32
mSelfTimeCounter
;
U32
mTotalTimeCounter
;
U32
mTotalTimeCounter
;
U32
mChildTimeCounter
;
U32
mCalls
;
U32
mCalls
;
Accumulator
*
mParent
;
// info for caller timer
Accumulator
*
mParent
;
// info for caller timer
Accumulator
*
mLastCaller
;
// used to bootstrap tree construction
Accumulator
*
mLastCaller
;
// used to bootstrap tree construction
const
BlockTimer
*
mTimer
;
// points to block timer associated with this storage
const
BlockTimer
*
mTimer
;
// points to block timer associated with this storage
U
16
mActiveCount
;
// number of timers with this ID active on stack
U
8
mActiveCount
;
// number of timers with this ID active on stack
bool
mMoveUpTree
;
// needs to be moved up the tree of timers at the end of frame
bool
mMoveUpTree
;
// needs to be moved up the tree of timers at the end of frame
std
::
vector
<
Accumulator
*>
mChildren
;
// currently assumed child timers
std
::
vector
<
Accumulator
*>
mChildren
;
// currently assumed child timers
};
};
struct
Recorder
Head
struct
Recorder
StackEntry
{
{
struct
Recorder
*
mRecorder
;
struct
Recorder
*
mRecorder
;
Accumulator
*
mAccumulator
;
Accumulator
*
mAccumulator
;
...
@@ -72,7 +72,7 @@ namespace LLTrace
...
@@ -72,7 +72,7 @@ namespace LLTrace
struct
Recorder
struct
Recorder
{
{
LL_FORCE_INLINE
Recorder
(
BlockTimer
&
block_timer
)
LL_FORCE_INLINE
Recorder
(
BlockTimer
&
block_timer
)
:
mLast
Head
(
s
Recorder
Head
)
:
mLast
Recorder
(
sCur
Recorder
)
{
{
mStartTime
=
getCPUClockCount32
();
mStartTime
=
getCPUClockCount32
();
Accumulator
*
accumulator
=
???
;
// get per-thread accumulator
Accumulator
*
accumulator
=
???
;
// get per-thread accumulator
...
@@ -81,28 +81,28 @@ namespace LLTrace
...
@@ -81,28 +81,28 @@ namespace LLTrace
accumulator
->
mMoveUpTree
|=
(
accumulator
->
mParent
->
mActiveCount
==
0
);
accumulator
->
mMoveUpTree
|=
(
accumulator
->
mParent
->
mActiveCount
==
0
);
// push new timer on stack
// push new timer on stack
sRecorder
Head
.
mRecorder
=
this
;
s
Cur
Recorder
.
mRecorder
=
this
;
sRecorder
Head
.
mAccumulator
=
accumulator
;
s
Cur
Recorder
.
mAccumulator
=
accumulator
;
sRecorder
Head
.
mChildTime
=
0
;
s
Cur
Recorder
.
mChildTime
=
0
;
}
}
LL_FORCE_INLINE
~
Recorder
()
LL_FORCE_INLINE
~
Recorder
()
{
{
U32
total_time
=
getCPUClockCount32
()
-
mStartTime
;
U32
total_time
=
getCPUClockCount32
()
-
mStartTime
;
Accumulator
*
accumulator
=
sRecorderHead
.
mAccumulator
;
Accumulator
*
accumulator
=
sCurRecorder
.
mAccumulator
;
accumulator
->
mSelfTimeCounter
+=
total_time
-
sRecorderHead
.
mChildTime
;
accumulator
->
mTotalTimeCounter
+=
total_time
;
accumulator
->
mTotalTimeCounter
+=
total_time
;
accumulator
->
mChildTimeCounter
+=
sCurRecorder
.
mChildTime
;
accumulator
->
mActiveCount
--
;
accumulator
->
mActiveCount
--
;
accumulator
->
mLastCaller
=
mLast
Head
->
mAccumulator
;
accumulator
->
mLastCaller
=
mLast
Recorder
->
mAccumulator
;
mLast
Head
->
mChildTime
+=
total_time
;
mLast
Recorder
->
mChildTime
+=
total_time
;
// pop stack
// pop stack
sRecorder
Head
=
mLast
Head
;
s
Cur
Recorder
=
mLast
Recorder
;
}
}
AccumulatorHead
mLastHead
;
RecorderStackEntry
mLastRecorder
;
U32
mStartTime
;
U32
mStartTime
;
};
};
...
@@ -139,10 +139,10 @@ namespace LLTrace
...
@@ -139,10 +139,10 @@ namespace LLTrace
}
}
const
std
::
string
mName
;
const
std
::
string
mName
;
static
Recorder
Head
*
s
Recorder
Head
;
static
Recorder
StackEntry
*
sCur
Recorder
;
};
};
BlockTimer
::
Recorder
Head
BlockTimer
::
sRecorder
Head
;
BlockTimer
::
Recorder
StackEntry
BlockTimer
::
s
Cur
Recorder
;
class
TimeInterval
class
TimeInterval
{
{
...
...
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