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

Unified Diff: src/top.cc

Issue 5890003: Make V8 compilable with profiling support turned off. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 10 years 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/runtime-profiler.cc ('k') | tools/test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/top.cc
diff --git a/src/top.cc b/src/top.cc
index 6187ef0a1d1f368948fed8ecc4f5327f26f4b1fc..f093af6c38405faaf9a437d897b5e49a5f9ecb37 100644
--- a/src/top.cc
+++ b/src/top.cc
@@ -40,7 +40,9 @@
namespace v8 {
namespace internal {
+#ifdef ENABLE_LOGGING_AND_PROFILING
Semaphore* Top::runtime_profiler_semaphore_ = NULL;
+#endif
ThreadLocalTop Top::thread_local_;
Mutex* Top::break_access_ = OS::CreateMutex();
@@ -277,9 +279,11 @@ static bool initialized = false;
void Top::Initialize() {
CHECK(!initialized);
+#ifdef ENABLE_LOGGING_AND_PROFILING
ASSERT(runtime_profiler_semaphore_ == NULL);
runtime_profiler_semaphore_ = OS::CreateSemaphore(0);
-
+#endif
+
InitializeThreadLocal();
// Only preallocate on the first initialization.
@@ -297,9 +301,11 @@ void Top::Initialize() {
void Top::TearDown() {
if (initialized) {
+#ifdef ENABLE_LOGGING_AND_PROFILING
delete runtime_profiler_semaphore_;
runtime_profiler_semaphore_ = NULL;
-
+#endif
+
// Remove the external reference to the preallocated stack memory.
if (preallocated_message_space != NULL) {
delete preallocated_message_space;
« no previous file with comments | « src/runtime-profiler.cc ('k') | tools/test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698