diff options
Diffstat (limited to 'linden/indra/newview/llfasttimerview.cpp')
-rw-r--r-- | linden/indra/newview/llfasttimerview.cpp | 78 |
1 files changed, 59 insertions, 19 deletions
diff --git a/linden/indra/newview/llfasttimerview.cpp b/linden/indra/newview/llfasttimerview.cpp index e147e3f..5038ed9 100644 --- a/linden/indra/newview/llfasttimerview.cpp +++ b/linden/indra/newview/llfasttimerview.cpp | |||
@@ -86,31 +86,41 @@ static struct ft_display_info ft_display_table[] = | |||
86 | { LLFastTimer::FTM_RESET_DRAWORDER, " ResetDrawOrder", &LLColor4::pink1, 0 }, | 86 | { LLFastTimer::FTM_RESET_DRAWORDER, " ResetDrawOrder", &LLColor4::pink1, 0 }, |
87 | { LLFastTimer::FTM_WORLD_UPDATE, " World Update", &LLColor4::blue1, 1 }, | 87 | { LLFastTimer::FTM_WORLD_UPDATE, " World Update", &LLColor4::blue1, 1 }, |
88 | { LLFastTimer::FTM_UPDATE_MOVE, " Move Objects", &LLColor4::pink2, 0 }, | 88 | { LLFastTimer::FTM_UPDATE_MOVE, " Move Objects", &LLColor4::pink2, 0 }, |
89 | { LLFastTimer::FTM_OCTREE_BALANCE, " Octree Balance", &LLColor4::red3, 0 }, | 89 | { LLFastTimer::FTM_OCTREE_BALANCE, " Octree Balance", &LLColor4::red3, 0 }, |
90 | { LLFastTimer::FTM_CULL, " Object Cull", &LLColor4::blue2, 0 }, | 90 | // { LLFastTimer::FTM_TEMP1, " Blur", &LLColor4::red1, 0 }, |
91 | { LLFastTimer::FTM_CULL_REBOUND, " Rebound", &LLColor4::blue3, 0 }, | 91 | { LLFastTimer::FTM_CULL, " Object Cull", &LLColor4::blue2, 1 }, |
92 | { LLFastTimer::FTM_CULL_REBOUND, " Rebound", &LLColor4::blue3, 0 }, | ||
93 | { LLFastTimer::FTM_FRUSTUM_CULL, " Frustum Cull", &LLColor4::blue4, 0 }, | ||
94 | { LLFastTimer::FTM_OCCLUSION, " Object Occlude", &LLColor4::pink1, 0 }, | ||
95 | { LLFastTimer::FTM_OCCLUSION_READBACK, " Occlusion Read", &LLColor4::red2, 0 }, | ||
92 | { LLFastTimer::FTM_HUD_EFFECTS, " HUD Effects", &LLColor4::orange1, 0 }, | 96 | { LLFastTimer::FTM_HUD_EFFECTS, " HUD Effects", &LLColor4::orange1, 0 }, |
93 | { LLFastTimer::FTM_HUD_UPDATE, " HUD Update", &LLColor4::orange2, 0 }, | 97 | { LLFastTimer::FTM_HUD_UPDATE, " HUD Update", &LLColor4::orange2, 0 }, |
94 | { LLFastTimer::FTM_OCCLUSION, " Object Occlude",&LLColor4::pink1, 0 }, | ||
95 | { LLFastTimer::FTM_OCCLUSION_READBACK, " Occlusion Read",&LLColor4::red2, 0 }, | ||
96 | { LLFastTimer::FTM_GEO_UPDATE, " Geo Update", &LLColor4::blue3, 0 }, | 98 | { LLFastTimer::FTM_GEO_UPDATE, " Geo Update", &LLColor4::blue3, 0 }, |
97 | { LLFastTimer::FTM_UPDATE_PRIMITIVES, " Volumes", &LLColor4::blue4, 0 }, | 99 | { LLFastTimer::FTM_UPDATE_PRIMITIVES, " Volumes", &LLColor4::blue4, 0 }, |
98 | { LLFastTimer::FTM_GEN_VOLUME, " Gen Volume", &LLColor4::yellow3, 0 }, | 100 | { LLFastTimer::FTM_GEN_VOLUME, " Gen Volume", &LLColor4::yellow3, 0 }, |
99 | { LLFastTimer::FTM_GEN_FLEX, " Flexible", &LLColor4::yellow4, 0 }, | 101 | { LLFastTimer::FTM_GEN_FLEX, " Flexible", &LLColor4::yellow4, 0 }, |
100 | { LLFastTimer::FTM_GEN_TRIANGLES, " Triangles", &LLColor4::yellow5, 0 }, | 102 | { LLFastTimer::FTM_GEN_TRIANGLES, " Triangles", &LLColor4::yellow5, 0 }, |
103 | { LLFastTimer::FTM_UPDATE_AVATAR, " Avatar", &LLColor4::yellow1, 0 }, | ||
104 | { LLFastTimer::FTM_UPDATE_TREE, " Tree", &LLColor4::yellow2, 0 }, | ||
105 | { LLFastTimer::FTM_UPDATE_TERRAIN, " Terrain", &LLColor4::yellow6, 0 }, | ||
106 | { LLFastTimer::FTM_UPDATE_CLOUDS, " Clouds", &LLColor4::yellow7, 0 }, | ||
107 | { LLFastTimer::FTM_UPDATE_GRASS, " Grass", &LLColor4::yellow8, 0 }, | ||
108 | { LLFastTimer::FTM_UPDATE_WATER, " Water", &LLColor4::yellow9, 0 }, | ||
101 | { LLFastTimer::FTM_GEO_LIGHT, " Lighting", &LLColor4::yellow1, 0 }, | 109 | { LLFastTimer::FTM_GEO_LIGHT, " Lighting", &LLColor4::yellow1, 0 }, |
102 | { LLFastTimer::FTM_GEO_SHADOW, " Shadow", &LLColor4::black, 0 }, | 110 | { LLFastTimer::FTM_GEO_SHADOW, " Shadow", &LLColor4::black, 0 }, |
103 | { LLFastTimer::FTM_UPDATE_PARTICLES, " Particles", &LLColor4::blue5, 0 }, | 111 | { LLFastTimer::FTM_UPDATE_PARTICLES, " Particles", &LLColor4::blue5, 0 }, |
112 | { LLFastTimer::FTM_SIMULATE_PARTICLES, " Particle Sim", &LLColor4::blue4, 0 }, | ||
104 | { LLFastTimer::FTM_GEO_RESERVE, " Reserve", &LLColor4::blue6, 0 }, | 113 | { LLFastTimer::FTM_GEO_RESERVE, " Reserve", &LLColor4::blue6, 0 }, |
105 | { LLFastTimer::FTM_UPDATE_LIGHTS, " Lights", &LLColor4::yellow2, 0 }, | 114 | { LLFastTimer::FTM_UPDATE_LIGHTS, " Lights", &LLColor4::yellow2, 0 }, |
106 | { LLFastTimer::FTM_UPDATE_SKY, " Sky Update", &LLColor4::cyan1, 0 }, | 115 | { LLFastTimer::FTM_UPDATE_SKY, " Sky Update", &LLColor4::cyan1, 0 }, |
107 | { LLFastTimer::FTM_OBJECTLIST_UPDATE, " Object Update", &LLColor4::purple1, 1 }, | 116 | { LLFastTimer::FTM_OBJECTLIST_UPDATE, " Object Update", &LLColor4::purple1, 0 }, |
108 | { LLFastTimer::FTM_AVATAR_UPDATE, " Avatars", &LLColor4::purple2, 0 }, | 117 | { LLFastTimer::FTM_AVATAR_UPDATE, " Avatars", &LLColor4::purple2, 0 }, |
109 | { LLFastTimer::FTM_JOINT_UPDATE, " Joints", &LLColor4::purple3, 0 }, | 118 | { LLFastTimer::FTM_JOINT_UPDATE, " Joints", &LLColor4::purple3, 0 }, |
110 | { LLFastTimer::FTM_ATTACHMENT_UPDATE, " Attachments", &LLColor4::purple4, 0 }, | 119 | { LLFastTimer::FTM_ATTACHMENT_UPDATE, " Attachments", &LLColor4::purple4, 0 }, |
111 | { LLFastTimer::FTM_UPDATE_ANIMATION, " Animation", &LLColor4::purple5, 0 }, | 120 | { LLFastTimer::FTM_UPDATE_ANIMATION, " Animation", &LLColor4::purple5, 0 }, |
112 | { LLFastTimer::FTM_FLEXIBLE_UPDATE, " Flex Update", &LLColor4::pink2, 0 }, | 121 | { LLFastTimer::FTM_FLEXIBLE_UPDATE, " Flex Update", &LLColor4::pink2, 0 }, |
113 | { LLFastTimer::FTM_LOD_UPDATE, " LOD Update", &LLColor4::magenta1, 0 }, | 122 | { LLFastTimer::FTM_LOD_UPDATE, " LOD Update", &LLColor4::magenta1, 0 }, |
123 | // { LLFastTimer::FTM_TEMP5, " Check", &LLColor4::red1, 1}, | ||
114 | { LLFastTimer::FTM_REGION_UPDATE, " Region Update", &LLColor4::cyan2, 0 }, | 124 | { LLFastTimer::FTM_REGION_UPDATE, " Region Update", &LLColor4::cyan2, 0 }, |
115 | { LLFastTimer::FTM_NETWORK, " Network", &LLColor4::orange1, 1 }, | 125 | { LLFastTimer::FTM_NETWORK, " Network", &LLColor4::orange1, 1 }, |
116 | { LLFastTimer::FTM_IDLE_NETWORK, " Decode Msgs", &LLColor4::orange2, 0 }, | 126 | { LLFastTimer::FTM_IDLE_NETWORK, " Decode Msgs", &LLColor4::orange2, 0 }, |
@@ -125,17 +135,36 @@ static struct ft_display_info ft_display_table[] = | |||
125 | { LLFastTimer::FTM_IMAGE_UPDATE, " Image Update", &LLColor4::yellow4, 1 }, | 135 | { LLFastTimer::FTM_IMAGE_UPDATE, " Image Update", &LLColor4::yellow4, 1 }, |
126 | { LLFastTimer::FTM_IMAGE_CREATE, " Image CreateGL",&LLColor4::yellow5, 0 }, | 136 | { LLFastTimer::FTM_IMAGE_CREATE, " Image CreateGL",&LLColor4::yellow5, 0 }, |
127 | { LLFastTimer::FTM_IMAGE_DECODE, " Image Decode", &LLColor4::yellow6, 0 }, | 137 | { LLFastTimer::FTM_IMAGE_DECODE, " Image Decode", &LLColor4::yellow6, 0 }, |
138 | { LLFastTimer::FTM_IMAGE_MARK_DIRTY, " Dirty Textures",&LLColor4::red1, 0 }, | ||
128 | { LLFastTimer::FTM_VFILE_WAIT, " VFile Wait", &LLColor4::cyan6, 0 }, | 139 | { LLFastTimer::FTM_VFILE_WAIT, " VFile Wait", &LLColor4::cyan6, 0 }, |
129 | // { LLFastTimer::FTM_IDLE_CB, " Callbacks", &LLColor4::pink1, 0 }, | 140 | // { LLFastTimer::FTM_IDLE_CB, " Callbacks", &LLColor4::pink1, 0 }, |
130 | { LLFastTimer::FTM_RENDER, " Render", &green0, 0 }, | 141 | { LLFastTimer::FTM_RENDER, " Render", &green0, 1 }, |
131 | { LLFastTimer::FTM_REBUILD, " Rebuild", &LLColor4::green1, 1 }, | 142 | { LLFastTimer::FTM_REBUILD, " Rebuild", &LLColor4::green1, 1 }, |
132 | { LLFastTimer::FTM_STATESORT, " State Sort", &LLColor4::orange1, 1 }, | 143 | { LLFastTimer::FTM_STATESORT, " State Sort", &LLColor4::orange1, 1 }, |
144 | { LLFastTimer::FTM_STATESORT_DRAWABLE, " Drawable", &LLColor4::orange2, 0 }, | ||
145 | { LLFastTimer::FTM_STATESORT_POSTSORT, " Post Sort", &LLColor4::orange3, 0 }, | ||
146 | { LLFastTimer::FTM_REBUILD_OCCLUSION_VB," Occlusion", &LLColor4::cyan5, 0 }, | ||
147 | { LLFastTimer::FTM_REBUILD_VBO, " VBO Rebuild", &LLColor4::red4, 0 }, | ||
148 | { LLFastTimer::FTM_REBUILD_VOLUME_VB, " Volume", &LLColor4::blue1, 0 }, | ||
149 | { LLFastTimer::FTM_REBUILD_NONE_VB, " Unknown", &LLColor4::cyan5, 0 }, | ||
150 | { LLFastTimer::FTM_REBUILD_BRIDGE_VB, " Bridge", &LLColor4::blue2, 0 }, | ||
151 | { LLFastTimer::FTM_REBUILD_HUD_VB, " HUD", &LLColor4::blue3, 0 }, | ||
152 | { LLFastTimer::FTM_REBUILD_TERRAIN_VB, " Terrain", &LLColor4::blue4, 0 }, | ||
153 | { LLFastTimer::FTM_REBUILD_WATER_VB, " Water", &LLColor4::blue5, 0 }, | ||
154 | { LLFastTimer::FTM_REBUILD_TREE_VB, " Tree", &LLColor4::cyan1, 0 }, | ||
155 | { LLFastTimer::FTM_REBUILD_PARTICLE_VB, " Particle", &LLColor4::cyan2, 0 }, | ||
156 | { LLFastTimer::FTM_REBUILD_CLOUD_VB, " Cloud", &LLColor4::cyan3, 0 }, | ||
157 | { LLFastTimer::FTM_REBUILD_GRASS_VB, " Grass", &LLColor4::cyan4, 0 }, | ||
133 | { LLFastTimer::FTM_RENDER_GEOMETRY, " Geometry", &LLColor4::green2, 1 }, | 158 | { LLFastTimer::FTM_RENDER_GEOMETRY, " Geometry", &LLColor4::green2, 1 }, |
134 | { LLFastTimer::FTM_POOLS, " Pools", &LLColor4::green3, 0 }, | 159 | { LLFastTimer::FTM_POOLS, " Pools", &LLColor4::green3, 1 }, |
135 | { LLFastTimer::FTM_POOLRENDER, " RenderPool", &LLColor4::green4, 0 }, | 160 | { LLFastTimer::FTM_POOLRENDER, " RenderPool", &LLColor4::green4, 1 }, |
136 | { LLFastTimer::FTM_RENDER_TERRAIN, " Terrain", &LLColor4::green6, 0 }, | 161 | { LLFastTimer::FTM_RENDER_TERRAIN, " Terrain", &LLColor4::green6, 0 }, |
137 | { LLFastTimer::FTM_RENDER_CHARACTERS, " Avatars", &LLColor4::yellow1, 0 }, | 162 | { LLFastTimer::FTM_RENDER_CHARACTERS, " Avatars", &LLColor4::yellow1, 0 }, |
138 | { LLFastTimer::FTM_RENDER_SIMPLE, " Simple", &LLColor4::yellow2, 0 }, | 163 | { LLFastTimer::FTM_RENDER_SIMPLE, " Simple", &LLColor4::yellow2, 0 }, |
164 | { LLFastTimer::FTM_RENDER_FULLBRIGHT, " Fullbright", &LLColor4::yellow5, 0 }, | ||
165 | { LLFastTimer::FTM_RENDER_GLOW, " Glow", &LLColor4::orange1, 0 }, | ||
166 | { LLFastTimer::FTM_RENDER_GRASS, " Grass", &LLColor4::yellow6, 0 }, | ||
167 | { LLFastTimer::FTM_RENDER_INVISIBLE, " Invisible", &LLColor4::red2, 0 }, | ||
139 | { LLFastTimer::FTM_RENDER_SHINY, " Shiny", &LLColor4::yellow3, 0 }, | 168 | { LLFastTimer::FTM_RENDER_SHINY, " Shiny", &LLColor4::yellow3, 0 }, |
140 | { LLFastTimer::FTM_RENDER_BUMP, " Bump", &LLColor4::yellow4, 0 }, | 169 | { LLFastTimer::FTM_RENDER_BUMP, " Bump", &LLColor4::yellow4, 0 }, |
141 | { LLFastTimer::FTM_RENDER_TREES, " Trees", &LLColor4::yellow8, 0 }, | 170 | { LLFastTimer::FTM_RENDER_TREES, " Trees", &LLColor4::yellow8, 0 }, |
@@ -149,15 +178,16 @@ static struct ft_display_info ft_display_table[] = | |||
149 | // { LLFastTimer::FTM_RENDER_FONTS, " Fonts", &LLColor4::pink1, 0 }, | 178 | // { LLFastTimer::FTM_RENDER_FONTS, " Fonts", &LLColor4::pink1, 0 }, |
150 | // { LLFastTimer::FTM_UPDATE_TEXTURES, " Textures", &LLColor4::pink2, 0 }, | 179 | // { LLFastTimer::FTM_UPDATE_TEXTURES, " Textures", &LLColor4::pink2, 0 }, |
151 | { LLFastTimer::FTM_SWAP, " Swap", &LLColor4::pink1, 0 }, | 180 | { LLFastTimer::FTM_SWAP, " Swap", &LLColor4::pink1, 0 }, |
181 | { LLFastTimer::FTM_CLIENT_COPY, " Client Copy", &LLColor4::red1, 1}, | ||
152 | 182 | ||
153 | // { LLFastTimer::FTM_TEMP1, " Temp1", &LLColor4::red1, 0 }, | 183 | // { LLFastTimer::FTM_TEMP1, " Temp1", &LLColor4::red1, 0 }, |
154 | // { LLFastTimer::FTM_TEMP2, " Temp2", &LLColor4::magenta1, 0 }, | 184 | // { LLFastTimer::FTM_TEMP2, " Temp2", &LLColor4::magenta1, 0 }, |
155 | // { LLFastTimer::FTM_TEMP3, " Temp3", &LLColor4::red2, 0 }, | 185 | // { LLFastTimer::FTM_TEMP3, " Temp3", &LLColor4::red2, 0 }, |
156 | // { LLFastTimer::FTM_TEMP4, " Temp4", &LLColor4::magenta2, 0 }, | 186 | // { LLFastTimer::FTM_TEMP4, " Temp4", &LLColor4::magenta2, 0 }, |
157 | // { LLFastTimer::FTM_TEMP5, " Temp5", &LLColor4::red3, 0 }, | 187 | // { LLFastTimer::FTM_TEMP5, " Temp5", &LLColor4::red3, 0 }, |
158 | // { LLFastTimer::FTM_TEMP6, " Temp6", &LLColor4::magenta3, 0 }, | 188 | // { LLFastTimer::FTM_TEMP6, " Temp6", &LLColor4::magenta3, 0 }, |
159 | // { LLFastTimer::FTM_TEMP7, " Temp7", &LLColor4::red4, 0 }, | 189 | // { LLFastTimer::FTM_TEMP7, " Temp7", &LLColor4::red4, 0 }, |
160 | // { LLFastTimer::FTM_TEMP8, " Temp8", &LLColor4::magenta4, 0 }, | 190 | // { LLFastTimer::FTM_TEMP8, " Temp8", &LLColor4::magenta4, 0 }, |
161 | 191 | ||
162 | { LLFastTimer::FTM_OTHER, " Other", &red0 } | 192 | { LLFastTimer::FTM_OTHER, " Other", &red0 } |
163 | }; | 193 | }; |
@@ -167,7 +197,7 @@ static const int FTV_DISPLAY_NUM = (sizeof(ft_display_table)/sizeof(ft_display_ | |||
167 | S32 ft_display_idx[FTV_DISPLAY_NUM]; // line of table entry for display purposes (for collapse) | 197 | S32 ft_display_idx[FTV_DISPLAY_NUM]; // line of table entry for display purposes (for collapse) |
168 | 198 | ||
169 | LLFastTimerView::LLFastTimerView(const std::string& name, const LLRect& rect) | 199 | LLFastTimerView::LLFastTimerView(const std::string& name, const LLRect& rect) |
170 | : LLView(name, rect, TRUE) | 200 | : LLFloater(name, rect, "Fast Timers") |
171 | { | 201 | { |
172 | setVisible(FALSE); | 202 | setVisible(FALSE); |
173 | mDisplayMode = 0; | 203 | mDisplayMode = 0; |
@@ -910,7 +940,10 @@ void LLFastTimerView::draw() | |||
910 | F32 ms = (F32)((F64)max_ticks * iclock_freq); | 940 | F32 ms = (F32)((F64)max_ticks * iclock_freq); |
911 | 941 | ||
912 | //display y-axis range | 942 | //display y-axis range |
913 | LLString tdesc = llformat("%4.2f ms", ms); | 943 | LLString tdesc = mDisplayCalls ? |
944 | llformat("%d calls", max_ticks) : | ||
945 | llformat("%4.2f ms", ms); | ||
946 | |||
914 | x = graph_rect.mRight - LLFontGL::sMonospace->getWidth(tdesc)-5; | 947 | x = graph_rect.mRight - LLFontGL::sMonospace->getWidth(tdesc)-5; |
915 | y = graph_rect.mTop - ((S32)LLFontGL::sMonospace->getLineHeight()); | 948 | y = graph_rect.mTop - ((S32)LLFontGL::sMonospace->getLineHeight()); |
916 | 949 | ||
@@ -976,6 +1009,13 @@ void LLFastTimerView::draw() | |||
976 | for (U32 j = 0; j < LLFastTimer::FTM_HISTORY_NUM; j++) | 1009 | for (U32 j = 0; j < LLFastTimer::FTM_HISTORY_NUM; j++) |
977 | { | 1010 | { |
978 | U64 ticks = ticks_sum[j+1][idx]; | 1011 | U64 ticks = ticks_sum[j+1][idx]; |
1012 | if (mDisplayCalls) | ||
1013 | { | ||
1014 | S32 tidx = ft_display_table[idx].timer; | ||
1015 | S32 hidx = (LLFastTimer::sLastFrameIndex + j) % LLFastTimer::FTM_HISTORY_NUM; | ||
1016 | ticks = (S32)LLFastTimer::sCallHistory[hidx][tidx]; | ||
1017 | } | ||
1018 | |||
979 | if (alpha == 1.f) | 1019 | if (alpha == 1.f) |
980 | { //normalize to highlighted timer | 1020 | { //normalize to highlighted timer |
981 | cur_max = llmax(cur_max, ticks); | 1021 | cur_max = llmax(cur_max, ticks); |