OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
58 V8.MemoryExternalFragmentationOldPointerSpace) \ | 58 V8.MemoryExternalFragmentationOldPointerSpace) \ |
59 HP(external_fragmentation_old_data_space, \ | 59 HP(external_fragmentation_old_data_space, \ |
60 V8.MemoryExternalFragmentationOldDataSpace) \ | 60 V8.MemoryExternalFragmentationOldDataSpace) \ |
61 HP(external_fragmentation_code_space, \ | 61 HP(external_fragmentation_code_space, \ |
62 V8.MemoryExternalFragmentationCodeSpace) \ | 62 V8.MemoryExternalFragmentationCodeSpace) \ |
63 HP(external_fragmentation_map_space, \ | 63 HP(external_fragmentation_map_space, \ |
64 V8.MemoryExternalFragmentationMapSpace) \ | 64 V8.MemoryExternalFragmentationMapSpace) \ |
65 HP(external_fragmentation_cell_space, \ | 65 HP(external_fragmentation_cell_space, \ |
66 V8.MemoryExternalFragmentationCellSpace) \ | 66 V8.MemoryExternalFragmentationCellSpace) \ |
67 HP(external_fragmentation_lo_space, \ | 67 HP(external_fragmentation_lo_space, \ |
68 V8.MemoryExternalFragmentationLoSpace) | 68 V8.MemoryExternalFragmentationLoSpace) \ |
69 HP(map_space_fraction_of_total, \ | |
70 V8.MemoryFractionMapSpace) \ | |
71 HP(cell_space_fraction_of_total, \ | |
72 V8.MemoryFractionCellSpace) \ | |
73 | |
74 | |
75 #define HISTOGRAM_MEMORY_LIST(HM) \ | |
76 HM(total_heap_size, V8.MemoryHeapSizeTotal) \ | |
77 HM(live_heap_size, V8.MemoryHeapSizeLive) \ | |
78 HM(total_map_space_size, V8.MemoryMapSpaceSize) \ | |
79 HM(total_cell_space_size, V8.MemoryCellSpaceSize) | |
Michael Starzinger
2012/08/08 18:44:36
We should start using consistent names for the hea
jochen (gone - plz use gerrit)
2012/08/09 13:31:29
Done.
| |
69 | 80 |
70 | 81 |
71 // WARNING: STATS_COUNTER_LIST_* is a very large macro that is causing MSVC | 82 // WARNING: STATS_COUNTER_LIST_* is a very large macro that is causing MSVC |
72 // Intellisense to crash. It was broken into two macros (each of length 40 | 83 // Intellisense to crash. It was broken into two macros (each of length 40 |
73 // lines) rather than one macro (of length about 80 lines) to work around | 84 // lines) rather than one macro (of length about 80 lines) to work around |
74 // this problem. Please avoid using recursive macros of this length when | 85 // this problem. Please avoid using recursive macros of this length when |
75 // possible. | 86 // possible. |
76 #define STATS_COUNTER_LIST_1(SC) \ | 87 #define STATS_COUNTER_LIST_1(SC) \ |
77 /* Global Handle Count*/ \ | 88 /* Global Handle Count*/ \ |
78 SC(global_handles, V8.GlobalHandles) \ | 89 SC(global_handles, V8.GlobalHandles) \ |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
296 #define HT(name, caption) \ | 307 #define HT(name, caption) \ |
297 HistogramTimer* name() { return &name##_; } | 308 HistogramTimer* name() { return &name##_; } |
298 HISTOGRAM_TIMER_LIST(HT) | 309 HISTOGRAM_TIMER_LIST(HT) |
299 #undef HT | 310 #undef HT |
300 | 311 |
301 #define HP(name, caption) \ | 312 #define HP(name, caption) \ |
302 Histogram* name() { return &name##_; } | 313 Histogram* name() { return &name##_; } |
303 HISTOGRAM_PERCENTAGE_LIST(HP) | 314 HISTOGRAM_PERCENTAGE_LIST(HP) |
304 #undef HP | 315 #undef HP |
305 | 316 |
317 #define HM(name, caption) \ | |
318 Histogram* name() { return &name##_; } | |
319 HISTOGRAM_MEMORY_LIST(HM) | |
320 #undef HM | |
321 | |
306 #define SC(name, caption) \ | 322 #define SC(name, caption) \ |
307 StatsCounter* name() { return &name##_; } | 323 StatsCounter* name() { return &name##_; } |
308 STATS_COUNTER_LIST_1(SC) | 324 STATS_COUNTER_LIST_1(SC) |
309 STATS_COUNTER_LIST_2(SC) | 325 STATS_COUNTER_LIST_2(SC) |
310 #undef SC | 326 #undef SC |
311 | 327 |
312 #define SC(name) \ | 328 #define SC(name) \ |
313 StatsCounter* count_of_##name() { return &count_of_##name##_; } \ | 329 StatsCounter* count_of_##name() { return &count_of_##name##_; } \ |
314 StatsCounter* size_of_##name() { return &size_of_##name##_; } | 330 StatsCounter* size_of_##name() { return &size_of_##name##_; } |
315 INSTANCE_TYPE_LIST(SC) | 331 INSTANCE_TYPE_LIST(SC) |
(...skipping 15 matching lines...) Expand all Loading... | |
331 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(SC) | 347 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(SC) |
332 #undef SC | 348 #undef SC |
333 | 349 |
334 enum Id { | 350 enum Id { |
335 #define RATE_ID(name, caption) k_##name, | 351 #define RATE_ID(name, caption) k_##name, |
336 HISTOGRAM_TIMER_LIST(RATE_ID) | 352 HISTOGRAM_TIMER_LIST(RATE_ID) |
337 #undef RATE_ID | 353 #undef RATE_ID |
338 #define PERCENTAGE_ID(name, caption) k_##name, | 354 #define PERCENTAGE_ID(name, caption) k_##name, |
339 HISTOGRAM_PERCENTAGE_LIST(PERCENTAGE_ID) | 355 HISTOGRAM_PERCENTAGE_LIST(PERCENTAGE_ID) |
340 #undef PERCENTAGE_ID | 356 #undef PERCENTAGE_ID |
357 #define MEMORY_ID(name, caption) k_##name, | |
358 HISTOGRAM_MEMORY_LIST(MEMORY_ID) | |
359 #undef MEMORY_ID | |
341 #define COUNTER_ID(name, caption) k_##name, | 360 #define COUNTER_ID(name, caption) k_##name, |
342 STATS_COUNTER_LIST_1(COUNTER_ID) | 361 STATS_COUNTER_LIST_1(COUNTER_ID) |
343 STATS_COUNTER_LIST_2(COUNTER_ID) | 362 STATS_COUNTER_LIST_2(COUNTER_ID) |
344 #undef COUNTER_ID | 363 #undef COUNTER_ID |
345 #define COUNTER_ID(name) kCountOf##name, kSizeOf##name, | 364 #define COUNTER_ID(name) kCountOf##name, kSizeOf##name, |
346 INSTANCE_TYPE_LIST(COUNTER_ID) | 365 INSTANCE_TYPE_LIST(COUNTER_ID) |
347 #undef COUNTER_ID | 366 #undef COUNTER_ID |
348 #define COUNTER_ID(name) kCountOfCODE_TYPE_##name, \ | 367 #define COUNTER_ID(name) kCountOfCODE_TYPE_##name, \ |
349 kSizeOfCODE_TYPE_##name, | 368 kSizeOfCODE_TYPE_##name, |
350 CODE_KIND_LIST(COUNTER_ID) | 369 CODE_KIND_LIST(COUNTER_ID) |
(...skipping 18 matching lines...) Expand all Loading... | |
369 #define HT(name, caption) \ | 388 #define HT(name, caption) \ |
370 HistogramTimer name##_; | 389 HistogramTimer name##_; |
371 HISTOGRAM_TIMER_LIST(HT) | 390 HISTOGRAM_TIMER_LIST(HT) |
372 #undef HT | 391 #undef HT |
373 | 392 |
374 #define HP(name, caption) \ | 393 #define HP(name, caption) \ |
375 Histogram name##_; | 394 Histogram name##_; |
376 HISTOGRAM_PERCENTAGE_LIST(HP) | 395 HISTOGRAM_PERCENTAGE_LIST(HP) |
377 #undef HP | 396 #undef HP |
378 | 397 |
398 #define HM(name, caption) \ | |
399 Histogram name##_; | |
400 HISTOGRAM_MEMORY_LIST(HM) | |
401 #undef HM | |
402 | |
379 #define SC(name, caption) \ | 403 #define SC(name, caption) \ |
380 StatsCounter name##_; | 404 StatsCounter name##_; |
381 STATS_COUNTER_LIST_1(SC) | 405 STATS_COUNTER_LIST_1(SC) |
382 STATS_COUNTER_LIST_2(SC) | 406 STATS_COUNTER_LIST_2(SC) |
383 #undef SC | 407 #undef SC |
384 | 408 |
385 #define SC(name) \ | 409 #define SC(name) \ |
386 StatsCounter size_of_##name##_; \ | 410 StatsCounter size_of_##name##_; \ |
387 StatsCounter count_of_##name##_; | 411 StatsCounter count_of_##name##_; |
388 INSTANCE_TYPE_LIST(SC) | 412 INSTANCE_TYPE_LIST(SC) |
(...skipping 21 matching lines...) Expand all Loading... | |
410 // Sliding state window counters. | 434 // Sliding state window counters. |
411 StatsCounter state_counters_[kSlidingStateWindowCounterCount]; | 435 StatsCounter state_counters_[kSlidingStateWindowCounterCount]; |
412 friend class Isolate; | 436 friend class Isolate; |
413 | 437 |
414 DISALLOW_IMPLICIT_CONSTRUCTORS(Counters); | 438 DISALLOW_IMPLICIT_CONSTRUCTORS(Counters); |
415 }; | 439 }; |
416 | 440 |
417 } } // namespace v8::internal | 441 } } // namespace v8::internal |
418 | 442 |
419 #endif // V8_V8_COUNTERS_H_ | 443 #endif // V8_V8_COUNTERS_H_ |
OLD | NEW |