OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_COUNTERS_H_ | 5 #ifndef V8_COUNTERS_H_ |
6 #define V8_COUNTERS_H_ | 6 #define V8_COUNTERS_H_ |
7 | 7 |
8 #include "include/v8.h" | 8 #include "include/v8.h" |
9 #include "src/allocation.h" | 9 #include "src/allocation.h" |
10 #include "src/base/platform/elapsed-timer.h" | 10 #include "src/base/platform/elapsed-timer.h" |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 RuntimeCallTimer* parent_; | 521 RuntimeCallTimer* parent_; |
522 base::ElapsedTimer timer_; | 522 base::ElapsedTimer timer_; |
523 }; | 523 }; |
524 | 524 |
525 struct RuntimeCallStats { | 525 struct RuntimeCallStats { |
526 // Dummy counter for the unexpected stub miss. | 526 // Dummy counter for the unexpected stub miss. |
527 RuntimeCallCounter UnexpectedStubMiss = | 527 RuntimeCallCounter UnexpectedStubMiss = |
528 RuntimeCallCounter("UnexpectedStubMiss"); | 528 RuntimeCallCounter("UnexpectedStubMiss"); |
529 // Counter for runtime callbacks into JavaScript. | 529 // Counter for runtime callbacks into JavaScript. |
530 RuntimeCallCounter ExternalCallback = RuntimeCallCounter("ExternalCallback"); | 530 RuntimeCallCounter ExternalCallback = RuntimeCallCounter("ExternalCallback"); |
| 531 RuntimeCallCounter GC = RuntimeCallCounter("GC"); |
531 #define CALL_RUNTIME_COUNTER(name, nargs, ressize) \ | 532 #define CALL_RUNTIME_COUNTER(name, nargs, ressize) \ |
532 RuntimeCallCounter Runtime_##name = RuntimeCallCounter(#name); | 533 RuntimeCallCounter Runtime_##name = RuntimeCallCounter(#name); |
533 FOR_EACH_INTRINSIC(CALL_RUNTIME_COUNTER) | 534 FOR_EACH_INTRINSIC(CALL_RUNTIME_COUNTER) |
534 #undef CALL_RUNTIME_COUNTER | 535 #undef CALL_RUNTIME_COUNTER |
535 #define CALL_BUILTIN_COUNTER(name, type) \ | 536 #define CALL_BUILTIN_COUNTER(name, type) \ |
536 RuntimeCallCounter Builtin_##name = RuntimeCallCounter(#name); | 537 RuntimeCallCounter Builtin_##name = RuntimeCallCounter(#name); |
537 BUILTIN_LIST_C(CALL_BUILTIN_COUNTER) | 538 BUILTIN_LIST_C(CALL_BUILTIN_COUNTER) |
538 #undef CALL_BUILTIN_COUNTER | 539 #undef CALL_BUILTIN_COUNTER |
539 | 540 |
540 // Counter to track recursive time events. | 541 // Counter to track recursive time events. |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
976 | 977 |
977 explicit Counters(Isolate* isolate); | 978 explicit Counters(Isolate* isolate); |
978 | 979 |
979 DISALLOW_IMPLICIT_CONSTRUCTORS(Counters); | 980 DISALLOW_IMPLICIT_CONSTRUCTORS(Counters); |
980 }; | 981 }; |
981 | 982 |
982 } // namespace internal | 983 } // namespace internal |
983 } // namespace v8 | 984 } // namespace v8 |
984 | 985 |
985 #endif // V8_COUNTERS_H_ | 986 #endif // V8_COUNTERS_H_ |
OLD | NEW |