diff options
| author | 2017-07-06 01:01:36 +0000 | |
|---|---|---|
| committer | 2017-07-06 01:01:36 +0000 | |
| commit | 71bde0dff0159976fdad4b6a45e903a96bd51aca (patch) | |
| tree | b47f72efc2e56af1fb2839495692076521437e0c /compiler | |
| parent | b2bedf41a6ce1204d01a4adf804bc418594af0ee (diff) | |
| parent | 23e81a182fb71693b731ac24b6fc3969b7471473 (diff) | |
Merge "Improve ImageWriter logging."
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/image_writer.cc | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/compiler/image_writer.cc b/compiler/image_writer.cc index 4ff5dd2b8b..1c73dfab37 100644 --- a/compiler/image_writer.cc +++ b/compiler/image_writer.cc @@ -398,12 +398,18 @@ void ImageWriter::SetImageBinSlot(mirror::Object* object, BinSlot bin_slot) { // Before we stomp over the lock word, save the hash code for later. LockWord lw(object->GetLockWord(false)); switch (lw.GetState()) { - case LockWord::kFatLocked: { - LOG(FATAL) << "Fat locked object " << object << " found during object copy"; - break; - } + case LockWord::kFatLocked: + FALLTHROUGH_INTENDED; case LockWord::kThinLocked: { - LOG(FATAL) << "Thin locked object " << object << " found during object copy"; + std::ostringstream oss; + bool thin = (lw.GetState() == LockWord::kThinLocked); + oss << (thin ? "Thin" : "Fat") + << " locked object " << object << "(" << object->PrettyTypeOf() + << ") found during object copy"; + if (thin) { + oss << ". Lock owner:" << lw.ThinLockOwner(); + } + LOG(FATAL) << oss.str(); break; } case LockWord::kUnlocked: |