| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64_INSTRUMENT_ARM64_H_ | 5 #ifndef V8_ARM64_INSTRUMENT_ARM64_H_ |
| 6 #define V8_ARM64_INSTRUMENT_ARM64_H_ | 6 #define V8_ARM64_INSTRUMENT_ARM64_H_ |
| 7 | 7 |
| 8 #include "src/globals.h" | 8 #include "src/globals.h" |
| 9 #include "src/utils.h" | 9 #include "src/utils.h" |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 | 26 |
| 27 enum CounterType { | 27 enum CounterType { |
| 28 Gauge = 0, // Gauge counters reset themselves after reading. | 28 Gauge = 0, // Gauge counters reset themselves after reading. |
| 29 Cumulative = 1 // Cumulative counters keep their value after reading. | 29 Cumulative = 1 // Cumulative counters keep their value after reading. |
| 30 }; | 30 }; |
| 31 | 31 |
| 32 | 32 |
| 33 class Counter { | 33 class Counter { |
| 34 public: | 34 public: |
| 35 Counter(const char* name, CounterType type = Gauge); | 35 explicit Counter(const char* name, CounterType type = Gauge); |
| 36 | 36 |
| 37 void Increment(); | 37 void Increment(); |
| 38 void Enable(); | 38 void Enable(); |
| 39 void Disable(); | 39 void Disable(); |
| 40 bool IsEnabled(); | 40 bool IsEnabled(); |
| 41 uint64_t count(); | 41 uint64_t count(); |
| 42 const char* name(); | 42 const char* name(); |
| 43 CounterType type(); | 43 CounterType type(); |
| 44 | 44 |
| 45 private: | 45 private: |
| (...skipping 30 matching lines...) Expand all Loading... |
| 76 | 76 |
| 77 std::list<Counter*> counters_; | 77 std::list<Counter*> counters_; |
| 78 | 78 |
| 79 FILE *output_stream_; | 79 FILE *output_stream_; |
| 80 uint64_t sample_period_; | 80 uint64_t sample_period_; |
| 81 }; | 81 }; |
| 82 | 82 |
| 83 } } // namespace v8::internal | 83 } } // namespace v8::internal |
| 84 | 84 |
| 85 #endif // V8_ARM64_INSTRUMENT_ARM64_H_ | 85 #endif // V8_ARM64_INSTRUMENT_ARM64_H_ |
| OLD | NEW |