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

Unified Diff: src/log.h

Issue 1582004: C++ profiles processor: wire up to VM. (Closed)
Patch Set: Created 10 years, 9 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
Index: src/log.h
diff --git a/src/log.h b/src/log.h
index 613a1e26cfb58bf44dc5e809e54330441c2412b4..961b100e6691d4ac8add7ae318ebcdf57061d03a 100644
--- a/src/log.h
+++ b/src/log.h
@@ -87,7 +87,6 @@ class CompressionHelper;
#define LOG(Call) ((void) 0)
#endif
-
class VMState BASE_EMBEDDED {
#ifdef ENABLE_LOGGING_AND_PROFILING
public:
@@ -378,6 +377,8 @@ class Logger {
static int logging_nesting_;
static int cpu_profiler_nesting_;
static int heap_profiler_nesting_;
+
+ friend class CpuProfiler;
#else
static bool is_logging() { return false; }
#endif
@@ -391,6 +392,26 @@ class StackTracer : public AllStatic {
};
+#ifdef ENABLE_CPP_PROFILES_PROCESSOR
+
+class Ticker: public Sampler {
+ public:
+ explicit Ticker(int interval):
+ Sampler(interval, FLAG_prof) {}
+
+ void SampleStack(TickSample* sample) {
+ StackTracer::Trace(sample);
+ }
+ void Tick(TickSample* sample) { }
+ void SetWindow(SlidingStateWindow* window) { }
+ void ClearWindow() { }
+ void SetProfiler(Profiler* profiler) { }
+ void ClearProfiler() { }
+};
+
+#endif // ENABLE_CPP_PROFILES_PROCESSOR
+
} } // namespace v8::internal
+
#endif // V8_LOG_H_
« no previous file with comments | « src/ia32/regexp-macro-assembler-ia32.cc ('k') | src/log.cc » ('j') | src/platform-linux.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698