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

Unified Diff: src/log.cc

Issue 22897021: Add source map support to tick processor. (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Added copyright & fixed nits Created 7 years, 4 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/log.h ('k') | tools/SourceMap.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/log.cc
diff --git a/src/log.cc b/src/log.cc
index a1e5a6752b1b733135e3f7c3deddacf4a38a5e35..ab8c711db96433b8a526995c739a04d57022e0d9 100644
--- a/src/log.cc
+++ b/src/log.cc
@@ -1233,7 +1233,7 @@ void Logger::CodeCreateEvent(LogEventsAndTags tag,
Code* code,
SharedFunctionInfo* shared,
CompilationInfo* info,
- Name* source, int line) {
+ Name* source, int line, int column) {
PROFILER_LOG(CodeCreateEvent(tag, code, shared, info, source, line));
if (!is_logging_code_events()) return;
@@ -1252,7 +1252,7 @@ void Logger::CodeCreateEvent(LogEventsAndTags tag,
} else {
msg.AppendSymbolName(Symbol::cast(source));
}
- msg.Append(":%d\",", line);
+ msg.Append(":%d:%d\",", line, column);
msg.AppendAddress(shared->address());
msg.Append(",%s", ComputeMarker(code));
msg.Append('\n');
@@ -1712,6 +1712,8 @@ void Logger::LogExistingFunction(Handle<SharedFunctionInfo> shared,
if (shared->script()->IsScript()) {
Handle<Script> script(Script::cast(shared->script()));
int line_num = GetScriptLineNumber(script, shared->start_position()) + 1;
+ int column_num =
+ GetScriptColumnNumber(script, shared->start_position()) + 1;
if (script->name()->IsString()) {
Handle<String> script_name(String::cast(script->name()));
if (line_num > 0) {
@@ -1719,7 +1721,7 @@ void Logger::LogExistingFunction(Handle<SharedFunctionInfo> shared,
CodeCreateEvent(
Logger::ToNativeByScript(Logger::LAZY_COMPILE_TAG, *script),
*code, *shared, NULL,
- *script_name, line_num));
+ *script_name, line_num, column_num));
} else {
// Can't distinguish eval and script here, so always use Script.
PROFILE(isolate_,
@@ -1732,7 +1734,7 @@ void Logger::LogExistingFunction(Handle<SharedFunctionInfo> shared,
CodeCreateEvent(
Logger::ToNativeByScript(Logger::LAZY_COMPILE_TAG, *script),
*code, *shared, NULL,
- isolate_->heap()->empty_string(), line_num));
+ isolate_->heap()->empty_string(), line_num, column_num));
}
} else if (shared->IsApiFunction()) {
// API function.
« no previous file with comments | « src/log.h ('k') | tools/SourceMap.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698