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

Unified Diff: src/objects.cc

Issue 1920873003: Include file names in trace-opt/trace-deopt output (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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/flag-definitions.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 86bdc7cbb268078db55c5e019a891e5a1f1cc659..3f3e8ce93cc19d5938c0cfd4388a8f34fb1b5b7b 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -1921,6 +1921,18 @@ void JSObject::JSObjectShortPrint(StringStream* accumulator) {
if (!printed) {
accumulator->Add("<JS Function");
}
+ if (FLAG_trace_file_names) {
+ Object* source_name =
+ Script::cast(function->shared()->script())->name();
+ if (source_name->IsString()) {
+ String* str = String::cast(source_name);
+ if (str->length() > 0) {
+ accumulator->Add(" <");
+ accumulator->Put(str);
+ accumulator->Add(">");
+ }
+ }
+ }
accumulator->Add(" (SharedFunctionInfo %p)",
reinterpret_cast<void*>(function->shared()));
accumulator->Put('>');
« no previous file with comments | « src/flag-definitions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698