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

Unified Diff: src/compiler.cc

Issue 1582004: C++ profiles processor: wire up to VM. (Closed)
Patch Set: Created 10 years, 9 months 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/codegen.cc ('k') | src/cpu-profiler.h » ('j') | src/platform-linux.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()));
« no previous file with comments | « src/codegen.cc ('k') | src/cpu-profiler.h » ('j') | src/platform-linux.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698