1The following are examples of running js_objcpu.d. 2 3This script will show the time on-CPU of object creation events in graphical 4format. 5 6Here we see it running on Code/JavaScript/func_clock.html 7 8# js_objcpu.d 9Tracing... Hit Ctrl-C to end. 10^C 11Total object creation on-CPU time (ms): 0 12 13Object creation on-CPU time distributions (us), 14 15 Date 16 value ------------- Distribution ------------- count 17 4 | 0 18 8 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 2 19 16 | 0 20 21We can see that there were two object creation events, both of type 'Date' 22that spent between 8 microseconds and 15 microseconds on-CPU each. 23 24 25Here we see the results of having Code/JavaScript/func_slow.html in a browser 26window and hitting reload. This includes events that happen due to mouse 27movement. 28 29# js_objcpu.d 30Tracing... Hit Ctrl-C to end. 31^C 32Total object creation on-CPU time (ms): 2 33 34Object creation on-CPU time distributions (us), 35 36 HTMLBodyElement 37 value ------------- Distribution ------------- count 38 1 | 0 39 2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 40 4 | 0 41 42 HTMLCollection 43 value ------------- Distribution ------------- count 44 1 | 0 45 2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 46 4 | 0 47 48 HTMLDocument 49 value ------------- Distribution ------------- count 50 1 | 0 51 2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 52 4 | 0 53 54 HTMLHtmlElement 55 value ------------- Distribution ------------- count 56 1 | 0 57 2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 58 4 | 0 59 60 Location 61 value ------------- Distribution ------------- count 62 1 | 0 63 2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 64 4 | 0 65 66 NodeList 67 value ------------- Distribution ------------- count 68 1 | 0 69 2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 70 4 | 0 71 72 StyleSheetList 73 value ------------- Distribution ------------- count 74 1 | 0 75 2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 76 4 | 0 77 78 Window 79 value ------------- Distribution ------------- count 80 1 | 0 81 2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 82 4 | 0 83 84 chrome://global/content/bindings/popup.xml#popup 8830492 85 value ------------- Distribution ------------- count 86 1 | 0 87 2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 88 4 | 0 89 90 chrome://global/content/bindings/scrollbar.xml#scrollbar 8beef52 91 value ------------- Distribution ------------- count 92 1 | 0 93 2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 94 4 | 0 95 96 BarProp 97 value ------------- Distribution ------------- count 98 2 | 0 99 4 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 100 8 | 0 101 102 BoxObject 103 value ------------- Distribution ------------- count 104 2 | 0 105 4 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 106 8 | 0 107 108 CSSStyleDeclaration 109 value ------------- Distribution ------------- count 110 2 | 0 111 4 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 112 8 | 0 113 114 chrome://global/content/bindings/popup.xml#popup 8bef592 115 value ------------- Distribution ------------- count 116 2 | 0 117 4 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 118 8 | 0 119 120 nsXPCComponents_Classes 121 value ------------- Distribution ------------- count 122 2 | 0 123 4 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 124 8 | 0 125 126 nsJSCID 127 value ------------- Distribution ------------- count 128 1 | 0 129 2 |@@@@@@@@@@@@@@@@@@@@ 1 130 4 |@@@@@@@@@@@@@@@@@@@@ 1 131 8 | 0 132 133 nsXPCComponents 134 value ------------- Distribution ------------- count 135 1 | 0 136 2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 3 137 4 | 0 138 139 Global Scope Polluter 140 value ------------- Distribution ------------- count 141 4 | 0 142 8 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1 143 16 | 0 144 145 JavaArray 146 value ------------- Distribution ------------- count 147 1 | 0 148 2 |@@@@@@@@@@@@@@@@@@@@ 1 149 4 | 0 150 8 |@@@@@@@@@@@@@@@@@@@@ 1 151 16 | 0 152 153 JavaClass 154 value ------------- Distribution ------------- count 155 1 | 0 156 2 |@@@@@@@@@@@@@@@@@@@@ 1 157 4 | 0 158 8 |@@@@@@@@@@@@@@@@@@@@ 1 159 16 | 0 160 161 JavaMember 162 value ------------- Distribution ------------- count 163 1 | 0 164 2 |@@@@@@@@@@@@@@@@@@@@ 1 165 4 | 0 166 8 |@@@@@@@@@@@@@@@@@@@@ 1 167 16 | 0 168 169 JavaObject 170 value ------------- Distribution ------------- count 171 1 | 0 172 2 |@@@@@@@@@@@@@@@@@@@@ 1 173 4 | 0 174 8 |@@@@@@@@@@@@@@@@@@@@ 1 175 16 | 0 176 177 KeyboardEvent 178 value ------------- Distribution ------------- count 179 1 | 0 180 2 |@@@@@@@@@@@@@@@@@@@@ 1 181 4 | 0 182 8 |@@@@@@@@@@@@@@@@@@@@ 1 183 16 | 0 184 185 XPC_WN_NoMods_Proto_JSClass 186 value ------------- Distribution ------------- count 187 1 | 0 188 2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 3 189 4 |@@@@@@@@@@ 1 190 8 | 0 191 192 PageTransitionEvent 193 value ------------- Distribution ------------- count 194 2 | 0 195 4 |@@@@@@@@@@@@@@@@@@@@ 1 196 8 |@@@@@@@@@@@@@@@@@@@@ 1 197 16 | 0 198 199 JSOptions 200 value ------------- Distribution ------------- count 201 4 | 0 202 8 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 2 203 16 | 0 204 205 Call 206 value ------------- Distribution ------------- count 207 2 | 0 208 4 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 5 209 8 | 0 210 211 DOM Constructor.prototype 212 value ------------- Distribution ------------- count 213 1 | 0 214 2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@ 2 215 4 | 0 216 8 | 0 217 16 |@@@@@@@@@@@@@ 1 218 32 | 0 219 220 With 221 value ------------- Distribution ------------- count 222 2 | 0 223 4 |@@@@@@@@@@@@@ 1 224 8 |@@@@@@@@@@@@@@@@@@@@@@@@@@@ 2 225 16 | 0 226 227 Constructor 228 value ------------- Distribution ------------- count 229 1 | 0 230 2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 9 231 4 |@@@@ 1 232 8 | 0 233 234 Object 235 value ------------- Distribution ------------- count 236 1 | 0 237 2 |@@@@@@@@@@@@@@@ 3 238 4 |@@@@@@@@@@@@@@@@@@@@@@@@@ 5 239 8 | 0 240 241 XPCNativeWrapper 242 value ------------- Distribution ------------- count 243 1 | 0 244 2 |@@@@@@@ 1 245 4 |@@@@@@@@@@@@@@@@@@@@@@@@@@@ 4 246 8 |@@@@@@@ 1 247 16 | 0 248 249 XULElement 250 value ------------- Distribution ------------- count 251 1 | 0 252 2 |@@@@@@@@@@@@@@@@@@@@@@ 5 253 4 |@@@@@@@@@@@@@@@@@@ 4 254 8 | 0 255 256 Array 257 value ------------- Distribution ------------- count 258 1 | 0 259 2 |@@@@@@@@@@ 2 260 4 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 6 261 8 | 0 262 263 XPCWrappedNative_NoHelper 264 value ------------- Distribution ------------- count 265 1 | 0 266 2 |@@@@@@@@@@@@@@@ 3 267 4 |@@@@@@@@@@@@@@@@@@@@ 4 268 8 |@@@@@ 1 269 16 | 0 270 271 XPC_WN_ModsAllowed_Proto_JSClass 272 value ------------- Distribution ------------- count 273 1 | 0 274 2 |@@@@@@@@@@@@@@@@@@@@@@@@ 6 275 4 |@@@@@@@@@@@@ 3 276 8 |@@@@ 1 277 16 | 0 278 279 MouseEvent 280 value ------------- Distribution ------------- count 281 2 | 0 282 4 |@@@@@@@@@@@@@@@@@ 3 283 8 |@@@@@@@@@@@@@@@@@@@@@@@ 4 284 16 | 0 285 286 String 287 value ------------- Distribution ------------- count 288 2 | 0 289 4 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 11 290 8 | 0 291 292 Event 293 value ------------- Distribution ------------- count 294 1 | 0 295 2 |@@@ 1 296 4 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 10 297 8 |@@@@@@@@@ 3 298 16 | 0 299 300 JavaPackage 301 value ------------- Distribution ------------- count 302 1 | 0 303 2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 40 304 4 | 0 305 8 |@ 1 306 16 | 0 307 308 Function 309 value ------------- Distribution ------------- count 310 1 | 0 311 2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 246 312 4 |@@@@@@@ 58 313 8 |@ 8 314 16 |@ 9 315 32 | 0 316 317 318