49 50 // Keep a strong reference to dump it later: 51 RendererStatsHolder.getInstance().add(parent, stats); 52 53 return stats; 54 } 55 56 public static void dumpStats() { 57 RendererStatsHolder.dumpStats(); 58 } 59 60 // context name (debugging purposes) 61 final String name; 62 // stats 63 final StatLong stat_cache_rowAA 64 = new StatLong("cache.rowAA"); 65 final StatLong stat_cache_rowAAChunk 66 = new StatLong("cache.rowAAChunk"); 67 final StatLong stat_cache_tiles 68 = new StatLong("cache.tiles"); 69 final StatLong stat_rdr_poly_stack_curves 70 = new StatLong("renderer.poly.stack.curves"); 71 final StatLong stat_rdr_poly_stack_types 72 = new StatLong("renderer.poly.stack.types"); 73 final StatLong stat_rdr_addLine 74 = new StatLong("renderer.addLine"); 75 final StatLong stat_rdr_addLine_skip 76 = new StatLong("renderer.addLine.skip"); 77 final StatLong stat_rdr_curveBreak 78 = new StatLong("renderer.curveBreakIntoLinesAndAdd"); 79 final StatLong stat_rdr_curveBreak_dec 80 = new StatLong("renderer.curveBreakIntoLinesAndAdd.dec"); 81 final StatLong stat_rdr_curveBreak_inc 82 = new StatLong("renderer.curveBreakIntoLinesAndAdd.inc"); 83 final StatLong stat_rdr_quadBreak 84 = new StatLong("renderer.quadBreakIntoLinesAndAdd"); 85 final StatLong stat_rdr_quadBreak_dec 86 = new StatLong("renderer.quadBreakIntoLinesAndAdd.dec"); 87 final StatLong stat_rdr_edges 88 = new StatLong("renderer.edges"); 89 final StatLong stat_rdr_edges_count 90 = new StatLong("renderer.edges.count"); 91 final StatLong stat_rdr_edges_resizes 92 = new StatLong("renderer.edges.resize"); 93 final StatLong stat_rdr_activeEdges 94 = new StatLong("renderer.activeEdges"); 95 final StatLong stat_rdr_activeEdges_updates 96 = new StatLong("renderer.activeEdges.updates"); 97 final StatLong stat_rdr_activeEdges_adds 98 = new StatLong("renderer.activeEdges.adds"); 99 final StatLong stat_rdr_activeEdges_adds_high 100 = new StatLong("renderer.activeEdges.adds_high"); 101 final StatLong stat_rdr_crossings_updates 102 = new StatLong("renderer.crossings.updates"); 103 final StatLong stat_rdr_crossings_sorts 104 = new StatLong("renderer.crossings.sorts"); 105 final StatLong stat_rdr_crossings_bsearch 106 = new StatLong("renderer.crossings.bsearch"); 107 final StatLong stat_rdr_crossings_msorts 108 = new StatLong("renderer.crossings.msorts"); 109 // growable arrays 110 final StatLong stat_array_dasher_dasher 111 = new StatLong("array.dasher.dasher.d_float"); 112 final StatLong stat_array_dasher_firstSegmentsBuffer 113 = new StatLong("array.dasher.firstSegmentsBuffer.d_float"); 114 final StatLong stat_array_stroker_polystack_curves 115 = new StatLong("array.stroker.polystack.curves.d_float"); 116 final StatLong stat_array_stroker_polystack_curveTypes 117 = new StatLong("array.stroker.polystack.curveTypes.d_byte"); 118 final StatLong stat_array_marlincache_rowAAChunk 119 = new StatLong("array.marlincache.rowAAChunk.resize"); 120 final StatLong stat_array_marlincache_touchedTile 121 = new StatLong("array.marlincache.touchedTile.int"); 122 final StatLong stat_array_renderer_alphaline 123 = new StatLong("array.renderer.alphaline.int"); 124 final StatLong stat_array_renderer_crossings 125 = new StatLong("array.renderer.crossings.int"); 126 final StatLong stat_array_renderer_aux_crossings 127 = new StatLong("array.renderer.aux_crossings.int"); 128 final StatLong stat_array_renderer_edgeBuckets 129 = new StatLong("array.renderer.edgeBuckets.int"); 130 final StatLong stat_array_renderer_edgeBucketCounts 131 = new StatLong("array.renderer.edgeBucketCounts.int"); 132 final StatLong stat_array_renderer_edgePtrs 133 = new StatLong("array.renderer.edgePtrs.int"); 134 final StatLong stat_array_renderer_aux_edgePtrs 135 = new StatLong("array.renderer.aux_edgePtrs.int"); 136 // histograms 137 final Histogram hist_rdr_edges_count 138 = new Histogram("renderer.edges.count"); 139 final Histogram hist_rdr_poly_stack_curves 140 = new Histogram("renderer.polystack.curves"); 141 final Histogram hist_rdr_crossings 142 = new Histogram("renderer.crossings"); 143 final Histogram hist_rdr_crossings_ratio 144 = new Histogram("renderer.crossings.ratio"); 145 final Histogram hist_rdr_crossings_adds 146 = new Histogram("renderer.crossings.adds"); 147 final Histogram hist_rdr_crossings_msorts 148 = new Histogram("renderer.crossings.msorts"); 149 final Histogram hist_rdr_crossings_msorts_adds 150 = new Histogram("renderer.crossings.msorts.adds"); 151 final Histogram hist_tile_generator_alpha 152 = new Histogram("tile_generator.alpha"); 153 final Histogram hist_tile_generator_encoding 154 = new Histogram("tile_generator.encoding"); 155 final Histogram hist_tile_generator_encoding_dist 156 = new Histogram("tile_generator.encoding.dist"); 157 final Histogram hist_tile_generator_encoding_ratio 158 = new Histogram("tile_generator.encoding.ratio"); 159 final Histogram hist_tile_generator_encoding_runLen 160 = new Histogram("tile_generator.encoding.runLen"); 161 // all stats 162 final StatLong[] statistics = new StatLong[]{ 163 stat_cache_rowAA, 164 stat_cache_rowAAChunk, 165 stat_cache_tiles, 166 stat_rdr_poly_stack_types, 167 stat_rdr_poly_stack_curves, 168 stat_rdr_addLine, 169 stat_rdr_addLine_skip, 170 stat_rdr_curveBreak, 171 stat_rdr_curveBreak_dec, 172 stat_rdr_curveBreak_inc, 173 stat_rdr_quadBreak, 174 stat_rdr_quadBreak_dec, 175 stat_rdr_edges, 176 stat_rdr_edges_count, 177 stat_rdr_edges_resizes, 178 stat_rdr_activeEdges, 179 stat_rdr_activeEdges_updates, 180 stat_rdr_activeEdges_adds, 181 stat_rdr_activeEdges_adds_high, 182 stat_rdr_crossings_updates, 183 stat_rdr_crossings_sorts, 184 stat_rdr_crossings_bsearch, 185 stat_rdr_crossings_msorts, 186 hist_rdr_edges_count, 187 hist_rdr_poly_stack_curves, 188 hist_rdr_crossings, 189 hist_rdr_crossings_ratio, 190 hist_rdr_crossings_adds, 191 hist_rdr_crossings_msorts, 192 hist_rdr_crossings_msorts_adds, 193 hist_tile_generator_alpha, 194 hist_tile_generator_encoding, 195 hist_tile_generator_encoding_dist, 196 hist_tile_generator_encoding_ratio, 197 hist_tile_generator_encoding_runLen, 198 stat_array_dasher_dasher, 199 stat_array_dasher_firstSegmentsBuffer, 200 stat_array_stroker_polystack_curves, 201 stat_array_stroker_polystack_curveTypes, 202 stat_array_marlincache_rowAAChunk, 203 stat_array_marlincache_touchedTile, 204 stat_array_renderer_alphaline, 205 stat_array_renderer_crossings, 206 stat_array_renderer_aux_crossings, 207 stat_array_renderer_edgeBuckets, 208 stat_array_renderer_edgeBucketCounts, 209 stat_array_renderer_edgePtrs, 210 stat_array_renderer_aux_edgePtrs 211 }; 212 // monitors 213 final Monitor mon_pre_getAATileGenerator 214 = new Monitor("MarlinRenderingEngine.getAATileGenerator()"); 215 final Monitor mon_rdr_addLine 216 = new Monitor("Renderer.addLine()"); 217 final Monitor mon_rdr_endRendering 218 = new Monitor("Renderer.endRendering()"); 219 final Monitor mon_rdr_endRendering_Y 220 = new Monitor("Renderer._endRendering(Y)"); 221 final Monitor mon_rdr_copyAARow 222 = new Monitor("Renderer.copyAARow()"); 223 final Monitor mon_pipe_renderTiles 224 = new Monitor("AAShapePipe.renderTiles()"); 225 final Monitor mon_ptg_getAlpha 226 = new Monitor("MarlinTileGenerator.getAlpha()"); 227 final Monitor mon_debug 228 = new Monitor("DEBUG()"); 229 // all monitors 230 final Monitor[] monitors = new Monitor[]{ | 49 50 // Keep a strong reference to dump it later: 51 RendererStatsHolder.getInstance().add(parent, stats); 52 53 return stats; 54 } 55 56 public static void dumpStats() { 57 RendererStatsHolder.dumpStats(); 58 } 59 60 // context name (debugging purposes) 61 final String name; 62 // stats 63 final StatLong stat_cache_rowAA 64 = new StatLong("cache.rowAA"); 65 final StatLong stat_cache_rowAAChunk 66 = new StatLong("cache.rowAAChunk"); 67 final StatLong stat_cache_tiles 68 = new StatLong("cache.tiles"); 69 final StatLong stat_rdr_addLine 70 = new StatLong("renderer.addLine"); 71 final StatLong stat_rdr_addLine_skip 72 = new StatLong("renderer.addLine.skip"); 73 final StatLong stat_rdr_curveBreak 74 = new StatLong("renderer.curveBreakIntoLinesAndAdd"); 75 final StatLong stat_rdr_curveBreak_dec 76 = new StatLong("renderer.curveBreakIntoLinesAndAdd.dec"); 77 final StatLong stat_rdr_curveBreak_inc 78 = new StatLong("renderer.curveBreakIntoLinesAndAdd.inc"); 79 final StatLong stat_rdr_quadBreak 80 = new StatLong("renderer.quadBreakIntoLinesAndAdd"); 81 final StatLong stat_rdr_quadBreak_dec 82 = new StatLong("renderer.quadBreakIntoLinesAndAdd.dec"); 83 final StatLong stat_rdr_edges 84 = new StatLong("renderer.edges"); 85 final StatLong stat_rdr_edges_count 86 = new StatLong("renderer.edges.count"); 87 final StatLong stat_rdr_edges_resizes 88 = new StatLong("renderer.edges.resize"); 89 final StatLong stat_rdr_activeEdges 90 = new StatLong("renderer.activeEdges"); 91 final StatLong stat_rdr_activeEdges_updates 92 = new StatLong("renderer.activeEdges.updates"); 93 final StatLong stat_rdr_activeEdges_adds 94 = new StatLong("renderer.activeEdges.adds"); 95 final StatLong stat_rdr_activeEdges_adds_high 96 = new StatLong("renderer.activeEdges.adds_high"); 97 final StatLong stat_rdr_crossings_updates 98 = new StatLong("renderer.crossings.updates"); 99 final StatLong stat_rdr_crossings_sorts 100 = new StatLong("renderer.crossings.sorts"); 101 final StatLong stat_rdr_crossings_bsearch 102 = new StatLong("renderer.crossings.bsearch"); 103 final StatLong stat_rdr_crossings_msorts 104 = new StatLong("renderer.crossings.msorts"); 105 final StatLong stat_str_polystack_curves 106 = new StatLong("stroker.polystack.curves"); 107 final StatLong stat_str_polystack_types 108 = new StatLong("stroker.polystack.types"); 109 final StatLong stat_cpd_polystack_curves 110 = new StatLong("closedPathDetector.polystack.curves"); 111 final StatLong stat_cpd_polystack_types 112 = new StatLong("closedPathDetector.polystack.types"); 113 final StatLong stat_pcf_idxstack_indices 114 = new StatLong("pathClipFilter.stack.indices"); 115 // growable arrays 116 final StatLong stat_array_dasher_dasher 117 = new StatLong("array.dasher.dasher.d_float"); 118 final StatLong stat_array_dasher_firstSegmentsBuffer 119 = new StatLong("array.dasher.firstSegmentsBuffer.d_float"); 120 final StatLong stat_array_marlincache_rowAAChunk 121 = new StatLong("array.marlincache.rowAAChunk.resize"); 122 final StatLong stat_array_marlincache_touchedTile 123 = new StatLong("array.marlincache.touchedTile.int"); 124 final StatLong stat_array_renderer_alphaline 125 = new StatLong("array.renderer.alphaline.int"); 126 final StatLong stat_array_renderer_crossings 127 = new StatLong("array.renderer.crossings.int"); 128 final StatLong stat_array_renderer_aux_crossings 129 = new StatLong("array.renderer.aux_crossings.int"); 130 final StatLong stat_array_renderer_edgeBuckets 131 = new StatLong("array.renderer.edgeBuckets.int"); 132 final StatLong stat_array_renderer_edgeBucketCounts 133 = new StatLong("array.renderer.edgeBucketCounts.int"); 134 final StatLong stat_array_renderer_edgePtrs 135 = new StatLong("array.renderer.edgePtrs.int"); 136 final StatLong stat_array_renderer_aux_edgePtrs 137 = new StatLong("array.renderer.aux_edgePtrs.int"); 138 final StatLong stat_array_str_polystack_curves 139 = new StatLong("array.stroker.polystack.curves.d_float"); 140 final StatLong stat_array_str_polystack_types 141 = new StatLong("array.stroker.polystack.curveTypes.d_byte"); 142 final StatLong stat_array_cpd_polystack_curves 143 = new StatLong("array.closedPathDetector.polystack.curves.d_float"); 144 final StatLong stat_array_cpd_polystack_types 145 = new StatLong("array.closedPathDetector.polystack.curveTypes.d_byte"); 146 final StatLong stat_array_pcf_idxstack_indices 147 = new StatLong("array.pathClipFilter.stack.indices.d_int"); 148 // histograms 149 final Histogram hist_rdr_edges_count 150 = new Histogram("renderer.edges.count"); 151 final Histogram hist_rdr_crossings 152 = new Histogram("renderer.crossings"); 153 final Histogram hist_rdr_crossings_ratio 154 = new Histogram("renderer.crossings.ratio"); 155 final Histogram hist_rdr_crossings_adds 156 = new Histogram("renderer.crossings.adds"); 157 final Histogram hist_rdr_crossings_msorts 158 = new Histogram("renderer.crossings.msorts"); 159 final Histogram hist_rdr_crossings_msorts_adds 160 = new Histogram("renderer.crossings.msorts.adds"); 161 final Histogram hist_str_polystack_curves 162 = new Histogram("stroker.polystack.curves"); 163 final Histogram hist_tile_generator_alpha 164 = new Histogram("tile_generator.alpha"); 165 final Histogram hist_tile_generator_encoding 166 = new Histogram("tile_generator.encoding"); 167 final Histogram hist_tile_generator_encoding_dist 168 = new Histogram("tile_generator.encoding.dist"); 169 final Histogram hist_tile_generator_encoding_ratio 170 = new Histogram("tile_generator.encoding.ratio"); 171 final Histogram hist_tile_generator_encoding_runLen 172 = new Histogram("tile_generator.encoding.runLen"); 173 final Histogram hist_cpd_polystack_curves 174 = new Histogram("closedPathDetector.polystack.curves"); 175 final Histogram hist_pcf_idxstack_indices 176 = new Histogram("pathClipFilter.stack.indices"); 177 // all stats 178 final StatLong[] statistics = new StatLong[]{ 179 stat_cache_rowAA, 180 stat_cache_rowAAChunk, 181 stat_cache_tiles, 182 stat_rdr_addLine, 183 stat_rdr_addLine_skip, 184 stat_rdr_curveBreak, 185 stat_rdr_curveBreak_dec, 186 stat_rdr_curveBreak_inc, 187 stat_rdr_quadBreak, 188 stat_rdr_quadBreak_dec, 189 stat_rdr_edges, 190 stat_rdr_edges_count, 191 stat_rdr_edges_resizes, 192 stat_rdr_activeEdges, 193 stat_rdr_activeEdges_updates, 194 stat_rdr_activeEdges_adds, 195 stat_rdr_activeEdges_adds_high, 196 stat_rdr_crossings_updates, 197 stat_rdr_crossings_sorts, 198 stat_rdr_crossings_bsearch, 199 stat_rdr_crossings_msorts, 200 stat_str_polystack_types, 201 stat_str_polystack_curves, 202 stat_cpd_polystack_curves, 203 stat_cpd_polystack_types, 204 stat_pcf_idxstack_indices, 205 hist_rdr_edges_count, 206 hist_rdr_crossings, 207 hist_rdr_crossings_ratio, 208 hist_rdr_crossings_adds, 209 hist_rdr_crossings_msorts, 210 hist_rdr_crossings_msorts_adds, 211 hist_tile_generator_alpha, 212 hist_tile_generator_encoding, 213 hist_tile_generator_encoding_dist, 214 hist_tile_generator_encoding_ratio, 215 hist_tile_generator_encoding_runLen, 216 hist_str_polystack_curves, 217 hist_cpd_polystack_curves, 218 hist_pcf_idxstack_indices, 219 stat_array_dasher_dasher, 220 stat_array_dasher_firstSegmentsBuffer, 221 stat_array_marlincache_rowAAChunk, 222 stat_array_marlincache_touchedTile, 223 stat_array_renderer_alphaline, 224 stat_array_renderer_crossings, 225 stat_array_renderer_aux_crossings, 226 stat_array_renderer_edgeBuckets, 227 stat_array_renderer_edgeBucketCounts, 228 stat_array_renderer_edgePtrs, 229 stat_array_renderer_aux_edgePtrs, 230 stat_array_str_polystack_curves, 231 stat_array_str_polystack_types, 232 stat_array_cpd_polystack_curves, 233 stat_array_cpd_polystack_types, 234 stat_array_pcf_idxstack_indices 235 }; 236 // monitors 237 final Monitor mon_pre_getAATileGenerator 238 = new Monitor("MarlinRenderingEngine.getAATileGenerator()"); 239 final Monitor mon_rdr_addLine 240 = new Monitor("Renderer.addLine()"); 241 final Monitor mon_rdr_endRendering 242 = new Monitor("Renderer.endRendering()"); 243 final Monitor mon_rdr_endRendering_Y 244 = new Monitor("Renderer._endRendering(Y)"); 245 final Monitor mon_rdr_copyAARow 246 = new Monitor("Renderer.copyAARow()"); 247 final Monitor mon_pipe_renderTiles 248 = new Monitor("AAShapePipe.renderTiles()"); 249 final Monitor mon_ptg_getAlpha 250 = new Monitor("MarlinTileGenerator.getAlpha()"); 251 final Monitor mon_debug 252 = new Monitor("DEBUG()"); 253 // all monitors 254 final Monitor[] monitors = new Monitor[]{ |