| Index: src/compiler.cc
|
| diff --git a/src/compiler.cc b/src/compiler.cc
|
| index 9c4113d84c26e59f8c2c8c23094924589ffb379a..611c0bdff332cb2f445fdaafb03825ede52e5c51 100755
|
| --- a/src/compiler.cc
|
| +++ b/src/compiler.cc
|
| @@ -217,14 +217,14 @@ static Handle<SharedFunctionInfo> MakeFunctionInfo(bool is_global,
|
| }
|
|
|
| if (script->name()->IsString()) {
|
| - LOG(CodeCreateEvent(is_eval ? Logger::EVAL_TAG : Logger::SCRIPT_TAG,
|
| - *code, String::cast(script->name())));
|
| + PROFILE(CodeCreateEvent(is_eval ? Logger::EVAL_TAG : Logger::SCRIPT_TAG,
|
| + *code, String::cast(script->name())));
|
| OPROFILE(CreateNativeCodeRegion(String::cast(script->name()),
|
| code->instruction_start(),
|
| code->instruction_size()));
|
| } else {
|
| - LOG(CodeCreateEvent(is_eval ? Logger::EVAL_TAG : Logger::SCRIPT_TAG,
|
| - *code, ""));
|
| + PROFILE(CodeCreateEvent(is_eval ? Logger::EVAL_TAG : Logger::SCRIPT_TAG,
|
| + *code, ""));
|
| OPROFILE(CreateNativeCodeRegion(is_eval ? "Eval" : "Script",
|
| code->instruction_start(),
|
| code->instruction_size()));
|
| @@ -585,20 +585,22 @@ void Compiler::RecordFunctionCompilation(Logger::LogEventsAndTags tag,
|
| // Log the code generation. If source information is available
|
| // include script name and line number. Check explicitly whether
|
| // logging is enabled as finding the line number is not free.
|
| - if (Logger::is_logging() || OProfileAgent::is_enabled()) {
|
| + if (Logger::is_logging()
|
| + || OProfileAgent::is_enabled()
|
| + || CpuProfiler::is_profiling()) {
|
| Handle<String> func_name(name->length() > 0 ? *name : *inferred_name);
|
| if (script->name()->IsString()) {
|
| int line_num = GetScriptLineNumber(script, start_position) + 1;
|
| USE(line_num);
|
| - LOG(CodeCreateEvent(tag, *code, *func_name,
|
| - String::cast(script->name()), line_num));
|
| + PROFILE(CodeCreateEvent(tag, *code, *func_name,
|
| + String::cast(script->name()), line_num));
|
| OPROFILE(CreateNativeCodeRegion(*func_name,
|
| String::cast(script->name()),
|
| line_num,
|
| code->instruction_start(),
|
| code->instruction_size()));
|
| } else {
|
| - LOG(CodeCreateEvent(tag, *code, *func_name));
|
| + PROFILE(CodeCreateEvent(tag, *code, *func_name));
|
| OPROFILE(CreateNativeCodeRegion(*func_name,
|
| code->instruction_start(),
|
| code->instruction_size()));
|
|
|