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

Unified Diff: src/cpu-profiler.h

Issue 1514006: C++ profiles processor: put under #ifdef and fix issues. (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/cpu-profiler.h
diff --git a/src/cpu-profiler.h b/src/cpu-profiler.h
index 8a7d2fdd31893a931fea71f8f0e4ea4bde1ab6fc..c7805bd6c64bbe942b94620ffa65f02fae507d95 100644
--- a/src/cpu-profiler.h
+++ b/src/cpu-profiler.h
@@ -34,6 +34,7 @@
namespace v8 {
namespace internal {
+#ifdef ENABLE_CPP_PROFILES_PROCESSOR
#define CODE_EVENTS_TYPE_LIST(V) \
V(CODE_CREATION, CodeCreateEventRecord) \
@@ -101,7 +102,7 @@ class CodeAliasEventRecord : public CodeEventRecord {
};
-class TickSampleEventRecord {
+class TickSampleEventRecord BASE_EMBEDDED {
public:
// In memory, the first machine word of a TickSampleEventRecord will be the
// first entry of TickSample, that is -- a program counter field.
@@ -110,18 +111,12 @@ class TickSampleEventRecord {
TickSample sample;
unsigned order;
-#if defined(__GNUC__) && (__GNUC__ < 4)
- // Added to avoid 'all member functions in class are private' warning.
- INLINE(unsigned get_order() const) { return order; }
- // Added to avoid 'class only defines private constructors and
- // has no friends' warning.
- friend class TickSampleEventRecordFriend;
-#endif
- private:
- // Disable instantiation.
- TickSampleEventRecord();
+ static TickSampleEventRecord* cast(void* value) {
+ return reinterpret_cast<TickSampleEventRecord*>(value);
+ }
- DISALLOW_COPY_AND_ASSIGN(TickSampleEventRecord);
+ private:
+ DISALLOW_IMPLICIT_CONSTRUCTORS(TickSampleEventRecord);
};
@@ -179,6 +174,7 @@ class ProfilerEventsProcessor : public Thread {
unsigned enqueue_order_;
};
+#endif // ENABLE_CPP_PROFILES_PROCESSOR
} } // namespace v8::internal

Powered by Google App Engine
This is Rietveld 408576698