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

Commit 146dcc02 authored by Joe Onorato's avatar Joe Onorato
Browse files

Add stack traces to logs about mismatched sequenece numbers in procstats.

Bug: 27045736
Change-Id: I7a0fc76928a55bb079b8234c5f5d689a401a204b
parent a68fe1e4
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"));
    }

    /**