| 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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 #define COUNTER_ID(name) k_##name, | 356 #define COUNTER_ID(name) k_##name, |
| 357 STATE_TAG_LIST(COUNTER_ID) | 357 STATE_TAG_LIST(COUNTER_ID) |
| 358 #undef COUNTER_ID | 358 #undef COUNTER_ID |
| 359 stats_counter_count | 359 stats_counter_count |
| 360 }; | 360 }; |
| 361 | 361 |
| 362 StatsCounter* state_counters(StateTag state) { | 362 StatsCounter* state_counters(StateTag state) { |
| 363 return &state_counters_[state]; | 363 return &state_counters_[state]; |
| 364 } | 364 } |
| 365 | 365 |
| 366 void ResetHistograms(); |
| 367 |
| 366 private: | 368 private: |
| 367 #define HT(name, caption) \ | 369 #define HT(name, caption) \ |
| 368 HistogramTimer name##_; | 370 HistogramTimer name##_; |
| 369 HISTOGRAM_TIMER_LIST(HT) | 371 HISTOGRAM_TIMER_LIST(HT) |
| 370 #undef HT | 372 #undef HT |
| 371 | 373 |
| 372 #define HP(name, caption) \ | 374 #define HP(name, caption) \ |
| 373 Histogram name##_; | 375 Histogram name##_; |
| 374 HISTOGRAM_PERCENTAGE_LIST(HP) | 376 HISTOGRAM_PERCENTAGE_LIST(HP) |
| 375 #undef HP | 377 #undef HP |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 // Sliding state window counters. | 410 // Sliding state window counters. |
| 409 StatsCounter state_counters_[kSlidingStateWindowCounterCount]; | 411 StatsCounter state_counters_[kSlidingStateWindowCounterCount]; |
| 410 friend class Isolate; | 412 friend class Isolate; |
| 411 | 413 |
| 412 DISALLOW_IMPLICIT_CONSTRUCTORS(Counters); | 414 DISALLOW_IMPLICIT_CONSTRUCTORS(Counters); |
| 413 }; | 415 }; |
| 414 | 416 |
| 415 } } // namespace v8::internal | 417 } } // namespace v8::internal |
| 416 | 418 |
| 417 #endif // V8_V8_COUNTERS_H_ | 419 #endif // V8_V8_COUNTERS_H_ |
| OLD | NEW |