Chromium Code Reviews| 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_V8_PLATFORM_H_ | 5 #ifndef V8_V8_PLATFORM_H_ |
| 6 #define V8_V8_PLATFORM_H_ | 6 #define V8_V8_PLATFORM_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | |
| 9 | |
| 8 namespace v8 { | 10 namespace v8 { |
| 9 | 11 |
| 10 class Isolate; | 12 class Isolate; |
| 11 | 13 |
| 12 /** | 14 /** |
| 13 * A Task represents a unit of work. | 15 * A Task represents a unit of work. |
| 14 */ | 16 */ |
| 15 class Task { | 17 class Task { |
| 16 public: | 18 public: |
| 17 virtual ~Task() {} | 19 virtual ~Task() {} |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 100 } | 102 } |
| 101 | 103 |
| 102 /** | 104 /** |
| 103 * Monotonically increasing time in seconds from an arbitrary fixed point in | 105 * Monotonically increasing time in seconds from an arbitrary fixed point in |
| 104 * the past. This function is expected to return at least | 106 * the past. This function is expected to return at least |
| 105 * millisecond-precision values. For this reason, | 107 * millisecond-precision values. For this reason, |
| 106 * it is recommended that the fixed point be no further in the past than | 108 * it is recommended that the fixed point be no further in the past than |
| 107 * the epoch. | 109 * the epoch. |
| 108 **/ | 110 **/ |
| 109 virtual double MonotonicallyIncreasingTime() = 0; | 111 virtual double MonotonicallyIncreasingTime() = 0; |
| 112 | |
| 113 /** | |
| 114 * Get a pointer to the enabled state of the given trace category. | |
| 115 **/ | |
| 116 virtual const uint8_t* GetCategoryGroupEnabled(const char* name) = 0; | |
| 117 | |
| 118 /** | |
| 119 * Get the category group name of the given category_enabled_flags. | |
| 120 **/ | |
| 121 virtual const char* GetCategoryGroupName( | |
| 122 const uint8_t* category_enabled_flag) = 0; | |
| 123 | |
| 124 /** | |
| 125 * Add a trace event to the platform tracing system. | |
|
Yang
2015/11/19 09:30:32
Can you add a comment about what this method retur
fmeawad
2015/11/20 22:22:20
I have updated the description on all the methods.
| |
| 126 **/ | |
| 127 virtual uint64_t AddTraceEvent( | |
| 128 char phase, const uint8_t* category_enabled_flag, const char* name, | |
| 129 uint64_t id, uint64_t bind_id, int32_t num_args, const char** arg_names, | |
| 130 const uint8_t* arg_types, const uint64_t* arg_values, | |
| 131 unsigned int flags) = 0; | |
| 132 | |
| 133 /** | |
| 134 * Set the duration field of a COMPLETE trace event. | |
| 135 **/ | |
| 136 virtual void UpdateTraceEventDuration(const uint8_t* category_enabled_flag, | |
| 137 const char* name, uint64_t handle) = 0; | |
| 110 }; | 138 }; |
| 111 | 139 |
| 112 } // namespace v8 | 140 } // namespace v8 |
| 113 | 141 |
| 114 #endif // V8_V8_PLATFORM_H_ | 142 #endif // V8_V8_PLATFORM_H_ |
| OLD | NEW |