Index: test/cctest/profiler-extension.h |
diff --git a/src/extensions/free-buffer-extension.h b/test/cctest/profiler-extension.h |
similarity index 78% |
copy from src/extensions/free-buffer-extension.h |
copy to test/cctest/profiler-extension.h |
index 22d466f61e02b4e8367dfc9d06f00095aa5efe02..5d36f4fe73d630033d07865b7928091f611d503e 100644 |
--- a/src/extensions/free-buffer-extension.h |
+++ b/test/cctest/profiler-extension.h |
@@ -24,26 +24,20 @@ |
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
+// |
+// Tests of profiles generator and utilities. |
-#ifndef V8_EXTENSIONS_FREE_BUFFER_EXTENSION_H_ |
-#define V8_EXTENSIONS_FREE_BUFFER_EXTENSION_H_ |
- |
-#include "v8.h" |
- |
-namespace v8 { |
-namespace internal { |
+#include "v8-profiler.h" |
-class FreeBufferExtension : public v8::Extension { |
+class ProfilerExtension : public v8::Extension { |
public: |
- explicit FreeBufferExtension(const char* source) |
- : v8::Extension("v8/free-buffer", source) {} |
+ ProfilerExtension() : v8::Extension("v8/profiler", kSource) { } |
virtual v8::Handle<v8::FunctionTemplate> GetNativeFunctionTemplate( |
v8::Isolate* isolate, |
v8::Handle<v8::String> name); |
- static void FreeBuffer(const v8::FunctionCallbackInfo<v8::Value>& args); |
- static void Register(); |
+ static void StartProfiling(const v8::FunctionCallbackInfo<v8::Value>& args); |
+ static void StopProfiling(const v8::FunctionCallbackInfo<v8::Value>& args); |
+ static const v8::CpuProfile* last_profile; |
+ private: |
+ static const char* kSource; |
}; |
- |
-} } // namespace v8::internal |
- |
-#endif // V8_EXTENSIONS_FREE_BUFFER_EXTENSION_H_ |