Get more debugging data when crashing in Deoptimizer::GetOutputInfo.

BUG=

Review URL: https://codereview.chromium.org/1138493004

Cr-Commit-Position: refs/heads/master@{#28373}
This commit is contained in:
hpayer 2015-05-12 08:48:04 -07:00 committed by Commit bot
parent 09ecf6cef7
commit 9dc99e9cc8
3 changed files with 7 additions and 10 deletions

View File

@ -723,6 +723,8 @@ int Deoptimizer::GetOutputInfo(DeoptimizationOutputData* data,
<< "[method: " << shared->DebugName()->ToCString().get() << "]\n" << "[method: " << shared->DebugName()->ToCString().get() << "]\n"
<< "[source:\n" << SourceCodeOf(shared) << "\n]" << std::endl; << "[source:\n" << SourceCodeOf(shared) << "\n]" << std::endl;
shared->GetHeap()->isolate()->PushStackTraceAndDie(0xfefefefe, data, shared,
0xfefefeff);
FATAL("unable to find pc offset during deoptimization"); FATAL("unable to find pc offset during deoptimization");
return -1; return -1;
} }

View File

@ -280,9 +280,7 @@ Handle<String> Isolate::StackTraceString() {
} }
void Isolate::PushStackTraceAndDie(unsigned int magic, void Isolate::PushStackTraceAndDie(unsigned int magic, void* ptr1, void* ptr2,
Object* object,
Map* map,
unsigned int magic2) { unsigned int magic2) {
const int kMaxStackTraceSize = 32 * KB; const int kMaxStackTraceSize = 32 * KB;
Handle<String> trace = StackTraceString(); Handle<String> trace = StackTraceString();
@ -291,9 +289,8 @@ void Isolate::PushStackTraceAndDie(unsigned int magic,
String::WriteToFlat(*trace, buffer, 0, length); String::WriteToFlat(*trace, buffer, 0, length);
buffer[length] = '\0'; buffer[length] = '\0';
// TODO(dcarney): convert buffer to utf8? // TODO(dcarney): convert buffer to utf8?
base::OS::PrintError("Stacktrace (%x-%x) %p %p: %s\n", magic, magic2, base::OS::PrintError("Stacktrace (%x-%x) %p %p: %s\n", magic, magic2, ptr1,
static_cast<void*>(object), static_cast<void*>(map), ptr2, reinterpret_cast<char*>(buffer));
reinterpret_cast<char*>(buffer));
base::OS::Abort(); base::OS::Abort();
} }

View File

@ -718,10 +718,8 @@ class Isolate {
PrintStackMode mode = kPrintStackVerbose); PrintStackMode mode = kPrintStackVerbose);
void PrintStack(FILE* out, PrintStackMode mode = kPrintStackVerbose); void PrintStack(FILE* out, PrintStackMode mode = kPrintStackVerbose);
Handle<String> StackTraceString(); Handle<String> StackTraceString();
NO_INLINE(void PushStackTraceAndDie(unsigned int magic, NO_INLINE(void PushStackTraceAndDie(unsigned int magic, void* ptr1,
Object* object, void* ptr2, unsigned int magic2));
Map* map,
unsigned int magic2));
Handle<JSArray> CaptureCurrentStackTrace( Handle<JSArray> CaptureCurrentStackTrace(
int frame_limit, int frame_limit,
StackTrace::StackTraceOptions options); StackTrace::StackTraceOptions options);