Class Storage


  • public final class Storage
    extends java.lang.Object
    Storage is responsible for storing and returning recorded marks. This is a low level class and not intended for use by users. Instead, the TraceEventWriter and TraceEventViewer classes provide easier to use APIs for accessing PerfMark data.

    This code is NOT API stable, and may be removed in the future, or changed without notice.

    • Method Detail

      • getInitNanoTime

        public static long getInitNanoTime()
      • read

        public static java.util.List<MarkList> read()
        Returns a list of MarkLists across all reachable threads.
        Returns:
        all reachable MarkLists.
      • clearLocalStorage

        public static void clearLocalStorage()
        Removes all data for the calling Thread. Other threads may Still have stored data.
      • clearGlobalIndex

        public static void clearGlobalIndex()
        Removes the global Read index on all storage, but leaves local storage in place. Because writer threads may still be writing to the same buffer (which they have a strong ref to), this function only removed data that is truly unwritable anymore. In addition, it captures a timestamp to which marks to include when reading. Thus, the data isn't fully removed. To fully remove all data, each tracing thread must call clearLocalStorage().
      • readForTest

        @Nullable
        public static MarkList readForTest()