Index: src/codegen.cc |
diff --git a/src/codegen.cc b/src/codegen.cc |
index fa05ef3b8af2b0db64d8c75bb7a1e42e2fe36702..5bbf050ccabcd29f5c43c78dcee8488376761da1 100644 |
--- a/src/codegen.cc |
+++ b/src/codegen.cc |
@@ -235,7 +235,7 @@ Handle<Code> CodeGenerator::MakeCode(CompilationInfo* info) { |
bool CodeGenerator::ShouldGenerateLog(Expression* type) { |
ASSERT(type != NULL); |
- if (!Logger::is_logging()) return false; |
+ if (!Logger::is_logging() && !CpuProfiler::is_profiling()) return false; |
Handle<String> name = Handle<String>::cast(type->AsLiteral()->handle()); |
if (FLAG_log_regexp) { |
static Vector<const char> kRegexp = CStrVector("regexp"); |