| 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 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 INSTANCE_TYPE_LIST(COUNTER_ID) | 366 INSTANCE_TYPE_LIST(COUNTER_ID) |
| 367 #undef COUNTER_ID | 367 #undef COUNTER_ID |
| 368 #define COUNTER_ID(name) kCountOfCODE_TYPE_##name, \ | 368 #define COUNTER_ID(name) kCountOfCODE_TYPE_##name, \ |
| 369 kSizeOfCODE_TYPE_##name, | 369 kSizeOfCODE_TYPE_##name, |
| 370 CODE_KIND_LIST(COUNTER_ID) | 370 CODE_KIND_LIST(COUNTER_ID) |
| 371 #undef COUNTER_ID | 371 #undef COUNTER_ID |
| 372 #define COUNTER_ID(name) kCountOfFIXED_ARRAY__##name, \ | 372 #define COUNTER_ID(name) kCountOfFIXED_ARRAY__##name, \ |
| 373 kSizeOfFIXED_ARRAY__##name, | 373 kSizeOfFIXED_ARRAY__##name, |
| 374 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(COUNTER_ID) | 374 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(COUNTER_ID) |
| 375 #undef COUNTER_ID | 375 #undef COUNTER_ID |
| 376 #define COUNTER_ID(name) k_##name, | |
| 377 STATE_TAG_LIST(COUNTER_ID) | |
| 378 #undef COUNTER_ID | |
| 379 stats_counter_count | 376 stats_counter_count |
| 380 }; | 377 }; |
| 381 | 378 |
| 382 StatsCounter* state_counters(StateTag state) { | |
| 383 return &state_counters_[state]; | |
| 384 } | |
| 385 | |
| 386 void ResetHistograms(); | 379 void ResetHistograms(); |
| 387 | 380 |
| 388 private: | 381 private: |
| 389 #define HT(name, caption) \ | 382 #define HT(name, caption) \ |
| 390 HistogramTimer name##_; | 383 HistogramTimer name##_; |
| 391 HISTOGRAM_TIMER_LIST(HT) | 384 HISTOGRAM_TIMER_LIST(HT) |
| 392 #undef HT | 385 #undef HT |
| 393 | 386 |
| 394 #define HP(name, caption) \ | 387 #define HP(name, caption) \ |
| 395 Histogram name##_; | 388 Histogram name##_; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 418 StatsCounter count_of_CODE_TYPE_##name##_; | 411 StatsCounter count_of_CODE_TYPE_##name##_; |
| 419 CODE_KIND_LIST(SC) | 412 CODE_KIND_LIST(SC) |
| 420 #undef SC | 413 #undef SC |
| 421 | 414 |
| 422 #define SC(name) \ | 415 #define SC(name) \ |
| 423 StatsCounter size_of_FIXED_ARRAY_##name##_; \ | 416 StatsCounter size_of_FIXED_ARRAY_##name##_; \ |
| 424 StatsCounter count_of_FIXED_ARRAY_##name##_; | 417 StatsCounter count_of_FIXED_ARRAY_##name##_; |
| 425 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(SC) | 418 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(SC) |
| 426 #undef SC | 419 #undef SC |
| 427 | 420 |
| 428 enum { | |
| 429 #define COUNTER_ID(name) __##name, | |
| 430 STATE_TAG_LIST(COUNTER_ID) | |
| 431 #undef COUNTER_ID | |
| 432 kSlidingStateWindowCounterCount | |
| 433 }; | |
| 434 | |
| 435 // Sliding state window counters. | |
| 436 StatsCounter state_counters_[kSlidingStateWindowCounterCount]; | |
| 437 friend class Isolate; | 421 friend class Isolate; |
| 438 | 422 |
| 439 DISALLOW_IMPLICIT_CONSTRUCTORS(Counters); | 423 DISALLOW_IMPLICIT_CONSTRUCTORS(Counters); |
| 440 }; | 424 }; |
| 441 | 425 |
| 442 } } // namespace v8::internal | 426 } } // namespace v8::internal |
| 443 | 427 |
| 444 #endif // V8_V8_COUNTERS_H_ | 428 #endif // V8_V8_COUNTERS_H_ |
| OLD | NEW |