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

Unified Diff: src/profiler/cpu-profiler.h

Issue 2040683002: Remove dependencies of V8 on cpu-profiler is_profiling. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: use macro for declaring is_profiling Created 4 years, 6 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.cc ('k') | src/profiler/cpu-profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/profiler/cpu-profiler.h
diff --git a/src/profiler/cpu-profiler.h b/src/profiler/cpu-profiler.h
index 4261c367e0ed42768205f3cd0d5ebc0c6676dca4..aa9f0504771431b7440e9f3d0d5001e15cc42ad0 100644
--- a/src/profiler/cpu-profiler.h
+++ b/src/profiler/cpu-profiler.h
@@ -180,18 +180,15 @@ class ProfilerEventsProcessor : public base::Thread {
unsigned last_processed_code_event_id_;
};
-
-#define PROFILE(IsolateGetter, Call) \
- do { \
- Isolate* cpu_profiler_isolate = (IsolateGetter); \
- v8::internal::Logger* logger = cpu_profiler_isolate->logger(); \
- CpuProfiler* cpu_profiler = cpu_profiler_isolate->cpu_profiler(); \
- if (logger->is_logging_code_events() || cpu_profiler->is_profiling()) { \
- logger->Call; \
- } \
+#define PROFILE(IsolateGetter, Call) \
+ do { \
+ Isolate* the_isolate = (IsolateGetter); \
+ v8::internal::Logger* logger = the_isolate->logger(); \
+ if (logger->is_logging_code_events() || the_isolate->is_profiling()) { \
+ logger->Call; \
+ } \
} while (false)
-
class CpuProfiler : public CodeEventListener {
public:
explicit CpuProfiler(Isolate* isolate);
@@ -242,10 +239,7 @@ class CpuProfiler : public CodeEventListener {
void SetterCallbackEvent(Name* name, Address entry_point) override;
void SharedFunctionInfoMoveEvent(Address from, Address to) override {}
- INLINE(bool is_profiling() const) { return is_profiling_; }
- bool* is_profiling_address() {
- return &is_profiling_;
- }
+ bool is_profiling() const { return is_profiling_; }
ProfileGenerator* generator() const { return generator_; }
ProfilerEventsProcessor* processor() const { return processor_; }
« no previous file with comments | « src/log.cc ('k') | src/profiler/cpu-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698