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

Unified Diff: src/frames.cc

Issue 8803013: Improve TraceIC logging (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: review feedback Created 9 years 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 | « no previous file | src/ic.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/frames.cc
diff --git a/src/frames.cc b/src/frames.cc
index 9fd00422aa07056df0a8b80a49e422894d3c691f..e3ed2de4e36d5acd4176aa83014e3fbe622a76bb 100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -723,12 +723,17 @@ void JavaScriptFrame::PrintTop(FILE* file,
JavaScriptFrame* frame = it.frame();
if (frame->IsConstructor()) PrintF(file, "new ");
// function name
- Object* fun = frame->function();
- if (fun->IsJSFunction()) {
- SharedFunctionInfo* shared = JSFunction::cast(fun)->shared();
- shared->DebugName()->ShortPrint(file);
+ Object* maybe_fun = frame->function();
+ if (maybe_fun->IsJSFunction()) {
+ JSFunction* fun = JSFunction::cast(maybe_fun);
+ fun->PrintName();
+ Code* js_code = frame->unchecked_code();
+ Address pc = frame->pc();
+ int code_offset =
+ static_cast<int>(pc - js_code->instruction_start());
+ PrintF("+%d", code_offset);
+ SharedFunctionInfo* shared = fun->shared();
if (print_line_number) {
- Address pc = frame->pc();
Code* code = Code::cast(
v8::internal::Isolate::Current()->heap()->FindCodeObject(pc));
int source_pos = code->SourcePosition(pc);
@@ -751,7 +756,7 @@ void JavaScriptFrame::PrintTop(FILE* file,
}
}
} else {
- fun->ShortPrint(file);
+ PrintF("<unknown>");
}
if (print_args) {
« no previous file with comments | « no previous file | src/ic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698