| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 /** Returns resource name for script from where the function originates. */ | 51 /** Returns resource name for script from where the function originates. */ |
| 52 Handle<String> GetScriptResourceName() const; | 52 Handle<String> GetScriptResourceName() const; |
| 53 | 53 |
| 54 /** | 54 /** |
| 55 * Returns the number, 1-based, of the line where the function originates. | 55 * Returns the number, 1-based, of the line where the function originates. |
| 56 * kNoLineNumberInfo if no line number information is available. | 56 * kNoLineNumberInfo if no line number information is available. |
| 57 */ | 57 */ |
| 58 int GetLineNumber() const; | 58 int GetLineNumber() const; |
| 59 | 59 |
| 60 /** Returns bailout reason for the function |
| 61 * if the optimization was disabled for it. |
| 62 */ |
| 63 const char* GetBailoutReason() const; |
| 64 |
| 60 /** DEPRECATED. Please use GetHitCount instead. | 65 /** DEPRECATED. Please use GetHitCount instead. |
| 61 * Returns the count of samples where function was currently executing. | 66 * Returns the count of samples where function was currently executing. |
| 62 */ | 67 */ |
| 63 V8_DEPRECATED(double GetSelfSamplesCount() const); | 68 V8_DEPRECATED(double GetSelfSamplesCount() const); |
| 64 | 69 |
| 65 /** | 70 /** |
| 66 * Returns the count of samples where the function was currently executing. | 71 * Returns the count of samples where the function was currently executing. |
| 67 */ | 72 */ |
| 68 unsigned GetHitCount() const; | 73 unsigned GetHitCount() const; |
| 69 | 74 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 }; | 139 }; |
| 135 | 140 |
| 136 | 141 |
| 137 /** | 142 /** |
| 138 * Interface for controlling CPU profiling. Instance of the | 143 * Interface for controlling CPU profiling. Instance of the |
| 139 * profiler can be retrieved using v8::Isolate::GetCpuProfiler. | 144 * profiler can be retrieved using v8::Isolate::GetCpuProfiler. |
| 140 */ | 145 */ |
| 141 class V8_EXPORT CpuProfiler { | 146 class V8_EXPORT CpuProfiler { |
| 142 public: | 147 public: |
| 143 /** | 148 /** |
| 144 * A note on security tokens usage. As scripts from different | 149 * Changes default CPU profiler sampling interval to the specified number |
| 145 * origins can run inside a single V8 instance, it is possible to | 150 * of microseconds. Default interval is 1000us. This method must be called |
| 146 * have functions from different security contexts intermixed in a | 151 * when there are no profiles being recorded. |
| 147 * single CPU profile. To avoid exposing function names belonging to | |
| 148 * other contexts, filtering by security token is performed while | |
| 149 * obtaining profiling results. | |
| 150 */ | 152 */ |
| 153 void SetSamplingInterval(int us); |
| 151 | 154 |
| 152 /** | 155 /** |
| 153 * Returns the number of profiles collected (doesn't include | 156 * Returns the number of profiles collected (doesn't include |
| 154 * profiles that are being collected at the moment of call.) | 157 * profiles that are being collected at the moment of call.) |
| 155 */ | 158 */ |
| 156 int GetProfileCount(); | 159 int GetProfileCount(); |
| 157 | 160 |
| 158 /** Returns a profile by index. */ | 161 /** Returns a profile by index. */ |
| 159 const CpuProfile* GetCpuProfile(int index); | 162 const CpuProfile* GetCpuProfile(int index); |
| 160 | 163 |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 uint32_t index; // Index of the time interval that was changed. | 563 uint32_t index; // Index of the time interval that was changed. |
| 561 uint32_t count; // New value of count field for the interval with this index. | 564 uint32_t count; // New value of count field for the interval with this index. |
| 562 uint32_t size; // New value of size field for the interval with this index. | 565 uint32_t size; // New value of size field for the interval with this index. |
| 563 }; | 566 }; |
| 564 | 567 |
| 565 | 568 |
| 566 } // namespace v8 | 569 } // namespace v8 |
| 567 | 570 |
| 568 | 571 |
| 569 #endif // V8_V8_PROFILER_H_ | 572 #endif // V8_V8_PROFILER_H_ |
| OLD | NEW |