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

Unified Diff: src/sampler-thread.h

Issue 499483002: [WIP] A sampler thread in d8 for consuming the new API. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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
« src/log.cc ('K') | « src/sampler.cc ('k') | src/sampler-thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/sampler-thread.h
diff --git a/src/sampler-thread.h b/src/sampler-thread.h
new file mode 100644
index 0000000000000000000000000000000000000000..247cb715f32e75ce1ec7d9ab4a0bce323a3aaf5f
--- /dev/null
+++ b/src/sampler-thread.h
@@ -0,0 +1,44 @@
+// Copyright 2014 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef V8_SAMPLER_THREAD_H_
+#define V8_SAMPLER_THREAD_H_
+
+#include "include/v8-sampler.h"
+#include "src/v8.h"
+
+#include "src/base/platform/platform.h"
+
+namespace v8 {
+
+class CodeEventPrinter: public CodeEventHandler{
+ public:
+ void Create(const void* from,
+ const int size,
+ const std::string& name);
+ void Delete(const void* from);
+ void Move(const void* from, const void* to);
+ void SharedLibrary(const std::string& library_path,
+ const void* start,
+ const void* end);
+};
+
+class SamplerThread : public base::Thread {
+ public:
+ explicit SamplerThread(Isolate* isolate);
+ virtual ~SamplerThread() {}
+
+ void Stop();
+
+ // Thread control.
+ virtual void Run();
+
+ private:
+ Isolate* isolate_;
+ bool done_sampling_;
+};
+
+} // namespace v8
+
+#endif // V8_SAMPLER_THREAD_H_
« src/log.cc ('K') | « src/sampler.cc ('k') | src/sampler-thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698