Revision: 4883
Author: [email protected]
Date: Wed Jun 16 12:53:24 2010
Log: Fix issue 738: make compilable with profilingsupport=off

BUG=738
[email protected]

Review URL: http://codereview.chromium.org/2800009
http://code.google.com/p/v8/source/detail?r=4883

Modified:
 /branches/bleeding_edge/src/heap-profiler.cc
 /branches/bleeding_edge/src/heap-profiler.h
 /branches/bleeding_edge/src/stub-cache.cc

=======================================
--- /branches/bleeding_edge/src/heap-profiler.cc        Tue Jun 15 04:44:07 2010
+++ /branches/bleeding_edge/src/heap-profiler.cc        Wed Jun 16 12:53:24 2010
@@ -326,20 +326,27 @@
   delete snapshots_;
 }

+#endif  // ENABLE_LOGGING_AND_PROFILING

 void HeapProfiler::Setup() {
+#ifdef ENABLE_LOGGING_AND_PROFILING
   if (singleton_ == NULL) {
     singleton_ = new HeapProfiler();
   }
+#endif
 }


 void HeapProfiler::TearDown() {
+#ifdef ENABLE_LOGGING_AND_PROFILING
   delete singleton_;
   singleton_ = NULL;
+#endif
 }


+#ifdef ENABLE_LOGGING_AND_PROFILING
+
 HeapSnapshot* HeapProfiler::TakeSnapshot(const char* name) {
   ASSERT(singleton_ != NULL);
   return singleton_->TakeSnapshotImpl(name);
=======================================
--- /branches/bleeding_edge/src/heap-profiler.h Tue Jun 15 04:44:07 2010
+++ /branches/bleeding_edge/src/heap-profiler.h Wed Jun 16 12:53:24 2010
@@ -38,12 +38,16 @@
 class HeapSnapshot;
 class HeapSnapshotsCollection;

+#endif
+
// The HeapProfiler writes data to the log files, which can be postprocessed
 // to generate .hp files for use by the GHC/Valgrind tool hp2ps.
 class HeapProfiler {
  public:
   static void Setup();
   static void TearDown();
+
+#ifdef ENABLE_LOGGING_AND_PROFILING
   static HeapSnapshot* TakeSnapshot(const char* name);
   static HeapSnapshot* TakeSnapshot(String* name);
   static int GetSnapshotsCount();
@@ -68,9 +72,12 @@
   unsigned next_snapshot_uid_;

   static HeapProfiler* singleton_;
+#endif  // ENABLE_LOGGING_AND_PROFILING
 };


+#ifdef ENABLE_LOGGING_AND_PROFILING
+
 // JSObjectsCluster describes a group of JS objects that are
 // considered equivalent in terms of a particular profile.
 class JSObjectsCluster BASE_EMBEDDED {
=======================================
--- /branches/bleeding_edge/src/stub-cache.cc   Mon Jun 14 03:10:42 2010
+++ /branches/bleeding_edge/src/stub-cache.cc   Wed Jun 16 12:53:24 2010
@@ -1105,6 +1105,7 @@
     Code* code = Code::cast(result);
     USE(code);
     Code::Kind kind = Code::ExtractKindFromFlags(flags);
+    USE(kind);
     PROFILE(CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_DEBUG_BREAK_TAG),
                             code, code->arguments_count()));
   }

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to