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

Commit 9b87cc2b authored by Joe Onorato's avatar Joe Onorato Committed by Android (Google) Code Review
Browse files

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

parents bad02b0e 146dcc02
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"));
    }

    /**