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

Unified Diff: src/log.cc

Issue 1708573003: [WIP]Create a V8 sampler library and tracing controller. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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/log.h ('k') | src/profiler/cpu-profiler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/log.cc
diff --git a/src/log.cc b/src/log.cc
index 0289586e5b6d2adf6245f7fdf4315172a9d1b959..4b1119988c75459cf087d8077bdb8f0349e24878 100644
--- a/src/log.cc
+++ b/src/log.cc
@@ -7,6 +7,7 @@
#include <cstdarg>
#include <sstream>
+#include "include/v8-sampler.h"
#include "src/bailout-reason.h"
#include "src/base/platform/platform.h"
#include "src/bootstrapper.h"
@@ -20,6 +21,7 @@
#include "src/runtime-profiler.h"
#include "src/string-stream.h"
#include "src/vm-state-inl.h"
+#include <iostream>
namespace v8 {
namespace internal {
@@ -674,10 +676,10 @@ class Profiler: public base::Thread {
// Ticker used to provide ticks to the profiler and the sliding state
// window.
//
-class Ticker: public Sampler {
+class Ticker: public V8Sampler {
public:
- Ticker(Isolate* isolate, int interval):
- Sampler(isolate, interval),
+ Ticker(Isolate* isolate):
+ V8Sampler(reinterpret_cast<v8::Isolate*>(isolate)),
profiler_(NULL) {}
~Ticker() { if (IsActive()) Stop(); }
@@ -1840,7 +1842,7 @@ bool Logger::SetUp(Isolate* isolate) {
addCodeEventListener(ll_logger_);
}
- ticker_ = new Ticker(isolate, kSamplingIntervalMs);
+ ticker_ = new Ticker(isolate);
if (Log::InitLogAtStart()) {
is_logging_ = true;
@@ -1878,7 +1880,8 @@ void Logger::SetCodeEventHandler(uint32_t options,
}
-Sampler* Logger::sampler() {
+// Sampler* Logger::sampler() {
+V8Sampler* Logger::sampler() {
return ticker_;
}
« no previous file with comments | « src/log.h ('k') | src/profiler/cpu-profiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698