Revision: 8113
Author: [email protected]
Date: Mon May 30 07:33:23 2011
Log: Fix building with profilingsupport=off
Using profilingsupport=off is not recommended as it will turn off
crankshaft. With this change it will build though.
[email protected]
BUG=none
TEST=none
Review URL: http://codereview.chromium.org//7085025
http://code.google.com/p/v8/source/detail?r=8113
Modified:
/branches/bleeding_edge/src/SConscript
/branches/bleeding_edge/src/api.cc
/branches/bleeding_edge/src/heap.cc
/branches/bleeding_edge/src/isolate.cc
/branches/bleeding_edge/src/log.cc
=======================================
--- /branches/bleeding_edge/src/SConscript Tue May 24 05:16:23 2011
+++ /branches/bleeding_edge/src/SConscript Mon May 30 07:33:23 2011
@@ -311,7 +311,10 @@
env.Replace(**context.flags['v8'])
context.ApplyEnvOverrides(env)
env['BUILDERS']['JS2C'] = Builder(action=js2c.JS2C)
- env['BUILDERS']['Snapshot'] = Builder(action='$SOURCE $TARGET
--logfile "$LOGFILE" --log-snapshot-positions')
+ if 'ENABLE_LOGGING_AND_PROFILING' in env['CPPDEFINES']:
+ env['BUILDERS']['Snapshot'] = Builder(action='$SOURCE $TARGET
--logfile "$LOGFILE" --log-snapshot-positions')
+ else:
+ env['BUILDERS']['Snapshot'] = Builder(action='$SOURCE $TARGET')
# Build the standard platform-independent source files.
source_files = context.GetRelevantSources(SOURCES)
=======================================
--- /branches/bleeding_edge/src/api.cc Thu May 19 04:47:34 2011
+++ /branches/bleeding_edge/src/api.cc Mon May 30 07:33:23 2011
@@ -925,6 +925,7 @@
int TypeSwitch::match(v8::Handle<Value> value) {
i::Isolate* isolate = i::Isolate::Current();
LOG_API(isolate, "TypeSwitch::match");
+ USE(isolate);
i::Handle<i::Object> obj = Utils::OpenHandle(*value);
i::Handle<i::TypeSwitchInfo> info = Utils::OpenHandle(this);
i::FixedArray* types = i::FixedArray::cast(info->types());
@@ -3392,6 +3393,7 @@
void Function::SetName(v8::Handle<v8::String> name) {
i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
ENTER_V8(isolate);
+ USE(isolate);
i::Handle<i::JSFunction> func = Utils::OpenHandle(this);
func->shared()->set_name(*Utils::OpenHandle(*name));
}
=======================================
--- /branches/bleeding_edge/src/heap.cc Mon May 30 06:49:22 2011
+++ /branches/bleeding_edge/src/heap.cc Mon May 30 07:33:23 2011
@@ -1528,6 +1528,7 @@
void Heap::SwitchScavengingVisitorsTableIfProfilingWasEnabled() {
+#ifdef ENABLE_LOGGING_AND_PROFILING
if (scavenging_visitors_table_mode_ == LOGGING_AND_PROFILING_ENABLED) {
// Table was already updated by some isolate.
return;
@@ -1553,6 +1554,7 @@
Release_Store(&scavenging_visitors_table_mode_,
LOGGING_AND_PROFILING_ENABLED);
}
+#endif
}
=======================================
--- /branches/bleeding_edge/src/isolate.cc Wed May 18 16:26:38 2011
+++ /branches/bleeding_edge/src/isolate.cc Mon May 30 07:33:23 2011
@@ -1279,9 +1279,11 @@
char* Isolate::ArchiveThread(char* to) {
+#ifdef ENABLE_LOGGING_AND_PROFILING
if (RuntimeProfiler::IsEnabled() && current_vm_state() == JS) {
RuntimeProfiler::IsolateExitedJS(this);
}
+#endif
memcpy(to, reinterpret_cast<char*>(thread_local_top()),
sizeof(ThreadLocalTop));
InitializeThreadLocal();
@@ -1301,9 +1303,11 @@
thread_local_top()->simulator_ = Simulator::current(this);
#endif
#endif
+#ifdef ENABLE_LOGGING_AND_PROFILING
if (RuntimeProfiler::IsEnabled() && current_vm_state() == JS) {
RuntimeProfiler::IsolateEnteredJS(this);
}
+#endif
return from + sizeof(ThreadLocalTop);
}
=======================================
--- /branches/bleeding_edge/src/log.cc Tue May 24 05:20:16 2011
+++ /branches/bleeding_edge/src/log.cc Mon May 30 07:33:23 2011
@@ -1878,7 +1878,11 @@
Sampler* Logger::sampler() {
+#ifdef ENABLE_LOGGING_AND_PROFILING
return ticker_;
+#else
+ return NULL;
+#endif
}
@@ -1955,8 +1959,10 @@
static void ComputeCpuProfiling(Sampler* sampler, void* flag_ptr) {
+#ifdef ENABLE_LOGGING_AND_PROFILING
bool* flag = reinterpret_cast<bool*>(flag_ptr);
*flag |= sampler->IsProfiling();
+#endif
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev