Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(654)

Unified Diff: test/cctest/profiler-extension.h

Issue 2117343006: Introduce v8::CpuProfiler::New and v8::CpuProfiler::Dispose API. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove ProfilerExtension::Scope Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/isolate.h ('k') | test/cctest/profiler-extension.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/profiler-extension.h
diff --git a/test/cctest/profiler-extension.h b/test/cctest/profiler-extension.h
index 00f9a5a8085fe62c40f0f31202c69fef2efb5852..dbc12f47a002dc39a6f2d48a254089a4cfba7e11 100644
--- a/test/cctest/profiler-extension.h
+++ b/test/cctest/profiler-extension.h
@@ -35,11 +35,20 @@
namespace v8 {
namespace internal {
+class CpuProfiler;
+
class ProfilerExtension : public v8::Extension {
public:
ProfilerExtension() : v8::Extension("v8/profiler", kSource) { }
+
virtual v8::Local<v8::FunctionTemplate> GetNativeFunctionTemplate(
v8::Isolate* isolate, v8::Local<v8::String> name);
+
+ static void set_profiler(v8::CpuProfiler* profiler) { profiler_ = profiler; }
+ static void set_profiler(CpuProfiler* profiler) {
+ profiler_ = reinterpret_cast<v8::CpuProfiler*>(profiler);
+ }
+ static v8::CpuProfiler* profiler() { return profiler_; }
static v8::CpuProfile* last_profile;
private:
@@ -47,6 +56,7 @@ class ProfilerExtension : public v8::Extension {
static void StopProfiling(const v8::FunctionCallbackInfo<v8::Value>& args);
static void CollectSample(const v8::FunctionCallbackInfo<v8::Value>& args);
+ static v8::CpuProfiler* profiler_;
static const char* kSource;
};
« no previous file with comments | « src/isolate.h ('k') | test/cctest/profiler-extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698