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"); | |
532 #define CALL_RUNTIME_COUNTER(name, nargs, ressize) \ | 531 #define CALL_RUNTIME_COUNTER(name, nargs, ressize) \ |
533 RuntimeCallCounter Runtime_##name = RuntimeCallCounter(#name); | 532 RuntimeCallCounter Runtime_##name = RuntimeCallCounter(#name); |
534 FOR_EACH_INTRINSIC(CALL_RUNTIME_COUNTER) | 533 FOR_EACH_INTRINSIC(CALL_RUNTIME_COUNTER) |
535 #undef CALL_RUNTIME_COUNTER | 534 #undef CALL_RUNTIME_COUNTER |
536 #define CALL_BUILTIN_COUNTER(name, type) \ | 535 #define CALL_BUILTIN_COUNTER(name, type) \ |
537 RuntimeCallCounter Builtin_##name = RuntimeCallCounter(#name); | 536 RuntimeCallCounter Builtin_##name = RuntimeCallCounter(#name); |
538 BUILTIN_LIST_C(CALL_BUILTIN_COUNTER) | 537 BUILTIN_LIST_C(CALL_BUILTIN_COUNTER) |
539 #undef CALL_BUILTIN_COUNTER | 538 #undef CALL_BUILTIN_COUNTER |
540 | 539 |
541 // Counter to track recursive time events. | 540 // Counter to track recursive time events. |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
977 | 976 |
978 explicit Counters(Isolate* isolate); | 977 explicit Counters(Isolate* isolate); |
979 | 978 |
980 DISALLOW_IMPLICIT_CONSTRUCTORS(Counters); | 979 DISALLOW_IMPLICIT_CONSTRUCTORS(Counters); |
981 }; | 980 }; |
982 | 981 |
983 } // namespace internal | 982 } // namespace internal |
984 } // namespace v8 | 983 } // namespace v8 |
985 | 984 |
986 #endif // V8_COUNTERS_H_ | 985 #endif // V8_COUNTERS_H_ |
OLD | NEW |