Commit 9dc99e9c authored by hpayer's avatar hpayer Committed by Commit bot

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

BUG=

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

Cr-Commit-Position: refs/heads/master@{#28373}
parent 09ecf6ce
......@@ -723,6 +723,8 @@ int Deoptimizer::GetOutputInfo(DeoptimizationOutputData* data,
<< "[method: " << shared->DebugName()->ToCString().get() << "]\n"
<< "[source:\n" << SourceCodeOf(shared) << "\n]" << std::endl;
shared->GetHeap()->isolate()->PushStackTraceAndDie(0xfefefefe, data, shared,
0xfefefeff);
FATAL("unable to find pc offset during deoptimization");
return -1;
}
......
......@@ -280,9 +280,7 @@ Handle<String> Isolate::StackTraceString() {
}
void Isolate::PushStackTraceAndDie(unsigned int magic,
Object* object,
Map* map,
void Isolate::PushStackTraceAndDie(unsigned int magic, void* ptr1, void* ptr2,
unsigned int magic2) {
const int kMaxStackTraceSize = 32 * KB;
Handle<String> trace = StackTraceString();
......@@ -291,9 +289,8 @@ void Isolate::PushStackTraceAndDie(unsigned int magic,
String::WriteToFlat(*trace, buffer, 0, length);
buffer[length] = '\0';
// TODO(dcarney): convert buffer to utf8?
base::OS::PrintError("Stacktrace (%x-%x) %p %p: %s\n", magic, magic2,
static_cast<void*>(object), static_cast<void*>(map),
reinterpret_cast<char*>(buffer));
base::OS::PrintError("Stacktrace (%x-%x) %p %p: %s\n", magic, magic2, ptr1,
ptr2, reinterpret_cast<char*>(buffer));
base::OS::Abort();
}
......
......@@ -718,10 +718,8 @@ class Isolate {
PrintStackMode mode = kPrintStackVerbose);
void PrintStack(FILE* out, PrintStackMode mode = kPrintStackVerbose);
Handle<String> StackTraceString();
NO_INLINE(void PushStackTraceAndDie(unsigned int magic,
Object* object,
Map* map,
unsigned int magic2));
NO_INLINE(void PushStackTraceAndDie(unsigned int magic, void* ptr1,
void* ptr2, unsigned int magic2));
Handle<JSArray> CaptureCurrentStackTrace(
int frame_limit,
StackTrace::StackTraceOptions options);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment