| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 HM(heap_sample_total_committed, V8.MemoryHeapSampleTotalCommitted) \ | 94 HM(heap_sample_total_committed, V8.MemoryHeapSampleTotalCommitted) \ |
| 95 HM(heap_sample_total_used, V8.MemoryHeapSampleTotalUsed) \ | 95 HM(heap_sample_total_used, V8.MemoryHeapSampleTotalUsed) \ |
| 96 HM(heap_sample_map_space_committed, \ | 96 HM(heap_sample_map_space_committed, \ |
| 97 V8.MemoryHeapSampleMapSpaceCommitted) \ | 97 V8.MemoryHeapSampleMapSpaceCommitted) \ |
| 98 HM(heap_sample_cell_space_committed, \ | 98 HM(heap_sample_cell_space_committed, \ |
| 99 V8.MemoryHeapSampleCellSpaceCommitted) \ | 99 V8.MemoryHeapSampleCellSpaceCommitted) \ |
| 100 HM(heap_sample_property_cell_space_committed, \ | 100 HM(heap_sample_property_cell_space_committed, \ |
| 101 V8.MemoryHeapSamplePropertyCellSpaceCommitted) \ | 101 V8.MemoryHeapSamplePropertyCellSpaceCommitted) \ |
| 102 HM(heap_sample_code_space_committed, \ | 102 HM(heap_sample_code_space_committed, \ |
| 103 V8.MemoryHeapSampleCodeSpaceCommitted) \ | 103 V8.MemoryHeapSampleCodeSpaceCommitted) \ |
| 104 HM(heap_sample_maximum_committed, \ |
| 105 V8.MemoryHeapSampleMaximumCommitted) \ |
| 104 | 106 |
| 105 | 107 |
| 106 // WARNING: STATS_COUNTER_LIST_* is a very large macro that is causing MSVC | 108 // WARNING: STATS_COUNTER_LIST_* is a very large macro that is causing MSVC |
| 107 // Intellisense to crash. It was broken into two macros (each of length 40 | 109 // Intellisense to crash. It was broken into two macros (each of length 40 |
| 108 // lines) rather than one macro (of length about 80 lines) to work around | 110 // lines) rather than one macro (of length about 80 lines) to work around |
| 109 // this problem. Please avoid using recursive macros of this length when | 111 // this problem. Please avoid using recursive macros of this length when |
| 110 // possible. | 112 // possible. |
| 111 #define STATS_COUNTER_LIST_1(SC) \ | 113 #define STATS_COUNTER_LIST_1(SC) \ |
| 112 /* Global Handle Count*/ \ | 114 /* Global Handle Count*/ \ |
| 113 SC(global_handles, V8.GlobalHandles) \ | 115 SC(global_handles, V8.GlobalHandles) \ |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 StatsCounter* size_of_FIXED_ARRAY_##name() \ | 336 StatsCounter* size_of_FIXED_ARRAY_##name() \ |
| 335 { return &size_of_FIXED_ARRAY_##name##_; } | 337 { return &size_of_FIXED_ARRAY_##name##_; } |
| 336 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(SC) | 338 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(SC) |
| 337 #undef SC | 339 #undef SC |
| 338 | 340 |
| 339 #define SC(name) \ | 341 #define SC(name) \ |
| 340 StatsCounter* count_of_CODE_AGE_##name() \ | 342 StatsCounter* count_of_CODE_AGE_##name() \ |
| 341 { return &count_of_CODE_AGE_##name##_; } \ | 343 { return &count_of_CODE_AGE_##name##_; } \ |
| 342 StatsCounter* size_of_CODE_AGE_##name() \ | 344 StatsCounter* size_of_CODE_AGE_##name() \ |
| 343 { return &size_of_CODE_AGE_##name##_; } | 345 { return &size_of_CODE_AGE_##name##_; } |
| 344 CODE_AGE_LIST_WITH_NO_AGE(SC) | 346 CODE_AGE_LIST_COMPLETE(SC) |
| 345 #undef SC | 347 #undef SC |
| 346 | 348 |
| 347 enum Id { | 349 enum Id { |
| 348 #define RATE_ID(name, caption) k_##name, | 350 #define RATE_ID(name, caption) k_##name, |
| 349 HISTOGRAM_TIMER_LIST(RATE_ID) | 351 HISTOGRAM_TIMER_LIST(RATE_ID) |
| 350 #undef RATE_ID | 352 #undef RATE_ID |
| 351 #define PERCENTAGE_ID(name, caption) k_##name, | 353 #define PERCENTAGE_ID(name, caption) k_##name, |
| 352 HISTOGRAM_PERCENTAGE_LIST(PERCENTAGE_ID) | 354 HISTOGRAM_PERCENTAGE_LIST(PERCENTAGE_ID) |
| 353 #undef PERCENTAGE_ID | 355 #undef PERCENTAGE_ID |
| 354 #define MEMORY_ID(name, caption) k_##name, | 356 #define MEMORY_ID(name, caption) k_##name, |
| 355 HISTOGRAM_MEMORY_LIST(MEMORY_ID) | 357 HISTOGRAM_MEMORY_LIST(MEMORY_ID) |
| 356 #undef MEMORY_ID | 358 #undef MEMORY_ID |
| 357 #define COUNTER_ID(name, caption) k_##name, | 359 #define COUNTER_ID(name, caption) k_##name, |
| 358 STATS_COUNTER_LIST_1(COUNTER_ID) | 360 STATS_COUNTER_LIST_1(COUNTER_ID) |
| 359 STATS_COUNTER_LIST_2(COUNTER_ID) | 361 STATS_COUNTER_LIST_2(COUNTER_ID) |
| 360 #undef COUNTER_ID | 362 #undef COUNTER_ID |
| 361 #define COUNTER_ID(name) kCountOf##name, kSizeOf##name, | 363 #define COUNTER_ID(name) kCountOf##name, kSizeOf##name, |
| 362 INSTANCE_TYPE_LIST(COUNTER_ID) | 364 INSTANCE_TYPE_LIST(COUNTER_ID) |
| 363 #undef COUNTER_ID | 365 #undef COUNTER_ID |
| 364 #define COUNTER_ID(name) kCountOfCODE_TYPE_##name, \ | 366 #define COUNTER_ID(name) kCountOfCODE_TYPE_##name, \ |
| 365 kSizeOfCODE_TYPE_##name, | 367 kSizeOfCODE_TYPE_##name, |
| 366 CODE_KIND_LIST(COUNTER_ID) | 368 CODE_KIND_LIST(COUNTER_ID) |
| 367 #undef COUNTER_ID | 369 #undef COUNTER_ID |
| 368 #define COUNTER_ID(name) kCountOfFIXED_ARRAY__##name, \ | 370 #define COUNTER_ID(name) kCountOfFIXED_ARRAY__##name, \ |
| 369 kSizeOfFIXED_ARRAY__##name, | 371 kSizeOfFIXED_ARRAY__##name, |
| 370 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(COUNTER_ID) | 372 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(COUNTER_ID) |
| 371 #undef COUNTER_ID | 373 #undef COUNTER_ID |
| 372 #define COUNTER_ID(name) kCountOfCODE_AGE__##name, \ | 374 #define COUNTER_ID(name) kCountOfCODE_AGE__##name, \ |
| 373 kSizeOfCODE_AGE__##name, | 375 kSizeOfCODE_AGE__##name, |
| 374 CODE_AGE_LIST_WITH_NO_AGE(COUNTER_ID) | 376 CODE_AGE_LIST_COMPLETE(COUNTER_ID) |
| 375 #undef COUNTER_ID | 377 #undef COUNTER_ID |
| 376 stats_counter_count | 378 stats_counter_count |
| 377 }; | 379 }; |
| 378 | 380 |
| 379 void ResetHistograms(); | 381 void ResetHistograms(); |
| 380 | 382 |
| 381 private: | 383 private: |
| 382 #define HT(name, caption) \ | 384 #define HT(name, caption) \ |
| 383 HistogramTimer name##_; | 385 HistogramTimer name##_; |
| 384 HISTOGRAM_TIMER_LIST(HT) | 386 HISTOGRAM_TIMER_LIST(HT) |
| (...skipping 29 matching lines...) Expand all Loading... |
| 414 | 416 |
| 415 #define SC(name) \ | 417 #define SC(name) \ |
| 416 StatsCounter size_of_FIXED_ARRAY_##name##_; \ | 418 StatsCounter size_of_FIXED_ARRAY_##name##_; \ |
| 417 StatsCounter count_of_FIXED_ARRAY_##name##_; | 419 StatsCounter count_of_FIXED_ARRAY_##name##_; |
| 418 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(SC) | 420 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(SC) |
| 419 #undef SC | 421 #undef SC |
| 420 | 422 |
| 421 #define SC(name) \ | 423 #define SC(name) \ |
| 422 StatsCounter size_of_CODE_AGE_##name##_; \ | 424 StatsCounter size_of_CODE_AGE_##name##_; \ |
| 423 StatsCounter count_of_CODE_AGE_##name##_; | 425 StatsCounter count_of_CODE_AGE_##name##_; |
| 424 CODE_AGE_LIST_WITH_NO_AGE(SC) | 426 CODE_AGE_LIST_COMPLETE(SC) |
| 425 #undef SC | 427 #undef SC |
| 426 | 428 |
| 427 friend class Isolate; | 429 friend class Isolate; |
| 428 | 430 |
| 429 explicit Counters(Isolate* isolate); | 431 explicit Counters(Isolate* isolate); |
| 430 | 432 |
| 431 DISALLOW_IMPLICIT_CONSTRUCTORS(Counters); | 433 DISALLOW_IMPLICIT_CONSTRUCTORS(Counters); |
| 432 }; | 434 }; |
| 433 | 435 |
| 434 } } // namespace v8::internal | 436 } } // namespace v8::internal |
| 435 | 437 |
| 436 #endif // V8_V8_COUNTERS_H_ | 438 #endif // V8_V8_COUNTERS_H_ |
| OLD | NEW |