Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e9ca789f authored by Joe Onorato's avatar Joe Onorato Committed by android-build-merger
Browse files

Merge "Add stack traces to logs about mismatched sequenece numbers in procstats." into nyc-dev

am: 9b87cc2b

* commit '9b87cc2b':
  Add stack traces to logs about mismatched sequenece numbers in procstats.

Change-Id: Ia932b31cc3d05c4224d933d85193ca6f62d0cc8b
parents 168f4185 9b87cc2b
Loading
Loading
Loading
Loading
+12 −8
Original line number Diff line number Diff line
@@ -377,7 +377,9 @@ public class SparseMappingTable {
            // since we were created or reset.
            if (mSequence == UNINITIALIZED_SEQUENCE) {
                logOrThrow("mSequence == UNINITIALIZED_SEQUENCE in"
                        + " SparseMappingTable.Table.  mParent.mSequence=" + mParent.mSequence);
                        + " SparseMappingTable.Table.  -- "
                        + dumpInternalState());
                return;
            }

            // Assert that our sequence number matches mParent's.  If it isn't that means
@@ -387,10 +389,12 @@ public class SparseMappingTable {
                    logOrThrow("Sequence mismatch. SparseMappingTable.resetTable()"
                            + " called but not Table.resetTable() -- "
                            + dumpInternalState());
                    return;
                } else if (mSequence > mParent.mSequence) {
                    logOrThrow("Sequence mismatch. Table.resetTable()"
                            + " called but not SparseMappingTable.resetTable() -- "
                            + dumpInternalState());
                    return;
                }
            }
        }
@@ -611,7 +615,7 @@ public class SparseMappingTable {
     * this is a debug build.)
     */
    private static void logOrThrow(String message) {
        logOrThrow(message, null);
        logOrThrow(message, new RuntimeException("Stack trace"));
    }

    /**