| File: | root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp |
| Warning: | line 3868, column 9 Method called on moved-from object 'bsv' |
Press '?' to see keyboard shortcuts
Keyboard shortcuts:
| 1 | /* This Source Code Form is subject to the terms of the Mozilla Public | |||
| 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this file, | |||
| 3 | * You can obtain one at http://mozilla.org/MPL/2.0/. */ | |||
| 4 | ||||
| 5 | #include "mozilla/Attributes.h" | |||
| 6 | #include "mozilla/BaseAndGeckoProfilerDetail.h" | |||
| 7 | #include "mozilla/BaseProfileJSONWriter.h" | |||
| 8 | #include "mozilla/BaseProfiler.h" | |||
| 9 | #include "mozilla/BaseProfilerDetail.h" | |||
| 10 | #include "mozilla/FailureLatch.h" | |||
| 11 | #include "mozilla/NotNull.h" | |||
| 12 | #include "mozilla/ProgressLogger.h" | |||
| 13 | #include "mozilla/ProportionValue.h" | |||
| 14 | ||||
| 15 | #include "mozilla/BaseProfilerMarkerTypes.h" | |||
| 16 | #include "mozilla/leb128iterator.h" | |||
| 17 | #include "mozilla/ModuloBuffer.h" | |||
| 18 | #include "mozilla/mozalloc.h" | |||
| 19 | #include "mozilla/PowerOfTwo.h" | |||
| 20 | #include "mozilla/ProfileBufferChunk.h" | |||
| 21 | #include "mozilla/ProfileBufferChunkManagerSingle.h" | |||
| 22 | #include "mozilla/ProfileBufferChunkManagerWithLocalLimit.h" | |||
| 23 | #include "mozilla/ProfileBufferControlledChunkManager.h" | |||
| 24 | #include "mozilla/ProfileChunkedBuffer.h" | |||
| 25 | #include "mozilla/Vector.h" | |||
| 26 | ||||
| 27 | #if defined(_MSC_VER) || defined(__MINGW32__) | |||
| 28 | # include <windows.h> | |||
| 29 | # include <mmsystem.h> | |||
| 30 | # include <process.h> | |||
| 31 | #else | |||
| 32 | # include <errno(*__errno_location ()).h> | |||
| 33 | # include <time.h> | |||
| 34 | #endif | |||
| 35 | ||||
| 36 | #include <algorithm> | |||
| 37 | #include <atomic> | |||
| 38 | #include <iostream> | |||
| 39 | #include <random> | |||
| 40 | #include <thread> | |||
| 41 | #include <type_traits> | |||
| 42 | #include <utility> | |||
| 43 | ||||
| 44 | void TestFailureLatch() { | |||
| 45 | printf("TestFailureLatch...\n"); | |||
| 46 | ||||
| 47 | // Test infallible latch. | |||
| 48 | { | |||
| 49 | mozilla::FailureLatchInfallibleSource& infallibleLatch = | |||
| 50 | mozilla::FailureLatchInfallibleSource::Singleton(); | |||
| 51 | ||||
| 52 | MOZ_RELEASE_ASSERT(!infallibleLatch.Fallible())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!infallibleLatch.Fallible())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!infallibleLatch.Fallible()) )), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!infallibleLatch.Fallible()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 52 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!infallibleLatch.Fallible()" ")"); do { MOZ_CrashSequence(__null, 52); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 53 | MOZ_RELEASE_ASSERT(!infallibleLatch.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!infallibleLatch.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!infallibleLatch.Failed()))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("!infallibleLatch.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 53 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!infallibleLatch.Failed()" ")"); do { MOZ_CrashSequence(__null, 53); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 54 | MOZ_RELEASE_ASSERT(!infallibleLatch.GetFailure())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!infallibleLatch.GetFailure())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!infallibleLatch.GetFailure( )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!infallibleLatch.GetFailure()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 54); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!infallibleLatch.GetFailure()" ")"); do { MOZ_CrashSequence(__null, 54); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 55 | MOZ_RELEASE_ASSERT(&infallibleLatch.SourceFailureLatch() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(&infallibleLatch.SourceFailureLatch() == &mozilla ::FailureLatchInfallibleSource::Singleton())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(&infallibleLatch.SourceFailureLatch () == &mozilla::FailureLatchInfallibleSource::Singleton() ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "&infallibleLatch.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 56 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&infallibleLatch.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" ")"); do { MOZ_CrashSequence(__null, 56); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 56 | &mozilla::FailureLatchInfallibleSource::Singleton())do { static_assert( mozilla::detail::AssertionConditionType< decltype(&infallibleLatch.SourceFailureLatch() == &mozilla ::FailureLatchInfallibleSource::Singleton())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(&infallibleLatch.SourceFailureLatch () == &mozilla::FailureLatchInfallibleSource::Singleton() ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "&infallibleLatch.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 56 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&infallibleLatch.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" ")"); do { MOZ_CrashSequence(__null, 56); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 57 | MOZ_RELEASE_ASSERT(&std::as_const(infallibleLatch).SourceFailureLatch() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(&std::as_const(infallibleLatch).SourceFailureLatch () == &mozilla::FailureLatchInfallibleSource::Singleton() )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(&std::as_const(infallibleLatch).SourceFailureLatch () == &mozilla::FailureLatchInfallibleSource::Singleton() ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "&std::as_const(infallibleLatch).SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 58 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&std::as_const(infallibleLatch).SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" ")"); do { MOZ_CrashSequence(__null, 58); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 58 | &mozilla::FailureLatchInfallibleSource::Singleton())do { static_assert( mozilla::detail::AssertionConditionType< decltype(&std::as_const(infallibleLatch).SourceFailureLatch () == &mozilla::FailureLatchInfallibleSource::Singleton() )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(&std::as_const(infallibleLatch).SourceFailureLatch () == &mozilla::FailureLatchInfallibleSource::Singleton() ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "&std::as_const(infallibleLatch).SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 58 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&std::as_const(infallibleLatch).SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" ")"); do { MOZ_CrashSequence(__null, 58); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 59 | } | |||
| 60 | ||||
| 61 | // Test failure latch basic functions. | |||
| 62 | { | |||
| 63 | mozilla::FailureLatchSource failureLatch; | |||
| 64 | ||||
| 65 | MOZ_RELEASE_ASSERT(failureLatch.Fallible())do { static_assert( mozilla::detail::AssertionConditionType< decltype(failureLatch.Fallible())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(failureLatch.Fallible()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("failureLatch.Fallible()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 65 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "failureLatch.Fallible()" ")"); do { MOZ_CrashSequence(__null, 65); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 66 | MOZ_RELEASE_ASSERT(!failureLatch.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!failureLatch.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!failureLatch.Failed()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("!failureLatch.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 66 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!failureLatch.Failed()" ")"); do { MOZ_CrashSequence(__null, 66); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 67 | MOZ_RELEASE_ASSERT(!failureLatch.GetFailure())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!failureLatch.GetFailure())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!failureLatch.GetFailure())) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!failureLatch.GetFailure()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 67 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!failureLatch.GetFailure()" ")"); do { MOZ_CrashSequence(__null, 67); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 68 | MOZ_RELEASE_ASSERT(&failureLatch.SourceFailureLatch() == &failureLatch)do { static_assert( mozilla::detail::AssertionConditionType< decltype(&failureLatch.SourceFailureLatch() == &failureLatch )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(&failureLatch.SourceFailureLatch() == &failureLatch ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "&failureLatch.SourceFailureLatch() == &failureLatch" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 68 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&failureLatch.SourceFailureLatch() == &failureLatch" ")"); do { MOZ_CrashSequence(__null, 68); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 69 | MOZ_RELEASE_ASSERT(&std::as_const(failureLatch).SourceFailureLatch() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(&std::as_const(failureLatch).SourceFailureLatch( ) == &failureLatch)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(&std::as_const(failureLatch ).SourceFailureLatch() == &failureLatch))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("&std::as_const(failureLatch).SourceFailureLatch() == &failureLatch" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 70 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&std::as_const(failureLatch).SourceFailureLatch() == &failureLatch" ")"); do { MOZ_CrashSequence(__null, 70); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 70 | &failureLatch)do { static_assert( mozilla::detail::AssertionConditionType< decltype(&std::as_const(failureLatch).SourceFailureLatch( ) == &failureLatch)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(&std::as_const(failureLatch ).SourceFailureLatch() == &failureLatch))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("&std::as_const(failureLatch).SourceFailureLatch() == &failureLatch" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 70 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&std::as_const(failureLatch).SourceFailureLatch() == &failureLatch" ")"); do { MOZ_CrashSequence(__null, 70); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 71 | ||||
| 72 | failureLatch.SetFailure("error"); | |||
| 73 | ||||
| 74 | MOZ_RELEASE_ASSERT(failureLatch.Fallible())do { static_assert( mozilla::detail::AssertionConditionType< decltype(failureLatch.Fallible())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(failureLatch.Fallible()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("failureLatch.Fallible()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 74 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "failureLatch.Fallible()" ")"); do { MOZ_CrashSequence(__null, 74); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 75 | MOZ_RELEASE_ASSERT(failureLatch.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(failureLatch.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(failureLatch.Failed()))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("failureLatch.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 75 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "failureLatch.Failed()" ")"); do { MOZ_CrashSequence(__null, 75); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 76 | MOZ_RELEASE_ASSERT(failureLatch.GetFailure())do { static_assert( mozilla::detail::AssertionConditionType< decltype(failureLatch.GetFailure())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(failureLatch.GetFailure()))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("failureLatch.GetFailure()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 76 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "failureLatch.GetFailure()" ")"); do { MOZ_CrashSequence(__null, 76); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 77 | MOZ_RELEASE_ASSERT(strcmp(failureLatch.GetFailure(), "error") == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(strcmp(failureLatch.GetFailure(), "error") == 0)> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(strcmp(failureLatch.GetFailure(), "error") == 0))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("strcmp(failureLatch.GetFailure(), \"error\") == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 77 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "strcmp(failureLatch.GetFailure(), \"error\") == 0" ")"); do { MOZ_CrashSequence(__null, 77); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 78 | ||||
| 79 | failureLatch.SetFailure("later error"); | |||
| 80 | ||||
| 81 | MOZ_RELEASE_ASSERT(failureLatch.Fallible())do { static_assert( mozilla::detail::AssertionConditionType< decltype(failureLatch.Fallible())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(failureLatch.Fallible()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("failureLatch.Fallible()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 81 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "failureLatch.Fallible()" ")"); do { MOZ_CrashSequence(__null, 81); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 82 | MOZ_RELEASE_ASSERT(failureLatch.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(failureLatch.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(failureLatch.Failed()))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("failureLatch.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 82 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "failureLatch.Failed()" ")"); do { MOZ_CrashSequence(__null, 82); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 83 | MOZ_RELEASE_ASSERT(failureLatch.GetFailure())do { static_assert( mozilla::detail::AssertionConditionType< decltype(failureLatch.GetFailure())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(failureLatch.GetFailure()))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("failureLatch.GetFailure()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 83 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "failureLatch.GetFailure()" ")"); do { MOZ_CrashSequence(__null, 83); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 84 | MOZ_RELEASE_ASSERT(strcmp(failureLatch.GetFailure(), "error") == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(strcmp(failureLatch.GetFailure(), "error") == 0)> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(strcmp(failureLatch.GetFailure(), "error") == 0))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("strcmp(failureLatch.GetFailure(), \"error\") == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 84 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "strcmp(failureLatch.GetFailure(), \"error\") == 0" ")"); do { MOZ_CrashSequence(__null, 84); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 85 | } | |||
| 86 | ||||
| 87 | // Test SetFailureFrom. | |||
| 88 | { | |||
| 89 | mozilla::FailureLatchSource failureLatch; | |||
| 90 | ||||
| 91 | MOZ_RELEASE_ASSERT(!failureLatch.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!failureLatch.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!failureLatch.Failed()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("!failureLatch.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 91 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!failureLatch.Failed()" ")"); do { MOZ_CrashSequence(__null, 91); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 92 | failureLatch.SetFailureFrom(failureLatch); | |||
| 93 | MOZ_RELEASE_ASSERT(!failureLatch.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!failureLatch.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!failureLatch.Failed()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("!failureLatch.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 93 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!failureLatch.Failed()" ")"); do { MOZ_CrashSequence(__null, 93); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 94 | MOZ_RELEASE_ASSERT(!failureLatch.GetFailure())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!failureLatch.GetFailure())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!failureLatch.GetFailure())) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!failureLatch.GetFailure()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 94 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!failureLatch.GetFailure()" ")"); do { MOZ_CrashSequence(__null, 94); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 95 | ||||
| 96 | // SetFailureFrom with no error. | |||
| 97 | { | |||
| 98 | mozilla::FailureLatchSource failureLatchInnerOk; | |||
| 99 | MOZ_RELEASE_ASSERT(!failureLatchInnerOk.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!failureLatchInnerOk.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!failureLatchInnerOk.Failed( )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!failureLatchInnerOk.Failed()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 99); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!failureLatchInnerOk.Failed()" ")"); do { MOZ_CrashSequence(__null, 99); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 100 | MOZ_RELEASE_ASSERT(!failureLatchInnerOk.GetFailure())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!failureLatchInnerOk.GetFailure())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!failureLatchInnerOk.GetFailure ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!failureLatchInnerOk.GetFailure()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 100); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!failureLatchInnerOk.GetFailure()" ")"); do { MOZ_CrashSequence(__null, 100); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 101 | ||||
| 102 | MOZ_RELEASE_ASSERT(!failureLatch.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!failureLatch.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!failureLatch.Failed()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("!failureLatch.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 102 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!failureLatch.Failed()" ")"); do { MOZ_CrashSequence(__null, 102); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 103 | failureLatch.SetFailureFrom(failureLatchInnerOk); | |||
| 104 | MOZ_RELEASE_ASSERT(!failureLatch.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!failureLatch.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!failureLatch.Failed()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("!failureLatch.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 104 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!failureLatch.Failed()" ")"); do { MOZ_CrashSequence(__null, 104); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 105 | ||||
| 106 | MOZ_RELEASE_ASSERT(!failureLatchInnerOk.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!failureLatchInnerOk.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!failureLatchInnerOk.Failed( )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!failureLatchInnerOk.Failed()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 106); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!failureLatchInnerOk.Failed()" ")"); do { MOZ_CrashSequence(__null, 106); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 107 | MOZ_RELEASE_ASSERT(!failureLatchInnerOk.GetFailure())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!failureLatchInnerOk.GetFailure())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!failureLatchInnerOk.GetFailure ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!failureLatchInnerOk.GetFailure()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 107); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!failureLatchInnerOk.GetFailure()" ")"); do { MOZ_CrashSequence(__null, 107); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 108 | } | |||
| 109 | MOZ_RELEASE_ASSERT(!failureLatch.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!failureLatch.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!failureLatch.Failed()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("!failureLatch.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 109 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!failureLatch.Failed()" ")"); do { MOZ_CrashSequence(__null, 109); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 110 | MOZ_RELEASE_ASSERT(!failureLatch.GetFailure())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!failureLatch.GetFailure())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!failureLatch.GetFailure())) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!failureLatch.GetFailure()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 110 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!failureLatch.GetFailure()" ")"); do { MOZ_CrashSequence(__null, 110); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 111 | ||||
| 112 | // SetFailureFrom with error. | |||
| 113 | { | |||
| 114 | mozilla::FailureLatchSource failureLatchInnerError; | |||
| 115 | MOZ_RELEASE_ASSERT(!failureLatchInnerError.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!failureLatchInnerError.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!failureLatchInnerError.Failed ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!failureLatchInnerError.Failed()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 115); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!failureLatchInnerError.Failed()" ")"); do { MOZ_CrashSequence(__null, 115); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 116 | MOZ_RELEASE_ASSERT(!failureLatchInnerError.GetFailure())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!failureLatchInnerError.GetFailure())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!failureLatchInnerError.GetFailure ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!failureLatchInnerError.GetFailure()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 116); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!failureLatchInnerError.GetFailure()" ")"); do { MOZ_CrashSequence(__null, 116); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 117 | ||||
| 118 | failureLatchInnerError.SetFailure("inner error"); | |||
| 119 | MOZ_RELEASE_ASSERT(failureLatchInnerError.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(failureLatchInnerError.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(failureLatchInnerError.Failed ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("failureLatchInnerError.Failed()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 119); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "failureLatchInnerError.Failed()" ")"); do { MOZ_CrashSequence(__null, 119); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 120 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(strcmp(failureLatchInnerError.GetFailure(), "inner error" ) == 0)>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(strcmp(failureLatchInnerError.GetFailure(), "inner error" ) == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("strcmp(failureLatchInnerError.GetFailure(), \"inner error\") == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 121 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "strcmp(failureLatchInnerError.GetFailure(), \"inner error\") == 0" ")"); do { MOZ_CrashSequence(__null, 121); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 121 | strcmp(failureLatchInnerError.GetFailure(), "inner error") == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(strcmp(failureLatchInnerError.GetFailure(), "inner error" ) == 0)>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(strcmp(failureLatchInnerError.GetFailure(), "inner error" ) == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("strcmp(failureLatchInnerError.GetFailure(), \"inner error\") == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 121 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "strcmp(failureLatchInnerError.GetFailure(), \"inner error\") == 0" ")"); do { MOZ_CrashSequence(__null, 121); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 122 | ||||
| 123 | MOZ_RELEASE_ASSERT(!failureLatch.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!failureLatch.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!failureLatch.Failed()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("!failureLatch.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 123 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!failureLatch.Failed()" ")"); do { MOZ_CrashSequence(__null, 123); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 124 | failureLatch.SetFailureFrom(failureLatchInnerError); | |||
| 125 | MOZ_RELEASE_ASSERT(failureLatch.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(failureLatch.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(failureLatch.Failed()))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("failureLatch.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 125 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "failureLatch.Failed()" ")"); do { MOZ_CrashSequence(__null, 125); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 126 | ||||
| 127 | MOZ_RELEASE_ASSERT(failureLatchInnerError.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(failureLatchInnerError.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(failureLatchInnerError.Failed ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("failureLatchInnerError.Failed()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 127); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "failureLatchInnerError.Failed()" ")"); do { MOZ_CrashSequence(__null, 127); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 128 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(strcmp(failureLatchInnerError.GetFailure(), "inner error" ) == 0)>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(strcmp(failureLatchInnerError.GetFailure(), "inner error" ) == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("strcmp(failureLatchInnerError.GetFailure(), \"inner error\") == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 129 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "strcmp(failureLatchInnerError.GetFailure(), \"inner error\") == 0" ")"); do { MOZ_CrashSequence(__null, 129); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 129 | strcmp(failureLatchInnerError.GetFailure(), "inner error") == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(strcmp(failureLatchInnerError.GetFailure(), "inner error" ) == 0)>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(strcmp(failureLatchInnerError.GetFailure(), "inner error" ) == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("strcmp(failureLatchInnerError.GetFailure(), \"inner error\") == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 129 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "strcmp(failureLatchInnerError.GetFailure(), \"inner error\") == 0" ")"); do { MOZ_CrashSequence(__null, 129); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 130 | } | |||
| 131 | MOZ_RELEASE_ASSERT(failureLatch.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(failureLatch.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(failureLatch.Failed()))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("failureLatch.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 131 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "failureLatch.Failed()" ")"); do { MOZ_CrashSequence(__null, 131); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 132 | MOZ_RELEASE_ASSERT(strcmp(failureLatch.GetFailure(), "inner error") == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(strcmp(failureLatch.GetFailure(), "inner error") == 0 )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(strcmp(failureLatch.GetFailure(), "inner error") == 0 ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "strcmp(failureLatch.GetFailure(), \"inner error\") == 0", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 132); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "strcmp(failureLatch.GetFailure(), \"inner error\") == 0" ")"); do { MOZ_CrashSequence(__null, 132); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 133 | ||||
| 134 | failureLatch.SetFailureFrom(failureLatch); | |||
| 135 | MOZ_RELEASE_ASSERT(failureLatch.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(failureLatch.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(failureLatch.Failed()))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("failureLatch.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 135 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "failureLatch.Failed()" ")"); do { MOZ_CrashSequence(__null, 135); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 136 | MOZ_RELEASE_ASSERT(strcmp(failureLatch.GetFailure(), "inner error") == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(strcmp(failureLatch.GetFailure(), "inner error") == 0 )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(strcmp(failureLatch.GetFailure(), "inner error") == 0 ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "strcmp(failureLatch.GetFailure(), \"inner error\") == 0", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 136); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "strcmp(failureLatch.GetFailure(), \"inner error\") == 0" ")"); do { MOZ_CrashSequence(__null, 136); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 137 | ||||
| 138 | // SetFailureFrom with error again, ignored. | |||
| 139 | { | |||
| 140 | mozilla::FailureLatchSource failureLatchInnerError; | |||
| 141 | failureLatchInnerError.SetFailure("later inner error"); | |||
| 142 | MOZ_RELEASE_ASSERT(failureLatchInnerError.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(failureLatchInnerError.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(failureLatchInnerError.Failed ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("failureLatchInnerError.Failed()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 142); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "failureLatchInnerError.Failed()" ")"); do { MOZ_CrashSequence(__null, 142); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 143 | MOZ_RELEASE_ASSERT(strcmp(failureLatchInnerError.GetFailure(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(strcmp(failureLatchInnerError.GetFailure(), "later inner error" ) == 0)>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(strcmp(failureLatchInnerError.GetFailure(), "later inner error" ) == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("strcmp(failureLatchInnerError.GetFailure(), \"later inner error\") == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 144 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "strcmp(failureLatchInnerError.GetFailure(), \"later inner error\") == 0" ")"); do { MOZ_CrashSequence(__null, 144); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 144 | "later inner error") == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(strcmp(failureLatchInnerError.GetFailure(), "later inner error" ) == 0)>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(strcmp(failureLatchInnerError.GetFailure(), "later inner error" ) == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("strcmp(failureLatchInnerError.GetFailure(), \"later inner error\") == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 144 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "strcmp(failureLatchInnerError.GetFailure(), \"later inner error\") == 0" ")"); do { MOZ_CrashSequence(__null, 144); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 145 | ||||
| 146 | MOZ_RELEASE_ASSERT(failureLatch.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(failureLatch.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(failureLatch.Failed()))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("failureLatch.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 146 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "failureLatch.Failed()" ")"); do { MOZ_CrashSequence(__null, 146); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 147 | failureLatch.SetFailureFrom(failureLatchInnerError); | |||
| 148 | MOZ_RELEASE_ASSERT(failureLatch.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(failureLatch.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(failureLatch.Failed()))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("failureLatch.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 148 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "failureLatch.Failed()" ")"); do { MOZ_CrashSequence(__null, 148); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 149 | ||||
| 150 | MOZ_RELEASE_ASSERT(failureLatchInnerError.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(failureLatchInnerError.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(failureLatchInnerError.Failed ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("failureLatchInnerError.Failed()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 150); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "failureLatchInnerError.Failed()" ")"); do { MOZ_CrashSequence(__null, 150); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 151 | MOZ_RELEASE_ASSERT(strcmp(failureLatchInnerError.GetFailure(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(strcmp(failureLatchInnerError.GetFailure(), "later inner error" ) == 0)>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(strcmp(failureLatchInnerError.GetFailure(), "later inner error" ) == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("strcmp(failureLatchInnerError.GetFailure(), \"later inner error\") == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 152 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "strcmp(failureLatchInnerError.GetFailure(), \"later inner error\") == 0" ")"); do { MOZ_CrashSequence(__null, 152); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 152 | "later inner error") == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(strcmp(failureLatchInnerError.GetFailure(), "later inner error" ) == 0)>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(strcmp(failureLatchInnerError.GetFailure(), "later inner error" ) == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("strcmp(failureLatchInnerError.GetFailure(), \"later inner error\") == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 152 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "strcmp(failureLatchInnerError.GetFailure(), \"later inner error\") == 0" ")"); do { MOZ_CrashSequence(__null, 152); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 153 | } | |||
| 154 | MOZ_RELEASE_ASSERT(failureLatch.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(failureLatch.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(failureLatch.Failed()))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("failureLatch.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 154 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "failureLatch.Failed()" ")"); do { MOZ_CrashSequence(__null, 154); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 155 | MOZ_RELEASE_ASSERT(strcmp(failureLatch.GetFailure(), "inner error") == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(strcmp(failureLatch.GetFailure(), "inner error") == 0 )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(strcmp(failureLatch.GetFailure(), "inner error") == 0 ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "strcmp(failureLatch.GetFailure(), \"inner error\") == 0", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 155); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "strcmp(failureLatch.GetFailure(), \"inner error\") == 0" ")"); do { MOZ_CrashSequence(__null, 155); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 156 | } | |||
| 157 | ||||
| 158 | // Test FAILURELATCH_IMPL_PROXY | |||
| 159 | { | |||
| 160 | class Proxy final : public mozilla::FailureLatch { | |||
| 161 | public: | |||
| 162 | explicit Proxy(mozilla::FailureLatch& aFailureLatch) | |||
| 163 | : mFailureLatch(WrapNotNull(&aFailureLatch)) {} | |||
| 164 | ||||
| 165 | void Set(mozilla::FailureLatch& aFailureLatch) { | |||
| 166 | mFailureLatch = WrapNotNull(&aFailureLatch); | |||
| 167 | } | |||
| 168 | ||||
| 169 | FAILURELATCH_IMPL_PROXY(*mFailureLatch)[[nodiscard]] bool Fallible() const final { return static_cast <const ::mozilla::FailureLatch&>(*mFailureLatch) .Fallible (); } void SetFailure(std::string aReason) final { static_cast <::mozilla::FailureLatch&>(*mFailureLatch) .SetFailure (std::move(aReason)); } [[nodiscard]] bool Failed() const final { return static_cast<const ::mozilla::FailureLatch&> (*mFailureLatch) .Failed(); } [[nodiscard]] const char* GetFailure () const final { return static_cast<const ::mozilla::FailureLatch &>(*mFailureLatch) .GetFailure(); } [[nodiscard]] const FailureLatch& SourceFailureLatch() const final { return static_cast <const ::mozilla::FailureLatch&>(*mFailureLatch) .SourceFailureLatch (); } [[nodiscard]] FailureLatch& SourceFailureLatch() final { return static_cast<::mozilla::FailureLatch&>(*mFailureLatch ) .SourceFailureLatch(); } | |||
| 170 | ||||
| 171 | private: | |||
| 172 | mozilla::NotNull<mozilla::FailureLatch*> mFailureLatch; | |||
| 173 | }; | |||
| 174 | ||||
| 175 | Proxy proxy{mozilla::FailureLatchInfallibleSource::Singleton()}; | |||
| 176 | ||||
| 177 | MOZ_RELEASE_ASSERT(!proxy.Fallible())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!proxy.Fallible())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!proxy.Fallible()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!proxy.Fallible()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 177 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!proxy.Fallible()" ")"); do { MOZ_CrashSequence(__null, 177); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 178 | MOZ_RELEASE_ASSERT(!proxy.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!proxy.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!proxy.Failed()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!proxy.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 178 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!proxy.Failed()" ")"); do { MOZ_CrashSequence(__null, 178); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 179 | MOZ_RELEASE_ASSERT(!proxy.GetFailure())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!proxy.GetFailure())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!proxy.GetFailure()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!proxy.GetFailure()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 179 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!proxy.GetFailure()" ")"); do { MOZ_CrashSequence(__null, 179); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 180 | MOZ_RELEASE_ASSERT(&proxy.SourceFailureLatch() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(&proxy.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource ::Singleton())>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(&proxy.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("&proxy.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 181 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&proxy.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" ")"); do { MOZ_CrashSequence(__null, 181); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 181 | &mozilla::FailureLatchInfallibleSource::Singleton())do { static_assert( mozilla::detail::AssertionConditionType< decltype(&proxy.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource ::Singleton())>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(&proxy.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("&proxy.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 181 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&proxy.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" ")"); do { MOZ_CrashSequence(__null, 181); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 182 | MOZ_RELEASE_ASSERT(&std::as_const(proxy).SourceFailureLatch() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(&std::as_const(proxy).SourceFailureLatch() == & mozilla::FailureLatchInfallibleSource::Singleton())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(&std::as_const(proxy).SourceFailureLatch() == &mozilla ::FailureLatchInfallibleSource::Singleton()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("&std::as_const(proxy).SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 183 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&std::as_const(proxy).SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" ")"); do { MOZ_CrashSequence(__null, 183); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 183 | &mozilla::FailureLatchInfallibleSource::Singleton())do { static_assert( mozilla::detail::AssertionConditionType< decltype(&std::as_const(proxy).SourceFailureLatch() == & mozilla::FailureLatchInfallibleSource::Singleton())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(&std::as_const(proxy).SourceFailureLatch() == &mozilla ::FailureLatchInfallibleSource::Singleton()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("&std::as_const(proxy).SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 183 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&std::as_const(proxy).SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" ")"); do { MOZ_CrashSequence(__null, 183); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 184 | ||||
| 185 | // Error from proxy. | |||
| 186 | { | |||
| 187 | mozilla::FailureLatchSource failureLatch; | |||
| 188 | proxy.Set(failureLatch); | |||
| 189 | MOZ_RELEASE_ASSERT(proxy.Fallible())do { static_assert( mozilla::detail::AssertionConditionType< decltype(proxy.Fallible())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(proxy.Fallible()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("proxy.Fallible()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 189 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "proxy.Fallible()" ")"); do { MOZ_CrashSequence(__null, 189); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 190 | MOZ_RELEASE_ASSERT(!proxy.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!proxy.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!proxy.Failed()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!proxy.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 190 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!proxy.Failed()" ")"); do { MOZ_CrashSequence(__null, 190); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 191 | MOZ_RELEASE_ASSERT(!proxy.GetFailure())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!proxy.GetFailure())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!proxy.GetFailure()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!proxy.GetFailure()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 191 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!proxy.GetFailure()" ")"); do { MOZ_CrashSequence(__null, 191); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 192 | MOZ_RELEASE_ASSERT(&proxy.SourceFailureLatch() == &failureLatch)do { static_assert( mozilla::detail::AssertionConditionType< decltype(&proxy.SourceFailureLatch() == &failureLatch )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(&proxy.SourceFailureLatch() == &failureLatch ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "&proxy.SourceFailureLatch() == &failureLatch", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 192); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&proxy.SourceFailureLatch() == &failureLatch" ")"); do { MOZ_CrashSequence(__null, 192); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 193 | MOZ_RELEASE_ASSERT(&std::as_const(proxy).SourceFailureLatch() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(&std::as_const(proxy).SourceFailureLatch() == & failureLatch)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(&std::as_const(proxy).SourceFailureLatch () == &failureLatch))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("&std::as_const(proxy).SourceFailureLatch() == &failureLatch" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 194 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&std::as_const(proxy).SourceFailureLatch() == &failureLatch" ")"); do { MOZ_CrashSequence(__null, 194); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 194 | &failureLatch)do { static_assert( mozilla::detail::AssertionConditionType< decltype(&std::as_const(proxy).SourceFailureLatch() == & failureLatch)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(&std::as_const(proxy).SourceFailureLatch () == &failureLatch))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("&std::as_const(proxy).SourceFailureLatch() == &failureLatch" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 194 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&std::as_const(proxy).SourceFailureLatch() == &failureLatch" ")"); do { MOZ_CrashSequence(__null, 194); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 195 | ||||
| 196 | proxy.SetFailure("error"); | |||
| 197 | MOZ_RELEASE_ASSERT(proxy.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(proxy.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(proxy.Failed()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("proxy.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 197 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "proxy.Failed()" ")"); do { MOZ_CrashSequence(__null, 197); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 198 | MOZ_RELEASE_ASSERT(strcmp(proxy.GetFailure(), "error") == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(strcmp(proxy.GetFailure(), "error") == 0)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(strcmp(proxy.GetFailure(), "error") == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("strcmp(proxy.GetFailure(), \"error\") == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 198 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "strcmp(proxy.GetFailure(), \"error\") == 0" ")"); do { MOZ_CrashSequence(__null, 198); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 199 | MOZ_RELEASE_ASSERT(failureLatch.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(failureLatch.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(failureLatch.Failed()))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("failureLatch.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 199 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "failureLatch.Failed()" ")"); do { MOZ_CrashSequence(__null, 199); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 200 | MOZ_RELEASE_ASSERT(strcmp(failureLatch.GetFailure(), "error") == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(strcmp(failureLatch.GetFailure(), "error") == 0)> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(strcmp(failureLatch.GetFailure(), "error") == 0))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("strcmp(failureLatch.GetFailure(), \"error\") == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 200 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "strcmp(failureLatch.GetFailure(), \"error\") == 0" ")"); do { MOZ_CrashSequence(__null, 200); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 201 | ||||
| 202 | // Don't forget to stop pointing at soon-to-be-destroyed object. | |||
| 203 | proxy.Set(mozilla::FailureLatchInfallibleSource::Singleton()); | |||
| 204 | } | |||
| 205 | ||||
| 206 | // Error from proxy's origin. | |||
| 207 | { | |||
| 208 | mozilla::FailureLatchSource failureLatch; | |||
| 209 | proxy.Set(failureLatch); | |||
| 210 | MOZ_RELEASE_ASSERT(proxy.Fallible())do { static_assert( mozilla::detail::AssertionConditionType< decltype(proxy.Fallible())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(proxy.Fallible()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("proxy.Fallible()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 210 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "proxy.Fallible()" ")"); do { MOZ_CrashSequence(__null, 210); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 211 | MOZ_RELEASE_ASSERT(!proxy.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!proxy.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!proxy.Failed()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!proxy.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 211 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!proxy.Failed()" ")"); do { MOZ_CrashSequence(__null, 211); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 212 | MOZ_RELEASE_ASSERT(!proxy.GetFailure())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!proxy.GetFailure())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!proxy.GetFailure()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!proxy.GetFailure()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 212 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!proxy.GetFailure()" ")"); do { MOZ_CrashSequence(__null, 212); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 213 | MOZ_RELEASE_ASSERT(&proxy.SourceFailureLatch() == &failureLatch)do { static_assert( mozilla::detail::AssertionConditionType< decltype(&proxy.SourceFailureLatch() == &failureLatch )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(&proxy.SourceFailureLatch() == &failureLatch ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "&proxy.SourceFailureLatch() == &failureLatch", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 213); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&proxy.SourceFailureLatch() == &failureLatch" ")"); do { MOZ_CrashSequence(__null, 213); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 214 | MOZ_RELEASE_ASSERT(&std::as_const(proxy).SourceFailureLatch() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(&std::as_const(proxy).SourceFailureLatch() == & failureLatch)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(&std::as_const(proxy).SourceFailureLatch () == &failureLatch))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("&std::as_const(proxy).SourceFailureLatch() == &failureLatch" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 215 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&std::as_const(proxy).SourceFailureLatch() == &failureLatch" ")"); do { MOZ_CrashSequence(__null, 215); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 215 | &failureLatch)do { static_assert( mozilla::detail::AssertionConditionType< decltype(&std::as_const(proxy).SourceFailureLatch() == & failureLatch)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(&std::as_const(proxy).SourceFailureLatch () == &failureLatch))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("&std::as_const(proxy).SourceFailureLatch() == &failureLatch" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 215 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&std::as_const(proxy).SourceFailureLatch() == &failureLatch" ")"); do { MOZ_CrashSequence(__null, 215); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 216 | ||||
| 217 | failureLatch.SetFailure("error"); | |||
| 218 | MOZ_RELEASE_ASSERT(proxy.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(proxy.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(proxy.Failed()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("proxy.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 218 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "proxy.Failed()" ")"); do { MOZ_CrashSequence(__null, 218); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 219 | MOZ_RELEASE_ASSERT(strcmp(proxy.GetFailure(), "error") == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(strcmp(proxy.GetFailure(), "error") == 0)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(strcmp(proxy.GetFailure(), "error") == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("strcmp(proxy.GetFailure(), \"error\") == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 219 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "strcmp(proxy.GetFailure(), \"error\") == 0" ")"); do { MOZ_CrashSequence(__null, 219); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 220 | MOZ_RELEASE_ASSERT(failureLatch.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(failureLatch.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(failureLatch.Failed()))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("failureLatch.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 220 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "failureLatch.Failed()" ")"); do { MOZ_CrashSequence(__null, 220); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 221 | MOZ_RELEASE_ASSERT(strcmp(failureLatch.GetFailure(), "error") == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(strcmp(failureLatch.GetFailure(), "error") == 0)> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(strcmp(failureLatch.GetFailure(), "error") == 0))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("strcmp(failureLatch.GetFailure(), \"error\") == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 221 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "strcmp(failureLatch.GetFailure(), \"error\") == 0" ")"); do { MOZ_CrashSequence(__null, 221); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 222 | ||||
| 223 | // Don't forget to stop pointing at soon-to-be-destroyed object. | |||
| 224 | proxy.Set(mozilla::FailureLatchInfallibleSource::Singleton()); | |||
| 225 | } | |||
| 226 | ||||
| 227 | MOZ_RELEASE_ASSERT(!proxy.Fallible())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!proxy.Fallible())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!proxy.Fallible()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!proxy.Fallible()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 227 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!proxy.Fallible()" ")"); do { MOZ_CrashSequence(__null, 227); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 228 | MOZ_RELEASE_ASSERT(!proxy.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!proxy.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!proxy.Failed()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!proxy.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 228 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!proxy.Failed()" ")"); do { MOZ_CrashSequence(__null, 228); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 229 | MOZ_RELEASE_ASSERT(!proxy.GetFailure())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!proxy.GetFailure())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!proxy.GetFailure()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!proxy.GetFailure()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 229 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!proxy.GetFailure()" ")"); do { MOZ_CrashSequence(__null, 229); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 230 | MOZ_RELEASE_ASSERT(&proxy.SourceFailureLatch() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(&proxy.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource ::Singleton())>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(&proxy.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("&proxy.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 231 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&proxy.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" ")"); do { MOZ_CrashSequence(__null, 231); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 231 | &mozilla::FailureLatchInfallibleSource::Singleton())do { static_assert( mozilla::detail::AssertionConditionType< decltype(&proxy.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource ::Singleton())>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(&proxy.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("&proxy.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 231 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&proxy.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" ")"); do { MOZ_CrashSequence(__null, 231); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 232 | MOZ_RELEASE_ASSERT(&std::as_const(proxy).SourceFailureLatch() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(&std::as_const(proxy).SourceFailureLatch() == & mozilla::FailureLatchInfallibleSource::Singleton())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(&std::as_const(proxy).SourceFailureLatch() == &mozilla ::FailureLatchInfallibleSource::Singleton()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("&std::as_const(proxy).SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 233 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&std::as_const(proxy).SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" ")"); do { MOZ_CrashSequence(__null, 233); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 233 | &mozilla::FailureLatchInfallibleSource::Singleton())do { static_assert( mozilla::detail::AssertionConditionType< decltype(&std::as_const(proxy).SourceFailureLatch() == & mozilla::FailureLatchInfallibleSource::Singleton())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(&std::as_const(proxy).SourceFailureLatch() == &mozilla ::FailureLatchInfallibleSource::Singleton()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("&std::as_const(proxy).SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 233 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&std::as_const(proxy).SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" ")"); do { MOZ_CrashSequence(__null, 233); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 234 | } | |||
| 235 | ||||
| 236 | // Test FAILURELATCH_IMPL_PROXY_OR_INFALLIBLE | |||
| 237 | { | |||
| 238 | class ProxyOrNull final : public mozilla::FailureLatch { | |||
| 239 | public: | |||
| 240 | ProxyOrNull() = default; | |||
| 241 | ||||
| 242 | void Set(mozilla::FailureLatch* aFailureLatchOrNull) { | |||
| 243 | mFailureLatchOrNull = aFailureLatchOrNull; | |||
| 244 | } | |||
| 245 | ||||
| 246 | FAILURELATCH_IMPL_PROXY_OR_INFALLIBLE(mFailureLatchOrNull, ProxyOrNull)[[nodiscard]] bool Fallible() const final { return mFailureLatchOrNull ? static_cast<const ::mozilla::FailureLatch*>(mFailureLatchOrNull ) ->Fallible() : false; } void SetFailure(std::string aReason ) final { if (mFailureLatchOrNull) { static_cast<::mozilla ::FailureLatch*>(mFailureLatchOrNull) ->SetFailure(std:: move(aReason)); } else { do { static_assert( mozilla::detail:: AssertionConditionType<decltype(false)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(false))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("false" " (" "SetFailure in infallible " "ProxyOrNull" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 246); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "false" ") (" "SetFailure in infallible " "ProxyOrNull" ")"); do { MOZ_CrashSequence (__null, 246); __attribute__((nomerge)) ::abort(); } while (false ); } } while (false); } } [[nodiscard]] bool Failed() const final { return mFailureLatchOrNull ? static_cast<const ::mozilla ::FailureLatch*>(mFailureLatchOrNull) ->Failed() : false ; } [[nodiscard]] const char* GetFailure() const final { return mFailureLatchOrNull ? static_cast<const ::mozilla::FailureLatch *>(mFailureLatchOrNull) ->GetFailure() : nullptr; } [[nodiscard ]] const FailureLatch& SourceFailureLatch() const final { return mFailureLatchOrNull ? static_cast<const ::mozilla:: FailureLatch*>(mFailureLatchOrNull) ->SourceFailureLatch () : ::mozilla::FailureLatchInfallibleSource::Singleton(); } [ [nodiscard]] FailureLatch& SourceFailureLatch() final { return mFailureLatchOrNull ? static_cast<::mozilla::FailureLatch *>(mFailureLatchOrNull) ->SourceFailureLatch() : ::mozilla ::FailureLatchInfallibleSource::Singleton(); } | |||
| 247 | ||||
| 248 | private: | |||
| 249 | mozilla::FailureLatch* mFailureLatchOrNull = nullptr; | |||
| 250 | }; | |||
| 251 | ||||
| 252 | ProxyOrNull proxy; | |||
| 253 | ||||
| 254 | MOZ_RELEASE_ASSERT(!proxy.Fallible())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!proxy.Fallible())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!proxy.Fallible()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!proxy.Fallible()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 254 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!proxy.Fallible()" ")"); do { MOZ_CrashSequence(__null, 254); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 255 | MOZ_RELEASE_ASSERT(!proxy.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!proxy.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!proxy.Failed()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!proxy.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 255 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!proxy.Failed()" ")"); do { MOZ_CrashSequence(__null, 255); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 256 | MOZ_RELEASE_ASSERT(!proxy.GetFailure())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!proxy.GetFailure())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!proxy.GetFailure()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!proxy.GetFailure()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 256 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!proxy.GetFailure()" ")"); do { MOZ_CrashSequence(__null, 256); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 257 | MOZ_RELEASE_ASSERT(&proxy.SourceFailureLatch() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(&proxy.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource ::Singleton())>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(&proxy.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("&proxy.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 258 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&proxy.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" ")"); do { MOZ_CrashSequence(__null, 258); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 258 | &mozilla::FailureLatchInfallibleSource::Singleton())do { static_assert( mozilla::detail::AssertionConditionType< decltype(&proxy.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource ::Singleton())>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(&proxy.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("&proxy.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 258 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&proxy.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" ")"); do { MOZ_CrashSequence(__null, 258); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 259 | MOZ_RELEASE_ASSERT(&std::as_const(proxy).SourceFailureLatch() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(&std::as_const(proxy).SourceFailureLatch() == & mozilla::FailureLatchInfallibleSource::Singleton())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(&std::as_const(proxy).SourceFailureLatch() == &mozilla ::FailureLatchInfallibleSource::Singleton()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("&std::as_const(proxy).SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 260 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&std::as_const(proxy).SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" ")"); do { MOZ_CrashSequence(__null, 260); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 260 | &mozilla::FailureLatchInfallibleSource::Singleton())do { static_assert( mozilla::detail::AssertionConditionType< decltype(&std::as_const(proxy).SourceFailureLatch() == & mozilla::FailureLatchInfallibleSource::Singleton())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(&std::as_const(proxy).SourceFailureLatch() == &mozilla ::FailureLatchInfallibleSource::Singleton()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("&std::as_const(proxy).SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 260 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&std::as_const(proxy).SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" ")"); do { MOZ_CrashSequence(__null, 260); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 261 | ||||
| 262 | // Error from proxy. | |||
| 263 | { | |||
| 264 | mozilla::FailureLatchSource failureLatch; | |||
| 265 | proxy.Set(&failureLatch); | |||
| 266 | MOZ_RELEASE_ASSERT(proxy.Fallible())do { static_assert( mozilla::detail::AssertionConditionType< decltype(proxy.Fallible())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(proxy.Fallible()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("proxy.Fallible()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 266 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "proxy.Fallible()" ")"); do { MOZ_CrashSequence(__null, 266); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 267 | MOZ_RELEASE_ASSERT(!proxy.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!proxy.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!proxy.Failed()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!proxy.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 267 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!proxy.Failed()" ")"); do { MOZ_CrashSequence(__null, 267); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 268 | MOZ_RELEASE_ASSERT(!proxy.GetFailure())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!proxy.GetFailure())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!proxy.GetFailure()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!proxy.GetFailure()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 268 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!proxy.GetFailure()" ")"); do { MOZ_CrashSequence(__null, 268); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 269 | MOZ_RELEASE_ASSERT(&proxy.SourceFailureLatch() == &failureLatch)do { static_assert( mozilla::detail::AssertionConditionType< decltype(&proxy.SourceFailureLatch() == &failureLatch )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(&proxy.SourceFailureLatch() == &failureLatch ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "&proxy.SourceFailureLatch() == &failureLatch", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 269); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&proxy.SourceFailureLatch() == &failureLatch" ")"); do { MOZ_CrashSequence(__null, 269); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 270 | MOZ_RELEASE_ASSERT(&std::as_const(proxy).SourceFailureLatch() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(&std::as_const(proxy).SourceFailureLatch() == & failureLatch)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(&std::as_const(proxy).SourceFailureLatch () == &failureLatch))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("&std::as_const(proxy).SourceFailureLatch() == &failureLatch" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 271 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&std::as_const(proxy).SourceFailureLatch() == &failureLatch" ")"); do { MOZ_CrashSequence(__null, 271); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 271 | &failureLatch)do { static_assert( mozilla::detail::AssertionConditionType< decltype(&std::as_const(proxy).SourceFailureLatch() == & failureLatch)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(&std::as_const(proxy).SourceFailureLatch () == &failureLatch))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("&std::as_const(proxy).SourceFailureLatch() == &failureLatch" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 271 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&std::as_const(proxy).SourceFailureLatch() == &failureLatch" ")"); do { MOZ_CrashSequence(__null, 271); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 272 | ||||
| 273 | proxy.SetFailure("error"); | |||
| 274 | MOZ_RELEASE_ASSERT(proxy.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(proxy.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(proxy.Failed()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("proxy.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 274 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "proxy.Failed()" ")"); do { MOZ_CrashSequence(__null, 274); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 275 | MOZ_RELEASE_ASSERT(strcmp(proxy.GetFailure(), "error") == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(strcmp(proxy.GetFailure(), "error") == 0)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(strcmp(proxy.GetFailure(), "error") == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("strcmp(proxy.GetFailure(), \"error\") == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 275 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "strcmp(proxy.GetFailure(), \"error\") == 0" ")"); do { MOZ_CrashSequence(__null, 275); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 276 | MOZ_RELEASE_ASSERT(failureLatch.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(failureLatch.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(failureLatch.Failed()))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("failureLatch.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 276 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "failureLatch.Failed()" ")"); do { MOZ_CrashSequence(__null, 276); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 277 | MOZ_RELEASE_ASSERT(strcmp(failureLatch.GetFailure(), "error") == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(strcmp(failureLatch.GetFailure(), "error") == 0)> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(strcmp(failureLatch.GetFailure(), "error") == 0))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("strcmp(failureLatch.GetFailure(), \"error\") == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 277 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "strcmp(failureLatch.GetFailure(), \"error\") == 0" ")"); do { MOZ_CrashSequence(__null, 277); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 278 | ||||
| 279 | // Don't forget to stop pointing at soon-to-be-destroyed object. | |||
| 280 | proxy.Set(nullptr); | |||
| 281 | } | |||
| 282 | ||||
| 283 | // Error from proxy's origin. | |||
| 284 | { | |||
| 285 | mozilla::FailureLatchSource failureLatch; | |||
| 286 | proxy.Set(&failureLatch); | |||
| 287 | MOZ_RELEASE_ASSERT(proxy.Fallible())do { static_assert( mozilla::detail::AssertionConditionType< decltype(proxy.Fallible())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(proxy.Fallible()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("proxy.Fallible()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 287 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "proxy.Fallible()" ")"); do { MOZ_CrashSequence(__null, 287); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 288 | MOZ_RELEASE_ASSERT(!proxy.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!proxy.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!proxy.Failed()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!proxy.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 288 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!proxy.Failed()" ")"); do { MOZ_CrashSequence(__null, 288); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 289 | MOZ_RELEASE_ASSERT(!proxy.GetFailure())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!proxy.GetFailure())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!proxy.GetFailure()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!proxy.GetFailure()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 289 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!proxy.GetFailure()" ")"); do { MOZ_CrashSequence(__null, 289); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 290 | MOZ_RELEASE_ASSERT(&proxy.SourceFailureLatch() == &failureLatch)do { static_assert( mozilla::detail::AssertionConditionType< decltype(&proxy.SourceFailureLatch() == &failureLatch )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(&proxy.SourceFailureLatch() == &failureLatch ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "&proxy.SourceFailureLatch() == &failureLatch", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 290); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&proxy.SourceFailureLatch() == &failureLatch" ")"); do { MOZ_CrashSequence(__null, 290); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 291 | MOZ_RELEASE_ASSERT(&std::as_const(proxy).SourceFailureLatch() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(&std::as_const(proxy).SourceFailureLatch() == & failureLatch)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(&std::as_const(proxy).SourceFailureLatch () == &failureLatch))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("&std::as_const(proxy).SourceFailureLatch() == &failureLatch" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 292 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&std::as_const(proxy).SourceFailureLatch() == &failureLatch" ")"); do { MOZ_CrashSequence(__null, 292); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 292 | &failureLatch)do { static_assert( mozilla::detail::AssertionConditionType< decltype(&std::as_const(proxy).SourceFailureLatch() == & failureLatch)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(&std::as_const(proxy).SourceFailureLatch () == &failureLatch))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("&std::as_const(proxy).SourceFailureLatch() == &failureLatch" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 292 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&std::as_const(proxy).SourceFailureLatch() == &failureLatch" ")"); do { MOZ_CrashSequence(__null, 292); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 293 | ||||
| 294 | failureLatch.SetFailure("error"); | |||
| 295 | MOZ_RELEASE_ASSERT(proxy.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(proxy.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(proxy.Failed()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("proxy.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 295 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "proxy.Failed()" ")"); do { MOZ_CrashSequence(__null, 295); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 296 | MOZ_RELEASE_ASSERT(strcmp(proxy.GetFailure(), "error") == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(strcmp(proxy.GetFailure(), "error") == 0)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(strcmp(proxy.GetFailure(), "error") == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("strcmp(proxy.GetFailure(), \"error\") == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 296 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "strcmp(proxy.GetFailure(), \"error\") == 0" ")"); do { MOZ_CrashSequence(__null, 296); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 297 | MOZ_RELEASE_ASSERT(failureLatch.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(failureLatch.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(failureLatch.Failed()))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("failureLatch.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 297 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "failureLatch.Failed()" ")"); do { MOZ_CrashSequence(__null, 297); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 298 | MOZ_RELEASE_ASSERT(strcmp(failureLatch.GetFailure(), "error") == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(strcmp(failureLatch.GetFailure(), "error") == 0)> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(strcmp(failureLatch.GetFailure(), "error") == 0))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("strcmp(failureLatch.GetFailure(), \"error\") == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 298 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "strcmp(failureLatch.GetFailure(), \"error\") == 0" ")"); do { MOZ_CrashSequence(__null, 298); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 299 | ||||
| 300 | // Don't forget to stop pointing at soon-to-be-destroyed object. | |||
| 301 | proxy.Set(nullptr); | |||
| 302 | } | |||
| 303 | ||||
| 304 | MOZ_RELEASE_ASSERT(!proxy.Fallible())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!proxy.Fallible())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!proxy.Fallible()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!proxy.Fallible()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 304 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!proxy.Fallible()" ")"); do { MOZ_CrashSequence(__null, 304); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 305 | MOZ_RELEASE_ASSERT(!proxy.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!proxy.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!proxy.Failed()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!proxy.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 305 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!proxy.Failed()" ")"); do { MOZ_CrashSequence(__null, 305); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 306 | MOZ_RELEASE_ASSERT(!proxy.GetFailure())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!proxy.GetFailure())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!proxy.GetFailure()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!proxy.GetFailure()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 306 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!proxy.GetFailure()" ")"); do { MOZ_CrashSequence(__null, 306); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 307 | MOZ_RELEASE_ASSERT(&proxy.SourceFailureLatch() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(&proxy.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource ::Singleton())>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(&proxy.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("&proxy.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 308 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&proxy.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" ")"); do { MOZ_CrashSequence(__null, 308); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 308 | &mozilla::FailureLatchInfallibleSource::Singleton())do { static_assert( mozilla::detail::AssertionConditionType< decltype(&proxy.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource ::Singleton())>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(&proxy.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("&proxy.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 308 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&proxy.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" ")"); do { MOZ_CrashSequence(__null, 308); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 309 | MOZ_RELEASE_ASSERT(&std::as_const(proxy).SourceFailureLatch() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(&std::as_const(proxy).SourceFailureLatch() == & mozilla::FailureLatchInfallibleSource::Singleton())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(&std::as_const(proxy).SourceFailureLatch() == &mozilla ::FailureLatchInfallibleSource::Singleton()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("&std::as_const(proxy).SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 310 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&std::as_const(proxy).SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" ")"); do { MOZ_CrashSequence(__null, 310); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 310 | &mozilla::FailureLatchInfallibleSource::Singleton())do { static_assert( mozilla::detail::AssertionConditionType< decltype(&std::as_const(proxy).SourceFailureLatch() == & mozilla::FailureLatchInfallibleSource::Singleton())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(&std::as_const(proxy).SourceFailureLatch() == &mozilla ::FailureLatchInfallibleSource::Singleton()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("&std::as_const(proxy).SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 310 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&std::as_const(proxy).SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" ")"); do { MOZ_CrashSequence(__null, 310); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 311 | } | |||
| 312 | ||||
| 313 | printf("TestFailureLatch done\n"); | |||
| 314 | } | |||
| 315 | ||||
| 316 | void TestProfilerUtils() { | |||
| 317 | printf("TestProfilerUtils...\n"); | |||
| 318 | ||||
| 319 | { | |||
| 320 | using mozilla::baseprofiler::BaseProfilerProcessId; | |||
| 321 | using Number = BaseProfilerProcessId::NumberType; | |||
| 322 | static constexpr Number scMaxNumber = std::numeric_limits<Number>::max(); | |||
| 323 | ||||
| 324 | static_assert( | |||
| 325 | BaseProfilerProcessId{}.ToNumber() == 0, | |||
| 326 | "These tests assume that the unspecified process id number is 0; " | |||
| 327 | "if this fails, please update these tests accordingly"); | |||
| 328 | ||||
| 329 | static_assert(!BaseProfilerProcessId{}.IsSpecified()); | |||
| 330 | static_assert(!BaseProfilerProcessId::FromNumber(0).IsSpecified()); | |||
| 331 | static_assert(BaseProfilerProcessId::FromNumber(1).IsSpecified()); | |||
| 332 | static_assert(BaseProfilerProcessId::FromNumber(123).IsSpecified()); | |||
| 333 | static_assert(BaseProfilerProcessId::FromNumber(scMaxNumber).IsSpecified()); | |||
| 334 | ||||
| 335 | static_assert(BaseProfilerProcessId::FromNumber(Number(1)).ToNumber() == | |||
| 336 | Number(1)); | |||
| 337 | static_assert(BaseProfilerProcessId::FromNumber(Number(123)).ToNumber() == | |||
| 338 | Number(123)); | |||
| 339 | static_assert(BaseProfilerProcessId::FromNumber(scMaxNumber).ToNumber() == | |||
| 340 | scMaxNumber); | |||
| 341 | ||||
| 342 | static_assert(BaseProfilerProcessId{} == BaseProfilerProcessId{}); | |||
| 343 | static_assert(BaseProfilerProcessId::FromNumber(Number(123)) == | |||
| 344 | BaseProfilerProcessId::FromNumber(Number(123))); | |||
| 345 | static_assert(BaseProfilerProcessId{} != | |||
| 346 | BaseProfilerProcessId::FromNumber(Number(123))); | |||
| 347 | static_assert(BaseProfilerProcessId::FromNumber(Number(123)) != | |||
| 348 | BaseProfilerProcessId{}); | |||
| 349 | static_assert(BaseProfilerProcessId::FromNumber(Number(123)) != | |||
| 350 | BaseProfilerProcessId::FromNumber(scMaxNumber)); | |||
| 351 | static_assert(BaseProfilerProcessId::FromNumber(scMaxNumber) != | |||
| 352 | BaseProfilerProcessId::FromNumber(Number(123))); | |||
| 353 | ||||
| 354 | // Verify trivial-copyability by memcpy'ing to&from same-size storage. | |||
| 355 | static_assert(std::is_trivially_copyable_v<BaseProfilerProcessId>); | |||
| 356 | BaseProfilerProcessId pid; | |||
| 357 | MOZ_RELEASE_ASSERT(!pid.IsSpecified())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!pid.IsSpecified())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!pid.IsSpecified()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!pid.IsSpecified()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 357 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!pid.IsSpecified()" ")"); do { MOZ_CrashSequence(__null, 357); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 358 | Number pidStorage; | |||
| 359 | static_assert(sizeof(pidStorage) == sizeof(pid)); | |||
| 360 | // Copy from BaseProfilerProcessId to storage. Note: We cannot assume that | |||
| 361 | // this is equal to what ToNumber() gives us. All we can do is verify that | |||
| 362 | // copying from storage back to BaseProfilerProcessId works as expected. | |||
| 363 | std::memcpy(&pidStorage, &pid, sizeof(pidStorage)); | |||
| 364 | BaseProfilerProcessId pid2 = BaseProfilerProcessId::FromNumber(2); | |||
| 365 | MOZ_RELEASE_ASSERT(pid2.IsSpecified())do { static_assert( mozilla::detail::AssertionConditionType< decltype(pid2.IsSpecified())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(pid2.IsSpecified()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("pid2.IsSpecified()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 365 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "pid2.IsSpecified()" ")"); do { MOZ_CrashSequence(__null, 365); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 366 | std::memcpy(&pid2, &pidStorage, sizeof(pid)); | |||
| 367 | MOZ_RELEASE_ASSERT(!pid2.IsSpecified())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!pid2.IsSpecified())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!pid2.IsSpecified()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!pid2.IsSpecified()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 367 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!pid2.IsSpecified()" ")"); do { MOZ_CrashSequence(__null, 367); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 368 | ||||
| 369 | pid = BaseProfilerProcessId::FromNumber(123); | |||
| 370 | std::memcpy(&pidStorage, &pid, sizeof(pidStorage)); | |||
| 371 | pid2 = BaseProfilerProcessId{}; | |||
| 372 | MOZ_RELEASE_ASSERT(!pid2.IsSpecified())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!pid2.IsSpecified())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!pid2.IsSpecified()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!pid2.IsSpecified()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 372 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!pid2.IsSpecified()" ")"); do { MOZ_CrashSequence(__null, 372); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 373 | std::memcpy(&pid2, &pidStorage, sizeof(pid)); | |||
| 374 | MOZ_RELEASE_ASSERT(pid2.IsSpecified())do { static_assert( mozilla::detail::AssertionConditionType< decltype(pid2.IsSpecified())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(pid2.IsSpecified()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("pid2.IsSpecified()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 374 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "pid2.IsSpecified()" ")"); do { MOZ_CrashSequence(__null, 374); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 375 | MOZ_RELEASE_ASSERT(pid2.ToNumber() == 123)do { static_assert( mozilla::detail::AssertionConditionType< decltype(pid2.ToNumber() == 123)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(pid2.ToNumber() == 123))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("pid2.ToNumber() == 123" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 375 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "pid2.ToNumber() == 123" ")"); do { MOZ_CrashSequence(__null, 375); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 376 | ||||
| 377 | // No conversions to/from numbers. | |||
| 378 | static_assert(!std::is_constructible_v<BaseProfilerProcessId, Number>); | |||
| 379 | static_assert(!std::is_assignable_v<BaseProfilerProcessId, Number>); | |||
| 380 | static_assert(!std::is_constructible_v<Number, BaseProfilerProcessId>); | |||
| 381 | static_assert(!std::is_assignable_v<Number, BaseProfilerProcessId>); | |||
| 382 | ||||
| 383 | static_assert( | |||
| 384 | std::is_same_v< | |||
| 385 | decltype(mozilla::baseprofiler::profiler_current_process_id()), | |||
| 386 | BaseProfilerProcessId>); | |||
| 387 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::profiler_current_process_id() .IsSpecified())>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::profiler_current_process_id ().IsSpecified()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("mozilla::baseprofiler::profiler_current_process_id().IsSpecified()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 388 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::profiler_current_process_id().IsSpecified()" ")"); do { MOZ_CrashSequence(__null, 388); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 388 | mozilla::baseprofiler::profiler_current_process_id().IsSpecified())do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::profiler_current_process_id() .IsSpecified())>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::profiler_current_process_id ().IsSpecified()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("mozilla::baseprofiler::profiler_current_process_id().IsSpecified()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 388 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::profiler_current_process_id().IsSpecified()" ")"); do { MOZ_CrashSequence(__null, 388); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 389 | } | |||
| 390 | ||||
| 391 | { | |||
| 392 | mozilla::baseprofiler::profiler_init_main_thread_id(); | |||
| 393 | ||||
| 394 | using mozilla::baseprofiler::BaseProfilerThreadId; | |||
| 395 | using Number = BaseProfilerThreadId::NumberType; | |||
| 396 | static constexpr Number scMaxNumber = std::numeric_limits<Number>::max(); | |||
| 397 | ||||
| 398 | static_assert( | |||
| 399 | BaseProfilerThreadId{}.ToNumber() == 0, | |||
| 400 | "These tests assume that the unspecified thread id number is 0; " | |||
| 401 | "if this fails, please update these tests accordingly"); | |||
| 402 | ||||
| 403 | static_assert(!BaseProfilerThreadId{}.IsSpecified()); | |||
| 404 | static_assert(!BaseProfilerThreadId::FromNumber(0).IsSpecified()); | |||
| 405 | static_assert(BaseProfilerThreadId::FromNumber(1).IsSpecified()); | |||
| 406 | static_assert(BaseProfilerThreadId::FromNumber(123).IsSpecified()); | |||
| 407 | static_assert(BaseProfilerThreadId::FromNumber(scMaxNumber).IsSpecified()); | |||
| 408 | ||||
| 409 | static_assert(BaseProfilerThreadId::FromNumber(Number(1)).ToNumber() == | |||
| 410 | Number(1)); | |||
| 411 | static_assert(BaseProfilerThreadId::FromNumber(Number(123)).ToNumber() == | |||
| 412 | Number(123)); | |||
| 413 | static_assert(BaseProfilerThreadId::FromNumber(scMaxNumber).ToNumber() == | |||
| 414 | scMaxNumber); | |||
| 415 | ||||
| 416 | static_assert(BaseProfilerThreadId{} == BaseProfilerThreadId{}); | |||
| 417 | static_assert(BaseProfilerThreadId::FromNumber(Number(123)) == | |||
| 418 | BaseProfilerThreadId::FromNumber(Number(123))); | |||
| 419 | static_assert(BaseProfilerThreadId{} != | |||
| 420 | BaseProfilerThreadId::FromNumber(Number(123))); | |||
| 421 | static_assert(BaseProfilerThreadId::FromNumber(Number(123)) != | |||
| 422 | BaseProfilerThreadId{}); | |||
| 423 | static_assert(BaseProfilerThreadId::FromNumber(Number(123)) != | |||
| 424 | BaseProfilerThreadId::FromNumber(scMaxNumber)); | |||
| 425 | static_assert(BaseProfilerThreadId::FromNumber(scMaxNumber) != | |||
| 426 | BaseProfilerThreadId::FromNumber(Number(123))); | |||
| 427 | ||||
| 428 | // Verify trivial-copyability by memcpy'ing to&from same-size storage. | |||
| 429 | static_assert(std::is_trivially_copyable_v<BaseProfilerThreadId>); | |||
| 430 | BaseProfilerThreadId tid; | |||
| 431 | MOZ_RELEASE_ASSERT(!tid.IsSpecified())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!tid.IsSpecified())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!tid.IsSpecified()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!tid.IsSpecified()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 431 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!tid.IsSpecified()" ")"); do { MOZ_CrashSequence(__null, 431); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 432 | Number tidStorage; | |||
| 433 | static_assert(sizeof(tidStorage) == sizeof(tid)); | |||
| 434 | // Copy from BaseProfilerThreadId to storage. Note: We cannot assume that | |||
| 435 | // this is equal to what ToNumber() gives us. All we can do is verify that | |||
| 436 | // copying from storage back to BaseProfilerThreadId works as expected. | |||
| 437 | std::memcpy(&tidStorage, &tid, sizeof(tidStorage)); | |||
| 438 | BaseProfilerThreadId tid2 = BaseProfilerThreadId::FromNumber(2); | |||
| 439 | MOZ_RELEASE_ASSERT(tid2.IsSpecified())do { static_assert( mozilla::detail::AssertionConditionType< decltype(tid2.IsSpecified())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(tid2.IsSpecified()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("tid2.IsSpecified()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 439 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "tid2.IsSpecified()" ")"); do { MOZ_CrashSequence(__null, 439); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 440 | std::memcpy(&tid2, &tidStorage, sizeof(tid)); | |||
| 441 | MOZ_RELEASE_ASSERT(!tid2.IsSpecified())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!tid2.IsSpecified())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!tid2.IsSpecified()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!tid2.IsSpecified()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 441 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!tid2.IsSpecified()" ")"); do { MOZ_CrashSequence(__null, 441); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 442 | ||||
| 443 | tid = BaseProfilerThreadId::FromNumber(Number(123)); | |||
| 444 | std::memcpy(&tidStorage, &tid, sizeof(tidStorage)); | |||
| 445 | tid2 = BaseProfilerThreadId{}; | |||
| 446 | MOZ_RELEASE_ASSERT(!tid2.IsSpecified())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!tid2.IsSpecified())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!tid2.IsSpecified()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!tid2.IsSpecified()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 446 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!tid2.IsSpecified()" ")"); do { MOZ_CrashSequence(__null, 446); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 447 | std::memcpy(&tid2, &tidStorage, sizeof(tid)); | |||
| 448 | MOZ_RELEASE_ASSERT(tid2.IsSpecified())do { static_assert( mozilla::detail::AssertionConditionType< decltype(tid2.IsSpecified())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(tid2.IsSpecified()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("tid2.IsSpecified()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 448 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "tid2.IsSpecified()" ")"); do { MOZ_CrashSequence(__null, 448); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 449 | MOZ_RELEASE_ASSERT(tid2.ToNumber() == Number(123))do { static_assert( mozilla::detail::AssertionConditionType< decltype(tid2.ToNumber() == Number(123))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(tid2.ToNumber() == Number(123 )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("tid2.ToNumber() == Number(123)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 449); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "tid2.ToNumber() == Number(123)" ")"); do { MOZ_CrashSequence(__null, 449); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 450 | ||||
| 451 | // No conversions to/from numbers. | |||
| 452 | static_assert(!std::is_constructible_v<BaseProfilerThreadId, Number>); | |||
| 453 | static_assert(!std::is_assignable_v<BaseProfilerThreadId, Number>); | |||
| 454 | static_assert(!std::is_constructible_v<Number, BaseProfilerThreadId>); | |||
| 455 | static_assert(!std::is_assignable_v<Number, BaseProfilerThreadId>); | |||
| 456 | ||||
| 457 | static_assert(std::is_same_v< | |||
| 458 | decltype(mozilla::baseprofiler::profiler_current_thread_id()), | |||
| 459 | BaseProfilerThreadId>); | |||
| 460 | BaseProfilerThreadId mainTestThreadId = | |||
| 461 | mozilla::baseprofiler::profiler_current_thread_id(); | |||
| 462 | MOZ_RELEASE_ASSERT(mainTestThreadId.IsSpecified())do { static_assert( mozilla::detail::AssertionConditionType< decltype(mainTestThreadId.IsSpecified())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mainTestThreadId.IsSpecified ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("mainTestThreadId.IsSpecified()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 462); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mainTestThreadId.IsSpecified()" ")"); do { MOZ_CrashSequence(__null, 462); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 463 | ||||
| 464 | BaseProfilerThreadId mainThreadId = | |||
| 465 | mozilla::baseprofiler::profiler_main_thread_id(); | |||
| 466 | MOZ_RELEASE_ASSERT(mainThreadId.IsSpecified())do { static_assert( mozilla::detail::AssertionConditionType< decltype(mainThreadId.IsSpecified())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mainThreadId.IsSpecified())) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("mainThreadId.IsSpecified()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 466 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mainThreadId.IsSpecified()" ")"); do { MOZ_CrashSequence(__null, 466); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 467 | ||||
| 468 | MOZ_RELEASE_ASSERT(mainThreadId == mainTestThreadId,do { static_assert( mozilla::detail::AssertionConditionType< decltype(mainThreadId == mainTestThreadId)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mainThreadId == mainTestThreadId ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "mainThreadId == mainTestThreadId" " (" "Test should run on the main thread" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 469); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mainThreadId == mainTestThreadId" ") (" "Test should run on the main thread" ")"); do { MOZ_CrashSequence (__null, 469); __attribute__((nomerge)) ::abort(); } while (false ); } } while (false) | |||
| 469 | "Test should run on the main thread")do { static_assert( mozilla::detail::AssertionConditionType< decltype(mainThreadId == mainTestThreadId)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mainThreadId == mainTestThreadId ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "mainThreadId == mainTestThreadId" " (" "Test should run on the main thread" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 469); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mainThreadId == mainTestThreadId" ") (" "Test should run on the main thread" ")"); do { MOZ_CrashSequence (__null, 469); __attribute__((nomerge)) ::abort(); } while (false ); } } while (false); | |||
| 470 | MOZ_RELEASE_ASSERT(mozilla::baseprofiler::profiler_is_main_thread())do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::profiler_is_main_thread())> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(mozilla::baseprofiler::profiler_is_main_thread()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("mozilla::baseprofiler::profiler_is_main_thread()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 470 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::profiler_is_main_thread()" ")"); do { MOZ_CrashSequence(__null, 470); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 471 | ||||
| 472 | std::thread testThread([&]() { | |||
| 473 | const BaseProfilerThreadId testThreadId = | |||
| 474 | mozilla::baseprofiler::profiler_current_thread_id(); | |||
| 475 | MOZ_RELEASE_ASSERT(testThreadId.IsSpecified())do { static_assert( mozilla::detail::AssertionConditionType< decltype(testThreadId.IsSpecified())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(testThreadId.IsSpecified())) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("testThreadId.IsSpecified()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 475 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "testThreadId.IsSpecified()" ")"); do { MOZ_CrashSequence(__null, 475); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 476 | MOZ_RELEASE_ASSERT(testThreadId != mainThreadId)do { static_assert( mozilla::detail::AssertionConditionType< decltype(testThreadId != mainThreadId)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(testThreadId != mainThreadId ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "testThreadId != mainThreadId", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 476); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "testThreadId != mainThreadId" ")"); do { MOZ_CrashSequence(__null, 476); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 477 | MOZ_RELEASE_ASSERT(!mozilla::baseprofiler::profiler_is_main_thread())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!mozilla::baseprofiler::profiler_is_main_thread())> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(!mozilla::baseprofiler::profiler_is_main_thread()))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("!mozilla::baseprofiler::profiler_is_main_thread()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 477 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!mozilla::baseprofiler::profiler_is_main_thread()" ")"); do { MOZ_CrashSequence(__null, 477); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 478 | }); | |||
| 479 | testThread.join(); | |||
| 480 | } | |||
| 481 | ||||
| 482 | // No conversions between processes and threads. | |||
| 483 | static_assert( | |||
| 484 | !std::is_constructible_v<mozilla::baseprofiler::BaseProfilerThreadId, | |||
| 485 | mozilla::baseprofiler::BaseProfilerProcessId>); | |||
| 486 | static_assert( | |||
| 487 | !std::is_assignable_v<mozilla::baseprofiler::BaseProfilerThreadId, | |||
| 488 | mozilla::baseprofiler::BaseProfilerProcessId>); | |||
| 489 | static_assert( | |||
| 490 | !std::is_constructible_v<mozilla::baseprofiler::BaseProfilerProcessId, | |||
| 491 | mozilla::baseprofiler::BaseProfilerThreadId>); | |||
| 492 | static_assert( | |||
| 493 | !std::is_assignable_v<mozilla::baseprofiler::BaseProfilerProcessId, | |||
| 494 | mozilla::baseprofiler::BaseProfilerThreadId>); | |||
| 495 | ||||
| 496 | printf("TestProfilerUtils done\n"); | |||
| 497 | } | |||
| 498 | ||||
| 499 | void TestBaseAndProfilerDetail() { | |||
| 500 | printf("TestBaseAndProfilerDetail...\n"); | |||
| 501 | ||||
| 502 | { | |||
| 503 | using mozilla::profiler::detail::FilterHasPid; | |||
| 504 | ||||
| 505 | const auto pid123 = | |||
| 506 | mozilla::baseprofiler::BaseProfilerProcessId::FromNumber(123); | |||
| 507 | MOZ_RELEASE_ASSERT(FilterHasPid("pid:123", pid123))do { static_assert( mozilla::detail::AssertionConditionType< decltype(FilterHasPid("pid:123", pid123))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(FilterHasPid("pid:123", pid123 )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("FilterHasPid(\"pid:123\", pid123)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 507); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "FilterHasPid(\"pid:123\", pid123)" ")"); do { MOZ_CrashSequence(__null, 507); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 508 | MOZ_RELEASE_ASSERT(!FilterHasPid("", pid123))do { static_assert( mozilla::detail::AssertionConditionType< decltype(!FilterHasPid("", pid123))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!FilterHasPid("", pid123)))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("!FilterHasPid(\"\", pid123)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 508 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!FilterHasPid(\"\", pid123)" ")"); do { MOZ_CrashSequence(__null, 508); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 509 | MOZ_RELEASE_ASSERT(!FilterHasPid(" ", pid123))do { static_assert( mozilla::detail::AssertionConditionType< decltype(!FilterHasPid(" ", pid123))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!FilterHasPid(" ", pid123))) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!FilterHasPid(\" \", pid123)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 509 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!FilterHasPid(\" \", pid123)" ")"); do { MOZ_CrashSequence(__null, 509); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 510 | MOZ_RELEASE_ASSERT(!FilterHasPid("123", pid123))do { static_assert( mozilla::detail::AssertionConditionType< decltype(!FilterHasPid("123", pid123))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!FilterHasPid("123", pid123) ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "!FilterHasPid(\"123\", pid123)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 510); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!FilterHasPid(\"123\", pid123)" ")"); do { MOZ_CrashSequence(__null, 510); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 511 | MOZ_RELEASE_ASSERT(!FilterHasPid("pid", pid123))do { static_assert( mozilla::detail::AssertionConditionType< decltype(!FilterHasPid("pid", pid123))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!FilterHasPid("pid", pid123) ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "!FilterHasPid(\"pid\", pid123)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 511); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!FilterHasPid(\"pid\", pid123)" ")"); do { MOZ_CrashSequence(__null, 511); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 512 | MOZ_RELEASE_ASSERT(!FilterHasPid("pid:", pid123))do { static_assert( mozilla::detail::AssertionConditionType< decltype(!FilterHasPid("pid:", pid123))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!FilterHasPid("pid:", pid123 )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!FilterHasPid(\"pid:\", pid123)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 512); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!FilterHasPid(\"pid:\", pid123)" ")"); do { MOZ_CrashSequence(__null, 512); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 513 | MOZ_RELEASE_ASSERT(!FilterHasPid("pid=123", pid123))do { static_assert( mozilla::detail::AssertionConditionType< decltype(!FilterHasPid("pid=123", pid123))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!FilterHasPid("pid=123", pid123 )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!FilterHasPid(\"pid=123\", pid123)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 513); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!FilterHasPid(\"pid=123\", pid123)" ")"); do { MOZ_CrashSequence(__null, 513); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 514 | MOZ_RELEASE_ASSERT(!FilterHasPid("pid:123 ", pid123))do { static_assert( mozilla::detail::AssertionConditionType< decltype(!FilterHasPid("pid:123 ", pid123))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!FilterHasPid("pid:123 ", pid123 )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!FilterHasPid(\"pid:123 \", pid123)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 514); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!FilterHasPid(\"pid:123 \", pid123)" ")"); do { MOZ_CrashSequence(__null, 514); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 515 | MOZ_RELEASE_ASSERT(!FilterHasPid("pid: 123", pid123))do { static_assert( mozilla::detail::AssertionConditionType< decltype(!FilterHasPid("pid: 123", pid123))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!FilterHasPid("pid: 123", pid123 )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!FilterHasPid(\"pid: 123\", pid123)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 515); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!FilterHasPid(\"pid: 123\", pid123)" ")"); do { MOZ_CrashSequence(__null, 515); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 516 | MOZ_RELEASE_ASSERT(!FilterHasPid("pid:0123", pid123))do { static_assert( mozilla::detail::AssertionConditionType< decltype(!FilterHasPid("pid:0123", pid123))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!FilterHasPid("pid:0123", pid123 )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!FilterHasPid(\"pid:0123\", pid123)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 516); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!FilterHasPid(\"pid:0123\", pid123)" ")"); do { MOZ_CrashSequence(__null, 516); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 517 | MOZ_RELEASE_ASSERT(!FilterHasPid("pid:0000000000000000000000123", pid123))do { static_assert( mozilla::detail::AssertionConditionType< decltype(!FilterHasPid("pid:0000000000000000000000123", pid123 ))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(!FilterHasPid("pid:0000000000000000000000123", pid123 )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!FilterHasPid(\"pid:0000000000000000000000123\", pid123)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 517); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!FilterHasPid(\"pid:0000000000000000000000123\", pid123)" ")"); do { MOZ_CrashSequence(__null, 517); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 518 | MOZ_RELEASE_ASSERT(!FilterHasPid("pid:12", pid123))do { static_assert( mozilla::detail::AssertionConditionType< decltype(!FilterHasPid("pid:12", pid123))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!FilterHasPid("pid:12", pid123 )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!FilterHasPid(\"pid:12\", pid123)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 518); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!FilterHasPid(\"pid:12\", pid123)" ")"); do { MOZ_CrashSequence(__null, 518); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 519 | MOZ_RELEASE_ASSERT(!FilterHasPid("pid:1234", pid123))do { static_assert( mozilla::detail::AssertionConditionType< decltype(!FilterHasPid("pid:1234", pid123))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!FilterHasPid("pid:1234", pid123 )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!FilterHasPid(\"pid:1234\", pid123)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 519); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!FilterHasPid(\"pid:1234\", pid123)" ")"); do { MOZ_CrashSequence(__null, 519); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 520 | MOZ_RELEASE_ASSERT(!FilterHasPid("pid:0", pid123))do { static_assert( mozilla::detail::AssertionConditionType< decltype(!FilterHasPid("pid:0", pid123))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!FilterHasPid("pid:0", pid123 )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!FilterHasPid(\"pid:0\", pid123)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 520); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!FilterHasPid(\"pid:0\", pid123)" ")"); do { MOZ_CrashSequence(__null, 520); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 521 | ||||
| 522 | using PidNumber = mozilla::baseprofiler::BaseProfilerProcessId::NumberType; | |||
| 523 | const PidNumber maxNumber = std::numeric_limits<PidNumber>::max(); | |||
| 524 | const auto maxPid = | |||
| 525 | mozilla::baseprofiler::BaseProfilerProcessId::FromNumber(maxNumber); | |||
| 526 | const std::string maxPidString = "pid:" + std::to_string(maxNumber); | |||
| 527 | MOZ_RELEASE_ASSERT(FilterHasPid(maxPidString.c_str(), maxPid))do { static_assert( mozilla::detail::AssertionConditionType< decltype(FilterHasPid(maxPidString.c_str(), maxPid))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(FilterHasPid(maxPidString.c_str(), maxPid)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("FilterHasPid(maxPidString.c_str(), maxPid)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 527 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "FilterHasPid(maxPidString.c_str(), maxPid)" ")"); do { MOZ_CrashSequence(__null, 527); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 528 | ||||
| 529 | const std::string tooBigPidString = maxPidString + "0"; | |||
| 530 | MOZ_RELEASE_ASSERT(!FilterHasPid(tooBigPidString.c_str(), maxPid))do { static_assert( mozilla::detail::AssertionConditionType< decltype(!FilterHasPid(tooBigPidString.c_str(), maxPid))>:: isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(!FilterHasPid(tooBigPidString.c_str(), maxPid)))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("!FilterHasPid(tooBigPidString.c_str(), maxPid)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 530 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!FilterHasPid(tooBigPidString.c_str(), maxPid)" ")"); do { MOZ_CrashSequence(__null, 530); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 531 | } | |||
| 532 | ||||
| 533 | { | |||
| 534 | using mozilla::profiler::detail::FiltersExcludePid; | |||
| 535 | const auto pid123 = | |||
| 536 | mozilla::baseprofiler::BaseProfilerProcessId::FromNumber(123); | |||
| 537 | ||||
| 538 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(!FiltersExcludePid(mozilla::Span<const char*>{ }, pid123))>::isValid, "invalid assertion condition"); if ( (__builtin_expect(!!(!(!!(!FiltersExcludePid(mozilla::Span< const char*>{}, pid123)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!FiltersExcludePid(mozilla::Span<const char*>{}, pid123)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 539 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!FiltersExcludePid(mozilla::Span<const char*>{}, pid123)" ")"); do { MOZ_CrashSequence(__null, 539); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 539 | !FiltersExcludePid(mozilla::Span<const char*>{}, pid123))do { static_assert( mozilla::detail::AssertionConditionType< decltype(!FiltersExcludePid(mozilla::Span<const char*>{ }, pid123))>::isValid, "invalid assertion condition"); if ( (__builtin_expect(!!(!(!!(!FiltersExcludePid(mozilla::Span< const char*>{}, pid123)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!FiltersExcludePid(mozilla::Span<const char*>{}, pid123)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 539 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!FiltersExcludePid(mozilla::Span<const char*>{}, pid123)" ")"); do { MOZ_CrashSequence(__null, 539); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 540 | ||||
| 541 | { | |||
| 542 | const char* const filters[] = {"main"}; | |||
| 543 | MOZ_RELEASE_ASSERT(!FiltersExcludePid(filters, pid123))do { static_assert( mozilla::detail::AssertionConditionType< decltype(!FiltersExcludePid(filters, pid123))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!FiltersExcludePid(filters, pid123 )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!FiltersExcludePid(filters, pid123)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 543); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!FiltersExcludePid(filters, pid123)" ")"); do { MOZ_CrashSequence(__null, 543); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 544 | } | |||
| 545 | ||||
| 546 | { | |||
| 547 | const char* const filters[] = {"main", "pid:123"}; | |||
| 548 | MOZ_RELEASE_ASSERT(!FiltersExcludePid(filters, pid123))do { static_assert( mozilla::detail::AssertionConditionType< decltype(!FiltersExcludePid(filters, pid123))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!FiltersExcludePid(filters, pid123 )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!FiltersExcludePid(filters, pid123)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 548); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!FiltersExcludePid(filters, pid123)" ")"); do { MOZ_CrashSequence(__null, 548); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 549 | } | |||
| 550 | ||||
| 551 | { | |||
| 552 | const char* const filters[] = {"main", "pid:456"}; | |||
| 553 | MOZ_RELEASE_ASSERT(!FiltersExcludePid(filters, pid123))do { static_assert( mozilla::detail::AssertionConditionType< decltype(!FiltersExcludePid(filters, pid123))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!FiltersExcludePid(filters, pid123 )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!FiltersExcludePid(filters, pid123)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 553); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!FiltersExcludePid(filters, pid123)" ")"); do { MOZ_CrashSequence(__null, 553); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 554 | } | |||
| 555 | ||||
| 556 | { | |||
| 557 | const char* const filters[] = {"pid:123"}; | |||
| 558 | MOZ_RELEASE_ASSERT(!FiltersExcludePid(filters, pid123))do { static_assert( mozilla::detail::AssertionConditionType< decltype(!FiltersExcludePid(filters, pid123))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!FiltersExcludePid(filters, pid123 )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!FiltersExcludePid(filters, pid123)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 558); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!FiltersExcludePid(filters, pid123)" ")"); do { MOZ_CrashSequence(__null, 558); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 559 | } | |||
| 560 | ||||
| 561 | { | |||
| 562 | const char* const filters[] = {"pid:123", "pid:456"}; | |||
| 563 | MOZ_RELEASE_ASSERT(!FiltersExcludePid(filters, pid123))do { static_assert( mozilla::detail::AssertionConditionType< decltype(!FiltersExcludePid(filters, pid123))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!FiltersExcludePid(filters, pid123 )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!FiltersExcludePid(filters, pid123)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 563); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!FiltersExcludePid(filters, pid123)" ")"); do { MOZ_CrashSequence(__null, 563); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 564 | } | |||
| 565 | ||||
| 566 | { | |||
| 567 | const char* const filters[] = {"pid:456", "pid:123"}; | |||
| 568 | MOZ_RELEASE_ASSERT(!FiltersExcludePid(filters, pid123))do { static_assert( mozilla::detail::AssertionConditionType< decltype(!FiltersExcludePid(filters, pid123))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!FiltersExcludePid(filters, pid123 )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!FiltersExcludePid(filters, pid123)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 568); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!FiltersExcludePid(filters, pid123)" ")"); do { MOZ_CrashSequence(__null, 568); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 569 | } | |||
| 570 | ||||
| 571 | { | |||
| 572 | const char* const filters[] = {"pid:456"}; | |||
| 573 | MOZ_RELEASE_ASSERT(FiltersExcludePid(filters, pid123))do { static_assert( mozilla::detail::AssertionConditionType< decltype(FiltersExcludePid(filters, pid123))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(FiltersExcludePid(filters, pid123 )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("FiltersExcludePid(filters, pid123)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 573); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "FiltersExcludePid(filters, pid123)" ")"); do { MOZ_CrashSequence(__null, 573); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 574 | } | |||
| 575 | ||||
| 576 | { | |||
| 577 | const char* const filters[] = {"pid:456", "pid:789"}; | |||
| 578 | MOZ_RELEASE_ASSERT(FiltersExcludePid(filters, pid123))do { static_assert( mozilla::detail::AssertionConditionType< decltype(FiltersExcludePid(filters, pid123))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(FiltersExcludePid(filters, pid123 )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("FiltersExcludePid(filters, pid123)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 578); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "FiltersExcludePid(filters, pid123)" ")"); do { MOZ_CrashSequence(__null, 578); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 579 | } | |||
| 580 | } | |||
| 581 | ||||
| 582 | printf("TestBaseAndProfilerDetail done\n"); | |||
| 583 | } | |||
| 584 | ||||
| 585 | void TestSharedMutex() { | |||
| 586 | printf("TestSharedMutex...\n"); | |||
| 587 | ||||
| 588 | mozilla::baseprofiler::detail::BaseProfilerSharedMutex sm; | |||
| 589 | ||||
| 590 | // First round of minimal tests in this thread. | |||
| 591 | ||||
| 592 | MOZ_RELEASE_ASSERT(!sm.IsLockedExclusiveOnCurrentThread())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!sm.IsLockedExclusiveOnCurrentThread())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(!sm.IsLockedExclusiveOnCurrentThread()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!sm.IsLockedExclusiveOnCurrentThread()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 592 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!sm.IsLockedExclusiveOnCurrentThread()" ")"); do { MOZ_CrashSequence(__null, 592); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 593 | ||||
| 594 | sm.LockExclusive(); | |||
| 595 | MOZ_RELEASE_ASSERT(sm.IsLockedExclusiveOnCurrentThread())do { static_assert( mozilla::detail::AssertionConditionType< decltype(sm.IsLockedExclusiveOnCurrentThread())>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(! !(sm.IsLockedExclusiveOnCurrentThread()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("sm.IsLockedExclusiveOnCurrentThread()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 595 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "sm.IsLockedExclusiveOnCurrentThread()" ")"); do { MOZ_CrashSequence(__null, 595); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 596 | sm.UnlockExclusive(); | |||
| 597 | MOZ_RELEASE_ASSERT(!sm.IsLockedExclusiveOnCurrentThread())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!sm.IsLockedExclusiveOnCurrentThread())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(!sm.IsLockedExclusiveOnCurrentThread()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!sm.IsLockedExclusiveOnCurrentThread()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 597 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!sm.IsLockedExclusiveOnCurrentThread()" ")"); do { MOZ_CrashSequence(__null, 597); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 598 | ||||
| 599 | sm.LockShared(); | |||
| 600 | MOZ_RELEASE_ASSERT(!sm.IsLockedExclusiveOnCurrentThread())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!sm.IsLockedExclusiveOnCurrentThread())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(!sm.IsLockedExclusiveOnCurrentThread()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!sm.IsLockedExclusiveOnCurrentThread()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 600 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!sm.IsLockedExclusiveOnCurrentThread()" ")"); do { MOZ_CrashSequence(__null, 600); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 601 | sm.UnlockShared(); | |||
| 602 | MOZ_RELEASE_ASSERT(!sm.IsLockedExclusiveOnCurrentThread())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!sm.IsLockedExclusiveOnCurrentThread())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(!sm.IsLockedExclusiveOnCurrentThread()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!sm.IsLockedExclusiveOnCurrentThread()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 602 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!sm.IsLockedExclusiveOnCurrentThread()" ")"); do { MOZ_CrashSequence(__null, 602); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 603 | ||||
| 604 | { | |||
| 605 | mozilla::baseprofiler::detail::BaseProfilerAutoLockExclusive exclusiveLock{ | |||
| 606 | sm}; | |||
| 607 | MOZ_RELEASE_ASSERT(sm.IsLockedExclusiveOnCurrentThread())do { static_assert( mozilla::detail::AssertionConditionType< decltype(sm.IsLockedExclusiveOnCurrentThread())>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(! !(sm.IsLockedExclusiveOnCurrentThread()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("sm.IsLockedExclusiveOnCurrentThread()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 607 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "sm.IsLockedExclusiveOnCurrentThread()" ")"); do { MOZ_CrashSequence(__null, 607); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 608 | } | |||
| 609 | MOZ_RELEASE_ASSERT(!sm.IsLockedExclusiveOnCurrentThread())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!sm.IsLockedExclusiveOnCurrentThread())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(!sm.IsLockedExclusiveOnCurrentThread()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!sm.IsLockedExclusiveOnCurrentThread()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 609 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!sm.IsLockedExclusiveOnCurrentThread()" ")"); do { MOZ_CrashSequence(__null, 609); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 610 | ||||
| 611 | { | |||
| 612 | mozilla::baseprofiler::detail::BaseProfilerAutoLockShared sharedLock{sm}; | |||
| 613 | MOZ_RELEASE_ASSERT(!sm.IsLockedExclusiveOnCurrentThread())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!sm.IsLockedExclusiveOnCurrentThread())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(!sm.IsLockedExclusiveOnCurrentThread()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!sm.IsLockedExclusiveOnCurrentThread()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 613 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!sm.IsLockedExclusiveOnCurrentThread()" ")"); do { MOZ_CrashSequence(__null, 613); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 614 | } | |||
| 615 | MOZ_RELEASE_ASSERT(!sm.IsLockedExclusiveOnCurrentThread())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!sm.IsLockedExclusiveOnCurrentThread())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(!sm.IsLockedExclusiveOnCurrentThread()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!sm.IsLockedExclusiveOnCurrentThread()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 615 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!sm.IsLockedExclusiveOnCurrentThread()" ")"); do { MOZ_CrashSequence(__null, 615); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 616 | ||||
| 617 | // The following will run actions between two threads, to verify that | |||
| 618 | // exclusive and shared locks work as expected. | |||
| 619 | ||||
| 620 | // These actions will happen from top to bottom. | |||
| 621 | // This will test all possible lock interactions. | |||
| 622 | enum NextAction { // State of the lock: | |||
| 623 | t1Starting, // (x=exclusive, s=shared, ?=blocked) | |||
| 624 | t2Starting, // t1 t2 | |||
| 625 | t1LockExclusive, // x | |||
| 626 | t2LockExclusiveAndBlock, // x x? - Can't have two exclusives. | |||
| 627 | t1UnlockExclusive, // x | |||
| 628 | t2UnblockedAfterT1Unlock, // x | |||
| 629 | t1LockSharedAndBlock, // s? x - Can't have shared during excl | |||
| 630 | t2UnlockExclusive, // s | |||
| 631 | t1UnblockedAfterT2Unlock, // s | |||
| 632 | t2LockShared, // s s - Can have multiple shared locks | |||
| 633 | t1UnlockShared, // s | |||
| 634 | t2StillLockedShared, // s | |||
| 635 | t1LockExclusiveAndBlock, // x? s - Can't have excl during shared | |||
| 636 | t2UnlockShared, // x | |||
| 637 | t1UnblockedAfterT2UnlockShared, // x | |||
| 638 | t2CheckAfterT1Lock, // x | |||
| 639 | t1LastUnlockExclusive, // (unlocked) | |||
| 640 | done | |||
| 641 | }; | |||
| 642 | ||||
| 643 | // Each thread will repeatedly read this `nextAction`, and run actions that | |||
| 644 | // target it... | |||
| 645 | std::atomic<NextAction> nextAction{static_cast<NextAction>(0)}; | |||
| 646 | // ... and advance to the next available action (which should usually be for | |||
| 647 | // the other thread). | |||
| 648 | auto AdvanceAction = [&nextAction]() { | |||
| 649 | MOZ_RELEASE_ASSERT(nextAction <= done)do { static_assert( mozilla::detail::AssertionConditionType< decltype(nextAction <= done)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(nextAction <= done))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("nextAction <= done" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 649 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "nextAction <= done" ")"); do { MOZ_CrashSequence(__null, 649); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 650 | nextAction = static_cast<NextAction>(static_cast<int>(nextAction) + 1); | |||
| 651 | }; | |||
| 652 | ||||
| 653 | std::thread t1{[&]() { | |||
| 654 | for (;;) { | |||
| 655 | switch (nextAction) { | |||
| 656 | case t1Starting: | |||
| 657 | AdvanceAction(); | |||
| 658 | break; | |||
| 659 | case t1LockExclusive: | |||
| 660 | MOZ_RELEASE_ASSERT(!sm.IsLockedExclusiveOnCurrentThread())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!sm.IsLockedExclusiveOnCurrentThread())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(!sm.IsLockedExclusiveOnCurrentThread()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!sm.IsLockedExclusiveOnCurrentThread()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 660 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!sm.IsLockedExclusiveOnCurrentThread()" ")"); do { MOZ_CrashSequence(__null, 660); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 661 | sm.LockExclusive(); | |||
| 662 | MOZ_RELEASE_ASSERT(sm.IsLockedExclusiveOnCurrentThread())do { static_assert( mozilla::detail::AssertionConditionType< decltype(sm.IsLockedExclusiveOnCurrentThread())>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(! !(sm.IsLockedExclusiveOnCurrentThread()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("sm.IsLockedExclusiveOnCurrentThread()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 662 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "sm.IsLockedExclusiveOnCurrentThread()" ")"); do { MOZ_CrashSequence(__null, 662); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 663 | AdvanceAction(); | |||
| 664 | break; | |||
| 665 | case t1UnlockExclusive: | |||
| 666 | MOZ_RELEASE_ASSERT(sm.IsLockedExclusiveOnCurrentThread())do { static_assert( mozilla::detail::AssertionConditionType< decltype(sm.IsLockedExclusiveOnCurrentThread())>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(! !(sm.IsLockedExclusiveOnCurrentThread()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("sm.IsLockedExclusiveOnCurrentThread()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 666 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "sm.IsLockedExclusiveOnCurrentThread()" ")"); do { MOZ_CrashSequence(__null, 666); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 667 | // Advance first, before unlocking, so that t2 sees the new state. | |||
| 668 | AdvanceAction(); | |||
| 669 | sm.UnlockExclusive(); | |||
| 670 | MOZ_RELEASE_ASSERT(!sm.IsLockedExclusiveOnCurrentThread())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!sm.IsLockedExclusiveOnCurrentThread())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(!sm.IsLockedExclusiveOnCurrentThread()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!sm.IsLockedExclusiveOnCurrentThread()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 670 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!sm.IsLockedExclusiveOnCurrentThread()" ")"); do { MOZ_CrashSequence(__null, 670); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 671 | break; | |||
| 672 | case t1LockSharedAndBlock: | |||
| 673 | // Advance action before attempting to lock after t2's exclusive lock. | |||
| 674 | AdvanceAction(); | |||
| 675 | sm.LockShared(); | |||
| 676 | // We will only acquire the lock after t1 unlocks. | |||
| 677 | MOZ_RELEASE_ASSERT(nextAction == t1UnblockedAfterT2Unlock)do { static_assert( mozilla::detail::AssertionConditionType< decltype(nextAction == t1UnblockedAfterT2Unlock)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(nextAction == t1UnblockedAfterT2Unlock))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("nextAction == t1UnblockedAfterT2Unlock" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 677 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "nextAction == t1UnblockedAfterT2Unlock" ")"); do { MOZ_CrashSequence(__null, 677); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 678 | MOZ_RELEASE_ASSERT(!sm.IsLockedExclusiveOnCurrentThread())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!sm.IsLockedExclusiveOnCurrentThread())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(!sm.IsLockedExclusiveOnCurrentThread()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!sm.IsLockedExclusiveOnCurrentThread()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 678 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!sm.IsLockedExclusiveOnCurrentThread()" ")"); do { MOZ_CrashSequence(__null, 678); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 679 | AdvanceAction(); | |||
| 680 | break; | |||
| 681 | case t1UnlockShared: | |||
| 682 | MOZ_RELEASE_ASSERT(!sm.IsLockedExclusiveOnCurrentThread())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!sm.IsLockedExclusiveOnCurrentThread())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(!sm.IsLockedExclusiveOnCurrentThread()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!sm.IsLockedExclusiveOnCurrentThread()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 682 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!sm.IsLockedExclusiveOnCurrentThread()" ")"); do { MOZ_CrashSequence(__null, 682); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 683 | // Advance first, before unlocking, so that t2 sees the new state. | |||
| 684 | AdvanceAction(); | |||
| 685 | sm.UnlockShared(); | |||
| 686 | MOZ_RELEASE_ASSERT(!sm.IsLockedExclusiveOnCurrentThread())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!sm.IsLockedExclusiveOnCurrentThread())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(!sm.IsLockedExclusiveOnCurrentThread()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!sm.IsLockedExclusiveOnCurrentThread()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 686 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!sm.IsLockedExclusiveOnCurrentThread()" ")"); do { MOZ_CrashSequence(__null, 686); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 687 | break; | |||
| 688 | case t1LockExclusiveAndBlock: | |||
| 689 | MOZ_RELEASE_ASSERT(!sm.IsLockedExclusiveOnCurrentThread())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!sm.IsLockedExclusiveOnCurrentThread())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(!sm.IsLockedExclusiveOnCurrentThread()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!sm.IsLockedExclusiveOnCurrentThread()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 689 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!sm.IsLockedExclusiveOnCurrentThread()" ")"); do { MOZ_CrashSequence(__null, 689); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 690 | // Advance action before attempting to lock after t2's shared lock. | |||
| 691 | AdvanceAction(); | |||
| 692 | sm.LockExclusive(); | |||
| 693 | // We will only acquire the lock after t2 unlocks. | |||
| 694 | MOZ_RELEASE_ASSERT(nextAction == t1UnblockedAfterT2UnlockShared)do { static_assert( mozilla::detail::AssertionConditionType< decltype(nextAction == t1UnblockedAfterT2UnlockShared)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(nextAction == t1UnblockedAfterT2UnlockShared))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("nextAction == t1UnblockedAfterT2UnlockShared" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 694 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "nextAction == t1UnblockedAfterT2UnlockShared" ")"); do { MOZ_CrashSequence(__null, 694); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 695 | MOZ_RELEASE_ASSERT(sm.IsLockedExclusiveOnCurrentThread())do { static_assert( mozilla::detail::AssertionConditionType< decltype(sm.IsLockedExclusiveOnCurrentThread())>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(! !(sm.IsLockedExclusiveOnCurrentThread()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("sm.IsLockedExclusiveOnCurrentThread()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 695 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "sm.IsLockedExclusiveOnCurrentThread()" ")"); do { MOZ_CrashSequence(__null, 695); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 696 | AdvanceAction(); | |||
| 697 | break; | |||
| 698 | case t1LastUnlockExclusive: | |||
| 699 | MOZ_RELEASE_ASSERT(sm.IsLockedExclusiveOnCurrentThread())do { static_assert( mozilla::detail::AssertionConditionType< decltype(sm.IsLockedExclusiveOnCurrentThread())>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(! !(sm.IsLockedExclusiveOnCurrentThread()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("sm.IsLockedExclusiveOnCurrentThread()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 699 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "sm.IsLockedExclusiveOnCurrentThread()" ")"); do { MOZ_CrashSequence(__null, 699); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 700 | // Advance first, before unlocking, so that t2 sees the new state. | |||
| 701 | AdvanceAction(); | |||
| 702 | sm.UnlockExclusive(); | |||
| 703 | MOZ_RELEASE_ASSERT(!sm.IsLockedExclusiveOnCurrentThread())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!sm.IsLockedExclusiveOnCurrentThread())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(!sm.IsLockedExclusiveOnCurrentThread()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!sm.IsLockedExclusiveOnCurrentThread()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 703 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!sm.IsLockedExclusiveOnCurrentThread()" ")"); do { MOZ_CrashSequence(__null, 703); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 704 | break; | |||
| 705 | case done: | |||
| 706 | return; | |||
| 707 | default: | |||
| 708 | // Ignore other actions intended for t2. | |||
| 709 | break; | |||
| 710 | } | |||
| 711 | } | |||
| 712 | }}; | |||
| 713 | ||||
| 714 | std::thread t2{[&]() { | |||
| 715 | for (;;) { | |||
| 716 | switch (nextAction) { | |||
| 717 | case t2Starting: | |||
| 718 | AdvanceAction(); | |||
| 719 | break; | |||
| 720 | case t2LockExclusiveAndBlock: | |||
| 721 | MOZ_RELEASE_ASSERT(!sm.IsLockedExclusiveOnCurrentThread())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!sm.IsLockedExclusiveOnCurrentThread())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(!sm.IsLockedExclusiveOnCurrentThread()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!sm.IsLockedExclusiveOnCurrentThread()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 721 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!sm.IsLockedExclusiveOnCurrentThread()" ")"); do { MOZ_CrashSequence(__null, 721); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 722 | // Advance action before attempting to lock after t1's exclusive lock. | |||
| 723 | AdvanceAction(); | |||
| 724 | sm.LockExclusive(); | |||
| 725 | // We will only acquire the lock after t1 unlocks. | |||
| 726 | MOZ_RELEASE_ASSERT(nextAction == t2UnblockedAfterT1Unlock)do { static_assert( mozilla::detail::AssertionConditionType< decltype(nextAction == t2UnblockedAfterT1Unlock)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(nextAction == t2UnblockedAfterT1Unlock))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("nextAction == t2UnblockedAfterT1Unlock" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 726 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "nextAction == t2UnblockedAfterT1Unlock" ")"); do { MOZ_CrashSequence(__null, 726); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 727 | MOZ_RELEASE_ASSERT(sm.IsLockedExclusiveOnCurrentThread())do { static_assert( mozilla::detail::AssertionConditionType< decltype(sm.IsLockedExclusiveOnCurrentThread())>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(! !(sm.IsLockedExclusiveOnCurrentThread()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("sm.IsLockedExclusiveOnCurrentThread()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 727 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "sm.IsLockedExclusiveOnCurrentThread()" ")"); do { MOZ_CrashSequence(__null, 727); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 728 | AdvanceAction(); | |||
| 729 | break; | |||
| 730 | case t2UnlockExclusive: | |||
| 731 | MOZ_RELEASE_ASSERT(sm.IsLockedExclusiveOnCurrentThread())do { static_assert( mozilla::detail::AssertionConditionType< decltype(sm.IsLockedExclusiveOnCurrentThread())>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(! !(sm.IsLockedExclusiveOnCurrentThread()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("sm.IsLockedExclusiveOnCurrentThread()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 731 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "sm.IsLockedExclusiveOnCurrentThread()" ")"); do { MOZ_CrashSequence(__null, 731); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 732 | // Advance first, before unlocking, so that t1 sees the new state. | |||
| 733 | AdvanceAction(); | |||
| 734 | sm.UnlockExclusive(); | |||
| 735 | MOZ_RELEASE_ASSERT(!sm.IsLockedExclusiveOnCurrentThread())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!sm.IsLockedExclusiveOnCurrentThread())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(!sm.IsLockedExclusiveOnCurrentThread()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!sm.IsLockedExclusiveOnCurrentThread()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 735 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!sm.IsLockedExclusiveOnCurrentThread()" ")"); do { MOZ_CrashSequence(__null, 735); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 736 | break; | |||
| 737 | case t2LockShared: | |||
| 738 | sm.LockShared(); | |||
| 739 | MOZ_RELEASE_ASSERT(!sm.IsLockedExclusiveOnCurrentThread())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!sm.IsLockedExclusiveOnCurrentThread())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(!sm.IsLockedExclusiveOnCurrentThread()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!sm.IsLockedExclusiveOnCurrentThread()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 739 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!sm.IsLockedExclusiveOnCurrentThread()" ")"); do { MOZ_CrashSequence(__null, 739); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 740 | AdvanceAction(); | |||
| 741 | break; | |||
| 742 | case t2StillLockedShared: | |||
| 743 | AdvanceAction(); | |||
| 744 | break; | |||
| 745 | case t2UnlockShared: | |||
| 746 | MOZ_RELEASE_ASSERT(!sm.IsLockedExclusiveOnCurrentThread())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!sm.IsLockedExclusiveOnCurrentThread())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(!sm.IsLockedExclusiveOnCurrentThread()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!sm.IsLockedExclusiveOnCurrentThread()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 746 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!sm.IsLockedExclusiveOnCurrentThread()" ")"); do { MOZ_CrashSequence(__null, 746); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 747 | // Advance first, before unlocking, so that t1 sees the new state. | |||
| 748 | AdvanceAction(); | |||
| 749 | sm.UnlockShared(); | |||
| 750 | MOZ_RELEASE_ASSERT(!sm.IsLockedExclusiveOnCurrentThread())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!sm.IsLockedExclusiveOnCurrentThread())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(!sm.IsLockedExclusiveOnCurrentThread()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!sm.IsLockedExclusiveOnCurrentThread()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 750 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!sm.IsLockedExclusiveOnCurrentThread()" ")"); do { MOZ_CrashSequence(__null, 750); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 751 | break; | |||
| 752 | case t2CheckAfterT1Lock: | |||
| 753 | MOZ_RELEASE_ASSERT(!sm.IsLockedExclusiveOnCurrentThread())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!sm.IsLockedExclusiveOnCurrentThread())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(!sm.IsLockedExclusiveOnCurrentThread()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!sm.IsLockedExclusiveOnCurrentThread()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 753 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!sm.IsLockedExclusiveOnCurrentThread()" ")"); do { MOZ_CrashSequence(__null, 753); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 754 | AdvanceAction(); | |||
| 755 | break; | |||
| 756 | case done: | |||
| 757 | return; | |||
| 758 | default: | |||
| 759 | // Ignore other actions intended for t1. | |||
| 760 | break; | |||
| 761 | } | |||
| 762 | } | |||
| 763 | }}; | |||
| 764 | ||||
| 765 | t1.join(); | |||
| 766 | t2.join(); | |||
| 767 | ||||
| 768 | printf("TestSharedMutex done\n"); | |||
| 769 | } | |||
| 770 | ||||
| 771 | void TestProportionValue() { | |||
| 772 | printf("TestProportionValue...\n"); | |||
| 773 | ||||
| 774 | using mozilla::ProportionValue; | |||
| 775 | ||||
| 776 | #define STATIC_ASSERT_EQ(a, b) \ | |||
| 777 | static_assert((a) == (b)); \ | |||
| 778 | MOZ_RELEASE_ASSERT((a) == (b))do { static_assert( mozilla::detail::AssertionConditionType< decltype((a) == (b))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!((a) == (b)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("(a) == (b)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 778); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "(a) == (b)" ")"); do { MOZ_CrashSequence(__null, 778); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 779 | ||||
| 780 | #define STATIC_ASSERT(e)STATIC_ASSERT_EQ(e, true) STATIC_ASSERT_EQ(e, true) | |||
| 781 | ||||
| 782 | // Conversion from&to double. | |||
| 783 | STATIC_ASSERT_EQ(ProportionValue().ToDouble(), 0.0); | |||
| 784 | STATIC_ASSERT_EQ(ProportionValue(0.0).ToDouble(), 0.0); | |||
| 785 | STATIC_ASSERT_EQ(ProportionValue(0.5).ToDouble(), 0.5); | |||
| 786 | STATIC_ASSERT_EQ(ProportionValue(1.0).ToDouble(), 1.0); | |||
| 787 | ||||
| 788 | // Clamping. | |||
| 789 | STATIC_ASSERT_EQ( | |||
| 790 | ProportionValue(std::numeric_limits<double>::min()).ToDouble(), 0.0); | |||
| 791 | STATIC_ASSERT_EQ( | |||
| 792 | ProportionValue(std::numeric_limits<long double>::min()).ToDouble(), 0.0); | |||
| 793 | STATIC_ASSERT_EQ(ProportionValue(-1.0).ToDouble(), 0.0); | |||
| 794 | STATIC_ASSERT_EQ(ProportionValue(-0.01).ToDouble(), 0.0); | |||
| 795 | STATIC_ASSERT_EQ(ProportionValue(-0.0).ToDouble(), 0.0); | |||
| 796 | STATIC_ASSERT_EQ(ProportionValue(1.01).ToDouble(), 1.0); | |||
| 797 | STATIC_ASSERT_EQ( | |||
| 798 | ProportionValue(std::numeric_limits<double>::max()).ToDouble(), 1.0); | |||
| 799 | ||||
| 800 | // User-defined literal. | |||
| 801 | { | |||
| 802 | using namespace mozilla::literals::ProportionValue_literals; | |||
| 803 | STATIC_ASSERT_EQ(0_pc, ProportionValue(0.0)); | |||
| 804 | STATIC_ASSERT_EQ(0._pc, ProportionValue(0.0)); | |||
| 805 | STATIC_ASSERT_EQ(50_pc, ProportionValue(0.5)); | |||
| 806 | STATIC_ASSERT_EQ(50._pc, ProportionValue(0.5)); | |||
| 807 | STATIC_ASSERT_EQ(100_pc, ProportionValue(1.0)); | |||
| 808 | STATIC_ASSERT_EQ(100._pc, ProportionValue(1.0)); | |||
| 809 | STATIC_ASSERT_EQ(101_pc, ProportionValue(1.0)); | |||
| 810 | STATIC_ASSERT_EQ(100.01_pc, ProportionValue(1.0)); | |||
| 811 | STATIC_ASSERT_EQ(1000_pc, ProportionValue(1.0)); | |||
| 812 | STATIC_ASSERT_EQ(1000._pc, ProportionValue(1.0)); | |||
| 813 | } | |||
| 814 | { | |||
| 815 | // ProportionValue_literals is an inline namespace of mozilla::literals, so | |||
| 816 | // it's optional. | |||
| 817 | using namespace mozilla::literals; | |||
| 818 | STATIC_ASSERT_EQ(0_pc, ProportionValue(0.0)); | |||
| 819 | STATIC_ASSERT_EQ(0._pc, ProportionValue(0.0)); | |||
| 820 | STATIC_ASSERT_EQ(50_pc, ProportionValue(0.5)); | |||
| 821 | STATIC_ASSERT_EQ(50._pc, ProportionValue(0.5)); | |||
| 822 | STATIC_ASSERT_EQ(100_pc, ProportionValue(1.0)); | |||
| 823 | STATIC_ASSERT_EQ(100._pc, ProportionValue(1.0)); | |||
| 824 | STATIC_ASSERT_EQ(101_pc, ProportionValue(1.0)); | |||
| 825 | STATIC_ASSERT_EQ(100.01_pc, ProportionValue(1.0)); | |||
| 826 | STATIC_ASSERT_EQ(1000_pc, ProportionValue(1.0)); | |||
| 827 | STATIC_ASSERT_EQ(1000._pc, ProportionValue(1.0)); | |||
| 828 | } | |||
| 829 | ||||
| 830 | // Invalid construction, conversion to double NaN. | |||
| 831 | MOZ_RELEASE_ASSERT(std::isnan(ProportionValue::MakeInvalid().ToDouble()))do { static_assert( mozilla::detail::AssertionConditionType< decltype(std::isnan(ProportionValue::MakeInvalid().ToDouble() ))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(std::isnan(ProportionValue::MakeInvalid().ToDouble() )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("std::isnan(ProportionValue::MakeInvalid().ToDouble())", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 831); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "std::isnan(ProportionValue::MakeInvalid().ToDouble())" ")"); do { MOZ_CrashSequence(__null, 831); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 832 | ||||
| 833 | using namespace mozilla::literals::ProportionValue_literals; | |||
| 834 | ||||
| 835 | // Conversion to&from underlying integral number. | |||
| 836 | STATIC_ASSERT_EQ( | |||
| 837 | ProportionValue::FromUnderlyingType((0_pc).ToUnderlyingType()).ToDouble(), | |||
| 838 | 0.0); | |||
| 839 | STATIC_ASSERT_EQ( | |||
| 840 | ProportionValue::FromUnderlyingType((50_pc).ToUnderlyingType()) | |||
| 841 | .ToDouble(), | |||
| 842 | 0.5); | |||
| 843 | STATIC_ASSERT_EQ( | |||
| 844 | ProportionValue::FromUnderlyingType((100_pc).ToUnderlyingType()) | |||
| 845 | .ToDouble(), | |||
| 846 | 1.0); | |||
| 847 | STATIC_ASSERT(ProportionValue::FromUnderlyingType(STATIC_ASSERT_EQ(ProportionValue::FromUnderlyingType( ProportionValue ::MakeInvalid().ToUnderlyingType()) .IsInvalid(), true) | |||
| 848 | ProportionValue::MakeInvalid().ToUnderlyingType())STATIC_ASSERT_EQ(ProportionValue::FromUnderlyingType( ProportionValue ::MakeInvalid().ToUnderlyingType()) .IsInvalid(), true) | |||
| 849 | .IsInvalid())STATIC_ASSERT_EQ(ProportionValue::FromUnderlyingType( ProportionValue ::MakeInvalid().ToUnderlyingType()) .IsInvalid(), true); | |||
| 850 | ||||
| 851 | // IsExactlyZero. | |||
| 852 | STATIC_ASSERT(ProportionValue().IsExactlyZero())STATIC_ASSERT_EQ(ProportionValue().IsExactlyZero(), true); | |||
| 853 | STATIC_ASSERT((0_pc).IsExactlyZero())STATIC_ASSERT_EQ((0_pc).IsExactlyZero(), true); | |||
| 854 | STATIC_ASSERT(!(50_pc).IsExactlyZero())STATIC_ASSERT_EQ(!(50_pc).IsExactlyZero(), true); | |||
| 855 | STATIC_ASSERT(!(100_pc).IsExactlyZero())STATIC_ASSERT_EQ(!(100_pc).IsExactlyZero(), true); | |||
| 856 | STATIC_ASSERT(!ProportionValue::MakeInvalid().IsExactlyZero())STATIC_ASSERT_EQ(!ProportionValue::MakeInvalid().IsExactlyZero (), true); | |||
| 857 | ||||
| 858 | // IsExactlyOne. | |||
| 859 | STATIC_ASSERT(!ProportionValue().IsExactlyOne())STATIC_ASSERT_EQ(!ProportionValue().IsExactlyOne(), true); | |||
| 860 | STATIC_ASSERT(!(0_pc).IsExactlyOne())STATIC_ASSERT_EQ(!(0_pc).IsExactlyOne(), true); | |||
| 861 | STATIC_ASSERT(!(50_pc).IsExactlyOne())STATIC_ASSERT_EQ(!(50_pc).IsExactlyOne(), true); | |||
| 862 | STATIC_ASSERT((100_pc).IsExactlyOne())STATIC_ASSERT_EQ((100_pc).IsExactlyOne(), true); | |||
| 863 | STATIC_ASSERT(!ProportionValue::MakeInvalid().IsExactlyOne())STATIC_ASSERT_EQ(!ProportionValue::MakeInvalid().IsExactlyOne (), true); | |||
| 864 | ||||
| 865 | // IsValid. | |||
| 866 | STATIC_ASSERT(ProportionValue().IsValid())STATIC_ASSERT_EQ(ProportionValue().IsValid(), true); | |||
| 867 | STATIC_ASSERT((0_pc).IsValid())STATIC_ASSERT_EQ((0_pc).IsValid(), true); | |||
| 868 | STATIC_ASSERT((50_pc).IsValid())STATIC_ASSERT_EQ((50_pc).IsValid(), true); | |||
| 869 | STATIC_ASSERT((100_pc).IsValid())STATIC_ASSERT_EQ((100_pc).IsValid(), true); | |||
| 870 | STATIC_ASSERT(!ProportionValue::MakeInvalid().IsValid())STATIC_ASSERT_EQ(!ProportionValue::MakeInvalid().IsValid(), true ); | |||
| 871 | ||||
| 872 | // IsInvalid. | |||
| 873 | STATIC_ASSERT(!ProportionValue().IsInvalid())STATIC_ASSERT_EQ(!ProportionValue().IsInvalid(), true); | |||
| 874 | STATIC_ASSERT(!(0_pc).IsInvalid())STATIC_ASSERT_EQ(!(0_pc).IsInvalid(), true); | |||
| 875 | STATIC_ASSERT(!(50_pc).IsInvalid())STATIC_ASSERT_EQ(!(50_pc).IsInvalid(), true); | |||
| 876 | STATIC_ASSERT(!(100_pc).IsInvalid())STATIC_ASSERT_EQ(!(100_pc).IsInvalid(), true); | |||
| 877 | STATIC_ASSERT(ProportionValue::MakeInvalid().IsInvalid())STATIC_ASSERT_EQ(ProportionValue::MakeInvalid().IsInvalid(), true ); | |||
| 878 | ||||
| 879 | // Addition. | |||
| 880 | STATIC_ASSERT_EQ((0_pc + 0_pc).ToDouble(), 0.0); | |||
| 881 | STATIC_ASSERT_EQ((0_pc + 100_pc).ToDouble(), 1.0); | |||
| 882 | STATIC_ASSERT_EQ((100_pc + 0_pc).ToDouble(), 1.0); | |||
| 883 | STATIC_ASSERT_EQ((100_pc + 100_pc).ToDouble(), 1.0); | |||
| 884 | STATIC_ASSERT((ProportionValue::MakeInvalid() + 50_pc).IsInvalid())STATIC_ASSERT_EQ((ProportionValue::MakeInvalid() + 50_pc).IsInvalid (), true); | |||
| 885 | STATIC_ASSERT((50_pc + ProportionValue::MakeInvalid()).IsInvalid())STATIC_ASSERT_EQ((50_pc + ProportionValue::MakeInvalid()).IsInvalid (), true); | |||
| 886 | ||||
| 887 | // Subtraction. | |||
| 888 | STATIC_ASSERT_EQ((0_pc - 0_pc).ToDouble(), 0.0); | |||
| 889 | STATIC_ASSERT_EQ((0_pc - 100_pc).ToDouble(), 0.0); | |||
| 890 | STATIC_ASSERT_EQ((100_pc - 0_pc).ToDouble(), 1.0); | |||
| 891 | STATIC_ASSERT_EQ((100_pc - 100_pc).ToDouble(), 0.0); | |||
| 892 | STATIC_ASSERT((ProportionValue::MakeInvalid() - 50_pc).IsInvalid())STATIC_ASSERT_EQ((ProportionValue::MakeInvalid() - 50_pc).IsInvalid (), true); | |||
| 893 | STATIC_ASSERT((50_pc - ProportionValue::MakeInvalid()).IsInvalid())STATIC_ASSERT_EQ((50_pc - ProportionValue::MakeInvalid()).IsInvalid (), true); | |||
| 894 | ||||
| 895 | // Multiplication. | |||
| 896 | STATIC_ASSERT_EQ((0_pc * 0_pc).ToDouble(), 0.0); | |||
| 897 | STATIC_ASSERT_EQ((0_pc * 100_pc).ToDouble(), 0.0); | |||
| 898 | STATIC_ASSERT_EQ((50_pc * 50_pc).ToDouble(), 0.25); | |||
| 899 | STATIC_ASSERT_EQ((50_pc * 100_pc).ToDouble(), 0.5); | |||
| 900 | STATIC_ASSERT_EQ((100_pc * 50_pc).ToDouble(), 0.5); | |||
| 901 | STATIC_ASSERT_EQ((100_pc * 0_pc).ToDouble(), 0.0); | |||
| 902 | STATIC_ASSERT_EQ((100_pc * 100_pc).ToDouble(), 1.0); | |||
| 903 | STATIC_ASSERT((ProportionValue::MakeInvalid() * 50_pc).IsInvalid())STATIC_ASSERT_EQ((ProportionValue::MakeInvalid() * 50_pc).IsInvalid (), true); | |||
| 904 | STATIC_ASSERT((50_pc * ProportionValue::MakeInvalid()).IsInvalid())STATIC_ASSERT_EQ((50_pc * ProportionValue::MakeInvalid()).IsInvalid (), true); | |||
| 905 | ||||
| 906 | // Division by a positive integer value. | |||
| 907 | STATIC_ASSERT_EQ((100_pc / 1u).ToDouble(), 1.0); | |||
| 908 | STATIC_ASSERT_EQ((100_pc / 2u).ToDouble(), 0.5); | |||
| 909 | STATIC_ASSERT_EQ( | |||
| 910 | (ProportionValue::FromUnderlyingType(6u) / 2u).ToUnderlyingType(), 3u); | |||
| 911 | STATIC_ASSERT_EQ( | |||
| 912 | (ProportionValue::FromUnderlyingType(5u) / 2u).ToUnderlyingType(), 2u); | |||
| 913 | STATIC_ASSERT_EQ( | |||
| 914 | (ProportionValue::FromUnderlyingType(1u) / 2u).ToUnderlyingType(), 0u); | |||
| 915 | STATIC_ASSERT_EQ( | |||
| 916 | (ProportionValue::FromUnderlyingType(0u) / 2u).ToUnderlyingType(), 0u); | |||
| 917 | STATIC_ASSERT((100_pc / 0u).IsInvalid())STATIC_ASSERT_EQ((100_pc / 0u).IsInvalid(), true); | |||
| 918 | STATIC_ASSERT((ProportionValue::MakeInvalid() / 2u).IsInvalid())STATIC_ASSERT_EQ((ProportionValue::MakeInvalid() / 2u).IsInvalid (), true); | |||
| 919 | ||||
| 920 | // Multiplication by a positive integer value. | |||
| 921 | STATIC_ASSERT_EQ((100_pc * 1u).ToDouble(), 1.0); | |||
| 922 | STATIC_ASSERT_EQ((50_pc * 1u).ToDouble(), 0.5); | |||
| 923 | STATIC_ASSERT_EQ((50_pc * 2u).ToDouble(), 1.0); | |||
| 924 | STATIC_ASSERT_EQ((50_pc * 3u).ToDouble(), 1.0); // Clamped. | |||
| 925 | STATIC_ASSERT_EQ( | |||
| 926 | (ProportionValue::FromUnderlyingType(1u) * 2u).ToUnderlyingType(), 2u); | |||
| 927 | STATIC_ASSERT((ProportionValue::MakeInvalid() * 2u).IsInvalid())STATIC_ASSERT_EQ((ProportionValue::MakeInvalid() * 2u).IsInvalid (), true); | |||
| 928 | ||||
| 929 | // Verifying PV - u < (PV / u) * u <= PV, with n=3, PV between 6 and 9 : | |||
| 930 | STATIC_ASSERT_EQ( | |||
| 931 | (ProportionValue::FromUnderlyingType(6u) / 3u).ToUnderlyingType(), 2u); | |||
| 932 | STATIC_ASSERT_EQ( | |||
| 933 | (ProportionValue::FromUnderlyingType(7u) / 3u).ToUnderlyingType(), 2u); | |||
| 934 | STATIC_ASSERT_EQ( | |||
| 935 | (ProportionValue::FromUnderlyingType(8u) / 3u).ToUnderlyingType(), 2u); | |||
| 936 | STATIC_ASSERT_EQ( | |||
| 937 | (ProportionValue::FromUnderlyingType(9u) / 3u).ToUnderlyingType(), 3u); | |||
| 938 | ||||
| 939 | // Direct comparisons. | |||
| 940 | STATIC_ASSERT_EQ(0_pc, 0_pc); | |||
| 941 | STATIC_ASSERT(0_pc == 0_pc)STATIC_ASSERT_EQ(0_pc == 0_pc, true); | |||
| 942 | STATIC_ASSERT(!(0_pc == 100_pc))STATIC_ASSERT_EQ(!(0_pc == 100_pc), true); | |||
| 943 | STATIC_ASSERT(0_pc != 100_pc)STATIC_ASSERT_EQ(0_pc != 100_pc, true); | |||
| 944 | STATIC_ASSERT(!(0_pc != 0_pc))STATIC_ASSERT_EQ(!(0_pc != 0_pc), true); | |||
| 945 | STATIC_ASSERT(0_pc < 100_pc)STATIC_ASSERT_EQ(0_pc < 100_pc, true); | |||
| 946 | STATIC_ASSERT(!(0_pc < 0_pc))STATIC_ASSERT_EQ(!(0_pc < 0_pc), true); | |||
| 947 | STATIC_ASSERT(0_pc <= 0_pc)STATIC_ASSERT_EQ(0_pc <= 0_pc, true); | |||
| 948 | STATIC_ASSERT(0_pc <= 100_pc)STATIC_ASSERT_EQ(0_pc <= 100_pc, true); | |||
| 949 | STATIC_ASSERT(!(100_pc <= 0_pc))STATIC_ASSERT_EQ(!(100_pc <= 0_pc), true); | |||
| 950 | STATIC_ASSERT(100_pc > 0_pc)STATIC_ASSERT_EQ(100_pc > 0_pc, true); | |||
| 951 | STATIC_ASSERT(!(100_pc > 100_pc))STATIC_ASSERT_EQ(!(100_pc > 100_pc), true); | |||
| 952 | STATIC_ASSERT(100_pc >= 0_pc)STATIC_ASSERT_EQ(100_pc >= 0_pc, true); | |||
| 953 | STATIC_ASSERT(100_pc >= 100_pc)STATIC_ASSERT_EQ(100_pc >= 100_pc, true); | |||
| 954 | STATIC_ASSERT(!(0_pc >= 100_pc))STATIC_ASSERT_EQ(!(0_pc >= 100_pc), true); | |||
| 955 | // 0.5 is binary-friendly, so we can double it and compare it exactly. | |||
| 956 | STATIC_ASSERT_EQ(50_pc + 50_pc, 100_pc); | |||
| 957 | ||||
| 958 | #undef STATIC_ASSERT_EQ | |||
| 959 | ||||
| 960 | printf("TestProportionValue done\n"); | |||
| 961 | } | |||
| 962 | ||||
| 963 | template <typename Arg0, typename... Args> | |||
| 964 | bool AreAllEqual(Arg0&& aArg0, Args&&... aArgs) { | |||
| 965 | return ((aArg0 == aArgs) && ...); | |||
| 966 | } | |||
| 967 | ||||
| 968 | void TestProgressLogger() { | |||
| 969 | printf("TestProgressLogger...\n"); | |||
| 970 | ||||
| 971 | using mozilla::ProgressLogger; | |||
| 972 | using mozilla::ProportionValue; | |||
| 973 | using namespace mozilla::literals::ProportionValue_literals; | |||
| 974 | ||||
| 975 | auto progressRefPtr = mozilla::MakeRefPtr<ProgressLogger::SharedProgress>(); | |||
| 976 | MOZ_RELEASE_ASSERT(progressRefPtr)do { static_assert( mozilla::detail::AssertionConditionType< decltype(progressRefPtr)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(progressRefPtr))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("progressRefPtr" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 976 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "progressRefPtr" ")"); do { MOZ_CrashSequence(__null, 976); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 977 | MOZ_RELEASE_ASSERT(progressRefPtr->Progress().IsExactlyZero())do { static_assert( mozilla::detail::AssertionConditionType< decltype(progressRefPtr->Progress().IsExactlyZero())>:: isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(progressRefPtr->Progress().IsExactlyZero()))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("progressRefPtr->Progress().IsExactlyZero()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 977 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "progressRefPtr->Progress().IsExactlyZero()" ")"); do { MOZ_CrashSequence(__null, 977); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 978 | ||||
| 979 | { | |||
| 980 | ProgressLogger pl(progressRefPtr, "Started", "All done"); | |||
| 981 | MOZ_RELEASE_ASSERT(progressRefPtr->Progress().IsExactlyZero())do { static_assert( mozilla::detail::AssertionConditionType< decltype(progressRefPtr->Progress().IsExactlyZero())>:: isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(progressRefPtr->Progress().IsExactlyZero()))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("progressRefPtr->Progress().IsExactlyZero()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 981 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "progressRefPtr->Progress().IsExactlyZero()" ")"); do { MOZ_CrashSequence(__null, 981); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 982 | MOZ_RELEASE_ASSERT(pl.GetGlobalProgress().IsExactlyZero())do { static_assert( mozilla::detail::AssertionConditionType< decltype(pl.GetGlobalProgress().IsExactlyZero())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(pl.GetGlobalProgress().IsExactlyZero()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("pl.GetGlobalProgress().IsExactlyZero()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 982 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "pl.GetGlobalProgress().IsExactlyZero()" ")"); do { MOZ_CrashSequence(__null, 982); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 983 | MOZ_RELEASE_ASSERT(AreAllEqual(progressRefPtr->LastLocation(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), "Started"))>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(AreAllEqual(progressRefPtr-> LastLocation(), pl.GetLastGlobalLocation(), "Started")))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), \"Started\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 984 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), \"Started\")" ")"); do { MOZ_CrashSequence(__null, 984); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 984 | pl.GetLastGlobalLocation(), "Started"))do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), "Started"))>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(AreAllEqual(progressRefPtr-> LastLocation(), pl.GetLastGlobalLocation(), "Started")))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), \"Started\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 984 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), \"Started\")" ")"); do { MOZ_CrashSequence(__null, 984); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 985 | ||||
| 986 | // At this top level, the scale is 1:1. | |||
| 987 | pl.SetLocalProgress(10_pc, "Top 10%"); | |||
| 988 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress (), 10_pc))>::isValid, "invalid assertion condition"); if ( (__builtin_expect(!!(!(!!(AreAllEqual(progressRefPtr->Progress (), pl.GetGlobalProgress(), 10_pc)))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), 10_pc)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 989 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), 10_pc)" ")"); do { MOZ_CrashSequence(__null, 989); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 989 | AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), 10_pc))do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress (), 10_pc))>::isValid, "invalid assertion condition"); if ( (__builtin_expect(!!(!(!!(AreAllEqual(progressRefPtr->Progress (), pl.GetGlobalProgress(), 10_pc)))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), 10_pc)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 989 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), 10_pc)" ")"); do { MOZ_CrashSequence(__null, 989); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 990 | MOZ_RELEASE_ASSERT(AreAllEqual(progressRefPtr->LastLocation(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), "Top 10%"))>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(AreAllEqual(progressRefPtr-> LastLocation(), pl.GetLastGlobalLocation(), "Top 10%")))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), \"Top 10%\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 991 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), \"Top 10%\")" ")"); do { MOZ_CrashSequence(__null, 991); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 991 | pl.GetLastGlobalLocation(), "Top 10%"))do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), "Top 10%"))>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(AreAllEqual(progressRefPtr-> LastLocation(), pl.GetLastGlobalLocation(), "Top 10%")))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), \"Top 10%\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 991 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), \"Top 10%\")" ")"); do { MOZ_CrashSequence(__null, 991); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 992 | ||||
| 993 | pl.SetLocalProgress(0_pc, "Restarted"); | |||
| 994 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress (), 0_pc))>::isValid, "invalid assertion condition"); if ( (__builtin_expect(!!(!(!!(AreAllEqual(progressRefPtr->Progress (), pl.GetGlobalProgress(), 0_pc)))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), 0_pc)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 995 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), 0_pc)" ")"); do { MOZ_CrashSequence(__null, 995); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 995 | AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), 0_pc))do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress (), 0_pc))>::isValid, "invalid assertion condition"); if ( (__builtin_expect(!!(!(!!(AreAllEqual(progressRefPtr->Progress (), pl.GetGlobalProgress(), 0_pc)))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), 0_pc)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 995 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), 0_pc)" ")"); do { MOZ_CrashSequence(__null, 995); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 996 | MOZ_RELEASE_ASSERT(AreAllEqual(progressRefPtr->LastLocation(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), "Restarted"))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(AreAllEqual(progressRefPtr-> LastLocation(), pl.GetLastGlobalLocation(), "Restarted")))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), \"Restarted\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 997 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), \"Restarted\")" ")"); do { MOZ_CrashSequence(__null, 997); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 997 | pl.GetLastGlobalLocation(), "Restarted"))do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), "Restarted"))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(AreAllEqual(progressRefPtr-> LastLocation(), pl.GetLastGlobalLocation(), "Restarted")))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), \"Restarted\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 997 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), \"Restarted\")" ")"); do { MOZ_CrashSequence(__null, 997); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 998 | ||||
| 999 | { | |||
| 1000 | // Create a sub-logger for the whole global range. Notice that this is | |||
| 1001 | // moving the current progress back to 0. | |||
| 1002 | ProgressLogger plSub1 = | |||
| 1003 | pl.CreateSubLoggerFromTo(0_pc, "Sub1 started", 100_pc, "Sub1 ended"); | |||
| 1004 | MOZ_RELEASE_ASSERT(progressRefPtr->Progress().IsExactlyZero())do { static_assert( mozilla::detail::AssertionConditionType< decltype(progressRefPtr->Progress().IsExactlyZero())>:: isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(progressRefPtr->Progress().IsExactlyZero()))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("progressRefPtr->Progress().IsExactlyZero()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1004 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "progressRefPtr->Progress().IsExactlyZero()" ")"); do { MOZ_CrashSequence(__null, 1004); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1005 | MOZ_RELEASE_ASSERT(pl.GetGlobalProgress().IsExactlyZero())do { static_assert( mozilla::detail::AssertionConditionType< decltype(pl.GetGlobalProgress().IsExactlyZero())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(pl.GetGlobalProgress().IsExactlyZero()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("pl.GetGlobalProgress().IsExactlyZero()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1005 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "pl.GetGlobalProgress().IsExactlyZero()" ")"); do { MOZ_CrashSequence(__null, 1005); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1006 | MOZ_RELEASE_ASSERT(plSub1.GetGlobalProgress().IsExactlyZero())do { static_assert( mozilla::detail::AssertionConditionType< decltype(plSub1.GetGlobalProgress().IsExactlyZero())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(plSub1.GetGlobalProgress().IsExactlyZero()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("plSub1.GetGlobalProgress().IsExactlyZero()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1006 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "plSub1.GetGlobalProgress().IsExactlyZero()" ")"); do { MOZ_CrashSequence(__null, 1006); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1007 | MOZ_RELEASE_ASSERT(AreAllEqual(do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), "Sub1 started"))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), "Sub1 started")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), \"Sub1 started\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1009 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), \"Sub1 started\")" ")"); do { MOZ_CrashSequence(__null, 1009); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1008 | progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), "Sub1 started"))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), "Sub1 started")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), \"Sub1 started\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1009 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), \"Sub1 started\")" ")"); do { MOZ_CrashSequence(__null, 1009); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1009 | plSub1.GetLastGlobalLocation(), "Sub1 started"))do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), "Sub1 started"))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), "Sub1 started")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), \"Sub1 started\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1009 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), \"Sub1 started\")" ")"); do { MOZ_CrashSequence(__null, 1009); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1010 | ||||
| 1011 | // At this level, the scale is still 1:1. | |||
| 1012 | plSub1.SetLocalProgress(10_pc, "Sub1 10%"); | |||
| 1013 | MOZ_RELEASE_ASSERT(AreAllEqual(progressRefPtr->Progress(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), 10_pc))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(AreAllEqual(progressRefPtr-> Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress( ), 10_pc)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), 10_pc)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1015 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), 10_pc)" ")"); do { MOZ_CrashSequence(__null, 1015); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1014 | pl.GetGlobalProgress(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), 10_pc))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(AreAllEqual(progressRefPtr-> Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress( ), 10_pc)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), 10_pc)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1015 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), 10_pc)" ")"); do { MOZ_CrashSequence(__null, 1015); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1015 | plSub1.GetGlobalProgress(), 10_pc))do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), 10_pc))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(AreAllEqual(progressRefPtr-> Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress( ), 10_pc)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), 10_pc)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1015 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), 10_pc)" ")"); do { MOZ_CrashSequence(__null, 1015); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1016 | MOZ_RELEASE_ASSERT(AreAllEqual(do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), "Sub1 10%"))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), "Sub1 10%")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), \"Sub1 10%\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1018 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), \"Sub1 10%\")" ")"); do { MOZ_CrashSequence(__null, 1018); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1017 | progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), "Sub1 10%"))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), "Sub1 10%")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), \"Sub1 10%\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1018 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), \"Sub1 10%\")" ")"); do { MOZ_CrashSequence(__null, 1018); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1018 | plSub1.GetLastGlobalLocation(), "Sub1 10%"))do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), "Sub1 10%"))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), "Sub1 10%")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), \"Sub1 10%\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1018 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), \"Sub1 10%\")" ")"); do { MOZ_CrashSequence(__null, 1018); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1019 | ||||
| 1020 | { | |||
| 1021 | // Create a sub-logger half the global range. | |||
| 1022 | // 0 0.25 0.375 0.5 0.625 0.75 1 | |||
| 1023 | // |---------------|-------|-------|-------|-------|---------------| | |||
| 1024 | // plSub2: 0 0.25 0.5 0.75 1 | |||
| 1025 | ProgressLogger plSub2 = plSub1.CreateSubLoggerFromTo( | |||
| 1026 | 25_pc, "Sub2 started", 75_pc, "Sub2 ended"); | |||
| 1027 | MOZ_RELEASE_ASSERT(AreAllEqual(do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 25_pc ))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 25_pc )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 25_pc)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1029 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 25_pc)" ")"); do { MOZ_CrashSequence(__null, 1029); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1028 | progressRefPtr->Progress(), pl.GetGlobalProgress(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 25_pc ))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 25_pc )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 25_pc)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1029 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 25_pc)" ")"); do { MOZ_CrashSequence(__null, 1029); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1029 | plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 25_pc))do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 25_pc ))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 25_pc )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 25_pc)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1029 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 25_pc)" ")"); do { MOZ_CrashSequence(__null, 1029); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1030 | MOZ_RELEASE_ASSERT(AreAllEqual(do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation (), "Sub2 started"))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(AreAllEqual( progressRefPtr-> LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation (), plSub2.GetLastGlobalLocation(), "Sub2 started")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), \"Sub2 started\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1033 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), \"Sub2 started\")" ")"); do { MOZ_CrashSequence(__null, 1033); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1031 | progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation (), "Sub2 started"))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(AreAllEqual( progressRefPtr-> LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation (), plSub2.GetLastGlobalLocation(), "Sub2 started")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), \"Sub2 started\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1033 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), \"Sub2 started\")" ")"); do { MOZ_CrashSequence(__null, 1033); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1032 | plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation (), "Sub2 started"))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(AreAllEqual( progressRefPtr-> LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation (), plSub2.GetLastGlobalLocation(), "Sub2 started")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), \"Sub2 started\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1033 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), \"Sub2 started\")" ")"); do { MOZ_CrashSequence(__null, 1033); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1033 | "Sub2 started"))do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation (), "Sub2 started"))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(AreAllEqual( progressRefPtr-> LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation (), plSub2.GetLastGlobalLocation(), "Sub2 started")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), \"Sub2 started\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1033 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), \"Sub2 started\")" ")"); do { MOZ_CrashSequence(__null, 1033); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1034 | ||||
| 1035 | plSub2.SetLocalProgress(25_pc, "Sub2 25%"); | |||
| 1036 | MOZ_RELEASE_ASSERT(AreAllEqual(do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 37.5_pc ))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 37.5_pc )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 37.5_pc)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1038 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 37.5_pc)" ")"); do { MOZ_CrashSequence(__null, 1038); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1037 | progressRefPtr->Progress(), pl.GetGlobalProgress(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 37.5_pc ))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 37.5_pc )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 37.5_pc)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1038 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 37.5_pc)" ")"); do { MOZ_CrashSequence(__null, 1038); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1038 | plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 37.5_pc))do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 37.5_pc ))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 37.5_pc )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 37.5_pc)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1038 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 37.5_pc)" ")"); do { MOZ_CrashSequence(__null, 1038); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1039 | MOZ_RELEASE_ASSERT(AreAllEqual(do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation (), "Sub2 25%"))>::isValid, "invalid assertion condition") ; if ((__builtin_expect(!!(!(!!(AreAllEqual( progressRefPtr-> LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation (), plSub2.GetLastGlobalLocation(), "Sub2 25%")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), \"Sub2 25%\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1042 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), \"Sub2 25%\")" ")"); do { MOZ_CrashSequence(__null, 1042); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1040 | progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation (), "Sub2 25%"))>::isValid, "invalid assertion condition") ; if ((__builtin_expect(!!(!(!!(AreAllEqual( progressRefPtr-> LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation (), plSub2.GetLastGlobalLocation(), "Sub2 25%")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), \"Sub2 25%\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1042 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), \"Sub2 25%\")" ")"); do { MOZ_CrashSequence(__null, 1042); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1041 | plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation (), "Sub2 25%"))>::isValid, "invalid assertion condition") ; if ((__builtin_expect(!!(!(!!(AreAllEqual( progressRefPtr-> LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation (), plSub2.GetLastGlobalLocation(), "Sub2 25%")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), \"Sub2 25%\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1042 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), \"Sub2 25%\")" ")"); do { MOZ_CrashSequence(__null, 1042); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1042 | "Sub2 25%"))do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation (), "Sub2 25%"))>::isValid, "invalid assertion condition") ; if ((__builtin_expect(!!(!(!!(AreAllEqual( progressRefPtr-> LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation (), plSub2.GetLastGlobalLocation(), "Sub2 25%")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), \"Sub2 25%\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1042 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), \"Sub2 25%\")" ")"); do { MOZ_CrashSequence(__null, 1042); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1043 | ||||
| 1044 | plSub2.SetLocalProgress(50_pc, "Sub2 50%"); | |||
| 1045 | MOZ_RELEASE_ASSERT(AreAllEqual(do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 50_pc ))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 50_pc )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 50_pc)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1047 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 50_pc)" ")"); do { MOZ_CrashSequence(__null, 1047); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1046 | progressRefPtr->Progress(), pl.GetGlobalProgress(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 50_pc ))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 50_pc )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 50_pc)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1047 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 50_pc)" ")"); do { MOZ_CrashSequence(__null, 1047); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1047 | plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 50_pc))do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 50_pc ))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 50_pc )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 50_pc)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1047 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 50_pc)" ")"); do { MOZ_CrashSequence(__null, 1047); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1048 | MOZ_RELEASE_ASSERT(AreAllEqual(do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation (), "Sub2 50%"))>::isValid, "invalid assertion condition") ; if ((__builtin_expect(!!(!(!!(AreAllEqual( progressRefPtr-> LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation (), plSub2.GetLastGlobalLocation(), "Sub2 50%")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), \"Sub2 50%\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1051 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), \"Sub2 50%\")" ")"); do { MOZ_CrashSequence(__null, 1051); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1049 | progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation (), "Sub2 50%"))>::isValid, "invalid assertion condition") ; if ((__builtin_expect(!!(!(!!(AreAllEqual( progressRefPtr-> LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation (), plSub2.GetLastGlobalLocation(), "Sub2 50%")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), \"Sub2 50%\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1051 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), \"Sub2 50%\")" ")"); do { MOZ_CrashSequence(__null, 1051); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1050 | plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation (), "Sub2 50%"))>::isValid, "invalid assertion condition") ; if ((__builtin_expect(!!(!(!!(AreAllEqual( progressRefPtr-> LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation (), plSub2.GetLastGlobalLocation(), "Sub2 50%")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), \"Sub2 50%\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1051 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), \"Sub2 50%\")" ")"); do { MOZ_CrashSequence(__null, 1051); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1051 | "Sub2 50%"))do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation (), "Sub2 50%"))>::isValid, "invalid assertion condition") ; if ((__builtin_expect(!!(!(!!(AreAllEqual( progressRefPtr-> LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation (), plSub2.GetLastGlobalLocation(), "Sub2 50%")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), \"Sub2 50%\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1051 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), \"Sub2 50%\")" ")"); do { MOZ_CrashSequence(__null, 1051); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1052 | ||||
| 1053 | { | |||
| 1054 | // Create a sub-logger half the parent range. | |||
| 1055 | // 0 0.25 0.375 0.5 0.625 0.75 1 | |||
| 1056 | // |---------------|-------|-------|-------|-------|---------------| | |||
| 1057 | // plSub2: 0 0.25 0.5 0.75 1 | |||
| 1058 | // plSub3: 0 0.5 1 | |||
| 1059 | ProgressLogger plSub3 = plSub2.CreateSubLoggerTo( | |||
| 1060 | "Sub3 started", 100_pc, ProgressLogger::NO_LOCATION_UPDATE); | |||
| 1061 | MOZ_RELEASE_ASSERT(AreAllEqual(do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), plSub3 .GetGlobalProgress(), 50_pc))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(AreAllEqual( progressRefPtr-> Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress( ), plSub2.GetGlobalProgress(), plSub3.GetGlobalProgress(), 50_pc )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), plSub3.GetGlobalProgress(), 50_pc)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1064 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), plSub3.GetGlobalProgress(), 50_pc)" ")"); do { MOZ_CrashSequence(__null, 1064); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1062 | progressRefPtr->Progress(), pl.GetGlobalProgress(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), plSub3 .GetGlobalProgress(), 50_pc))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(AreAllEqual( progressRefPtr-> Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress( ), plSub2.GetGlobalProgress(), plSub3.GetGlobalProgress(), 50_pc )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), plSub3.GetGlobalProgress(), 50_pc)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1064 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), plSub3.GetGlobalProgress(), 50_pc)" ")"); do { MOZ_CrashSequence(__null, 1064); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1063 | plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), plSub3 .GetGlobalProgress(), 50_pc))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(AreAllEqual( progressRefPtr-> Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress( ), plSub2.GetGlobalProgress(), plSub3.GetGlobalProgress(), 50_pc )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), plSub3.GetGlobalProgress(), 50_pc)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1064 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), plSub3.GetGlobalProgress(), 50_pc)" ")"); do { MOZ_CrashSequence(__null, 1064); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1064 | plSub3.GetGlobalProgress(), 50_pc))do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), plSub3 .GetGlobalProgress(), 50_pc))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(AreAllEqual( progressRefPtr-> Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress( ), plSub2.GetGlobalProgress(), plSub3.GetGlobalProgress(), 50_pc )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), plSub3.GetGlobalProgress(), 50_pc)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1064 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), plSub3.GetGlobalProgress(), 50_pc)" ")"); do { MOZ_CrashSequence(__null, 1064); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1065 | MOZ_RELEASE_ASSERT(AreAllEqual(do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation (), plSub3.GetLastGlobalLocation(), "Sub3 started"))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation (), plSub3.GetLastGlobalLocation(), "Sub3 started")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), plSub3.GetLastGlobalLocation(), \"Sub3 started\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1068 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), plSub3.GetLastGlobalLocation(), \"Sub3 started\")" ")"); do { MOZ_CrashSequence(__null, 1068); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1066 | progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation (), plSub3.GetLastGlobalLocation(), "Sub3 started"))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation (), plSub3.GetLastGlobalLocation(), "Sub3 started")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), plSub3.GetLastGlobalLocation(), \"Sub3 started\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1068 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), plSub3.GetLastGlobalLocation(), \"Sub3 started\")" ")"); do { MOZ_CrashSequence(__null, 1068); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1067 | plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation (), plSub3.GetLastGlobalLocation(), "Sub3 started"))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation (), plSub3.GetLastGlobalLocation(), "Sub3 started")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), plSub3.GetLastGlobalLocation(), \"Sub3 started\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1068 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), plSub3.GetLastGlobalLocation(), \"Sub3 started\")" ")"); do { MOZ_CrashSequence(__null, 1068); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1068 | plSub3.GetLastGlobalLocation(), "Sub3 started"))do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation (), plSub3.GetLastGlobalLocation(), "Sub3 started"))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation (), plSub3.GetLastGlobalLocation(), "Sub3 started")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), plSub3.GetLastGlobalLocation(), \"Sub3 started\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1068 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), plSub3.GetLastGlobalLocation(), \"Sub3 started\")" ")"); do { MOZ_CrashSequence(__null, 1068); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1069 | ||||
| 1070 | plSub3.SetLocalProgress(50_pc, "Sub3 50%"); | |||
| 1071 | MOZ_RELEASE_ASSERT(AreAllEqual(do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), plSub3 .GetGlobalProgress(), 62.5_pc))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(AreAllEqual( progressRefPtr-> Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress( ), plSub2.GetGlobalProgress(), plSub3.GetGlobalProgress(), 62.5_pc )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), plSub3.GetGlobalProgress(), 62.5_pc)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1074 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), plSub3.GetGlobalProgress(), 62.5_pc)" ")"); do { MOZ_CrashSequence(__null, 1074); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1072 | progressRefPtr->Progress(), pl.GetGlobalProgress(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), plSub3 .GetGlobalProgress(), 62.5_pc))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(AreAllEqual( progressRefPtr-> Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress( ), plSub2.GetGlobalProgress(), plSub3.GetGlobalProgress(), 62.5_pc )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), plSub3.GetGlobalProgress(), 62.5_pc)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1074 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), plSub3.GetGlobalProgress(), 62.5_pc)" ")"); do { MOZ_CrashSequence(__null, 1074); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1073 | plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), plSub3 .GetGlobalProgress(), 62.5_pc))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(AreAllEqual( progressRefPtr-> Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress( ), plSub2.GetGlobalProgress(), plSub3.GetGlobalProgress(), 62.5_pc )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), plSub3.GetGlobalProgress(), 62.5_pc)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1074 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), plSub3.GetGlobalProgress(), 62.5_pc)" ")"); do { MOZ_CrashSequence(__null, 1074); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1074 | plSub3.GetGlobalProgress(), 62.5_pc))do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), plSub3 .GetGlobalProgress(), 62.5_pc))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(AreAllEqual( progressRefPtr-> Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress( ), plSub2.GetGlobalProgress(), plSub3.GetGlobalProgress(), 62.5_pc )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), plSub3.GetGlobalProgress(), 62.5_pc)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1074 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), plSub3.GetGlobalProgress(), 62.5_pc)" ")"); do { MOZ_CrashSequence(__null, 1074); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1075 | MOZ_RELEASE_ASSERT(AreAllEqual(do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation (), plSub3.GetLastGlobalLocation(), "Sub3 50%"))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation (), plSub3.GetLastGlobalLocation(), "Sub3 50%")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), plSub3.GetLastGlobalLocation(), \"Sub3 50%\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1078 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), plSub3.GetLastGlobalLocation(), \"Sub3 50%\")" ")"); do { MOZ_CrashSequence(__null, 1078); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1076 | progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation (), plSub3.GetLastGlobalLocation(), "Sub3 50%"))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation (), plSub3.GetLastGlobalLocation(), "Sub3 50%")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), plSub3.GetLastGlobalLocation(), \"Sub3 50%\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1078 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), plSub3.GetLastGlobalLocation(), \"Sub3 50%\")" ")"); do { MOZ_CrashSequence(__null, 1078); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1077 | plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation (), plSub3.GetLastGlobalLocation(), "Sub3 50%"))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation (), plSub3.GetLastGlobalLocation(), "Sub3 50%")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), plSub3.GetLastGlobalLocation(), \"Sub3 50%\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1078 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), plSub3.GetLastGlobalLocation(), \"Sub3 50%\")" ")"); do { MOZ_CrashSequence(__null, 1078); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1078 | plSub3.GetLastGlobalLocation(), "Sub3 50%"))do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation (), plSub3.GetLastGlobalLocation(), "Sub3 50%"))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation (), plSub3.GetLastGlobalLocation(), "Sub3 50%")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), plSub3.GetLastGlobalLocation(), \"Sub3 50%\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1078 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), plSub3.GetLastGlobalLocation(), \"Sub3 50%\")" ")"); do { MOZ_CrashSequence(__null, 1078); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1079 | } // End of plSub3 | |||
| 1080 | ||||
| 1081 | // When plSub3 ends, progress moves to its 100%, which is also plSub2's | |||
| 1082 | // 100%, which is plSub1's and the global progress of 75% | |||
| 1083 | MOZ_RELEASE_ASSERT(AreAllEqual(do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 75_pc ))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 75_pc )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 75_pc)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1085 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 75_pc)" ")"); do { MOZ_CrashSequence(__null, 1085); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1084 | progressRefPtr->Progress(), pl.GetGlobalProgress(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 75_pc ))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 75_pc )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 75_pc)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1085 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 75_pc)" ")"); do { MOZ_CrashSequence(__null, 1085); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1085 | plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 75_pc))do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 75_pc ))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 75_pc )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 75_pc)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1085 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), plSub2.GetGlobalProgress(), 75_pc)" ")"); do { MOZ_CrashSequence(__null, 1085); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1086 | // But location is still at the last explicit update. | |||
| 1087 | MOZ_RELEASE_ASSERT(AreAllEqual(do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation (), "Sub3 50%"))>::isValid, "invalid assertion condition") ; if ((__builtin_expect(!!(!(!!(AreAllEqual( progressRefPtr-> LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation (), plSub2.GetLastGlobalLocation(), "Sub3 50%")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), \"Sub3 50%\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1090 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), \"Sub3 50%\")" ")"); do { MOZ_CrashSequence(__null, 1090); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1088 | progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation (), "Sub3 50%"))>::isValid, "invalid assertion condition") ; if ((__builtin_expect(!!(!(!!(AreAllEqual( progressRefPtr-> LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation (), plSub2.GetLastGlobalLocation(), "Sub3 50%")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), \"Sub3 50%\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1090 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), \"Sub3 50%\")" ")"); do { MOZ_CrashSequence(__null, 1090); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1089 | plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation (), "Sub3 50%"))>::isValid, "invalid assertion condition") ; if ((__builtin_expect(!!(!(!!(AreAllEqual( progressRefPtr-> LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation (), plSub2.GetLastGlobalLocation(), "Sub3 50%")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), \"Sub3 50%\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1090 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), \"Sub3 50%\")" ")"); do { MOZ_CrashSequence(__null, 1090); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1090 | "Sub3 50%"))do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation (), "Sub3 50%"))>::isValid, "invalid assertion condition") ; if ((__builtin_expect(!!(!(!!(AreAllEqual( progressRefPtr-> LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation (), plSub2.GetLastGlobalLocation(), "Sub3 50%")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), \"Sub3 50%\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1090 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), plSub2.GetLastGlobalLocation(), \"Sub3 50%\")" ")"); do { MOZ_CrashSequence(__null, 1090); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1091 | } // End of plSub2 | |||
| 1092 | ||||
| 1093 | MOZ_RELEASE_ASSERT(AreAllEqual(progressRefPtr->Progress(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), 75_pc))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(AreAllEqual(progressRefPtr-> Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress( ), 75_pc)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), 75_pc)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1095 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), 75_pc)" ")"); do { MOZ_CrashSequence(__null, 1095); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1094 | pl.GetGlobalProgress(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), 75_pc))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(AreAllEqual(progressRefPtr-> Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress( ), 75_pc)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), 75_pc)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1095 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), 75_pc)" ")"); do { MOZ_CrashSequence(__null, 1095); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1095 | plSub1.GetGlobalProgress(), 75_pc))do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress (), plSub1.GetGlobalProgress(), 75_pc))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(AreAllEqual(progressRefPtr-> Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress( ), 75_pc)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), 75_pc)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1095 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), plSub1.GetGlobalProgress(), 75_pc)" ")"); do { MOZ_CrashSequence(__null, 1095); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1096 | MOZ_RELEASE_ASSERT(AreAllEqual(do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), "Sub2 ended"))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), "Sub2 ended")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), \"Sub2 ended\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1098 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), \"Sub2 ended\")" ")"); do { MOZ_CrashSequence(__null, 1098); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1097 | progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), "Sub2 ended"))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), "Sub2 ended")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), \"Sub2 ended\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1098 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), \"Sub2 ended\")" ")"); do { MOZ_CrashSequence(__null, 1098); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1098 | plSub1.GetLastGlobalLocation(), "Sub2 ended"))do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), "Sub2 ended"))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), plSub1.GetLastGlobalLocation(), "Sub2 ended")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), \"Sub2 ended\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1098 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), plSub1.GetLastGlobalLocation(), \"Sub2 ended\")" ")"); do { MOZ_CrashSequence(__null, 1098); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1099 | } // End of plSub1 | |||
| 1100 | ||||
| 1101 | MOZ_RELEASE_ASSERT(progressRefPtr->Progress().IsExactlyOne())do { static_assert( mozilla::detail::AssertionConditionType< decltype(progressRefPtr->Progress().IsExactlyOne())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(progressRefPtr->Progress().IsExactlyOne()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("progressRefPtr->Progress().IsExactlyOne()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1101 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "progressRefPtr->Progress().IsExactlyOne()" ")"); do { MOZ_CrashSequence(__null, 1101); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1102 | MOZ_RELEASE_ASSERT(pl.GetGlobalProgress().IsExactlyOne())do { static_assert( mozilla::detail::AssertionConditionType< decltype(pl.GetGlobalProgress().IsExactlyOne())>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(! !(pl.GetGlobalProgress().IsExactlyOne()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("pl.GetGlobalProgress().IsExactlyOne()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1102 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "pl.GetGlobalProgress().IsExactlyOne()" ")"); do { MOZ_CrashSequence(__null, 1102); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1103 | MOZ_RELEASE_ASSERT(AreAllEqual(progressRefPtr->LastLocation(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), "Sub1 ended"))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(AreAllEqual(progressRefPtr-> LastLocation(), pl.GetLastGlobalLocation(), "Sub1 ended")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), \"Sub1 ended\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1104 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), \"Sub1 ended\")" ")"); do { MOZ_CrashSequence(__null, 1104); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1104 | pl.GetLastGlobalLocation(), "Sub1 ended"))do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), "Sub1 ended"))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(AreAllEqual(progressRefPtr-> LastLocation(), pl.GetLastGlobalLocation(), "Sub1 ended")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), \"Sub1 ended\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1104 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), \"Sub1 ended\")" ")"); do { MOZ_CrashSequence(__null, 1104); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1105 | ||||
| 1106 | const auto loopStart = 75_pc; | |||
| 1107 | const auto loopEnd = 87.5_pc; | |||
| 1108 | const uint32_t loopCount = 8; | |||
| 1109 | uint32_t expectedIndex = 0u; | |||
| 1110 | auto expectedIterationStart = loopStart; | |||
| 1111 | const auto iterationIncrement = (loopEnd - loopStart) / loopCount; | |||
| 1112 | for (auto&& [index, loopPL] : pl.CreateLoopSubLoggersFromTo( | |||
| 1113 | loopStart, loopEnd, loopCount, "looping...")) { | |||
| 1114 | MOZ_RELEASE_ASSERT(index == expectedIndex)do { static_assert( mozilla::detail::AssertionConditionType< decltype(index == expectedIndex)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(index == expectedIndex))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("index == expectedIndex" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1114 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "index == expectedIndex" ")"); do { MOZ_CrashSequence(__null, 1114); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1115 | ++expectedIndex; | |||
| 1116 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress (), loopPL.GetGlobalProgress(), expectedIterationStart))>:: isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress (), loopPL.GetGlobalProgress(), expectedIterationStart)))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), loopPL.GetGlobalProgress(), expectedIterationStart)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1118 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), loopPL.GetGlobalProgress(), expectedIterationStart)" ")"); do { MOZ_CrashSequence(__null, 1118); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1117 | AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress (), loopPL.GetGlobalProgress(), expectedIterationStart))>:: isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress (), loopPL.GetGlobalProgress(), expectedIterationStart)))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), loopPL.GetGlobalProgress(), expectedIterationStart)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1118 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), loopPL.GetGlobalProgress(), expectedIterationStart)" ")"); do { MOZ_CrashSequence(__null, 1118); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1118 | loopPL.GetGlobalProgress(), expectedIterationStart))do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress (), loopPL.GetGlobalProgress(), expectedIterationStart))>:: isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress (), loopPL.GetGlobalProgress(), expectedIterationStart)))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), loopPL.GetGlobalProgress(), expectedIterationStart)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1118 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), loopPL.GetGlobalProgress(), expectedIterationStart)" ")"); do { MOZ_CrashSequence(__null, 1118); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1119 | MOZ_RELEASE_ASSERT(AreAllEqual(do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), loopPL.GetLastGlobalLocation(), "looping..."))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), loopPL.GetLastGlobalLocation(), "looping...")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), loopPL.GetLastGlobalLocation(), \"looping...\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1121 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), loopPL.GetLastGlobalLocation(), \"looping...\")" ")"); do { MOZ_CrashSequence(__null, 1121); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1120 | progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), loopPL.GetLastGlobalLocation(), "looping..."))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), loopPL.GetLastGlobalLocation(), "looping...")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), loopPL.GetLastGlobalLocation(), \"looping...\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1121 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), loopPL.GetLastGlobalLocation(), \"looping...\")" ")"); do { MOZ_CrashSequence(__null, 1121); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1121 | loopPL.GetLastGlobalLocation(), "looping..."))do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), loopPL.GetLastGlobalLocation(), "looping..."))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), loopPL.GetLastGlobalLocation(), "looping...")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), loopPL.GetLastGlobalLocation(), \"looping...\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1121 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual( progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), loopPL.GetLastGlobalLocation(), \"looping...\")" ")"); do { MOZ_CrashSequence(__null, 1121); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1122 | ||||
| 1123 | loopPL.SetLocalProgress(50_pc, "half"); | |||
| 1124 | MOZ_RELEASE_ASSERT(loopPL.GetGlobalProgress() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(loopPL.GetGlobalProgress() == expectedIterationStart + iterationIncrement / 2u)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(loopPL.GetGlobalProgress() == expectedIterationStart + iterationIncrement / 2u))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("loopPL.GetGlobalProgress() == expectedIterationStart + iterationIncrement / 2u" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1125 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "loopPL.GetGlobalProgress() == expectedIterationStart + iterationIncrement / 2u" ")"); do { MOZ_CrashSequence(__null, 1125); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1125 | expectedIterationStart + iterationIncrement / 2u)do { static_assert( mozilla::detail::AssertionConditionType< decltype(loopPL.GetGlobalProgress() == expectedIterationStart + iterationIncrement / 2u)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(loopPL.GetGlobalProgress() == expectedIterationStart + iterationIncrement / 2u))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("loopPL.GetGlobalProgress() == expectedIterationStart + iterationIncrement / 2u" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1125 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "loopPL.GetGlobalProgress() == expectedIterationStart + iterationIncrement / 2u" ")"); do { MOZ_CrashSequence(__null, 1125); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1126 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress (), loopPL.GetGlobalProgress(), expectedIterationStart + iterationIncrement / 2u))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress (), loopPL.GetGlobalProgress(), expectedIterationStart + iterationIncrement / 2u)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), loopPL.GetGlobalProgress(), expectedIterationStart + iterationIncrement / 2u)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1129 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), loopPL.GetGlobalProgress(), expectedIterationStart + iterationIncrement / 2u)" ")"); do { MOZ_CrashSequence(__null, 1129); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1127 | AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress (), loopPL.GetGlobalProgress(), expectedIterationStart + iterationIncrement / 2u))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress (), loopPL.GetGlobalProgress(), expectedIterationStart + iterationIncrement / 2u)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), loopPL.GetGlobalProgress(), expectedIterationStart + iterationIncrement / 2u)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1129 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), loopPL.GetGlobalProgress(), expectedIterationStart + iterationIncrement / 2u)" ")"); do { MOZ_CrashSequence(__null, 1129); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1128 | loopPL.GetGlobalProgress(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress (), loopPL.GetGlobalProgress(), expectedIterationStart + iterationIncrement / 2u))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress (), loopPL.GetGlobalProgress(), expectedIterationStart + iterationIncrement / 2u)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), loopPL.GetGlobalProgress(), expectedIterationStart + iterationIncrement / 2u)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1129 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), loopPL.GetGlobalProgress(), expectedIterationStart + iterationIncrement / 2u)" ")"); do { MOZ_CrashSequence(__null, 1129); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1129 | expectedIterationStart + iterationIncrement / 2u))do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress (), loopPL.GetGlobalProgress(), expectedIterationStart + iterationIncrement / 2u))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress (), loopPL.GetGlobalProgress(), expectedIterationStart + iterationIncrement / 2u)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), loopPL.GetGlobalProgress(), expectedIterationStart + iterationIncrement / 2u)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1129 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), loopPL.GetGlobalProgress(), expectedIterationStart + iterationIncrement / 2u)" ")"); do { MOZ_CrashSequence(__null, 1129); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1130 | MOZ_RELEASE_ASSERT(AreAllEqual(progressRefPtr->LastLocation(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), loopPL.GetLastGlobalLocation(), "half"))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(AreAllEqual(progressRefPtr-> LastLocation(), pl.GetLastGlobalLocation(), loopPL.GetLastGlobalLocation (), "half")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), loopPL.GetLastGlobalLocation(), \"half\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1132 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), loopPL.GetLastGlobalLocation(), \"half\")" ")"); do { MOZ_CrashSequence(__null, 1132); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1131 | pl.GetLastGlobalLocation(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), loopPL.GetLastGlobalLocation(), "half"))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(AreAllEqual(progressRefPtr-> LastLocation(), pl.GetLastGlobalLocation(), loopPL.GetLastGlobalLocation (), "half")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), loopPL.GetLastGlobalLocation(), \"half\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1132 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), loopPL.GetLastGlobalLocation(), \"half\")" ")"); do { MOZ_CrashSequence(__null, 1132); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1132 | loopPL.GetLastGlobalLocation(), "half"))do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), loopPL.GetLastGlobalLocation(), "half"))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(AreAllEqual(progressRefPtr-> LastLocation(), pl.GetLastGlobalLocation(), loopPL.GetLastGlobalLocation (), "half")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), loopPL.GetLastGlobalLocation(), \"half\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1132 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), loopPL.GetLastGlobalLocation(), \"half\")" ")"); do { MOZ_CrashSequence(__null, 1132); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1133 | ||||
| 1134 | expectedIterationStart = expectedIterationStart + iterationIncrement; | |||
| 1135 | } | |||
| 1136 | MOZ_RELEASE_ASSERT(AreAllEqual(progressRefPtr->Progress(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress (), expectedIterationStart))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(AreAllEqual(progressRefPtr-> Progress(), pl.GetGlobalProgress(), expectedIterationStart))) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), expectedIterationStart)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1138 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), expectedIterationStart)" ")"); do { MOZ_CrashSequence(__null, 1138); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1137 | pl.GetGlobalProgress(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress (), expectedIterationStart))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(AreAllEqual(progressRefPtr-> Progress(), pl.GetGlobalProgress(), expectedIterationStart))) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), expectedIterationStart)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1138 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), expectedIterationStart)" ")"); do { MOZ_CrashSequence(__null, 1138); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1138 | expectedIterationStart))do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress (), expectedIterationStart))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(AreAllEqual(progressRefPtr-> Progress(), pl.GetGlobalProgress(), expectedIterationStart))) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), expectedIterationStart)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1138 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual(progressRefPtr->Progress(), pl.GetGlobalProgress(), expectedIterationStart)" ")"); do { MOZ_CrashSequence(__null, 1138); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1139 | MOZ_RELEASE_ASSERT(AreAllEqual(progressRefPtr->LastLocation(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), "looping..."))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(AreAllEqual(progressRefPtr-> LastLocation(), pl.GetLastGlobalLocation(), "looping...")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), \"looping...\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1140 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), \"looping...\")" ")"); do { MOZ_CrashSequence(__null, 1140); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1140 | pl.GetLastGlobalLocation(), "looping..."))do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation (), "looping..."))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(AreAllEqual(progressRefPtr-> LastLocation(), pl.GetLastGlobalLocation(), "looping...")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), \"looping...\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1140 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual(progressRefPtr->LastLocation(), pl.GetLastGlobalLocation(), \"looping...\")" ")"); do { MOZ_CrashSequence(__null, 1140); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1141 | } // End of pl | |||
| 1142 | MOZ_RELEASE_ASSERT(progressRefPtr->Progress().IsExactlyOne())do { static_assert( mozilla::detail::AssertionConditionType< decltype(progressRefPtr->Progress().IsExactlyOne())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(progressRefPtr->Progress().IsExactlyOne()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("progressRefPtr->Progress().IsExactlyOne()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1142 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "progressRefPtr->Progress().IsExactlyOne()" ")"); do { MOZ_CrashSequence(__null, 1142); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1143 | MOZ_RELEASE_ASSERT(AreAllEqual(progressRefPtr->LastLocation(), "All done"))do { static_assert( mozilla::detail::AssertionConditionType< decltype(AreAllEqual(progressRefPtr->LastLocation(), "All done" ))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(AreAllEqual(progressRefPtr->LastLocation(), "All done" )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("AreAllEqual(progressRefPtr->LastLocation(), \"All done\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1143 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "AreAllEqual(progressRefPtr->LastLocation(), \"All done\")" ")"); do { MOZ_CrashSequence(__null, 1143); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1144 | ||||
| 1145 | printf("TestProgressLogger done\n"); | |||
| 1146 | } | |||
| 1147 | ||||
| 1148 | [[maybe_unused]] static void SleepMilli(unsigned aMilliseconds) { | |||
| 1149 | #if defined(_MSC_VER) || defined(__MINGW32__) | |||
| 1150 | Sleep(aMilliseconds); | |||
| 1151 | #else | |||
| 1152 | struct timespec ts = {/* .tv_sec */ static_cast<time_t>(aMilliseconds / 1000), | |||
| 1153 | /* ts.tv_nsec */ long(aMilliseconds % 1000) * 1000000}; | |||
| 1154 | struct timespec tr = {0, 0}; | |||
| 1155 | while (nanosleep(&ts, &tr)) { | |||
| 1156 | if (errno(*__errno_location ()) == EINTR4) { | |||
| 1157 | ts = tr; | |||
| 1158 | } else { | |||
| 1159 | printf("nanosleep() -> %s\n", strerror(errno(*__errno_location ()))); | |||
| 1160 | exit(1); | |||
| 1161 | } | |||
| 1162 | } | |||
| 1163 | #endif | |||
| 1164 | } | |||
| 1165 | ||||
| 1166 | [[maybe_unused]] static void WaitUntilTimeStampChanges( | |||
| 1167 | const mozilla::TimeStamp& aTimeStampToCompare = mozilla::TimeStamp::Now()) { | |||
| 1168 | while (aTimeStampToCompare == mozilla::TimeStamp::Now()) { | |||
| 1169 | SleepMilli(1); | |||
| 1170 | } | |||
| 1171 | } | |||
| 1172 | ||||
| 1173 | using namespace mozilla; | |||
| 1174 | ||||
| 1175 | void TestPowerOfTwoMask() { | |||
| 1176 | printf("TestPowerOfTwoMask...\n"); | |||
| 1177 | ||||
| 1178 | static_assert(MakePowerOfTwoMask<uint32_t, 0>().MaskValue() == 0); | |||
| 1179 | constexpr PowerOfTwoMask<uint32_t> c0 = MakePowerOfTwoMask<uint32_t, 0>(); | |||
| 1180 | MOZ_RELEASE_ASSERT(c0.MaskValue() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(c0.MaskValue() == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(c0.MaskValue() == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("c0.MaskValue() == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1180 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "c0.MaskValue() == 0" ")"); do { MOZ_CrashSequence(__null, 1180); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1181 | ||||
| 1182 | static_assert(MakePowerOfTwoMask<uint32_t, 0xFFu>().MaskValue() == 0xFFu); | |||
| 1183 | constexpr PowerOfTwoMask<uint32_t> cFF = | |||
| 1184 | MakePowerOfTwoMask<uint32_t, 0xFFu>(); | |||
| 1185 | MOZ_RELEASE_ASSERT(cFF.MaskValue() == 0xFFu)do { static_assert( mozilla::detail::AssertionConditionType< decltype(cFF.MaskValue() == 0xFFu)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(cFF.MaskValue() == 0xFFu))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("cFF.MaskValue() == 0xFFu" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1185 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "cFF.MaskValue() == 0xFFu" ")"); do { MOZ_CrashSequence(__null, 1185); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1186 | ||||
| 1187 | static_assert(MakePowerOfTwoMask<uint32_t, 0xFFFFFFFFu>().MaskValue() == | |||
| 1188 | 0xFFFFFFFFu); | |||
| 1189 | constexpr PowerOfTwoMask<uint32_t> cFFFFFFFF = | |||
| 1190 | MakePowerOfTwoMask<uint32_t, 0xFFFFFFFFu>(); | |||
| 1191 | MOZ_RELEASE_ASSERT(cFFFFFFFF.MaskValue() == 0xFFFFFFFFu)do { static_assert( mozilla::detail::AssertionConditionType< decltype(cFFFFFFFF.MaskValue() == 0xFFFFFFFFu)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(cFFFFFFFF.MaskValue() == 0xFFFFFFFFu ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "cFFFFFFFF.MaskValue() == 0xFFFFFFFFu", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1191); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "cFFFFFFFF.MaskValue() == 0xFFFFFFFFu" ")"); do { MOZ_CrashSequence(__null, 1191); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1192 | ||||
| 1193 | struct TestDataU32 { | |||
| 1194 | uint32_t mInput; | |||
| 1195 | uint32_t mMask; | |||
| 1196 | }; | |||
| 1197 | // clang-format off | |||
| 1198 | TestDataU32 tests[] = { | |||
| 1199 | { 0, 0 }, | |||
| 1200 | { 1, 1 }, | |||
| 1201 | { 2, 3 }, | |||
| 1202 | { 3, 3 }, | |||
| 1203 | { 4, 7 }, | |||
| 1204 | { 5, 7 }, | |||
| 1205 | { (1u << 31) - 1, (1u << 31) - 1 }, | |||
| 1206 | { (1u << 31), uint32_t(-1) }, | |||
| 1207 | { (1u << 31) + 1, uint32_t(-1) }, | |||
| 1208 | { uint32_t(-1), uint32_t(-1) } | |||
| 1209 | }; | |||
| 1210 | // clang-format on | |||
| 1211 | for (const TestDataU32& test : tests) { | |||
| 1212 | PowerOfTwoMask<uint32_t> p2m(test.mInput); | |||
| 1213 | MOZ_RELEASE_ASSERT(p2m.MaskValue() == test.mMask)do { static_assert( mozilla::detail::AssertionConditionType< decltype(p2m.MaskValue() == test.mMask)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(p2m.MaskValue() == test.mMask ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "p2m.MaskValue() == test.mMask", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1213); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "p2m.MaskValue() == test.mMask" ")"); do { MOZ_CrashSequence(__null, 1213); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1214 | for (const TestDataU32& inner : tests) { | |||
| 1215 | if (p2m.MaskValue() != uint32_t(-1)) { | |||
| 1216 | MOZ_RELEASE_ASSERT((inner.mInput % p2m) ==do { static_assert( mozilla::detail::AssertionConditionType< decltype((inner.mInput % p2m) == (inner.mInput % (p2m.MaskValue () + 1)))>::isValid, "invalid assertion condition"); if (( __builtin_expect(!!(!(!!((inner.mInput % p2m) == (inner.mInput % (p2m.MaskValue() + 1))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("(inner.mInput % p2m) == (inner.mInput % (p2m.MaskValue() + 1))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1217 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "(inner.mInput % p2m) == (inner.mInput % (p2m.MaskValue() + 1))" ")"); do { MOZ_CrashSequence(__null, 1217); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1217 | (inner.mInput % (p2m.MaskValue() + 1)))do { static_assert( mozilla::detail::AssertionConditionType< decltype((inner.mInput % p2m) == (inner.mInput % (p2m.MaskValue () + 1)))>::isValid, "invalid assertion condition"); if (( __builtin_expect(!!(!(!!((inner.mInput % p2m) == (inner.mInput % (p2m.MaskValue() + 1))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("(inner.mInput % p2m) == (inner.mInput % (p2m.MaskValue() + 1))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1217 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "(inner.mInput % p2m) == (inner.mInput % (p2m.MaskValue() + 1))" ")"); do { MOZ_CrashSequence(__null, 1217); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1218 | } | |||
| 1219 | MOZ_RELEASE_ASSERT((inner.mInput & p2m) == (inner.mInput % p2m))do { static_assert( mozilla::detail::AssertionConditionType< decltype((inner.mInput & p2m) == (inner.mInput % p2m))> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!((inner.mInput & p2m) == (inner.mInput % p2m)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("(inner.mInput & p2m) == (inner.mInput % p2m)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1219 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "(inner.mInput & p2m) == (inner.mInput % p2m)" ")"); do { MOZ_CrashSequence(__null, 1219); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1220 | MOZ_RELEASE_ASSERT((p2m & inner.mInput) == (inner.mInput & p2m))do { static_assert( mozilla::detail::AssertionConditionType< decltype((p2m & inner.mInput) == (inner.mInput & p2m) )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!((p2m & inner.mInput) == (inner.mInput & p2m) ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "(p2m & inner.mInput) == (inner.mInput & p2m)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1220); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "(p2m & inner.mInput) == (inner.mInput & p2m)" ")"); do { MOZ_CrashSequence(__null, 1220); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1221 | } | |||
| 1222 | } | |||
| 1223 | ||||
| 1224 | printf("TestPowerOfTwoMask done\n"); | |||
| 1225 | } | |||
| 1226 | ||||
| 1227 | void TestPowerOfTwo() { | |||
| 1228 | printf("TestPowerOfTwo...\n"); | |||
| 1229 | ||||
| 1230 | static_assert(MakePowerOfTwo<uint32_t, 1>().Value() == 1); | |||
| 1231 | constexpr PowerOfTwo<uint32_t> c1 = MakePowerOfTwo<uint32_t, 1>(); | |||
| 1232 | MOZ_RELEASE_ASSERT(c1.Value() == 1)do { static_assert( mozilla::detail::AssertionConditionType< decltype(c1.Value() == 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(c1.Value() == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("c1.Value() == 1" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1232 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "c1.Value() == 1" ")"); do { MOZ_CrashSequence(__null, 1232); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1233 | static_assert(MakePowerOfTwo<uint32_t, 1>().Mask().MaskValue() == 0); | |||
| 1234 | ||||
| 1235 | static_assert(MakePowerOfTwo<uint32_t, 128>().Value() == 128); | |||
| 1236 | constexpr PowerOfTwo<uint32_t> c128 = MakePowerOfTwo<uint32_t, 128>(); | |||
| 1237 | MOZ_RELEASE_ASSERT(c128.Value() == 128)do { static_assert( mozilla::detail::AssertionConditionType< decltype(c128.Value() == 128)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(c128.Value() == 128))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("c128.Value() == 128" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1237 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "c128.Value() == 128" ")"); do { MOZ_CrashSequence(__null, 1237); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1238 | static_assert(MakePowerOfTwo<uint32_t, 128>().Mask().MaskValue() == 127); | |||
| 1239 | ||||
| 1240 | static_assert(MakePowerOfTwo<uint32_t, 0x80000000u>().Value() == 0x80000000u); | |||
| 1241 | constexpr PowerOfTwo<uint32_t> cMax = MakePowerOfTwo<uint32_t, 0x80000000u>(); | |||
| 1242 | MOZ_RELEASE_ASSERT(cMax.Value() == 0x80000000u)do { static_assert( mozilla::detail::AssertionConditionType< decltype(cMax.Value() == 0x80000000u)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(cMax.Value() == 0x80000000u) )), 0))) { do { } while (false); MOZ_ReportAssertionFailure("cMax.Value() == 0x80000000u" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1242 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "cMax.Value() == 0x80000000u" ")"); do { MOZ_CrashSequence(__null, 1242); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1243 | static_assert(MakePowerOfTwo<uint32_t, 0x80000000u>().Mask().MaskValue() == | |||
| 1244 | 0x7FFFFFFFu); | |||
| 1245 | ||||
| 1246 | struct TestDataU32 { | |||
| 1247 | uint32_t mInput; | |||
| 1248 | uint32_t mValue; | |||
| 1249 | uint32_t mMask; | |||
| 1250 | }; | |||
| 1251 | // clang-format off | |||
| 1252 | TestDataU32 tests[] = { | |||
| 1253 | { 0, 1, 0 }, | |||
| 1254 | { 1, 1, 0 }, | |||
| 1255 | { 2, 2, 1 }, | |||
| 1256 | { 3, 4, 3 }, | |||
| 1257 | { 4, 4, 3 }, | |||
| 1258 | { 5, 8, 7 }, | |||
| 1259 | { (1u << 31) - 1, (1u << 31), (1u << 31) - 1 }, | |||
| 1260 | { (1u << 31), (1u << 31), (1u << 31) - 1 }, | |||
| 1261 | { (1u << 31) + 1, (1u << 31), (1u << 31) - 1 }, | |||
| 1262 | { uint32_t(-1), (1u << 31), (1u << 31) - 1 } | |||
| 1263 | }; | |||
| 1264 | // clang-format on | |||
| 1265 | for (const TestDataU32& test : tests) { | |||
| 1266 | PowerOfTwo<uint32_t> p2(test.mInput); | |||
| 1267 | MOZ_RELEASE_ASSERT(p2.Value() == test.mValue)do { static_assert( mozilla::detail::AssertionConditionType< decltype(p2.Value() == test.mValue)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(p2.Value() == test.mValue))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("p2.Value() == test.mValue" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1267 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "p2.Value() == test.mValue" ")"); do { MOZ_CrashSequence(__null, 1267); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1268 | MOZ_RELEASE_ASSERT(p2.MaskValue() == test.mMask)do { static_assert( mozilla::detail::AssertionConditionType< decltype(p2.MaskValue() == test.mMask)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(p2.MaskValue() == test.mMask ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "p2.MaskValue() == test.mMask", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1268); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "p2.MaskValue() == test.mMask" ")"); do { MOZ_CrashSequence(__null, 1268); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1269 | PowerOfTwoMask<uint32_t> p2m = p2.Mask(); | |||
| 1270 | MOZ_RELEASE_ASSERT(p2m.MaskValue() == test.mMask)do { static_assert( mozilla::detail::AssertionConditionType< decltype(p2m.MaskValue() == test.mMask)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(p2m.MaskValue() == test.mMask ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "p2m.MaskValue() == test.mMask", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1270); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "p2m.MaskValue() == test.mMask" ")"); do { MOZ_CrashSequence(__null, 1270); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1271 | for (const TestDataU32& inner : tests) { | |||
| 1272 | MOZ_RELEASE_ASSERT((inner.mInput % p2) == (inner.mInput % p2.Value()))do { static_assert( mozilla::detail::AssertionConditionType< decltype((inner.mInput % p2) == (inner.mInput % p2.Value()))> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!((inner.mInput % p2) == (inner.mInput % p2.Value()))) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("(inner.mInput % p2) == (inner.mInput % p2.Value())" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1272 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "(inner.mInput % p2) == (inner.mInput % p2.Value())" ")"); do { MOZ_CrashSequence(__null, 1272); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1273 | } | |||
| 1274 | } | |||
| 1275 | ||||
| 1276 | printf("TestPowerOfTwo done\n"); | |||
| 1277 | } | |||
| 1278 | ||||
| 1279 | void TestLEB128() { | |||
| 1280 | printf("TestLEB128...\n"); | |||
| 1281 | ||||
| 1282 | MOZ_RELEASE_ASSERT(ULEB128MaxSize<uint8_t>() == 2)do { static_assert( mozilla::detail::AssertionConditionType< decltype(ULEB128MaxSize<uint8_t>() == 2)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(ULEB128MaxSize<uint8_t> () == 2))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("ULEB128MaxSize<uint8_t>() == 2", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1282); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "ULEB128MaxSize<uint8_t>() == 2" ")"); do { MOZ_CrashSequence(__null, 1282); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1283 | MOZ_RELEASE_ASSERT(ULEB128MaxSize<uint16_t>() == 3)do { static_assert( mozilla::detail::AssertionConditionType< decltype(ULEB128MaxSize<uint16_t>() == 3)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(! !(ULEB128MaxSize<uint16_t>() == 3))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("ULEB128MaxSize<uint16_t>() == 3" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1283 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "ULEB128MaxSize<uint16_t>() == 3" ")"); do { MOZ_CrashSequence(__null, 1283); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1284 | MOZ_RELEASE_ASSERT(ULEB128MaxSize<uint32_t>() == 5)do { static_assert( mozilla::detail::AssertionConditionType< decltype(ULEB128MaxSize<uint32_t>() == 5)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(! !(ULEB128MaxSize<uint32_t>() == 5))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("ULEB128MaxSize<uint32_t>() == 5" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1284 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "ULEB128MaxSize<uint32_t>() == 5" ")"); do { MOZ_CrashSequence(__null, 1284); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1285 | MOZ_RELEASE_ASSERT(ULEB128MaxSize<uint64_t>() == 10)do { static_assert( mozilla::detail::AssertionConditionType< decltype(ULEB128MaxSize<uint64_t>() == 10)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(ULEB128MaxSize<uint64_t>() == 10))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("ULEB128MaxSize<uint64_t>() == 10" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1285 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "ULEB128MaxSize<uint64_t>() == 10" ")"); do { MOZ_CrashSequence(__null, 1285); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1286 | ||||
| 1287 | struct TestDataU64 { | |||
| 1288 | uint64_t mValue; | |||
| 1289 | unsigned mSize; | |||
| 1290 | const char* mBytes; | |||
| 1291 | }; | |||
| 1292 | // clang-format off | |||
| 1293 | TestDataU64 tests[] = { | |||
| 1294 | // Small numbers should keep their normal byte representation. | |||
| 1295 | { 0u, 1, "\0" }, | |||
| 1296 | { 1u, 1, "\x01" }, | |||
| 1297 | ||||
| 1298 | // 0111 1111 (127, or 0x7F) is the highest number that fits into a single | |||
| 1299 | // LEB128 byte. It gets encoded as 0111 1111, note the most significant bit | |||
| 1300 | // is off. | |||
| 1301 | { 0x7Fu, 1, "\x7F" }, | |||
| 1302 | ||||
| 1303 | // Next number: 128, or 0x80. | |||
| 1304 | // Original data representation: 1000 0000 | |||
| 1305 | // Broken up into groups of 7: 1 0000000 | |||
| 1306 | // Padded with 0 (msB) or 1 (lsB): 00000001 10000000 | |||
| 1307 | // Byte representation: 0x01 0x80 | |||
| 1308 | // Little endian order: -> 0x80 0x01 | |||
| 1309 | { 0x80u, 2, "\x80\x01" }, | |||
| 1310 | ||||
| 1311 | // Next: 129, or 0x81 (showing that we don't lose low bits.) | |||
| 1312 | // Original data representation: 1000 0001 | |||
| 1313 | // Broken up into groups of 7: 1 0000001 | |||
| 1314 | // Padded with 0 (msB) or 1 (lsB): 00000001 10000001 | |||
| 1315 | // Byte representation: 0x01 0x81 | |||
| 1316 | // Little endian order: -> 0x81 0x01 | |||
| 1317 | { 0x81u, 2, "\x81\x01" }, | |||
| 1318 | ||||
| 1319 | // Highest 8-bit number: 255, or 0xFF. | |||
| 1320 | // Original data representation: 1111 1111 | |||
| 1321 | // Broken up into groups of 7: 1 1111111 | |||
| 1322 | // Padded with 0 (msB) or 1 (lsB): 00000001 11111111 | |||
| 1323 | // Byte representation: 0x01 0xFF | |||
| 1324 | // Little endian order: -> 0xFF 0x01 | |||
| 1325 | { 0xFFu, 2, "\xFF\x01" }, | |||
| 1326 | ||||
| 1327 | // Next: 256, or 0x100. | |||
| 1328 | // Original data representation: 1 0000 0000 | |||
| 1329 | // Broken up into groups of 7: 10 0000000 | |||
| 1330 | // Padded with 0 (msB) or 1 (lsB): 00000010 10000000 | |||
| 1331 | // Byte representation: 0x10 0x80 | |||
| 1332 | // Little endian order: -> 0x80 0x02 | |||
| 1333 | { 0x100u, 2, "\x80\x02" }, | |||
| 1334 | ||||
| 1335 | // Highest 32-bit number: 0xFFFFFFFF (8 bytes, all bits set). | |||
| 1336 | // Original: 1111 1111 1111 1111 1111 1111 1111 1111 | |||
| 1337 | // Groups: 1111 1111111 1111111 1111111 1111111 | |||
| 1338 | // Padded: 00001111 11111111 11111111 11111111 11111111 | |||
| 1339 | // Bytes: 0x0F 0xFF 0xFF 0xFF 0xFF | |||
| 1340 | // Little Endian: -> 0xFF 0xFF 0xFF 0xFF 0x0F | |||
| 1341 | { 0xFFFFFFFFu, 5, "\xFF\xFF\xFF\xFF\x0F" }, | |||
| 1342 | ||||
| 1343 | // Highest 64-bit number: 0xFFFFFFFFFFFFFFFF (16 bytes, all bits set). | |||
| 1344 | // 64 bits, that's 9 groups of 7 bits, plus 1 (most significant) bit. | |||
| 1345 | { 0xFFFFFFFFFFFFFFFFu, 10, "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x01" } | |||
| 1346 | }; | |||
| 1347 | // clang-format on | |||
| 1348 | ||||
| 1349 | for (const TestDataU64& test : tests) { | |||
| 1350 | MOZ_RELEASE_ASSERT(ULEB128Size(test.mValue) == test.mSize)do { static_assert( mozilla::detail::AssertionConditionType< decltype(ULEB128Size(test.mValue) == test.mSize)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(ULEB128Size(test.mValue) == test.mSize))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("ULEB128Size(test.mValue) == test.mSize" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1350 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "ULEB128Size(test.mValue) == test.mSize" ")"); do { MOZ_CrashSequence(__null, 1350); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1351 | // Prepare a buffer that can accomodate the largest-possible LEB128. | |||
| 1352 | uint8_t buffer[ULEB128MaxSize<uint64_t>()]; | |||
| 1353 | // Use a pointer into the buffer as iterator. | |||
| 1354 | uint8_t* p = buffer; | |||
| 1355 | // And write the LEB128. | |||
| 1356 | WriteULEB128(test.mValue, p); | |||
| 1357 | // Pointer (iterator) should have advanced just past the expected LEB128 | |||
| 1358 | // size. | |||
| 1359 | MOZ_RELEASE_ASSERT(p == buffer + test.mSize)do { static_assert( mozilla::detail::AssertionConditionType< decltype(p == buffer + test.mSize)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(p == buffer + test.mSize))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("p == buffer + test.mSize" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1359 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "p == buffer + test.mSize" ")"); do { MOZ_CrashSequence(__null, 1359); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1360 | // Check expected bytes. | |||
| 1361 | for (unsigned i = 0; i < test.mSize; ++i) { | |||
| 1362 | MOZ_RELEASE_ASSERT(buffer[i] == uint8_t(test.mBytes[i]))do { static_assert( mozilla::detail::AssertionConditionType< decltype(buffer[i] == uint8_t(test.mBytes[i]))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(buffer[i] == uint8_t(test.mBytes [i])))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("buffer[i] == uint8_t(test.mBytes[i])", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1362); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "buffer[i] == uint8_t(test.mBytes[i])" ")"); do { MOZ_CrashSequence(__null, 1362); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1363 | } | |||
| 1364 | ||||
| 1365 | // Move pointer (iterator) back to start of buffer. | |||
| 1366 | p = buffer; | |||
| 1367 | // And read the LEB128 we wrote above. | |||
| 1368 | uint64_t read = ReadULEB128<uint64_t>(p); | |||
| 1369 | // Pointer (iterator) should have also advanced just past the expected | |||
| 1370 | // LEB128 size. | |||
| 1371 | MOZ_RELEASE_ASSERT(p == buffer + test.mSize)do { static_assert( mozilla::detail::AssertionConditionType< decltype(p == buffer + test.mSize)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(p == buffer + test.mSize))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("p == buffer + test.mSize" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1371 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "p == buffer + test.mSize" ")"); do { MOZ_CrashSequence(__null, 1371); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1372 | // And check the read value. | |||
| 1373 | MOZ_RELEASE_ASSERT(read == test.mValue)do { static_assert( mozilla::detail::AssertionConditionType< decltype(read == test.mValue)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(read == test.mValue))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("read == test.mValue" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1373 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "read == test.mValue" ")"); do { MOZ_CrashSequence(__null, 1373); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1374 | ||||
| 1375 | // Testing ULEB128 reader. | |||
| 1376 | ULEB128Reader<uint64_t> reader; | |||
| 1377 | MOZ_RELEASE_ASSERT(!reader.IsComplete())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!reader.IsComplete())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!reader.IsComplete()))), 0)) ) { do { } while (false); MOZ_ReportAssertionFailure("!reader.IsComplete()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1377 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!reader.IsComplete()" ")"); do { MOZ_CrashSequence(__null, 1377); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1378 | // Move pointer back to start of buffer. | |||
| 1379 | p = buffer; | |||
| 1380 | for (;;) { | |||
| 1381 | // Read a byte and feed it to the reader. | |||
| 1382 | if (reader.FeedByteIsComplete(*p++)) { | |||
| 1383 | break; | |||
| 1384 | } | |||
| 1385 | // Not complete yet, we shouldn't have reached the end pointer. | |||
| 1386 | MOZ_RELEASE_ASSERT(!reader.IsComplete())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!reader.IsComplete())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!reader.IsComplete()))), 0)) ) { do { } while (false); MOZ_ReportAssertionFailure("!reader.IsComplete()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1386 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!reader.IsComplete()" ")"); do { MOZ_CrashSequence(__null, 1386); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1387 | MOZ_RELEASE_ASSERT(p < buffer + test.mSize)do { static_assert( mozilla::detail::AssertionConditionType< decltype(p < buffer + test.mSize)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(p < buffer + test.mSize)) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("p < buffer + test.mSize" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1387 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "p < buffer + test.mSize" ")"); do { MOZ_CrashSequence(__null, 1387); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1388 | } | |||
| 1389 | MOZ_RELEASE_ASSERT(reader.IsComplete())do { static_assert( mozilla::detail::AssertionConditionType< decltype(reader.IsComplete())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(reader.IsComplete()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("reader.IsComplete()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1389 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "reader.IsComplete()" ")"); do { MOZ_CrashSequence(__null, 1389); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1390 | // Pointer should have advanced just past the expected LEB128 size. | |||
| 1391 | MOZ_RELEASE_ASSERT(p == buffer + test.mSize)do { static_assert( mozilla::detail::AssertionConditionType< decltype(p == buffer + test.mSize)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(p == buffer + test.mSize))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("p == buffer + test.mSize" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1391 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "p == buffer + test.mSize" ")"); do { MOZ_CrashSequence(__null, 1391); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1392 | // And check the read value. | |||
| 1393 | MOZ_RELEASE_ASSERT(reader.Value() == test.mValue)do { static_assert( mozilla::detail::AssertionConditionType< decltype(reader.Value() == test.mValue)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(reader.Value() == test.mValue ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "reader.Value() == test.mValue", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1393); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "reader.Value() == test.mValue" ")"); do { MOZ_CrashSequence(__null, 1393); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1394 | ||||
| 1395 | // And again after a Reset. | |||
| 1396 | reader.Reset(); | |||
| 1397 | MOZ_RELEASE_ASSERT(!reader.IsComplete())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!reader.IsComplete())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!reader.IsComplete()))), 0)) ) { do { } while (false); MOZ_ReportAssertionFailure("!reader.IsComplete()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1397 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!reader.IsComplete()" ")"); do { MOZ_CrashSequence(__null, 1397); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1398 | p = buffer; | |||
| 1399 | for (;;) { | |||
| 1400 | if (reader.FeedByteIsComplete(*p++)) { | |||
| 1401 | break; | |||
| 1402 | } | |||
| 1403 | MOZ_RELEASE_ASSERT(!reader.IsComplete())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!reader.IsComplete())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!reader.IsComplete()))), 0)) ) { do { } while (false); MOZ_ReportAssertionFailure("!reader.IsComplete()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1403 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!reader.IsComplete()" ")"); do { MOZ_CrashSequence(__null, 1403); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1404 | MOZ_RELEASE_ASSERT(p < buffer + test.mSize)do { static_assert( mozilla::detail::AssertionConditionType< decltype(p < buffer + test.mSize)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(p < buffer + test.mSize)) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("p < buffer + test.mSize" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1404 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "p < buffer + test.mSize" ")"); do { MOZ_CrashSequence(__null, 1404); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1405 | } | |||
| 1406 | MOZ_RELEASE_ASSERT(reader.IsComplete())do { static_assert( mozilla::detail::AssertionConditionType< decltype(reader.IsComplete())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(reader.IsComplete()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("reader.IsComplete()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1406 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "reader.IsComplete()" ")"); do { MOZ_CrashSequence(__null, 1406); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1407 | MOZ_RELEASE_ASSERT(p == buffer + test.mSize)do { static_assert( mozilla::detail::AssertionConditionType< decltype(p == buffer + test.mSize)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(p == buffer + test.mSize))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("p == buffer + test.mSize" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1407 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "p == buffer + test.mSize" ")"); do { MOZ_CrashSequence(__null, 1407); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1408 | MOZ_RELEASE_ASSERT(reader.Value() == test.mValue)do { static_assert( mozilla::detail::AssertionConditionType< decltype(reader.Value() == test.mValue)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(reader.Value() == test.mValue ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "reader.Value() == test.mValue", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1408); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "reader.Value() == test.mValue" ")"); do { MOZ_CrashSequence(__null, 1408); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1409 | } | |||
| 1410 | ||||
| 1411 | printf("TestLEB128 done\n"); | |||
| 1412 | } | |||
| 1413 | ||||
| 1414 | struct StringWriteFunc final : public JSONWriteFunc { | |||
| 1415 | std::string mString; | |||
| 1416 | ||||
| 1417 | void Write(const mozilla::Span<const char>& aStr) final { | |||
| 1418 | mString.append(aStr.data(), aStr.size()); | |||
| 1419 | } | |||
| 1420 | }; | |||
| 1421 | ||||
| 1422 | void CheckJSON(mozilla::baseprofiler::SpliceableJSONWriter& aWriter, | |||
| 1423 | const char* aExpected, int aLine) { | |||
| 1424 | const std::string& actual = | |||
| 1425 | static_cast<StringWriteFunc&>(aWriter.WriteFunc()).mString; | |||
| 1426 | if (strcmp(aExpected, actual.c_str()) != 0) { | |||
| 1427 | fprintf(stderrstderr, | |||
| 1428 | "---- EXPECTED ---- (line %d)\n<<<%s>>>\n" | |||
| 1429 | "---- ACTUAL ----\n<<<%s>>>\n", | |||
| 1430 | aLine, aExpected, actual.c_str()); | |||
| 1431 | MOZ_RELEASE_ASSERT(false, "expected and actual output don't match")do { static_assert( mozilla::detail::AssertionConditionType< decltype(false)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(false))), 0))) { do { } while ( false); MOZ_ReportAssertionFailure("false" " (" "expected and actual output don't match" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1431); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "false" ") (" "expected and actual output don't match" ")"); do { MOZ_CrashSequence (__null, 1431); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 1432 | } | |||
| 1433 | } | |||
| 1434 | ||||
| 1435 | void TestJSONTimeOutput() { | |||
| 1436 | printf("TestJSONTimeOutput...\n"); | |||
| 1437 | ||||
| 1438 | #define TEST(in, out) \ | |||
| 1439 | do { \ | |||
| 1440 | mozilla::baseprofiler::SpliceableJSONWriter writer( \ | |||
| 1441 | mozilla::MakeUnique<StringWriteFunc>(), \ | |||
| 1442 | FailureLatchInfallibleSource::Singleton()); \ | |||
| 1443 | writer.Start(); \ | |||
| 1444 | writer.TimeDoubleMsProperty("time_ms", (in)); \ | |||
| 1445 | writer.End(); \ | |||
| 1446 | CheckJSON(writer, "{\"time_ms\":" out "}", __LINE__1446); \ | |||
| 1447 | } while (false); | |||
| 1448 | ||||
| 1449 | TEST(0, "0"); | |||
| 1450 | ||||
| 1451 | TEST(0.000'000'1, "0"); | |||
| 1452 | TEST(0.000'000'4, "0"); | |||
| 1453 | TEST(0.000'000'499, "0"); | |||
| 1454 | TEST(0.000'000'5, "0.000001"); | |||
| 1455 | TEST(0.000'001, "0.000001"); | |||
| 1456 | TEST(0.000'01, "0.00001"); | |||
| 1457 | TEST(0.000'1, "0.0001"); | |||
| 1458 | TEST(0.001, "0.001"); | |||
| 1459 | TEST(0.01, "0.01"); | |||
| 1460 | TEST(0.1, "0.1"); | |||
| 1461 | TEST(1, "1"); | |||
| 1462 | TEST(2, "2"); | |||
| 1463 | TEST(10, "10"); | |||
| 1464 | TEST(100, "100"); | |||
| 1465 | TEST(1'000, "1000"); | |||
| 1466 | TEST(10'000, "10000"); | |||
| 1467 | TEST(100'000, "100000"); | |||
| 1468 | TEST(1'000'000, "1000000"); | |||
| 1469 | // 2^53-2 ns in ms. 2^53-1 is the highest integer value representable in | |||
| 1470 | // double, -1 again because we're adding 0.5 before truncating. | |||
| 1471 | // That's 104 days, after which the nanosecond precision would decrease. | |||
| 1472 | TEST(9'007'199'254.740'990, "9007199254.74099"); | |||
| 1473 | ||||
| 1474 | TEST(-0.000'000'1, "0"); | |||
| 1475 | TEST(-0.000'000'4, "0"); | |||
| 1476 | TEST(-0.000'000'499, "0"); | |||
| 1477 | TEST(-0.000'000'5, "-0.000001"); | |||
| 1478 | TEST(-0.000'001, "-0.000001"); | |||
| 1479 | TEST(-0.000'01, "-0.00001"); | |||
| 1480 | TEST(-0.000'1, "-0.0001"); | |||
| 1481 | TEST(-0.001, "-0.001"); | |||
| 1482 | TEST(-0.01, "-0.01"); | |||
| 1483 | TEST(-0.1, "-0.1"); | |||
| 1484 | TEST(-1, "-1"); | |||
| 1485 | TEST(-2, "-2"); | |||
| 1486 | TEST(-10, "-10"); | |||
| 1487 | TEST(-100, "-100"); | |||
| 1488 | TEST(-1'000, "-1000"); | |||
| 1489 | TEST(-10'000, "-10000"); | |||
| 1490 | TEST(-100'000, "-100000"); | |||
| 1491 | TEST(-1'000'000, "-1000000"); | |||
| 1492 | TEST(-9'007'199'254.740'990, "-9007199254.74099"); | |||
| 1493 | ||||
| 1494 | #undef TEST | |||
| 1495 | ||||
| 1496 | printf("TestJSONTimeOutput done\n"); | |||
| 1497 | } | |||
| 1498 | ||||
| 1499 | void TestStreamPayloadHelperTimeDuration() { | |||
| 1500 | printf("TestStreamPayloadHelperTimeDuration...\n"); | |||
| 1501 | ||||
| 1502 | using MS = mozilla::MarkerSchema; | |||
| 1503 | using mozilla::TimeDuration; | |||
| 1504 | using mozilla::detail::StreamPayloadHelper; | |||
| 1505 | ||||
| 1506 | #define TEST(fmt, td, out) \ | |||
| 1507 | do { \ | |||
| 1508 | mozilla::baseprofiler::SpliceableJSONWriter writer( \ | |||
| 1509 | mozilla::MakeUnique<StringWriteFunc>(), \ | |||
| 1510 | FailureLatchInfallibleSource::Singleton()); \ | |||
| 1511 | writer.Start(); \ | |||
| 1512 | StreamPayloadHelper<TimeDuration, MS::Format::fmt>::Stream( \ | |||
| 1513 | writer, mozilla::MakeStringSpan("v"), (td)); \ | |||
| 1514 | writer.End(); \ | |||
| 1515 | CheckJSON(writer, "{\"v\":" out "}", __LINE__1515); \ | |||
| 1516 | } while (false) | |||
| 1517 | ||||
| 1518 | // Milliseconds / Duration / Seconds all serialize as milliseconds. | |||
| 1519 | TEST(Milliseconds, TimeDuration::FromMilliseconds(5000), "5000"); | |||
| 1520 | TEST(Duration, TimeDuration::FromMilliseconds(5000), "5000"); | |||
| 1521 | TEST(Seconds, TimeDuration::FromMilliseconds(500), "500"); | |||
| 1522 | ||||
| 1523 | // Microseconds: value in μs. | |||
| 1524 | TEST(Microseconds, TimeDuration::FromMicroseconds(5), "5"); | |||
| 1525 | TEST(Microseconds, TimeDuration::FromMilliseconds(2), "2000"); | |||
| 1526 | ||||
| 1527 | // Nanoseconds: value in ns. | |||
| 1528 | TEST(Nanoseconds, TimeDuration::FromMicroseconds(5), "5000"); | |||
| 1529 | TEST(Nanoseconds, TimeDuration::FromMilliseconds(1), "1000000"); | |||
| 1530 | ||||
| 1531 | #undef TEST | |||
| 1532 | ||||
| 1533 | printf("TestStreamPayloadHelperTimeDuration done\n"); | |||
| 1534 | } | |||
| 1535 | ||||
| 1536 | template <uint8_t byte, uint8_t... tail> | |||
| 1537 | constexpr bool TestConstexprULEB128Reader(ULEB128Reader<uint64_t>& aReader) { | |||
| 1538 | if (aReader.IsComplete()) { | |||
| 1539 | return false; | |||
| 1540 | } | |||
| 1541 | const bool isComplete = aReader.FeedByteIsComplete(byte); | |||
| 1542 | if (aReader.IsComplete() != isComplete) { | |||
| 1543 | return false; | |||
| 1544 | } | |||
| 1545 | if constexpr (sizeof...(tail) == 0) { | |||
| 1546 | return isComplete; | |||
| 1547 | } else { | |||
| 1548 | if (isComplete) { | |||
| 1549 | return false; | |||
| 1550 | } | |||
| 1551 | return TestConstexprULEB128Reader<tail...>(aReader); | |||
| 1552 | } | |||
| 1553 | } | |||
| 1554 | ||||
| 1555 | template <uint64_t expected, uint8_t... bytes> | |||
| 1556 | constexpr bool TestConstexprULEB128Reader() { | |||
| 1557 | ULEB128Reader<uint64_t> reader; | |||
| 1558 | if (!TestConstexprULEB128Reader<bytes...>(reader)) { | |||
| 1559 | return false; | |||
| 1560 | } | |||
| 1561 | if (!reader.IsComplete()) { | |||
| 1562 | return false; | |||
| 1563 | } | |||
| 1564 | if (reader.Value() != expected) { | |||
| 1565 | return false; | |||
| 1566 | } | |||
| 1567 | ||||
| 1568 | reader.Reset(); | |||
| 1569 | if (!TestConstexprULEB128Reader<bytes...>(reader)) { | |||
| 1570 | return false; | |||
| 1571 | } | |||
| 1572 | if (!reader.IsComplete()) { | |||
| 1573 | return false; | |||
| 1574 | } | |||
| 1575 | if (reader.Value() != expected) { | |||
| 1576 | return false; | |||
| 1577 | } | |||
| 1578 | ||||
| 1579 | return true; | |||
| 1580 | } | |||
| 1581 | ||||
| 1582 | static_assert(TestConstexprULEB128Reader<0x0u, 0x0u>()); | |||
| 1583 | static_assert(!TestConstexprULEB128Reader<0x0u, 0x0u, 0x0u>()); | |||
| 1584 | static_assert(TestConstexprULEB128Reader<0x1u, 0x1u>()); | |||
| 1585 | static_assert(TestConstexprULEB128Reader<0x7Fu, 0x7Fu>()); | |||
| 1586 | static_assert(TestConstexprULEB128Reader<0x80u, 0x80u, 0x01u>()); | |||
| 1587 | static_assert(!TestConstexprULEB128Reader<0x80u, 0x80u>()); | |||
| 1588 | static_assert(!TestConstexprULEB128Reader<0x80u, 0x01u>()); | |||
| 1589 | static_assert(TestConstexprULEB128Reader<0x81u, 0x81u, 0x01u>()); | |||
| 1590 | static_assert(TestConstexprULEB128Reader<0xFFu, 0xFFu, 0x01u>()); | |||
| 1591 | static_assert(TestConstexprULEB128Reader<0x100u, 0x80u, 0x02u>()); | |||
| 1592 | static_assert(TestConstexprULEB128Reader<0xFFFFFFFFu, 0xFFu, 0xFFu, 0xFFu, | |||
| 1593 | 0xFFu, 0x0Fu>()); | |||
| 1594 | static_assert( | |||
| 1595 | !TestConstexprULEB128Reader<0xFFFFFFFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu>()); | |||
| 1596 | static_assert(!TestConstexprULEB128Reader<0xFFFFFFFFu, 0xFFu, 0xFFu, 0xFFu, | |||
| 1597 | 0xFFu, 0xFFu, 0x0Fu>()); | |||
| 1598 | static_assert( | |||
| 1599 | TestConstexprULEB128Reader<0xFFFFFFFFFFFFFFFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, | |||
| 1600 | 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0x01u>()); | |||
| 1601 | static_assert( | |||
| 1602 | !TestConstexprULEB128Reader<0xFFFFFFFFFFFFFFFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, | |||
| 1603 | 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu>()); | |||
| 1604 | ||||
| 1605 | static void TestChunk() { | |||
| 1606 | printf("TestChunk...\n"); | |||
| 1607 | ||||
| 1608 | static_assert(!std::is_default_constructible_v<ProfileBufferChunk>, | |||
| 1609 | "ProfileBufferChunk should not be default-constructible"); | |||
| 1610 | static_assert( | |||
| 1611 | !std::is_constructible_v<ProfileBufferChunk, ProfileBufferChunk::Length>, | |||
| 1612 | "ProfileBufferChunk should not be constructible from Length"); | |||
| 1613 | ||||
| 1614 | static_assert( | |||
| 1615 | sizeof(ProfileBufferChunk::Header) == | |||
| 1616 | sizeof(ProfileBufferChunk::Header::mOffsetFirstBlock) + | |||
| 1617 | sizeof(ProfileBufferChunk::Header::mOffsetPastLastBlock) + | |||
| 1618 | sizeof(ProfileBufferChunk::Header::mStartTimeStamp) + | |||
| 1619 | sizeof(ProfileBufferChunk::Header::mDoneTimeStamp) + | |||
| 1620 | sizeof(ProfileBufferChunk::Header::mBufferBytes) + | |||
| 1621 | sizeof(ProfileBufferChunk::Header::mBlockCount) + | |||
| 1622 | sizeof(ProfileBufferChunk::Header::mRangeStart) + | |||
| 1623 | sizeof(ProfileBufferChunk::Header::mProcessId) + | |||
| 1624 | sizeof(ProfileBufferChunk::Header::mPADDING), | |||
| 1625 | "ProfileBufferChunk::Header may have unwanted padding, please review"); | |||
| 1626 | // Note: The above static_assert is an attempt at keeping | |||
| 1627 | // ProfileBufferChunk::Header tightly packed, but some changes could make this | |||
| 1628 | // impossible to achieve (most probably due to alignment) -- Just do your | |||
| 1629 | // best! | |||
| 1630 | ||||
| 1631 | constexpr ProfileBufferChunk::Length TestLen = 1000; | |||
| 1632 | ||||
| 1633 | // Basic allocations of different sizes. | |||
| 1634 | for (ProfileBufferChunk::Length len = 0; len <= TestLen; ++len) { | |||
| 1635 | auto chunk = ProfileBufferChunk::Create(len); | |||
| 1636 | static_assert( | |||
| 1637 | std::is_same_v<decltype(chunk), UniquePtr<ProfileBufferChunk>>, | |||
| 1638 | "ProfileBufferChunk::Create() should return a " | |||
| 1639 | "UniquePtr<ProfileBufferChunk>"); | |||
| 1640 | MOZ_RELEASE_ASSERT(!!chunk, "OOM!?")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!!chunk)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!!chunk))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!!chunk" " (" "OOM!?" ")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1640 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!!chunk" ") (" "OOM!?" ")"); do { MOZ_CrashSequence(__null, 1640); __attribute__ ((nomerge)) ::abort(); } while (false); } } while (false); | |||
| 1641 | MOZ_RELEASE_ASSERT(chunk->BufferBytes() >= len)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->BufferBytes() >= len)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(chunk->BufferBytes() >= len))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("chunk->BufferBytes() >= len", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1641); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->BufferBytes() >= len" ")"); do { MOZ_CrashSequence(__null, 1641); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1642 | MOZ_RELEASE_ASSERT(chunk->ChunkBytes() >=do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->ChunkBytes() >= len + ProfileBufferChunk ::SizeofChunkMetadata())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(chunk->ChunkBytes() >= len + ProfileBufferChunk::SizeofChunkMetadata()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("chunk->ChunkBytes() >= len + ProfileBufferChunk::SizeofChunkMetadata()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1643 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->ChunkBytes() >= len + ProfileBufferChunk::SizeofChunkMetadata()" ")"); do { MOZ_CrashSequence(__null, 1643); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1643 | len + ProfileBufferChunk::SizeofChunkMetadata())do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->ChunkBytes() >= len + ProfileBufferChunk ::SizeofChunkMetadata())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(chunk->ChunkBytes() >= len + ProfileBufferChunk::SizeofChunkMetadata()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("chunk->ChunkBytes() >= len + ProfileBufferChunk::SizeofChunkMetadata()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1643 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->ChunkBytes() >= len + ProfileBufferChunk::SizeofChunkMetadata()" ")"); do { MOZ_CrashSequence(__null, 1643); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1644 | MOZ_RELEASE_ASSERT(chunk->RemainingBytes() == chunk->BufferBytes())do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->RemainingBytes() == chunk->BufferBytes( ))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(chunk->RemainingBytes() == chunk->BufferBytes( )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("chunk->RemainingBytes() == chunk->BufferBytes()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1644); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->RemainingBytes() == chunk->BufferBytes()" ")"); do { MOZ_CrashSequence(__null, 1644); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1645 | MOZ_RELEASE_ASSERT(chunk->OffsetFirstBlock() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->OffsetFirstBlock() == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(chunk->OffsetFirstBlock() == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("chunk->OffsetFirstBlock() == 0", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1645); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->OffsetFirstBlock() == 0" ")"); do { MOZ_CrashSequence(__null, 1645); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1646 | MOZ_RELEASE_ASSERT(chunk->OffsetPastLastBlock() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->OffsetPastLastBlock() == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(chunk->OffsetPastLastBlock () == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("chunk->OffsetPastLastBlock() == 0", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1646); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->OffsetPastLastBlock() == 0" ")"); do { MOZ_CrashSequence(__null, 1646); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1647 | MOZ_RELEASE_ASSERT(chunk->BlockCount() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->BlockCount() == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(chunk->BlockCount() == 0) )), 0))) { do { } while (false); MOZ_ReportAssertionFailure("chunk->BlockCount() == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1647 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->BlockCount() == 0" ")"); do { MOZ_CrashSequence(__null, 1647); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1648 | MOZ_RELEASE_ASSERT(chunk->ProcessId() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->ProcessId() == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(chunk->ProcessId() == 0)) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("chunk->ProcessId() == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1648 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->ProcessId() == 0" ")"); do { MOZ_CrashSequence(__null, 1648); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1649 | MOZ_RELEASE_ASSERT(chunk->RangeStart() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->RangeStart() == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(chunk->RangeStart() == 0) )), 0))) { do { } while (false); MOZ_ReportAssertionFailure("chunk->RangeStart() == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1649 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->RangeStart() == 0" ")"); do { MOZ_CrashSequence(__null, 1649); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1650 | MOZ_RELEASE_ASSERT(chunk->BufferSpan().LengthBytes() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->BufferSpan().LengthBytes() == chunk->BufferBytes ())>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(chunk->BufferSpan().LengthBytes() == chunk->BufferBytes ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("chunk->BufferSpan().LengthBytes() == chunk->BufferBytes()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1651 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->BufferSpan().LengthBytes() == chunk->BufferBytes()" ")"); do { MOZ_CrashSequence(__null, 1651); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1651 | chunk->BufferBytes())do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->BufferSpan().LengthBytes() == chunk->BufferBytes ())>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(chunk->BufferSpan().LengthBytes() == chunk->BufferBytes ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("chunk->BufferSpan().LengthBytes() == chunk->BufferBytes()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1651 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->BufferSpan().LengthBytes() == chunk->BufferBytes()" ")"); do { MOZ_CrashSequence(__null, 1651); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1652 | MOZ_RELEASE_ASSERT(!chunk->GetNext())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!chunk->GetNext())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!chunk->GetNext()))), 0)) ) { do { } while (false); MOZ_ReportAssertionFailure("!chunk->GetNext()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1652 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!chunk->GetNext()" ")"); do { MOZ_CrashSequence(__null, 1652); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1653 | MOZ_RELEASE_ASSERT(!chunk->ReleaseNext())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!chunk->ReleaseNext())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!chunk->ReleaseNext()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!chunk->ReleaseNext()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1653 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!chunk->ReleaseNext()" ")"); do { MOZ_CrashSequence(__null, 1653); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1654 | MOZ_RELEASE_ASSERT(chunk->Last() == chunk.get())do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->Last() == chunk.get())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(chunk->Last() == chunk.get ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("chunk->Last() == chunk.get()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1654); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->Last() == chunk.get()" ")"); do { MOZ_CrashSequence(__null, 1654); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1655 | } | |||
| 1656 | ||||
| 1657 | // Allocate the main test Chunk. | |||
| 1658 | auto chunkA = ProfileBufferChunk::Create(TestLen); | |||
| 1659 | MOZ_RELEASE_ASSERT(!!chunkA, "OOM!?")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!!chunkA)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!!chunkA))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!!chunkA" " (" "OOM!?" ")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1659 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!!chunkA" ") (" "OOM!?" ")"); do { MOZ_CrashSequence(__null, 1659); __attribute__ ((nomerge)) ::abort(); } while (false); } } while (false); | |||
| 1660 | MOZ_RELEASE_ASSERT(chunkA->BufferBytes() >= TestLen)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunkA->BufferBytes() >= TestLen)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(chunkA->BufferBytes() >= TestLen))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("chunkA->BufferBytes() >= TestLen" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1660 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunkA->BufferBytes() >= TestLen" ")"); do { MOZ_CrashSequence(__null, 1660); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1661 | MOZ_RELEASE_ASSERT(chunkA->ChunkBytes() >=do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunkA->ChunkBytes() >= TestLen + ProfileBufferChunk ::SizeofChunkMetadata())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(chunkA->ChunkBytes() >= TestLen + ProfileBufferChunk::SizeofChunkMetadata()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("chunkA->ChunkBytes() >= TestLen + ProfileBufferChunk::SizeofChunkMetadata()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1662 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunkA->ChunkBytes() >= TestLen + ProfileBufferChunk::SizeofChunkMetadata()" ")"); do { MOZ_CrashSequence(__null, 1662); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1662 | TestLen + ProfileBufferChunk::SizeofChunkMetadata())do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunkA->ChunkBytes() >= TestLen + ProfileBufferChunk ::SizeofChunkMetadata())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(chunkA->ChunkBytes() >= TestLen + ProfileBufferChunk::SizeofChunkMetadata()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("chunkA->ChunkBytes() >= TestLen + ProfileBufferChunk::SizeofChunkMetadata()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1662 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunkA->ChunkBytes() >= TestLen + ProfileBufferChunk::SizeofChunkMetadata()" ")"); do { MOZ_CrashSequence(__null, 1662); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1663 | MOZ_RELEASE_ASSERT(!chunkA->GetNext())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!chunkA->GetNext())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!chunkA->GetNext()))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("!chunkA->GetNext()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1663 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!chunkA->GetNext()" ")"); do { MOZ_CrashSequence(__null, 1663); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1664 | MOZ_RELEASE_ASSERT(!chunkA->ReleaseNext())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!chunkA->ReleaseNext())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!chunkA->ReleaseNext()))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("!chunkA->ReleaseNext()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1664 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!chunkA->ReleaseNext()" ")"); do { MOZ_CrashSequence(__null, 1664); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1665 | ||||
| 1666 | constexpr ProfileBufferIndex chunkARangeStart = 12345; | |||
| 1667 | chunkA->SetRangeStart(chunkARangeStart); | |||
| 1668 | MOZ_RELEASE_ASSERT(chunkA->RangeStart() == chunkARangeStart)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunkA->RangeStart() == chunkARangeStart)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(chunkA->RangeStart() == chunkARangeStart))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("chunkA->RangeStart() == chunkARangeStart" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1668 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunkA->RangeStart() == chunkARangeStart" ")"); do { MOZ_CrashSequence(__null, 1668); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1669 | ||||
| 1670 | // Get a read-only span over its buffer. | |||
| 1671 | auto bufferA = chunkA->BufferSpan(); | |||
| 1672 | static_assert( | |||
| 1673 | std::is_same_v<decltype(bufferA), Span<const ProfileBufferChunk::Byte>>, | |||
| 1674 | "BufferSpan() should return a Span<const Byte>"); | |||
| 1675 | MOZ_RELEASE_ASSERT(bufferA.LengthBytes() == chunkA->BufferBytes())do { static_assert( mozilla::detail::AssertionConditionType< decltype(bufferA.LengthBytes() == chunkA->BufferBytes())> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(bufferA.LengthBytes() == chunkA->BufferBytes()))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("bufferA.LengthBytes() == chunkA->BufferBytes()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1675 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "bufferA.LengthBytes() == chunkA->BufferBytes()" ")"); do { MOZ_CrashSequence(__null, 1675); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1676 | ||||
| 1677 | // Add the initial tail block. | |||
| 1678 | constexpr ProfileBufferChunk::Length initTailLen = 10; | |||
| 1679 | auto initTail = chunkA->ReserveInitialBlockAsTail(initTailLen); | |||
| 1680 | static_assert( | |||
| 1681 | std::is_same_v<decltype(initTail), Span<ProfileBufferChunk::Byte>>, | |||
| 1682 | "ReserveInitialBlockAsTail() should return a Span<Byte>"); | |||
| 1683 | MOZ_RELEASE_ASSERT(initTail.LengthBytes() == initTailLen)do { static_assert( mozilla::detail::AssertionConditionType< decltype(initTail.LengthBytes() == initTailLen)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(! !(initTail.LengthBytes() == initTailLen))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("initTail.LengthBytes() == initTailLen" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1683 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "initTail.LengthBytes() == initTailLen" ")"); do { MOZ_CrashSequence(__null, 1683); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1684 | MOZ_RELEASE_ASSERT(initTail.Elements() == bufferA.Elements())do { static_assert( mozilla::detail::AssertionConditionType< decltype(initTail.Elements() == bufferA.Elements())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(initTail.Elements() == bufferA.Elements()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("initTail.Elements() == bufferA.Elements()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1684 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "initTail.Elements() == bufferA.Elements()" ")"); do { MOZ_CrashSequence(__null, 1684); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1685 | MOZ_RELEASE_ASSERT(chunkA->OffsetFirstBlock() == initTailLen)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunkA->OffsetFirstBlock() == initTailLen)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(chunkA->OffsetFirstBlock() == initTailLen))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("chunkA->OffsetFirstBlock() == initTailLen" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1685 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunkA->OffsetFirstBlock() == initTailLen" ")"); do { MOZ_CrashSequence(__null, 1685); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1686 | MOZ_RELEASE_ASSERT(chunkA->OffsetPastLastBlock() == initTailLen)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunkA->OffsetPastLastBlock() == initTailLen)> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(chunkA->OffsetPastLastBlock() == initTailLen))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("chunkA->OffsetPastLastBlock() == initTailLen" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1686 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunkA->OffsetPastLastBlock() == initTailLen" ")"); do { MOZ_CrashSequence(__null, 1686); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1687 | ||||
| 1688 | // Add the first complete block. | |||
| 1689 | constexpr ProfileBufferChunk::Length block1Len = 20; | |||
| 1690 | auto block1 = chunkA->ReserveBlock(block1Len); | |||
| 1691 | static_assert( | |||
| 1692 | std::is_same_v<decltype(block1), ProfileBufferChunk::ReserveReturn>, | |||
| 1693 | "ReserveBlock() should return a ReserveReturn"); | |||
| 1694 | MOZ_RELEASE_ASSERT(block1.mBlockRangeIndex.ConvertToProfileBufferIndex() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(block1.mBlockRangeIndex.ConvertToProfileBufferIndex( ) == chunkARangeStart + initTailLen)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(block1.mBlockRangeIndex.ConvertToProfileBufferIndex () == chunkARangeStart + initTailLen))), 0))) { do { } while ( false); MOZ_ReportAssertionFailure("block1.mBlockRangeIndex.ConvertToProfileBufferIndex() == chunkARangeStart + initTailLen" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1695 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "block1.mBlockRangeIndex.ConvertToProfileBufferIndex() == chunkARangeStart + initTailLen" ")"); do { MOZ_CrashSequence(__null, 1695); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1695 | chunkARangeStart + initTailLen)do { static_assert( mozilla::detail::AssertionConditionType< decltype(block1.mBlockRangeIndex.ConvertToProfileBufferIndex( ) == chunkARangeStart + initTailLen)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(block1.mBlockRangeIndex.ConvertToProfileBufferIndex () == chunkARangeStart + initTailLen))), 0))) { do { } while ( false); MOZ_ReportAssertionFailure("block1.mBlockRangeIndex.ConvertToProfileBufferIndex() == chunkARangeStart + initTailLen" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1695 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "block1.mBlockRangeIndex.ConvertToProfileBufferIndex() == chunkARangeStart + initTailLen" ")"); do { MOZ_CrashSequence(__null, 1695); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1696 | MOZ_RELEASE_ASSERT(block1.mSpan.LengthBytes() == block1Len)do { static_assert( mozilla::detail::AssertionConditionType< decltype(block1.mSpan.LengthBytes() == block1Len)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(block1.mSpan.LengthBytes() == block1Len))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("block1.mSpan.LengthBytes() == block1Len" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1696 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "block1.mSpan.LengthBytes() == block1Len" ")"); do { MOZ_CrashSequence(__null, 1696); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1697 | MOZ_RELEASE_ASSERT(block1.mSpan.Elements() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(block1.mSpan.Elements() == bufferA.Elements() + initTailLen )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(block1.mSpan.Elements() == bufferA.Elements() + initTailLen ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "block1.mSpan.Elements() == bufferA.Elements() + initTailLen" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1698 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "block1.mSpan.Elements() == bufferA.Elements() + initTailLen" ")"); do { MOZ_CrashSequence(__null, 1698); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1698 | bufferA.Elements() + initTailLen)do { static_assert( mozilla::detail::AssertionConditionType< decltype(block1.mSpan.Elements() == bufferA.Elements() + initTailLen )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(block1.mSpan.Elements() == bufferA.Elements() + initTailLen ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "block1.mSpan.Elements() == bufferA.Elements() + initTailLen" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1698 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "block1.mSpan.Elements() == bufferA.Elements() + initTailLen" ")"); do { MOZ_CrashSequence(__null, 1698); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1699 | MOZ_RELEASE_ASSERT(chunkA->OffsetFirstBlock() == initTailLen)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunkA->OffsetFirstBlock() == initTailLen)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(chunkA->OffsetFirstBlock() == initTailLen))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("chunkA->OffsetFirstBlock() == initTailLen" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1699 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunkA->OffsetFirstBlock() == initTailLen" ")"); do { MOZ_CrashSequence(__null, 1699); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1700 | MOZ_RELEASE_ASSERT(chunkA->OffsetPastLastBlock() == initTailLen + block1Len)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunkA->OffsetPastLastBlock() == initTailLen + block1Len )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(chunkA->OffsetPastLastBlock() == initTailLen + block1Len ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "chunkA->OffsetPastLastBlock() == initTailLen + block1Len" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1700 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunkA->OffsetPastLastBlock() == initTailLen + block1Len" ")"); do { MOZ_CrashSequence(__null, 1700); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1701 | MOZ_RELEASE_ASSERT(chunkA->RemainingBytes() != 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunkA->RemainingBytes() != 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(chunkA->RemainingBytes() != 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("chunkA->RemainingBytes() != 0", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1701); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunkA->RemainingBytes() != 0" ")"); do { MOZ_CrashSequence(__null, 1701); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1702 | ||||
| 1703 | // Add another block to over-fill the ProfileBufferChunk. | |||
| 1704 | const ProfileBufferChunk::Length remaining = | |||
| 1705 | chunkA->BufferBytes() - (initTailLen + block1Len); | |||
| 1706 | constexpr ProfileBufferChunk::Length overfill = 30; | |||
| 1707 | const ProfileBufferChunk::Length block2Len = remaining + overfill; | |||
| 1708 | ProfileBufferChunk::ReserveReturn block2 = chunkA->ReserveBlock(block2Len); | |||
| 1709 | MOZ_RELEASE_ASSERT(block2.mBlockRangeIndex.ConvertToProfileBufferIndex() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(block2.mBlockRangeIndex.ConvertToProfileBufferIndex( ) == chunkARangeStart + initTailLen + block1Len)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(block2.mBlockRangeIndex.ConvertToProfileBufferIndex() == chunkARangeStart + initTailLen + block1Len))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("block2.mBlockRangeIndex.ConvertToProfileBufferIndex() == chunkARangeStart + initTailLen + block1Len" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1710 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "block2.mBlockRangeIndex.ConvertToProfileBufferIndex() == chunkARangeStart + initTailLen + block1Len" ")"); do { MOZ_CrashSequence(__null, 1710); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1710 | chunkARangeStart + initTailLen + block1Len)do { static_assert( mozilla::detail::AssertionConditionType< decltype(block2.mBlockRangeIndex.ConvertToProfileBufferIndex( ) == chunkARangeStart + initTailLen + block1Len)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(block2.mBlockRangeIndex.ConvertToProfileBufferIndex() == chunkARangeStart + initTailLen + block1Len))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("block2.mBlockRangeIndex.ConvertToProfileBufferIndex() == chunkARangeStart + initTailLen + block1Len" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1710 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "block2.mBlockRangeIndex.ConvertToProfileBufferIndex() == chunkARangeStart + initTailLen + block1Len" ")"); do { MOZ_CrashSequence(__null, 1710); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1711 | MOZ_RELEASE_ASSERT(block2.mSpan.LengthBytes() == remaining)do { static_assert( mozilla::detail::AssertionConditionType< decltype(block2.mSpan.LengthBytes() == remaining)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(block2.mSpan.LengthBytes() == remaining))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("block2.mSpan.LengthBytes() == remaining" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1711 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "block2.mSpan.LengthBytes() == remaining" ")"); do { MOZ_CrashSequence(__null, 1711); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1712 | MOZ_RELEASE_ASSERT(block2.mSpan.Elements() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(block2.mSpan.Elements() == bufferA.Elements() + initTailLen + block1Len)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(block2.mSpan.Elements() == bufferA .Elements() + initTailLen + block1Len))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("block2.mSpan.Elements() == bufferA.Elements() + initTailLen + block1Len" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1713 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "block2.mSpan.Elements() == bufferA.Elements() + initTailLen + block1Len" ")"); do { MOZ_CrashSequence(__null, 1713); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1713 | bufferA.Elements() + initTailLen + block1Len)do { static_assert( mozilla::detail::AssertionConditionType< decltype(block2.mSpan.Elements() == bufferA.Elements() + initTailLen + block1Len)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(block2.mSpan.Elements() == bufferA .Elements() + initTailLen + block1Len))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("block2.mSpan.Elements() == bufferA.Elements() + initTailLen + block1Len" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1713 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "block2.mSpan.Elements() == bufferA.Elements() + initTailLen + block1Len" ")"); do { MOZ_CrashSequence(__null, 1713); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1714 | MOZ_RELEASE_ASSERT(chunkA->OffsetFirstBlock() == initTailLen)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunkA->OffsetFirstBlock() == initTailLen)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(chunkA->OffsetFirstBlock() == initTailLen))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("chunkA->OffsetFirstBlock() == initTailLen" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1714 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunkA->OffsetFirstBlock() == initTailLen" ")"); do { MOZ_CrashSequence(__null, 1714); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1715 | MOZ_RELEASE_ASSERT(chunkA->OffsetPastLastBlock() == chunkA->BufferBytes())do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunkA->OffsetPastLastBlock() == chunkA->BufferBytes ())>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(chunkA->OffsetPastLastBlock() == chunkA->BufferBytes ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("chunkA->OffsetPastLastBlock() == chunkA->BufferBytes()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1715 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunkA->OffsetPastLastBlock() == chunkA->BufferBytes()" ")"); do { MOZ_CrashSequence(__null, 1715); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1716 | MOZ_RELEASE_ASSERT(chunkA->RemainingBytes() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunkA->RemainingBytes() == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(chunkA->RemainingBytes() == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("chunkA->RemainingBytes() == 0", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1716); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunkA->RemainingBytes() == 0" ")"); do { MOZ_CrashSequence(__null, 1716); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1717 | ||||
| 1718 | // Block must be marked "done" before it can be recycled. | |||
| 1719 | chunkA->MarkDone(); | |||
| 1720 | ||||
| 1721 | // It must be marked "recycled" before data can be added to it again. | |||
| 1722 | chunkA->MarkRecycled(); | |||
| 1723 | ||||
| 1724 | // Add an empty initial tail block. | |||
| 1725 | Span<ProfileBufferChunk::Byte> initTail2 = | |||
| 1726 | chunkA->ReserveInitialBlockAsTail(0); | |||
| 1727 | MOZ_RELEASE_ASSERT(initTail2.LengthBytes() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(initTail2.LengthBytes() == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(initTail2.LengthBytes() == 0 ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "initTail2.LengthBytes() == 0", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1727); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "initTail2.LengthBytes() == 0" ")"); do { MOZ_CrashSequence(__null, 1727); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1728 | MOZ_RELEASE_ASSERT(initTail2.Elements() == bufferA.Elements())do { static_assert( mozilla::detail::AssertionConditionType< decltype(initTail2.Elements() == bufferA.Elements())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(initTail2.Elements() == bufferA.Elements()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("initTail2.Elements() == bufferA.Elements()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1728 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "initTail2.Elements() == bufferA.Elements()" ")"); do { MOZ_CrashSequence(__null, 1728); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1729 | MOZ_RELEASE_ASSERT(chunkA->OffsetFirstBlock() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunkA->OffsetFirstBlock() == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(chunkA->OffsetFirstBlock( ) == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("chunkA->OffsetFirstBlock() == 0", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1729); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunkA->OffsetFirstBlock() == 0" ")"); do { MOZ_CrashSequence(__null, 1729); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1730 | MOZ_RELEASE_ASSERT(chunkA->OffsetPastLastBlock() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunkA->OffsetPastLastBlock() == 0)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(! !(chunkA->OffsetPastLastBlock() == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("chunkA->OffsetPastLastBlock() == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1730 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunkA->OffsetPastLastBlock() == 0" ")"); do { MOZ_CrashSequence(__null, 1730); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1731 | ||||
| 1732 | // Block must be marked "done" before it can be destroyed. | |||
| 1733 | chunkA->MarkDone(); | |||
| 1734 | ||||
| 1735 | chunkA->SetProcessId(123); | |||
| 1736 | MOZ_RELEASE_ASSERT(chunkA->ProcessId() == 123)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunkA->ProcessId() == 123)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(chunkA->ProcessId() == 123 ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "chunkA->ProcessId() == 123", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1736); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunkA->ProcessId() == 123" ")"); do { MOZ_CrashSequence(__null, 1736); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1737 | ||||
| 1738 | printf("TestChunk done\n"); | |||
| 1739 | } | |||
| 1740 | ||||
| 1741 | static void TestChunkManagerSingle() { | |||
| 1742 | printf("TestChunkManagerSingle...\n"); | |||
| 1743 | ||||
| 1744 | // Construct a ProfileBufferChunkManagerSingle for one chunk of size >=1000. | |||
| 1745 | constexpr ProfileBufferChunk::Length ChunkMinBufferBytes = 1000; | |||
| 1746 | ProfileBufferChunkManagerSingle cms{ChunkMinBufferBytes}; | |||
| 1747 | ||||
| 1748 | // Reference to base class, to exercize virtual methods. | |||
| 1749 | ProfileBufferChunkManager& cm = cms; | |||
| 1750 | ||||
| 1751 | #ifdef DEBUG1 | |||
| 1752 | const char* chunkManagerRegisterer = "TestChunkManagerSingle"; | |||
| 1753 | cm.RegisteredWith(chunkManagerRegisterer); | |||
| 1754 | #endif // DEBUG | |||
| 1755 | ||||
| 1756 | const auto maxTotalSize = cm.MaxTotalSize(); | |||
| 1757 | MOZ_RELEASE_ASSERT(maxTotalSize >= ChunkMinBufferBytes)do { static_assert( mozilla::detail::AssertionConditionType< decltype(maxTotalSize >= ChunkMinBufferBytes)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(maxTotalSize >= ChunkMinBufferBytes))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("maxTotalSize >= ChunkMinBufferBytes" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1757 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "maxTotalSize >= ChunkMinBufferBytes" ")"); do { MOZ_CrashSequence(__null, 1757); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1758 | ||||
| 1759 | cm.SetChunkDestroyedCallback([](const ProfileBufferChunk&) { | |||
| 1760 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(false)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(false))), 0))) { do { } while ( false); MOZ_ReportAssertionFailure("false" " (" "ProfileBufferChunkManagerSingle should never destroy its one chunk" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1762); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "false" ") (" "ProfileBufferChunkManagerSingle should never destroy its one chunk" ")"); do { MOZ_CrashSequence(__null, 1762); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1761 | false,do { static_assert( mozilla::detail::AssertionConditionType< decltype(false)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(false))), 0))) { do { } while ( false); MOZ_ReportAssertionFailure("false" " (" "ProfileBufferChunkManagerSingle should never destroy its one chunk" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1762); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "false" ") (" "ProfileBufferChunkManagerSingle should never destroy its one chunk" ")"); do { MOZ_CrashSequence(__null, 1762); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1762 | "ProfileBufferChunkManagerSingle should never destroy its one chunk")do { static_assert( mozilla::detail::AssertionConditionType< decltype(false)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(false))), 0))) { do { } while ( false); MOZ_ReportAssertionFailure("false" " (" "ProfileBufferChunkManagerSingle should never destroy its one chunk" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1762); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "false" ") (" "ProfileBufferChunkManagerSingle should never destroy its one chunk" ")"); do { MOZ_CrashSequence(__null, 1762); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1763 | }); | |||
| 1764 | ||||
| 1765 | UniquePtr<ProfileBufferChunk> extantReleasedChunks = | |||
| 1766 | cm.GetExtantReleasedChunks(); | |||
| 1767 | MOZ_RELEASE_ASSERT(!extantReleasedChunks, "Unexpected released chunk(s)")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!extantReleasedChunks)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!extantReleasedChunks))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("!extantReleasedChunks" " (" "Unexpected released chunk(s)" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1767); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!extantReleasedChunks" ") (" "Unexpected released chunk(s)" ")"); do { MOZ_CrashSequence (__null, 1767); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 1768 | ||||
| 1769 | // First request. | |||
| 1770 | UniquePtr<ProfileBufferChunk> chunk = cm.GetChunk(); | |||
| 1771 | MOZ_RELEASE_ASSERT(!!chunk, "First chunk request should always work")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!!chunk)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!!chunk))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!!chunk" " (" "First chunk request should always work" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1771); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!!chunk" ") (" "First chunk request should always work" ")"); do { MOZ_CrashSequence (__null, 1771); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 1772 | MOZ_RELEASE_ASSERT(chunk->BufferBytes() >= ChunkMinBufferBytes,do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->BufferBytes() >= ChunkMinBufferBytes)> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(chunk->BufferBytes() >= ChunkMinBufferBytes))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("chunk->BufferBytes() >= ChunkMinBufferBytes" " (" "Unexpected chunk size" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1773); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->BufferBytes() >= ChunkMinBufferBytes" ") (" "Unexpected chunk size" ")"); do { MOZ_CrashSequence(__null , 1773); __attribute__((nomerge)) ::abort(); } while (false); } } while (false) | |||
| 1773 | "Unexpected chunk size")do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->BufferBytes() >= ChunkMinBufferBytes)> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(chunk->BufferBytes() >= ChunkMinBufferBytes))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("chunk->BufferBytes() >= ChunkMinBufferBytes" " (" "Unexpected chunk size" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1773); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->BufferBytes() >= ChunkMinBufferBytes" ") (" "Unexpected chunk size" ")"); do { MOZ_CrashSequence(__null , 1773); __attribute__((nomerge)) ::abort(); } while (false); } } while (false); | |||
| 1774 | MOZ_RELEASE_ASSERT(!chunk->GetNext(), "There should only be one chunk")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!chunk->GetNext())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!chunk->GetNext()))), 0)) ) { do { } while (false); MOZ_ReportAssertionFailure("!chunk->GetNext()" " (" "There should only be one chunk" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1774); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!chunk->GetNext()" ") (" "There should only be one chunk" ")"); do { MOZ_CrashSequence (__null, 1774); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 1775 | ||||
| 1776 | // Keep address, for later checks. | |||
| 1777 | const uintptr_t chunkAddress = reinterpret_cast<uintptr_t>(chunk.get()); | |||
| 1778 | ||||
| 1779 | extantReleasedChunks = cm.GetExtantReleasedChunks(); | |||
| 1780 | MOZ_RELEASE_ASSERT(!extantReleasedChunks, "Unexpected released chunk(s)")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!extantReleasedChunks)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!extantReleasedChunks))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("!extantReleasedChunks" " (" "Unexpected released chunk(s)" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1780); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!extantReleasedChunks" ") (" "Unexpected released chunk(s)" ")"); do { MOZ_CrashSequence (__null, 1780); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 1781 | ||||
| 1782 | // Second request. | |||
| 1783 | MOZ_RELEASE_ASSERT(!cm.GetChunk(), "Second chunk request should always fail")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!cm.GetChunk())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!cm.GetChunk()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!cm.GetChunk()" " (" "Second chunk request should always fail" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1783); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!cm.GetChunk()" ") (" "Second chunk request should always fail" ")"); do { MOZ_CrashSequence (__null, 1783); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 1784 | ||||
| 1785 | extantReleasedChunks = cm.GetExtantReleasedChunks(); | |||
| 1786 | MOZ_RELEASE_ASSERT(!extantReleasedChunks, "Unexpected released chunk(s)")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!extantReleasedChunks)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!extantReleasedChunks))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("!extantReleasedChunks" " (" "Unexpected released chunk(s)" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1786); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!extantReleasedChunks" ") (" "Unexpected released chunk(s)" ")"); do { MOZ_CrashSequence (__null, 1786); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 1787 | ||||
| 1788 | // Add some data to the chunk (to verify recycling later on). | |||
| 1789 | MOZ_RELEASE_ASSERT(chunk->ChunkHeader().mOffsetFirstBlock == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->ChunkHeader().mOffsetFirstBlock == 0)>:: isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(chunk->ChunkHeader().mOffsetFirstBlock == 0))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("chunk->ChunkHeader().mOffsetFirstBlock == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1789 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->ChunkHeader().mOffsetFirstBlock == 0" ")"); do { MOZ_CrashSequence(__null, 1789); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1790 | MOZ_RELEASE_ASSERT(chunk->ChunkHeader().mOffsetPastLastBlock == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->ChunkHeader().mOffsetPastLastBlock == 0)> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(chunk->ChunkHeader().mOffsetPastLastBlock == 0))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("chunk->ChunkHeader().mOffsetPastLastBlock == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1790 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->ChunkHeader().mOffsetPastLastBlock == 0" ")"); do { MOZ_CrashSequence(__null, 1790); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1791 | MOZ_RELEASE_ASSERT(chunk->RangeStart() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->RangeStart() == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(chunk->RangeStart() == 0) )), 0))) { do { } while (false); MOZ_ReportAssertionFailure("chunk->RangeStart() == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1791 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->RangeStart() == 0" ")"); do { MOZ_CrashSequence(__null, 1791); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1792 | chunk->SetRangeStart(100); | |||
| 1793 | MOZ_RELEASE_ASSERT(chunk->RangeStart() == 100)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->RangeStart() == 100)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(chunk->RangeStart() == 100 ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "chunk->RangeStart() == 100", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1793); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->RangeStart() == 100" ")"); do { MOZ_CrashSequence(__null, 1793); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1794 | (void)chunk->ReserveInitialBlockAsTail(1); | |||
| 1795 | (void)chunk->ReserveBlock(2); | |||
| 1796 | MOZ_RELEASE_ASSERT(chunk->ChunkHeader().mOffsetFirstBlock == 1)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->ChunkHeader().mOffsetFirstBlock == 1)>:: isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(chunk->ChunkHeader().mOffsetFirstBlock == 1))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("chunk->ChunkHeader().mOffsetFirstBlock == 1" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1796 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->ChunkHeader().mOffsetFirstBlock == 1" ")"); do { MOZ_CrashSequence(__null, 1796); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1797 | MOZ_RELEASE_ASSERT(chunk->ChunkHeader().mOffsetPastLastBlock == 1 + 2)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->ChunkHeader().mOffsetPastLastBlock == 1 + 2 )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(chunk->ChunkHeader().mOffsetPastLastBlock == 1 + 2 ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "chunk->ChunkHeader().mOffsetPastLastBlock == 1 + 2", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1797); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->ChunkHeader().mOffsetPastLastBlock == 1 + 2" ")"); do { MOZ_CrashSequence(__null, 1797); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1798 | ||||
| 1799 | // Release the first chunk. | |||
| 1800 | chunk->MarkDone(); | |||
| 1801 | cm.ReleaseChunk(std::move(chunk)); | |||
| 1802 | MOZ_RELEASE_ASSERT(!chunk, "chunk UniquePtr should have been moved-from")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!chunk)>::isValid, "invalid assertion condition") ; if ((__builtin_expect(!!(!(!!(!chunk))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!chunk" " (" "chunk UniquePtr should have been moved-from" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1802); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!chunk" ") (" "chunk UniquePtr should have been moved-from" ")"); do { MOZ_CrashSequence(__null, 1802); __attribute__((nomerge)) :: abort(); } while (false); } } while (false); | |||
| 1803 | ||||
| 1804 | // Request after release. | |||
| 1805 | MOZ_RELEASE_ASSERT(!cm.GetChunk(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(!cm.GetChunk())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!cm.GetChunk()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!cm.GetChunk()" " (" "Chunk request after release should also fail" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1806); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!cm.GetChunk()" ") (" "Chunk request after release should also fail" ")"); do { MOZ_CrashSequence(__null, 1806); __attribute__((nomerge)) :: abort(); } while (false); } } while (false) | |||
| 1806 | "Chunk request after release should also fail")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!cm.GetChunk())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!cm.GetChunk()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!cm.GetChunk()" " (" "Chunk request after release should also fail" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1806); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!cm.GetChunk()" ") (" "Chunk request after release should also fail" ")"); do { MOZ_CrashSequence(__null, 1806); __attribute__((nomerge)) :: abort(); } while (false); } } while (false); | |||
| 1807 | ||||
| 1808 | // Check released chunk. | |||
| 1809 | extantReleasedChunks = cm.GetExtantReleasedChunks(); | |||
| 1810 | MOZ_RELEASE_ASSERT(!!extantReleasedChunks,do { static_assert( mozilla::detail::AssertionConditionType< decltype(!!extantReleasedChunks)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!!extantReleasedChunks))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("!!extantReleasedChunks" " (" "Could not retrieve released chunk" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1811); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!!extantReleasedChunks" ") (" "Could not retrieve released chunk" ")"); do { MOZ_CrashSequence (__null, 1811); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false) | |||
| 1811 | "Could not retrieve released chunk")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!!extantReleasedChunks)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!!extantReleasedChunks))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("!!extantReleasedChunks" " (" "Could not retrieve released chunk" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1811); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!!extantReleasedChunks" ") (" "Could not retrieve released chunk" ")"); do { MOZ_CrashSequence (__null, 1811); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 1812 | MOZ_RELEASE_ASSERT(!extantReleasedChunks->GetNext(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(!extantReleasedChunks->GetNext())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!extantReleasedChunks->GetNext ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!extantReleasedChunks->GetNext()" " (" "There should only be one released chunk" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1813); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!extantReleasedChunks->GetNext()" ") (" "There should only be one released chunk" ")"); do { MOZ_CrashSequence (__null, 1813); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false) | |||
| 1813 | "There should only be one released chunk")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!extantReleasedChunks->GetNext())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!extantReleasedChunks->GetNext ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!extantReleasedChunks->GetNext()" " (" "There should only be one released chunk" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1813); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!extantReleasedChunks->GetNext()" ") (" "There should only be one released chunk" ")"); do { MOZ_CrashSequence (__null, 1813); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 1814 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(reinterpret_cast<uintptr_t>(extantReleasedChunks .get()) == chunkAddress)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(reinterpret_cast<uintptr_t >(extantReleasedChunks.get()) == chunkAddress))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("reinterpret_cast<uintptr_t>(extantReleasedChunks.get()) == chunkAddress" " (" "Released chunk should be first requested one" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1816); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "reinterpret_cast<uintptr_t>(extantReleasedChunks.get()) == chunkAddress" ") (" "Released chunk should be first requested one" ")"); do { MOZ_CrashSequence(__null, 1816); __attribute__((nomerge)) :: abort(); } while (false); } } while (false) | |||
| 1815 | reinterpret_cast<uintptr_t>(extantReleasedChunks.get()) == chunkAddress,do { static_assert( mozilla::detail::AssertionConditionType< decltype(reinterpret_cast<uintptr_t>(extantReleasedChunks .get()) == chunkAddress)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(reinterpret_cast<uintptr_t >(extantReleasedChunks.get()) == chunkAddress))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("reinterpret_cast<uintptr_t>(extantReleasedChunks.get()) == chunkAddress" " (" "Released chunk should be first requested one" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1816); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "reinterpret_cast<uintptr_t>(extantReleasedChunks.get()) == chunkAddress" ") (" "Released chunk should be first requested one" ")"); do { MOZ_CrashSequence(__null, 1816); __attribute__((nomerge)) :: abort(); } while (false); } } while (false) | |||
| 1816 | "Released chunk should be first requested one")do { static_assert( mozilla::detail::AssertionConditionType< decltype(reinterpret_cast<uintptr_t>(extantReleasedChunks .get()) == chunkAddress)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(reinterpret_cast<uintptr_t >(extantReleasedChunks.get()) == chunkAddress))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("reinterpret_cast<uintptr_t>(extantReleasedChunks.get()) == chunkAddress" " (" "Released chunk should be first requested one" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1816); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "reinterpret_cast<uintptr_t>(extantReleasedChunks.get()) == chunkAddress" ") (" "Released chunk should be first requested one" ")"); do { MOZ_CrashSequence(__null, 1816); __attribute__((nomerge)) :: abort(); } while (false); } } while (false); | |||
| 1817 | ||||
| 1818 | MOZ_RELEASE_ASSERT(!cm.GetExtantReleasedChunks(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(!cm.GetExtantReleasedChunks())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!cm.GetExtantReleasedChunks( )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!cm.GetExtantReleasedChunks()" " (" "Unexpected extra released chunk(s)" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1819); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!cm.GetExtantReleasedChunks()" ") (" "Unexpected extra released chunk(s)" ")"); do { MOZ_CrashSequence (__null, 1819); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false) | |||
| 1819 | "Unexpected extra released chunk(s)")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!cm.GetExtantReleasedChunks())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!cm.GetExtantReleasedChunks( )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!cm.GetExtantReleasedChunks()" " (" "Unexpected extra released chunk(s)" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1819); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!cm.GetExtantReleasedChunks()" ") (" "Unexpected extra released chunk(s)" ")"); do { MOZ_CrashSequence (__null, 1819); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 1820 | ||||
| 1821 | // Another request after release. | |||
| 1822 | MOZ_RELEASE_ASSERT(!cm.GetChunk(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(!cm.GetChunk())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!cm.GetChunk()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!cm.GetChunk()" " (" "Chunk request after release should also fail" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1823); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!cm.GetChunk()" ") (" "Chunk request after release should also fail" ")"); do { MOZ_CrashSequence(__null, 1823); __attribute__((nomerge)) :: abort(); } while (false); } } while (false) | |||
| 1823 | "Chunk request after release should also fail")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!cm.GetChunk())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!cm.GetChunk()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!cm.GetChunk()" " (" "Chunk request after release should also fail" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1823); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!cm.GetChunk()" ") (" "Chunk request after release should also fail" ")"); do { MOZ_CrashSequence(__null, 1823); __attribute__((nomerge)) :: abort(); } while (false); } } while (false); | |||
| 1824 | ||||
| 1825 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(cm.MaxTotalSize() == maxTotalSize)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(cm.MaxTotalSize() == maxTotalSize ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "cm.MaxTotalSize() == maxTotalSize" " (" "MaxTotalSize() should not change after requests&releases" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1827); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "cm.MaxTotalSize() == maxTotalSize" ") (" "MaxTotalSize() should not change after requests&releases" ")"); do { MOZ_CrashSequence(__null, 1827); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1826 | cm.MaxTotalSize() == maxTotalSize,do { static_assert( mozilla::detail::AssertionConditionType< decltype(cm.MaxTotalSize() == maxTotalSize)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(cm.MaxTotalSize() == maxTotalSize ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "cm.MaxTotalSize() == maxTotalSize" " (" "MaxTotalSize() should not change after requests&releases" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1827); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "cm.MaxTotalSize() == maxTotalSize" ") (" "MaxTotalSize() should not change after requests&releases" ")"); do { MOZ_CrashSequence(__null, 1827); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1827 | "MaxTotalSize() should not change after requests&releases")do { static_assert( mozilla::detail::AssertionConditionType< decltype(cm.MaxTotalSize() == maxTotalSize)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(cm.MaxTotalSize() == maxTotalSize ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "cm.MaxTotalSize() == maxTotalSize" " (" "MaxTotalSize() should not change after requests&releases" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1827); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "cm.MaxTotalSize() == maxTotalSize" ") (" "MaxTotalSize() should not change after requests&releases" ")"); do { MOZ_CrashSequence(__null, 1827); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1828 | ||||
| 1829 | // Reset the chunk manager. (Single-only non-virtual function.) | |||
| 1830 | cms.Reset(std::move(extantReleasedChunks)); | |||
| 1831 | MOZ_RELEASE_ASSERT(!extantReleasedChunks,do { static_assert( mozilla::detail::AssertionConditionType< decltype(!extantReleasedChunks)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!extantReleasedChunks))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("!extantReleasedChunks" " (" "Released chunk UniquePtr should have been moved-from" ")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1832 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!extantReleasedChunks" ") (" "Released chunk UniquePtr should have been moved-from" ")"); do { MOZ_CrashSequence(__null, 1832); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1832 | "Released chunk UniquePtr should have been moved-from")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!extantReleasedChunks)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!extantReleasedChunks))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("!extantReleasedChunks" " (" "Released chunk UniquePtr should have been moved-from" ")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1832 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!extantReleasedChunks" ") (" "Released chunk UniquePtr should have been moved-from" ")"); do { MOZ_CrashSequence(__null, 1832); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1833 | ||||
| 1834 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(cm.MaxTotalSize() == maxTotalSize)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(cm.MaxTotalSize() == maxTotalSize ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "cm.MaxTotalSize() == maxTotalSize" " (" "MaxTotalSize() should not change when resetting with the same chunk" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1836); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "cm.MaxTotalSize() == maxTotalSize" ") (" "MaxTotalSize() should not change when resetting with the same chunk" ")"); do { MOZ_CrashSequence(__null, 1836); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1835 | cm.MaxTotalSize() == maxTotalSize,do { static_assert( mozilla::detail::AssertionConditionType< decltype(cm.MaxTotalSize() == maxTotalSize)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(cm.MaxTotalSize() == maxTotalSize ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "cm.MaxTotalSize() == maxTotalSize" " (" "MaxTotalSize() should not change when resetting with the same chunk" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1836); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "cm.MaxTotalSize() == maxTotalSize" ") (" "MaxTotalSize() should not change when resetting with the same chunk" ")"); do { MOZ_CrashSequence(__null, 1836); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1836 | "MaxTotalSize() should not change when resetting with the same chunk")do { static_assert( mozilla::detail::AssertionConditionType< decltype(cm.MaxTotalSize() == maxTotalSize)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(cm.MaxTotalSize() == maxTotalSize ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "cm.MaxTotalSize() == maxTotalSize" " (" "MaxTotalSize() should not change when resetting with the same chunk" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1836); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "cm.MaxTotalSize() == maxTotalSize" ") (" "MaxTotalSize() should not change when resetting with the same chunk" ")"); do { MOZ_CrashSequence(__null, 1836); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1837 | ||||
| 1838 | // 2nd round, first request. Theoretically async, but this implementation just | |||
| 1839 | // immediately runs the callback. | |||
| 1840 | bool ran = false; | |||
| 1841 | cm.RequestChunk([&](UniquePtr<ProfileBufferChunk> aChunk) { | |||
| 1842 | ran = true; | |||
| 1843 | MOZ_RELEASE_ASSERT(!!aChunk)do { static_assert( mozilla::detail::AssertionConditionType< decltype(!!aChunk)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!!aChunk))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!!aChunk", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1843); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!!aChunk" ")"); do { MOZ_CrashSequence(__null, 1843); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1844 | chunk = std::move(aChunk); | |||
| 1845 | }); | |||
| 1846 | MOZ_RELEASE_ASSERT(ran, "RequestChunk callback not called immediately")do { static_assert( mozilla::detail::AssertionConditionType< decltype(ran)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(ran))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("ran" " (" "RequestChunk callback not called immediately" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1846); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "ran" ") (" "RequestChunk callback not called immediately" ")"); do { MOZ_CrashSequence(__null, 1846); __attribute__((nomerge)) :: abort(); } while (false); } } while (false); | |||
| 1847 | ran = false; | |||
| 1848 | cm.FulfillChunkRequests(); | |||
| 1849 | MOZ_RELEASE_ASSERT(!ran, "FulfillChunkRequests should not have any effects")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!ran)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(!ran))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("!ran" " (" "FulfillChunkRequests should not have any effects" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1849); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!ran" ") (" "FulfillChunkRequests should not have any effects" ")" ); do { MOZ_CrashSequence(__null, 1849); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1850 | MOZ_RELEASE_ASSERT(!!chunk, "First chunk request should always work")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!!chunk)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!!chunk))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!!chunk" " (" "First chunk request should always work" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1850); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!!chunk" ") (" "First chunk request should always work" ")"); do { MOZ_CrashSequence (__null, 1850); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 1851 | MOZ_RELEASE_ASSERT(chunk->BufferBytes() >= ChunkMinBufferBytes,do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->BufferBytes() >= ChunkMinBufferBytes)> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(chunk->BufferBytes() >= ChunkMinBufferBytes))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("chunk->BufferBytes() >= ChunkMinBufferBytes" " (" "Unexpected chunk size" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1852); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->BufferBytes() >= ChunkMinBufferBytes" ") (" "Unexpected chunk size" ")"); do { MOZ_CrashSequence(__null , 1852); __attribute__((nomerge)) ::abort(); } while (false); } } while (false) | |||
| 1852 | "Unexpected chunk size")do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->BufferBytes() >= ChunkMinBufferBytes)> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(chunk->BufferBytes() >= ChunkMinBufferBytes))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("chunk->BufferBytes() >= ChunkMinBufferBytes" " (" "Unexpected chunk size" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1852); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->BufferBytes() >= ChunkMinBufferBytes" ") (" "Unexpected chunk size" ")"); do { MOZ_CrashSequence(__null , 1852); __attribute__((nomerge)) ::abort(); } while (false); } } while (false); | |||
| 1853 | MOZ_RELEASE_ASSERT(!chunk->GetNext(), "There should only be one chunk")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!chunk->GetNext())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!chunk->GetNext()))), 0)) ) { do { } while (false); MOZ_ReportAssertionFailure("!chunk->GetNext()" " (" "There should only be one chunk" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1853); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!chunk->GetNext()" ") (" "There should only be one chunk" ")"); do { MOZ_CrashSequence (__null, 1853); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 1854 | MOZ_RELEASE_ASSERT(reinterpret_cast<uintptr_t>(chunk.get()) == chunkAddress,do { static_assert( mozilla::detail::AssertionConditionType< decltype(reinterpret_cast<uintptr_t>(chunk.get()) == chunkAddress )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(reinterpret_cast<uintptr_t>(chunk.get()) == chunkAddress ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "reinterpret_cast<uintptr_t>(chunk.get()) == chunkAddress" " (" "Requested chunk should be first requested one" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1855); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "reinterpret_cast<uintptr_t>(chunk.get()) == chunkAddress" ") (" "Requested chunk should be first requested one" ")"); do { MOZ_CrashSequence(__null, 1855); __attribute__((nomerge)) :: abort(); } while (false); } } while (false) | |||
| 1855 | "Requested chunk should be first requested one")do { static_assert( mozilla::detail::AssertionConditionType< decltype(reinterpret_cast<uintptr_t>(chunk.get()) == chunkAddress )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(reinterpret_cast<uintptr_t>(chunk.get()) == chunkAddress ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "reinterpret_cast<uintptr_t>(chunk.get()) == chunkAddress" " (" "Requested chunk should be first requested one" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1855); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "reinterpret_cast<uintptr_t>(chunk.get()) == chunkAddress" ") (" "Requested chunk should be first requested one" ")"); do { MOZ_CrashSequence(__null, 1855); __attribute__((nomerge)) :: abort(); } while (false); } } while (false); | |||
| 1856 | // Verify that chunk is empty and usable. | |||
| 1857 | MOZ_RELEASE_ASSERT(chunk->ChunkHeader().mOffsetFirstBlock == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->ChunkHeader().mOffsetFirstBlock == 0)>:: isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(chunk->ChunkHeader().mOffsetFirstBlock == 0))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("chunk->ChunkHeader().mOffsetFirstBlock == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1857 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->ChunkHeader().mOffsetFirstBlock == 0" ")"); do { MOZ_CrashSequence(__null, 1857); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1858 | MOZ_RELEASE_ASSERT(chunk->ChunkHeader().mOffsetPastLastBlock == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->ChunkHeader().mOffsetPastLastBlock == 0)> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(chunk->ChunkHeader().mOffsetPastLastBlock == 0))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("chunk->ChunkHeader().mOffsetPastLastBlock == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1858 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->ChunkHeader().mOffsetPastLastBlock == 0" ")"); do { MOZ_CrashSequence(__null, 1858); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1859 | MOZ_RELEASE_ASSERT(chunk->RangeStart() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->RangeStart() == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(chunk->RangeStart() == 0) )), 0))) { do { } while (false); MOZ_ReportAssertionFailure("chunk->RangeStart() == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1859 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->RangeStart() == 0" ")"); do { MOZ_CrashSequence(__null, 1859); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1860 | chunk->SetRangeStart(200); | |||
| 1861 | MOZ_RELEASE_ASSERT(chunk->RangeStart() == 200)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->RangeStart() == 200)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(chunk->RangeStart() == 200 ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "chunk->RangeStart() == 200", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1861); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->RangeStart() == 200" ")"); do { MOZ_CrashSequence(__null, 1861); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1862 | (void)chunk->ReserveInitialBlockAsTail(3); | |||
| 1863 | (void)chunk->ReserveBlock(4); | |||
| 1864 | MOZ_RELEASE_ASSERT(chunk->ChunkHeader().mOffsetFirstBlock == 3)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->ChunkHeader().mOffsetFirstBlock == 3)>:: isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(chunk->ChunkHeader().mOffsetFirstBlock == 3))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("chunk->ChunkHeader().mOffsetFirstBlock == 3" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1864 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->ChunkHeader().mOffsetFirstBlock == 3" ")"); do { MOZ_CrashSequence(__null, 1864); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1865 | MOZ_RELEASE_ASSERT(chunk->ChunkHeader().mOffsetPastLastBlock == 3 + 4)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->ChunkHeader().mOffsetPastLastBlock == 3 + 4 )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(chunk->ChunkHeader().mOffsetPastLastBlock == 3 + 4 ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "chunk->ChunkHeader().mOffsetPastLastBlock == 3 + 4", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1865); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->ChunkHeader().mOffsetPastLastBlock == 3 + 4" ")"); do { MOZ_CrashSequence(__null, 1865); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1866 | ||||
| 1867 | // Second request. | |||
| 1868 | ran = false; | |||
| 1869 | cm.RequestChunk([&](UniquePtr<ProfileBufferChunk> aChunk) { | |||
| 1870 | ran = true; | |||
| 1871 | MOZ_RELEASE_ASSERT(!aChunk, "Second chunk request should always fail")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!aChunk)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!aChunk))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!aChunk" " (" "Second chunk request should always fail" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1871); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!aChunk" ") (" "Second chunk request should always fail" ")"); do { MOZ_CrashSequence (__null, 1871); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 1872 | }); | |||
| 1873 | MOZ_RELEASE_ASSERT(ran, "RequestChunk callback not called")do { static_assert( mozilla::detail::AssertionConditionType< decltype(ran)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(ran))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("ran" " (" "RequestChunk callback not called" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1873); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "ran" ") (" "RequestChunk callback not called" ")"); do { MOZ_CrashSequence (__null, 1873); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 1874 | ||||
| 1875 | // This one does nothing. | |||
| 1876 | cm.ForgetUnreleasedChunks(); | |||
| 1877 | ||||
| 1878 | // Don't forget to mark chunk "Done" before letting it die. | |||
| 1879 | chunk->MarkDone(); | |||
| 1880 | chunk = nullptr; | |||
| 1881 | ||||
| 1882 | // Create a tiny chunk and reset the chunk manager with it. | |||
| 1883 | chunk = ProfileBufferChunk::Create(1); | |||
| 1884 | MOZ_RELEASE_ASSERT(!!chunk)do { static_assert( mozilla::detail::AssertionConditionType< decltype(!!chunk)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!!chunk))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!!chunk", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1884); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!!chunk" ")"); do { MOZ_CrashSequence(__null, 1884); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1885 | auto tinyChunkSize = chunk->BufferBytes(); | |||
| 1886 | MOZ_RELEASE_ASSERT(tinyChunkSize >= 1)do { static_assert( mozilla::detail::AssertionConditionType< decltype(tinyChunkSize >= 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(tinyChunkSize >= 1))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("tinyChunkSize >= 1" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1886 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "tinyChunkSize >= 1" ")"); do { MOZ_CrashSequence(__null, 1886); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1887 | MOZ_RELEASE_ASSERT(tinyChunkSize < ChunkMinBufferBytes)do { static_assert( mozilla::detail::AssertionConditionType< decltype(tinyChunkSize < ChunkMinBufferBytes)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(tinyChunkSize < ChunkMinBufferBytes))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("tinyChunkSize < ChunkMinBufferBytes" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1887 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "tinyChunkSize < ChunkMinBufferBytes" ")"); do { MOZ_CrashSequence(__null, 1887); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1888 | MOZ_RELEASE_ASSERT(chunk->RangeStart() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->RangeStart() == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(chunk->RangeStart() == 0) )), 0))) { do { } while (false); MOZ_ReportAssertionFailure("chunk->RangeStart() == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1888 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->RangeStart() == 0" ")"); do { MOZ_CrashSequence(__null, 1888); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1889 | chunk->SetRangeStart(300); | |||
| 1890 | MOZ_RELEASE_ASSERT(chunk->RangeStart() == 300)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->RangeStart() == 300)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(chunk->RangeStart() == 300 ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "chunk->RangeStart() == 300", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1890); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->RangeStart() == 300" ")"); do { MOZ_CrashSequence(__null, 1890); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1891 | cms.Reset(std::move(chunk)); | |||
| 1892 | MOZ_RELEASE_ASSERT(!chunk, "chunk UniquePtr should have been moved-from")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!chunk)>::isValid, "invalid assertion condition") ; if ((__builtin_expect(!!(!(!!(!chunk))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!chunk" " (" "chunk UniquePtr should have been moved-from" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1892); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!chunk" ") (" "chunk UniquePtr should have been moved-from" ")"); do { MOZ_CrashSequence(__null, 1892); __attribute__((nomerge)) :: abort(); } while (false); } } while (false); | |||
| 1893 | MOZ_RELEASE_ASSERT(cm.MaxTotalSize() == tinyChunkSize,do { static_assert( mozilla::detail::AssertionConditionType< decltype(cm.MaxTotalSize() == tinyChunkSize)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(cm.MaxTotalSize() == tinyChunkSize ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "cm.MaxTotalSize() == tinyChunkSize" " (" "MaxTotalSize() should match the new chunk size" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1894); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "cm.MaxTotalSize() == tinyChunkSize" ") (" "MaxTotalSize() should match the new chunk size" ")"); do { MOZ_CrashSequence(__null, 1894); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1894 | "MaxTotalSize() should match the new chunk size")do { static_assert( mozilla::detail::AssertionConditionType< decltype(cm.MaxTotalSize() == tinyChunkSize)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(cm.MaxTotalSize() == tinyChunkSize ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "cm.MaxTotalSize() == tinyChunkSize" " (" "MaxTotalSize() should match the new chunk size" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1894); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "cm.MaxTotalSize() == tinyChunkSize" ") (" "MaxTotalSize() should match the new chunk size" ")"); do { MOZ_CrashSequence(__null, 1894); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1895 | chunk = cm.GetChunk(); | |||
| 1896 | MOZ_RELEASE_ASSERT(chunk->RangeStart() == 0, "Got non-recycled chunk")do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->RangeStart() == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(chunk->RangeStart() == 0) )), 0))) { do { } while (false); MOZ_ReportAssertionFailure("chunk->RangeStart() == 0" " (" "Got non-recycled chunk" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1896); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->RangeStart() == 0" ") (" "Got non-recycled chunk" ")"); do { MOZ_CrashSequence( __null, 1896); __attribute__((nomerge)) ::abort(); } while (false ); } } while (false); | |||
| 1897 | ||||
| 1898 | // Enough testing! Clean-up. | |||
| 1899 | (void)chunk->ReserveInitialBlockAsTail(0); | |||
| 1900 | chunk->MarkDone(); | |||
| 1901 | cm.ForgetUnreleasedChunks(); | |||
| 1902 | ||||
| 1903 | #ifdef DEBUG1 | |||
| 1904 | cm.DeregisteredFrom(chunkManagerRegisterer); | |||
| 1905 | #endif // DEBUG | |||
| 1906 | ||||
| 1907 | printf("TestChunkManagerSingle done\n"); | |||
| 1908 | } | |||
| 1909 | ||||
| 1910 | static void TestChunkManagerWithLocalLimit() { | |||
| 1911 | printf("TestChunkManagerWithLocalLimit...\n"); | |||
| 1912 | ||||
| 1913 | // Construct a ProfileBufferChunkManagerWithLocalLimit with chunk of minimum | |||
| 1914 | // size >=100, up to 1000 bytes. | |||
| 1915 | constexpr ProfileBufferChunk::Length MaxTotalBytes = 1000; | |||
| 1916 | constexpr ProfileBufferChunk::Length ChunkMinBufferBytes = 100; | |||
| 1917 | ProfileBufferChunkManagerWithLocalLimit cmll{MaxTotalBytes, | |||
| 1918 | ChunkMinBufferBytes}; | |||
| 1919 | ||||
| 1920 | // Reference to base class, to exercize virtual methods. | |||
| 1921 | ProfileBufferChunkManager& cm = cmll; | |||
| 1922 | ||||
| 1923 | #ifdef DEBUG1 | |||
| 1924 | const char* chunkManagerRegisterer = "TestChunkManagerWithLocalLimit"; | |||
| 1925 | cm.RegisteredWith(chunkManagerRegisterer); | |||
| 1926 | #endif // DEBUG | |||
| 1927 | ||||
| 1928 | MOZ_RELEASE_ASSERT(cm.MaxTotalSize() == MaxTotalBytes,do { static_assert( mozilla::detail::AssertionConditionType< decltype(cm.MaxTotalSize() == MaxTotalBytes)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(cm.MaxTotalSize() == MaxTotalBytes ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "cm.MaxTotalSize() == MaxTotalBytes" " (" "Max total size should be exactly as given" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1929); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "cm.MaxTotalSize() == MaxTotalBytes" ") (" "Max total size should be exactly as given" ")"); do { MOZ_CrashSequence(__null, 1929); __attribute__((nomerge)) :: abort(); } while (false); } } while (false) | |||
| 1929 | "Max total size should be exactly as given")do { static_assert( mozilla::detail::AssertionConditionType< decltype(cm.MaxTotalSize() == MaxTotalBytes)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(cm.MaxTotalSize() == MaxTotalBytes ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "cm.MaxTotalSize() == MaxTotalBytes" " (" "Max total size should be exactly as given" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1929); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "cm.MaxTotalSize() == MaxTotalBytes" ") (" "Max total size should be exactly as given" ")"); do { MOZ_CrashSequence(__null, 1929); __attribute__((nomerge)) :: abort(); } while (false); } } while (false); | |||
| 1930 | ||||
| 1931 | unsigned destroyedChunks = 0; | |||
| 1932 | unsigned destroyedBytes = 0; | |||
| 1933 | cm.SetChunkDestroyedCallback([&](const ProfileBufferChunk& aChunks) { | |||
| 1934 | for (const ProfileBufferChunk* chunk = &aChunks; chunk; | |||
| 1935 | chunk = chunk->GetNext()) { | |||
| 1936 | destroyedChunks += 1; | |||
| 1937 | destroyedBytes += chunk->BufferBytes(); | |||
| 1938 | } | |||
| 1939 | }); | |||
| 1940 | ||||
| 1941 | UniquePtr<ProfileBufferChunk> extantReleasedChunks = | |||
| 1942 | cm.GetExtantReleasedChunks(); | |||
| 1943 | MOZ_RELEASE_ASSERT(!extantReleasedChunks, "Unexpected released chunk(s)")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!extantReleasedChunks)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!extantReleasedChunks))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("!extantReleasedChunks" " (" "Unexpected released chunk(s)" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1943); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!extantReleasedChunks" ") (" "Unexpected released chunk(s)" ")"); do { MOZ_CrashSequence (__null, 1943); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 1944 | ||||
| 1945 | // First request. | |||
| 1946 | UniquePtr<ProfileBufferChunk> chunk = cm.GetChunk(); | |||
| 1947 | MOZ_RELEASE_ASSERT(!!chunk,do { static_assert( mozilla::detail::AssertionConditionType< decltype(!!chunk)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!!chunk))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!!chunk" " (" "First chunk immediate request should always work" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1948); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!!chunk" ") (" "First chunk immediate request should always work" ")" ); do { MOZ_CrashSequence(__null, 1948); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1948 | "First chunk immediate request should always work")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!!chunk)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!!chunk))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!!chunk" " (" "First chunk immediate request should always work" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1948); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!!chunk" ") (" "First chunk immediate request should always work" ")" ); do { MOZ_CrashSequence(__null, 1948); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1949 | const auto chunkActualBufferBytes = chunk->BufferBytes(); | |||
| 1950 | MOZ_RELEASE_ASSERT(chunkActualBufferBytes >= ChunkMinBufferBytes,do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunkActualBufferBytes >= ChunkMinBufferBytes)> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(chunkActualBufferBytes >= ChunkMinBufferBytes))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("chunkActualBufferBytes >= ChunkMinBufferBytes" " (" "Unexpected chunk size" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1951); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunkActualBufferBytes >= ChunkMinBufferBytes" ") (" "Unexpected chunk size" ")"); do { MOZ_CrashSequence(__null , 1951); __attribute__((nomerge)) ::abort(); } while (false); } } while (false) | |||
| 1951 | "Unexpected chunk size")do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunkActualBufferBytes >= ChunkMinBufferBytes)> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(chunkActualBufferBytes >= ChunkMinBufferBytes))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("chunkActualBufferBytes >= ChunkMinBufferBytes" " (" "Unexpected chunk size" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1951); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunkActualBufferBytes >= ChunkMinBufferBytes" ") (" "Unexpected chunk size" ")"); do { MOZ_CrashSequence(__null , 1951); __attribute__((nomerge)) ::abort(); } while (false); } } while (false); | |||
| 1952 | MOZ_RELEASE_ASSERT(!chunk->GetNext(), "There should only be one chunk")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!chunk->GetNext())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!chunk->GetNext()))), 0)) ) { do { } while (false); MOZ_ReportAssertionFailure("!chunk->GetNext()" " (" "There should only be one chunk" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1952); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!chunk->GetNext()" ") (" "There should only be one chunk" ")"); do { MOZ_CrashSequence (__null, 1952); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 1953 | ||||
| 1954 | // Keep address, for later checks. | |||
| 1955 | const uintptr_t chunk1Address = reinterpret_cast<uintptr_t>(chunk.get()); | |||
| 1956 | ||||
| 1957 | extantReleasedChunks = cm.GetExtantReleasedChunks(); | |||
| 1958 | MOZ_RELEASE_ASSERT(!extantReleasedChunks, "Unexpected released chunk(s)")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!extantReleasedChunks)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!extantReleasedChunks))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("!extantReleasedChunks" " (" "Unexpected released chunk(s)" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1958); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!extantReleasedChunks" ") (" "Unexpected released chunk(s)" ")"); do { MOZ_CrashSequence (__null, 1958); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 1959 | ||||
| 1960 | // Verify that ReleaseChunk accepts zero chunks. | |||
| 1961 | cm.ReleaseChunk(nullptr); | |||
| 1962 | MOZ_RELEASE_ASSERT(!extantReleasedChunks, "Unexpected released chunk(s)")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!extantReleasedChunks)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!extantReleasedChunks))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("!extantReleasedChunks" " (" "Unexpected released chunk(s)" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1962); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!extantReleasedChunks" ") (" "Unexpected released chunk(s)" ")"); do { MOZ_CrashSequence (__null, 1962); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 1963 | ||||
| 1964 | // For this test, we need to be able to get at least 2 chunks without hitting | |||
| 1965 | // the limit. (If this failed, it wouldn't necessary be a problem with | |||
| 1966 | // ProfileBufferChunkManagerWithLocalLimit, fiddle with constants at the top | |||
| 1967 | // of this test.) | |||
| 1968 | MOZ_RELEASE_ASSERT(chunkActualBufferBytes < 2 * MaxTotalBytes)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunkActualBufferBytes < 2 * MaxTotalBytes)>:: isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(chunkActualBufferBytes < 2 * MaxTotalBytes))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("chunkActualBufferBytes < 2 * MaxTotalBytes" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1968 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunkActualBufferBytes < 2 * MaxTotalBytes" ")"); do { MOZ_CrashSequence(__null, 1968); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1969 | ||||
| 1970 | unsigned chunk1ReuseCount = 0; | |||
| 1971 | ||||
| 1972 | // We will do enough loops to go through the maximum size a number of times. | |||
| 1973 | const unsigned Rollovers = 3; | |||
| 1974 | const unsigned Loops = Rollovers * MaxTotalBytes / chunkActualBufferBytes; | |||
| 1975 | for (unsigned i = 0; i < Loops; ++i) { | |||
| 1976 | // Add some data to the chunk. | |||
| 1977 | MOZ_RELEASE_ASSERT(chunk->ChunkHeader().mOffsetFirstBlock == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->ChunkHeader().mOffsetFirstBlock == 0)>:: isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(chunk->ChunkHeader().mOffsetFirstBlock == 0))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("chunk->ChunkHeader().mOffsetFirstBlock == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1977 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->ChunkHeader().mOffsetFirstBlock == 0" ")"); do { MOZ_CrashSequence(__null, 1977); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1978 | MOZ_RELEASE_ASSERT(chunk->ChunkHeader().mOffsetPastLastBlock == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->ChunkHeader().mOffsetPastLastBlock == 0)> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(chunk->ChunkHeader().mOffsetPastLastBlock == 0))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("chunk->ChunkHeader().mOffsetPastLastBlock == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1978 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->ChunkHeader().mOffsetPastLastBlock == 0" ")"); do { MOZ_CrashSequence(__null, 1978); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1979 | MOZ_RELEASE_ASSERT(chunk->RangeStart() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->RangeStart() == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(chunk->RangeStart() == 0) )), 0))) { do { } while (false); MOZ_ReportAssertionFailure("chunk->RangeStart() == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1979 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->RangeStart() == 0" ")"); do { MOZ_CrashSequence(__null, 1979); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1980 | const ProfileBufferIndex index = 1 + i * chunkActualBufferBytes; | |||
| 1981 | chunk->SetRangeStart(index); | |||
| 1982 | MOZ_RELEASE_ASSERT(chunk->RangeStart() == index)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->RangeStart() == index)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(chunk->RangeStart() == index ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "chunk->RangeStart() == index", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1982); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->RangeStart() == index" ")"); do { MOZ_CrashSequence(__null, 1982); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1983 | (void)chunk->ReserveInitialBlockAsTail(1); | |||
| 1984 | (void)chunk->ReserveBlock(2); | |||
| 1985 | MOZ_RELEASE_ASSERT(chunk->ChunkHeader().mOffsetFirstBlock == 1)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->ChunkHeader().mOffsetFirstBlock == 1)>:: isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(chunk->ChunkHeader().mOffsetFirstBlock == 1))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("chunk->ChunkHeader().mOffsetFirstBlock == 1" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 1985 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->ChunkHeader().mOffsetFirstBlock == 1" ")"); do { MOZ_CrashSequence(__null, 1985); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1986 | MOZ_RELEASE_ASSERT(chunk->ChunkHeader().mOffsetPastLastBlock == 1 + 2)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->ChunkHeader().mOffsetPastLastBlock == 1 + 2 )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(chunk->ChunkHeader().mOffsetPastLastBlock == 1 + 2 ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "chunk->ChunkHeader().mOffsetPastLastBlock == 1 + 2", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1986); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->ChunkHeader().mOffsetPastLastBlock == 1 + 2" ")"); do { MOZ_CrashSequence(__null, 1986); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1987 | ||||
| 1988 | // Request a new chunk. | |||
| 1989 | bool ran = false; | |||
| 1990 | UniquePtr<ProfileBufferChunk> newChunk; | |||
| 1991 | cm.RequestChunk([&](UniquePtr<ProfileBufferChunk> aChunk) { | |||
| 1992 | ran = true; | |||
| 1993 | newChunk = std::move(aChunk); | |||
| 1994 | }); | |||
| 1995 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(!ran)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(!ran))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("!ran" " (" "RequestChunk should not immediately fulfill the request" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1996); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!ran" ") (" "RequestChunk should not immediately fulfill the request" ")"); do { MOZ_CrashSequence(__null, 1996); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 1996 | !ran, "RequestChunk should not immediately fulfill the request")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!ran)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(!ran))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("!ran" " (" "RequestChunk should not immediately fulfill the request" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1996); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!ran" ") (" "RequestChunk should not immediately fulfill the request" ")"); do { MOZ_CrashSequence(__null, 1996); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1997 | cm.FulfillChunkRequests(); | |||
| 1998 | MOZ_RELEASE_ASSERT(ran, "FulfillChunkRequests should invoke the callback")do { static_assert( mozilla::detail::AssertionConditionType< decltype(ran)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(ran))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("ran" " (" "FulfillChunkRequests should invoke the callback" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1998); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "ran" ") (" "FulfillChunkRequests should invoke the callback" ")") ; do { MOZ_CrashSequence(__null, 1998); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 1999 | MOZ_RELEASE_ASSERT(!!newChunk, "Chunk request should always work")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!!newChunk)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!!newChunk))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!!newChunk" " (" "Chunk request should always work" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 1999); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!!newChunk" ") (" "Chunk request should always work" ")"); do { MOZ_CrashSequence (__null, 1999); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 2000 | MOZ_RELEASE_ASSERT(newChunk->BufferBytes() == chunkActualBufferBytes,do { static_assert( mozilla::detail::AssertionConditionType< decltype(newChunk->BufferBytes() == chunkActualBufferBytes )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(newChunk->BufferBytes() == chunkActualBufferBytes ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "newChunk->BufferBytes() == chunkActualBufferBytes" " (" "Unexpected chunk size" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2001); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "newChunk->BufferBytes() == chunkActualBufferBytes" ") (" "Unexpected chunk size" ")"); do { MOZ_CrashSequence(__null , 2001); __attribute__((nomerge)) ::abort(); } while (false); } } while (false) | |||
| 2001 | "Unexpected chunk size")do { static_assert( mozilla::detail::AssertionConditionType< decltype(newChunk->BufferBytes() == chunkActualBufferBytes )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(newChunk->BufferBytes() == chunkActualBufferBytes ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "newChunk->BufferBytes() == chunkActualBufferBytes" " (" "Unexpected chunk size" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2001); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "newChunk->BufferBytes() == chunkActualBufferBytes" ") (" "Unexpected chunk size" ")"); do { MOZ_CrashSequence(__null , 2001); __attribute__((nomerge)) ::abort(); } while (false); } } while (false); | |||
| 2002 | MOZ_RELEASE_ASSERT(!newChunk->GetNext(), "There should only be one chunk")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!newChunk->GetNext())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!newChunk->GetNext()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("!newChunk->GetNext()" " (" "There should only be one chunk" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2002); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!newChunk->GetNext()" ") (" "There should only be one chunk" ")"); do { MOZ_CrashSequence (__null, 2002); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 2003 | ||||
| 2004 | // Mark previous chunk done and release it. | |||
| 2005 | WaitUntilTimeStampChanges(); // Force "done" timestamp to change. | |||
| 2006 | chunk->MarkDone(); | |||
| 2007 | cm.ReleaseChunk(std::move(chunk)); | |||
| 2008 | ||||
| 2009 | // And cycle to the new chunk. | |||
| 2010 | chunk = std::move(newChunk); | |||
| 2011 | ||||
| 2012 | if (reinterpret_cast<uintptr_t>(chunk.get()) == chunk1Address) { | |||
| 2013 | ++chunk1ReuseCount; | |||
| 2014 | } | |||
| 2015 | } | |||
| 2016 | ||||
| 2017 | // Expect all rollovers except 1 to destroy chunks. | |||
| 2018 | MOZ_RELEASE_ASSERT(destroyedChunks >= (Rollovers - 1) * MaxTotalBytes /do { static_assert( mozilla::detail::AssertionConditionType< decltype(destroyedChunks >= (Rollovers - 1) * MaxTotalBytes / chunkActualBufferBytes)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(destroyedChunks >= (Rollovers - 1) * MaxTotalBytes / chunkActualBufferBytes))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("destroyedChunks >= (Rollovers - 1) * MaxTotalBytes / chunkActualBufferBytes" " (" "Not enough destroyed chunks" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2020); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "destroyedChunks >= (Rollovers - 1) * MaxTotalBytes / chunkActualBufferBytes" ") (" "Not enough destroyed chunks" ")"); do { MOZ_CrashSequence (__null, 2020); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false) | |||
| 2019 | chunkActualBufferBytes,do { static_assert( mozilla::detail::AssertionConditionType< decltype(destroyedChunks >= (Rollovers - 1) * MaxTotalBytes / chunkActualBufferBytes)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(destroyedChunks >= (Rollovers - 1) * MaxTotalBytes / chunkActualBufferBytes))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("destroyedChunks >= (Rollovers - 1) * MaxTotalBytes / chunkActualBufferBytes" " (" "Not enough destroyed chunks" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2020); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "destroyedChunks >= (Rollovers - 1) * MaxTotalBytes / chunkActualBufferBytes" ") (" "Not enough destroyed chunks" ")"); do { MOZ_CrashSequence (__null, 2020); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false) | |||
| 2020 | "Not enough destroyed chunks")do { static_assert( mozilla::detail::AssertionConditionType< decltype(destroyedChunks >= (Rollovers - 1) * MaxTotalBytes / chunkActualBufferBytes)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(destroyedChunks >= (Rollovers - 1) * MaxTotalBytes / chunkActualBufferBytes))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("destroyedChunks >= (Rollovers - 1) * MaxTotalBytes / chunkActualBufferBytes" " (" "Not enough destroyed chunks" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2020); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "destroyedChunks >= (Rollovers - 1) * MaxTotalBytes / chunkActualBufferBytes" ") (" "Not enough destroyed chunks" ")"); do { MOZ_CrashSequence (__null, 2020); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 2021 | MOZ_RELEASE_ASSERT(destroyedBytes == destroyedChunks * chunkActualBufferBytes,do { static_assert( mozilla::detail::AssertionConditionType< decltype(destroyedBytes == destroyedChunks * chunkActualBufferBytes )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(destroyedBytes == destroyedChunks * chunkActualBufferBytes ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "destroyedBytes == destroyedChunks * chunkActualBufferBytes" " (" "Mismatched destroyed chunks and bytes" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2022); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "destroyedBytes == destroyedChunks * chunkActualBufferBytes" ") (" "Mismatched destroyed chunks and bytes" ")"); do { MOZ_CrashSequence (__null, 2022); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false) | |||
| 2022 | "Mismatched destroyed chunks and bytes")do { static_assert( mozilla::detail::AssertionConditionType< decltype(destroyedBytes == destroyedChunks * chunkActualBufferBytes )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(destroyedBytes == destroyedChunks * chunkActualBufferBytes ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "destroyedBytes == destroyedChunks * chunkActualBufferBytes" " (" "Mismatched destroyed chunks and bytes" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2022); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "destroyedBytes == destroyedChunks * chunkActualBufferBytes" ") (" "Mismatched destroyed chunks and bytes" ")"); do { MOZ_CrashSequence (__null, 2022); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 2023 | MOZ_RELEASE_ASSERT(chunk1ReuseCount >= (Rollovers - 1),do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk1ReuseCount >= (Rollovers - 1))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(chunk1ReuseCount >= (Rollovers - 1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("chunk1ReuseCount >= (Rollovers - 1)" " (" "Not enough reuse of the first chunks" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2024); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk1ReuseCount >= (Rollovers - 1)" ") (" "Not enough reuse of the first chunks" ")"); do { MOZ_CrashSequence (__null, 2024); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false) | |||
| 2024 | "Not enough reuse of the first chunks")do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk1ReuseCount >= (Rollovers - 1))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(chunk1ReuseCount >= (Rollovers - 1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("chunk1ReuseCount >= (Rollovers - 1)" " (" "Not enough reuse of the first chunks" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2024); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk1ReuseCount >= (Rollovers - 1)" ") (" "Not enough reuse of the first chunks" ")"); do { MOZ_CrashSequence (__null, 2024); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 2025 | ||||
| 2026 | // Check that chunk manager is reentrant from request callback. | |||
| 2027 | bool ran = false; | |||
| 2028 | bool ranInner = false; | |||
| 2029 | UniquePtr<ProfileBufferChunk> newChunk; | |||
| 2030 | cm.RequestChunk([&](UniquePtr<ProfileBufferChunk> aChunk) { | |||
| 2031 | ran = true; | |||
| 2032 | MOZ_RELEASE_ASSERT(!!aChunk, "Chunk request should always work")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!!aChunk)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!!aChunk))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!!aChunk" " (" "Chunk request should always work" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2032); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!!aChunk" ") (" "Chunk request should always work" ")"); do { MOZ_CrashSequence (__null, 2032); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 2033 | (void)aChunk->ReserveInitialBlockAsTail(0); | |||
| 2034 | WaitUntilTimeStampChanges(); // Force "done" timestamp to change. | |||
| 2035 | aChunk->MarkDone(); | |||
| 2036 | UniquePtr<ProfileBufferChunk> anotherChunk = cm.GetChunk(); | |||
| 2037 | MOZ_RELEASE_ASSERT(!!anotherChunk)do { static_assert( mozilla::detail::AssertionConditionType< decltype(!!anotherChunk)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!!anotherChunk))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!!anotherChunk" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2037 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!!anotherChunk" ")"); do { MOZ_CrashSequence(__null, 2037); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2038 | (void)anotherChunk->ReserveInitialBlockAsTail(0); | |||
| 2039 | WaitUntilTimeStampChanges(); // Force "done" timestamp to change. | |||
| 2040 | anotherChunk->MarkDone(); | |||
| 2041 | cm.RequestChunk([&](UniquePtr<ProfileBufferChunk> aChunk) { | |||
| 2042 | ranInner = true; | |||
| 2043 | MOZ_RELEASE_ASSERT(!!aChunk, "Chunk request should always work")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!!aChunk)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!!aChunk))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!!aChunk" " (" "Chunk request should always work" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2043); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!!aChunk" ") (" "Chunk request should always work" ")"); do { MOZ_CrashSequence (__null, 2043); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 2044 | (void)aChunk->ReserveInitialBlockAsTail(0); | |||
| 2045 | WaitUntilTimeStampChanges(); // Force "done" timestamp to change. | |||
| 2046 | aChunk->MarkDone(); | |||
| 2047 | }); | |||
| 2048 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(!ranInner)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!ranInner))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!ranInner" " (" "RequestChunk should not immediately fulfill the request" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2049); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!ranInner" ") (" "RequestChunk should not immediately fulfill the request" ")"); do { MOZ_CrashSequence(__null, 2049); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2049 | !ranInner, "RequestChunk should not immediately fulfill the request")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!ranInner)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!ranInner))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!ranInner" " (" "RequestChunk should not immediately fulfill the request" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2049); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!ranInner" ") (" "RequestChunk should not immediately fulfill the request" ")"); do { MOZ_CrashSequence(__null, 2049); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2050 | }); | |||
| 2051 | MOZ_RELEASE_ASSERT(!ran,do { static_assert( mozilla::detail::AssertionConditionType< decltype(!ran)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(!ran))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("!ran" " (" "RequestChunk should not immediately fulfill the request" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2052); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!ran" ") (" "RequestChunk should not immediately fulfill the request" ")"); do { MOZ_CrashSequence(__null, 2052); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2052 | "RequestChunk should not immediately fulfill the request")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!ran)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(!ran))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("!ran" " (" "RequestChunk should not immediately fulfill the request" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2052); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!ran" ") (" "RequestChunk should not immediately fulfill the request" ")"); do { MOZ_CrashSequence(__null, 2052); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2053 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(!ranInner)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!ranInner))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!ranInner" " (" "RequestChunk should not immediately fulfill the inner request" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2055); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!ranInner" ") (" "RequestChunk should not immediately fulfill the inner request" ")"); do { MOZ_CrashSequence(__null, 2055); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2054 | !ranInner,do { static_assert( mozilla::detail::AssertionConditionType< decltype(!ranInner)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!ranInner))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!ranInner" " (" "RequestChunk should not immediately fulfill the inner request" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2055); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!ranInner" ") (" "RequestChunk should not immediately fulfill the inner request" ")"); do { MOZ_CrashSequence(__null, 2055); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2055 | "RequestChunk should not immediately fulfill the inner request")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!ranInner)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!ranInner))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!ranInner" " (" "RequestChunk should not immediately fulfill the inner request" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2055); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!ranInner" ") (" "RequestChunk should not immediately fulfill the inner request" ")"); do { MOZ_CrashSequence(__null, 2055); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2056 | cm.FulfillChunkRequests(); | |||
| 2057 | MOZ_RELEASE_ASSERT(ran, "FulfillChunkRequests should invoke the callback")do { static_assert( mozilla::detail::AssertionConditionType< decltype(ran)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(ran))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("ran" " (" "FulfillChunkRequests should invoke the callback" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2057); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "ran" ") (" "FulfillChunkRequests should invoke the callback" ")") ; do { MOZ_CrashSequence(__null, 2057); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2058 | MOZ_RELEASE_ASSERT(!ranInner,do { static_assert( mozilla::detail::AssertionConditionType< decltype(!ranInner)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!ranInner))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!ranInner" " (" "FulfillChunkRequests should not immediately fulfill " "the inner request" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2060); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!ranInner" ") (" "FulfillChunkRequests should not immediately fulfill " "the inner request" ")"); do { MOZ_CrashSequence(__null, 2060 ); __attribute__((nomerge)) ::abort(); } while (false); } } while (false) | |||
| 2059 | "FulfillChunkRequests should not immediately fulfill "do { static_assert( mozilla::detail::AssertionConditionType< decltype(!ranInner)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!ranInner))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!ranInner" " (" "FulfillChunkRequests should not immediately fulfill " "the inner request" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2060); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!ranInner" ") (" "FulfillChunkRequests should not immediately fulfill " "the inner request" ")"); do { MOZ_CrashSequence(__null, 2060 ); __attribute__((nomerge)) ::abort(); } while (false); } } while (false) | |||
| 2060 | "the inner request")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!ranInner)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!ranInner))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!ranInner" " (" "FulfillChunkRequests should not immediately fulfill " "the inner request" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2060); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!ranInner" ") (" "FulfillChunkRequests should not immediately fulfill " "the inner request" ")"); do { MOZ_CrashSequence(__null, 2060 ); __attribute__((nomerge)) ::abort(); } while (false); } } while (false); | |||
| 2061 | cm.FulfillChunkRequests(); | |||
| 2062 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(ran)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(ran))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("ran" " (" "2nd FulfillChunkRequests should invoke the inner request callback" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2063); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "ran" ") (" "2nd FulfillChunkRequests should invoke the inner request callback" ")"); do { MOZ_CrashSequence(__null, 2063); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2063 | ran, "2nd FulfillChunkRequests should invoke the inner request callback")do { static_assert( mozilla::detail::AssertionConditionType< decltype(ran)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(ran))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("ran" " (" "2nd FulfillChunkRequests should invoke the inner request callback" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2063); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "ran" ") (" "2nd FulfillChunkRequests should invoke the inner request callback" ")"); do { MOZ_CrashSequence(__null, 2063); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2064 | ||||
| 2065 | // Enough testing! Clean-up. | |||
| 2066 | (void)chunk->ReserveInitialBlockAsTail(0); | |||
| 2067 | WaitUntilTimeStampChanges(); // Force "done" timestamp to change. | |||
| 2068 | chunk->MarkDone(); | |||
| 2069 | cm.ForgetUnreleasedChunks(); | |||
| 2070 | ||||
| 2071 | // Special testing of the release algorithm, to make sure released chunks get | |||
| 2072 | // sorted. | |||
| 2073 | constexpr unsigned RandomReleaseChunkLoop = 100; | |||
| 2074 | // Build a vector of chunks, and mark them "done", ready to be released. | |||
| 2075 | Vector<UniquePtr<ProfileBufferChunk>> chunksToRelease; | |||
| 2076 | MOZ_RELEASE_ASSERT(chunksToRelease.reserve(RandomReleaseChunkLoop))do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunksToRelease.reserve(RandomReleaseChunkLoop))> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(chunksToRelease.reserve(RandomReleaseChunkLoop)))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("chunksToRelease.reserve(RandomReleaseChunkLoop)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2076 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunksToRelease.reserve(RandomReleaseChunkLoop)" ")"); do { MOZ_CrashSequence(__null, 2076); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2077 | Vector<TimeStamp> chunksTimeStamps; | |||
| 2078 | MOZ_RELEASE_ASSERT(chunksTimeStamps.reserve(RandomReleaseChunkLoop))do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunksTimeStamps.reserve(RandomReleaseChunkLoop))> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(chunksTimeStamps.reserve(RandomReleaseChunkLoop)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("chunksTimeStamps.reserve(RandomReleaseChunkLoop)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2078 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunksTimeStamps.reserve(RandomReleaseChunkLoop)" ")"); do { MOZ_CrashSequence(__null, 2078); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2079 | for (unsigned i = 0; i < RandomReleaseChunkLoop; ++i) { | |||
| 2080 | UniquePtr<ProfileBufferChunk> chunk = cm.GetChunk(); | |||
| 2081 | MOZ_RELEASE_ASSERT(chunk)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(chunk))), 0))) { do { } while ( false); MOZ_ReportAssertionFailure("chunk", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2081); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk" ")"); do { MOZ_CrashSequence(__null, 2081); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2082 | (void)chunk->ReserveInitialBlockAsTail(0); | |||
| 2083 | chunk->MarkDone(); | |||
| 2084 | MOZ_RELEASE_ASSERT(!chunk->ChunkHeader().mDoneTimeStamp.IsNull())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!chunk->ChunkHeader().mDoneTimeStamp.IsNull())> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(!chunk->ChunkHeader().mDoneTimeStamp.IsNull()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!chunk->ChunkHeader().mDoneTimeStamp.IsNull()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2084 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!chunk->ChunkHeader().mDoneTimeStamp.IsNull()" ")"); do { MOZ_CrashSequence(__null, 2084); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2085 | chunksTimeStamps.infallibleEmplaceBack(chunk->ChunkHeader().mDoneTimeStamp); | |||
| 2086 | chunksToRelease.infallibleEmplaceBack(std::move(chunk)); | |||
| 2087 | if (i % 10 == 0) { | |||
| 2088 | // "Done" timestamps should *usually* increase, let's make extra sure some | |||
| 2089 | // timestamps are actually different. | |||
| 2090 | WaitUntilTimeStampChanges(); | |||
| 2091 | } | |||
| 2092 | } | |||
| 2093 | // Shuffle the list. | |||
| 2094 | std::random_device randomDevice; | |||
| 2095 | std::mt19937 generator(randomDevice()); | |||
| 2096 | std::shuffle(chunksToRelease.begin(), chunksToRelease.end(), generator); | |||
| 2097 | // And release chunks one by one, checking that the list of released chunks | |||
| 2098 | // is always sorted. | |||
| 2099 | printf("TestChunkManagerWithLocalLimit - Shuffle test timestamps:"); | |||
| 2100 | for (unsigned i = 0; i < RandomReleaseChunkLoop; ++i) { | |||
| 2101 | printf(" %f", (chunksToRelease[i]->ChunkHeader().mDoneTimeStamp - | |||
| 2102 | TimeStamp::ProcessCreation()) | |||
| 2103 | .ToMicroseconds()); | |||
| 2104 | cm.ReleaseChunk(std::move(chunksToRelease[i])); | |||
| 2105 | cm.PeekExtantReleasedChunks([i](const ProfileBufferChunk* releasedChunks) { | |||
| 2106 | MOZ_RELEASE_ASSERT(releasedChunks)do { static_assert( mozilla::detail::AssertionConditionType< decltype(releasedChunks)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(releasedChunks))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("releasedChunks" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2106 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "releasedChunks" ")"); do { MOZ_CrashSequence(__null, 2106); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2107 | unsigned releasedChunkCount = 1; | |||
| 2108 | for (;;) { | |||
| 2109 | const ProfileBufferChunk* nextChunk = releasedChunks->GetNext(); | |||
| 2110 | if (!nextChunk) { | |||
| 2111 | break; | |||
| 2112 | } | |||
| 2113 | ++releasedChunkCount; | |||
| 2114 | MOZ_RELEASE_ASSERT(releasedChunks->ChunkHeader().mDoneTimeStamp <=do { static_assert( mozilla::detail::AssertionConditionType< decltype(releasedChunks->ChunkHeader().mDoneTimeStamp <= nextChunk->ChunkHeader().mDoneTimeStamp)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(releasedChunks->ChunkHeader ().mDoneTimeStamp <= nextChunk->ChunkHeader().mDoneTimeStamp ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "releasedChunks->ChunkHeader().mDoneTimeStamp <= nextChunk->ChunkHeader().mDoneTimeStamp" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2115 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "releasedChunks->ChunkHeader().mDoneTimeStamp <= nextChunk->ChunkHeader().mDoneTimeStamp" ")"); do { MOZ_CrashSequence(__null, 2115); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2115 | nextChunk->ChunkHeader().mDoneTimeStamp)do { static_assert( mozilla::detail::AssertionConditionType< decltype(releasedChunks->ChunkHeader().mDoneTimeStamp <= nextChunk->ChunkHeader().mDoneTimeStamp)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(releasedChunks->ChunkHeader ().mDoneTimeStamp <= nextChunk->ChunkHeader().mDoneTimeStamp ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "releasedChunks->ChunkHeader().mDoneTimeStamp <= nextChunk->ChunkHeader().mDoneTimeStamp" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2115 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "releasedChunks->ChunkHeader().mDoneTimeStamp <= nextChunk->ChunkHeader().mDoneTimeStamp" ")"); do { MOZ_CrashSequence(__null, 2115); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2116 | releasedChunks = nextChunk; | |||
| 2117 | } | |||
| 2118 | MOZ_RELEASE_ASSERT(releasedChunkCount == i + 1)do { static_assert( mozilla::detail::AssertionConditionType< decltype(releasedChunkCount == i + 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(releasedChunkCount == i + 1) )), 0))) { do { } while (false); MOZ_ReportAssertionFailure("releasedChunkCount == i + 1" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2118 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "releasedChunkCount == i + 1" ")"); do { MOZ_CrashSequence(__null, 2118); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2119 | }); | |||
| 2120 | } | |||
| 2121 | printf("\n"); | |||
| 2122 | // Finally, the whole list of released chunks should have the exact same | |||
| 2123 | // timestamps as the initial list of "done" chunks. | |||
| 2124 | extantReleasedChunks = cm.GetExtantReleasedChunks(); | |||
| 2125 | for (unsigned i = 0; i < RandomReleaseChunkLoop; ++i) { | |||
| 2126 | MOZ_RELEASE_ASSERT(extantReleasedChunks, "Not enough released chunks")do { static_assert( mozilla::detail::AssertionConditionType< decltype(extantReleasedChunks)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(extantReleasedChunks))), 0)) ) { do { } while (false); MOZ_ReportAssertionFailure("extantReleasedChunks" " (" "Not enough released chunks" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2126); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "extantReleasedChunks" ") (" "Not enough released chunks" ")"); do { MOZ_CrashSequence (__null, 2126); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 2127 | MOZ_RELEASE_ASSERT(extantReleasedChunks->ChunkHeader().mDoneTimeStamp ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(extantReleasedChunks->ChunkHeader().mDoneTimeStamp == chunksTimeStamps[i])>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(extantReleasedChunks->ChunkHeader ().mDoneTimeStamp == chunksTimeStamps[i]))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("extantReleasedChunks->ChunkHeader().mDoneTimeStamp == chunksTimeStamps[i]" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2128 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "extantReleasedChunks->ChunkHeader().mDoneTimeStamp == chunksTimeStamps[i]" ")"); do { MOZ_CrashSequence(__null, 2128); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2128 | chunksTimeStamps[i])do { static_assert( mozilla::detail::AssertionConditionType< decltype(extantReleasedChunks->ChunkHeader().mDoneTimeStamp == chunksTimeStamps[i])>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(extantReleasedChunks->ChunkHeader ().mDoneTimeStamp == chunksTimeStamps[i]))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("extantReleasedChunks->ChunkHeader().mDoneTimeStamp == chunksTimeStamps[i]" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2128 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "extantReleasedChunks->ChunkHeader().mDoneTimeStamp == chunksTimeStamps[i]" ")"); do { MOZ_CrashSequence(__null, 2128); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2129 | (void)std::exchange(extantReleasedChunks, | |||
| 2130 | extantReleasedChunks->ReleaseNext()); | |||
| 2131 | } | |||
| 2132 | MOZ_RELEASE_ASSERT(!extantReleasedChunks, "Too many released chunks")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!extantReleasedChunks)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!extantReleasedChunks))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("!extantReleasedChunks" " (" "Too many released chunks" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2132); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!extantReleasedChunks" ") (" "Too many released chunks" ")"); do { MOZ_CrashSequence (__null, 2132); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 2133 | ||||
| 2134 | #ifdef DEBUG1 | |||
| 2135 | cm.DeregisteredFrom(chunkManagerRegisterer); | |||
| 2136 | #endif // DEBUG | |||
| 2137 | ||||
| 2138 | printf("TestChunkManagerWithLocalLimit done\n"); | |||
| 2139 | } | |||
| 2140 | ||||
| 2141 | static bool IsSameMetadata( | |||
| 2142 | const ProfileBufferControlledChunkManager::ChunkMetadata& a1, | |||
| 2143 | const ProfileBufferControlledChunkManager::ChunkMetadata& a2) { | |||
| 2144 | return a1.mDoneTimeStamp == a2.mDoneTimeStamp && | |||
| 2145 | a1.mBufferBytes == a2.mBufferBytes; | |||
| 2146 | }; | |||
| 2147 | ||||
| 2148 | static bool IsSameUpdate( | |||
| 2149 | const ProfileBufferControlledChunkManager::Update& a1, | |||
| 2150 | const ProfileBufferControlledChunkManager::Update& a2) { | |||
| 2151 | // Final and not-an-update don't carry other data, so we can test these two | |||
| 2152 | // states first. | |||
| 2153 | if (a1.IsFinal() || a2.IsFinal()) { | |||
| 2154 | return a1.IsFinal() && a2.IsFinal(); | |||
| 2155 | } | |||
| 2156 | if (a1.IsNotUpdate() || a2.IsNotUpdate()) { | |||
| 2157 | return a1.IsNotUpdate() && a2.IsNotUpdate(); | |||
| 2158 | } | |||
| 2159 | ||||
| 2160 | // Here, both are "normal" udpates, check member variables: | |||
| 2161 | ||||
| 2162 | if (a1.UnreleasedBytes() != a2.UnreleasedBytes()) { | |||
| 2163 | return false; | |||
| 2164 | } | |||
| 2165 | if (a1.ReleasedBytes() != a2.ReleasedBytes()) { | |||
| 2166 | return false; | |||
| 2167 | } | |||
| 2168 | if (a1.OldestDoneTimeStamp() != a2.OldestDoneTimeStamp()) { | |||
| 2169 | return false; | |||
| 2170 | } | |||
| 2171 | if (a1.NewlyReleasedChunksRef().size() != | |||
| 2172 | a2.NewlyReleasedChunksRef().size()) { | |||
| 2173 | return false; | |||
| 2174 | } | |||
| 2175 | for (unsigned i = 0; i < a1.NewlyReleasedChunksRef().size(); ++i) { | |||
| 2176 | if (!IsSameMetadata(a1.NewlyReleasedChunksRef()[i], | |||
| 2177 | a2.NewlyReleasedChunksRef()[i])) { | |||
| 2178 | return false; | |||
| 2179 | } | |||
| 2180 | } | |||
| 2181 | return true; | |||
| 2182 | } | |||
| 2183 | ||||
| 2184 | static void TestControlledChunkManagerUpdate() { | |||
| 2185 | printf("TestControlledChunkManagerUpdate...\n"); | |||
| 2186 | ||||
| 2187 | using Update = ProfileBufferControlledChunkManager::Update; | |||
| 2188 | ||||
| 2189 | // Default construction. | |||
| 2190 | Update update1; | |||
| 2191 | MOZ_RELEASE_ASSERT(update1.IsNotUpdate())do { static_assert( mozilla::detail::AssertionConditionType< decltype(update1.IsNotUpdate())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(update1.IsNotUpdate()))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("update1.IsNotUpdate()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2191 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "update1.IsNotUpdate()" ")"); do { MOZ_CrashSequence(__null, 2191); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2192 | MOZ_RELEASE_ASSERT(!update1.IsFinal())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!update1.IsFinal())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!update1.IsFinal()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!update1.IsFinal()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2192 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!update1.IsFinal()" ")"); do { MOZ_CrashSequence(__null, 2192); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2193 | ||||
| 2194 | // Clear an already-cleared update. | |||
| 2195 | update1.Clear(); | |||
| 2196 | MOZ_RELEASE_ASSERT(update1.IsNotUpdate())do { static_assert( mozilla::detail::AssertionConditionType< decltype(update1.IsNotUpdate())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(update1.IsNotUpdate()))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("update1.IsNotUpdate()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2196 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "update1.IsNotUpdate()" ")"); do { MOZ_CrashSequence(__null, 2196); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2197 | MOZ_RELEASE_ASSERT(!update1.IsFinal())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!update1.IsFinal())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!update1.IsFinal()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!update1.IsFinal()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2197 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!update1.IsFinal()" ")"); do { MOZ_CrashSequence(__null, 2197); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2198 | ||||
| 2199 | // Final construction with nullptr. | |||
| 2200 | const Update final(nullptr); | |||
| 2201 | MOZ_RELEASE_ASSERT(final.IsFinal())do { static_assert( mozilla::detail::AssertionConditionType< decltype(final.IsFinal())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(final.IsFinal()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("final.IsFinal()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2201 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "final.IsFinal()" ")"); do { MOZ_CrashSequence(__null, 2201); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2202 | MOZ_RELEASE_ASSERT(!final.IsNotUpdate())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!final.IsNotUpdate())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!final.IsNotUpdate()))), 0)) ) { do { } while (false); MOZ_ReportAssertionFailure("!final.IsNotUpdate()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2202 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!final.IsNotUpdate()" ")"); do { MOZ_CrashSequence(__null, 2202); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2203 | ||||
| 2204 | // Copy final to cleared. | |||
| 2205 | update1 = final; | |||
| 2206 | MOZ_RELEASE_ASSERT(update1.IsFinal())do { static_assert( mozilla::detail::AssertionConditionType< decltype(update1.IsFinal())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(update1.IsFinal()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("update1.IsFinal()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2206 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "update1.IsFinal()" ")"); do { MOZ_CrashSequence(__null, 2206); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2207 | MOZ_RELEASE_ASSERT(!update1.IsNotUpdate())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!update1.IsNotUpdate())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!update1.IsNotUpdate()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("!update1.IsNotUpdate()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2207 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!update1.IsNotUpdate()" ")"); do { MOZ_CrashSequence(__null, 2207); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2208 | ||||
| 2209 | // Copy final to final. | |||
| 2210 | update1 = final; | |||
| 2211 | MOZ_RELEASE_ASSERT(update1.IsFinal())do { static_assert( mozilla::detail::AssertionConditionType< decltype(update1.IsFinal())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(update1.IsFinal()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("update1.IsFinal()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2211 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "update1.IsFinal()" ")"); do { MOZ_CrashSequence(__null, 2211); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2212 | MOZ_RELEASE_ASSERT(!update1.IsNotUpdate())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!update1.IsNotUpdate())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!update1.IsNotUpdate()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("!update1.IsNotUpdate()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2212 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!update1.IsNotUpdate()" ")"); do { MOZ_CrashSequence(__null, 2212); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2213 | ||||
| 2214 | // Clear a final update. | |||
| 2215 | update1.Clear(); | |||
| 2216 | MOZ_RELEASE_ASSERT(update1.IsNotUpdate())do { static_assert( mozilla::detail::AssertionConditionType< decltype(update1.IsNotUpdate())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(update1.IsNotUpdate()))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("update1.IsNotUpdate()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2216 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "update1.IsNotUpdate()" ")"); do { MOZ_CrashSequence(__null, 2216); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2217 | MOZ_RELEASE_ASSERT(!update1.IsFinal())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!update1.IsFinal())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!update1.IsFinal()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!update1.IsFinal()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2217 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!update1.IsFinal()" ")"); do { MOZ_CrashSequence(__null, 2217); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2218 | ||||
| 2219 | // Move final to cleared. | |||
| 2220 | update1 = Update(nullptr); | |||
| 2221 | MOZ_RELEASE_ASSERT(update1.IsFinal())do { static_assert( mozilla::detail::AssertionConditionType< decltype(update1.IsFinal())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(update1.IsFinal()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("update1.IsFinal()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2221 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "update1.IsFinal()" ")"); do { MOZ_CrashSequence(__null, 2221); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2222 | MOZ_RELEASE_ASSERT(!update1.IsNotUpdate())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!update1.IsNotUpdate())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!update1.IsNotUpdate()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("!update1.IsNotUpdate()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2222 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!update1.IsNotUpdate()" ")"); do { MOZ_CrashSequence(__null, 2222); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2223 | ||||
| 2224 | // Move final to final. | |||
| 2225 | update1 = Update(nullptr); | |||
| 2226 | MOZ_RELEASE_ASSERT(update1.IsFinal())do { static_assert( mozilla::detail::AssertionConditionType< decltype(update1.IsFinal())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(update1.IsFinal()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("update1.IsFinal()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2226 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "update1.IsFinal()" ")"); do { MOZ_CrashSequence(__null, 2226); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2227 | MOZ_RELEASE_ASSERT(!update1.IsNotUpdate())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!update1.IsNotUpdate())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!update1.IsNotUpdate()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("!update1.IsNotUpdate()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2227 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!update1.IsNotUpdate()" ")"); do { MOZ_CrashSequence(__null, 2227); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2228 | ||||
| 2229 | // Move from not-an-update (effectively same as Clear). | |||
| 2230 | update1 = Update(); | |||
| 2231 | MOZ_RELEASE_ASSERT(update1.IsNotUpdate())do { static_assert( mozilla::detail::AssertionConditionType< decltype(update1.IsNotUpdate())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(update1.IsNotUpdate()))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("update1.IsNotUpdate()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2231 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "update1.IsNotUpdate()" ")"); do { MOZ_CrashSequence(__null, 2231); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2232 | MOZ_RELEASE_ASSERT(!update1.IsFinal())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!update1.IsFinal())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!update1.IsFinal()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!update1.IsFinal()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2232 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!update1.IsFinal()" ")"); do { MOZ_CrashSequence(__null, 2232); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2233 | ||||
| 2234 | auto CreateBiggerChunkAfter = [](const ProfileBufferChunk& aChunkToBeat) { | |||
| 2235 | while (TimeStamp::Now() <= aChunkToBeat.ChunkHeader().mDoneTimeStamp) { | |||
| 2236 | ::SleepMilli(1); | |||
| 2237 | } | |||
| 2238 | auto chunk = ProfileBufferChunk::Create(aChunkToBeat.BufferBytes() * 2); | |||
| 2239 | MOZ_RELEASE_ASSERT(!!chunk)do { static_assert( mozilla::detail::AssertionConditionType< decltype(!!chunk)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!!chunk))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!!chunk", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2239); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!!chunk" ")"); do { MOZ_CrashSequence(__null, 2239); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2240 | MOZ_RELEASE_ASSERT(chunk->BufferBytes() >= aChunkToBeat.BufferBytes() * 2)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->BufferBytes() >= aChunkToBeat.BufferBytes () * 2)>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(chunk->BufferBytes() >= aChunkToBeat.BufferBytes () * 2))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("chunk->BufferBytes() >= aChunkToBeat.BufferBytes() * 2" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2240 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->BufferBytes() >= aChunkToBeat.BufferBytes() * 2" ")"); do { MOZ_CrashSequence(__null, 2240); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2241 | (void)chunk->ReserveInitialBlockAsTail(0); | |||
| 2242 | chunk->MarkDone(); | |||
| 2243 | MOZ_RELEASE_ASSERT(chunk->ChunkHeader().mDoneTimeStamp >do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->ChunkHeader().mDoneTimeStamp > aChunkToBeat .ChunkHeader().mDoneTimeStamp)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(chunk->ChunkHeader().mDoneTimeStamp > aChunkToBeat.ChunkHeader().mDoneTimeStamp))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("chunk->ChunkHeader().mDoneTimeStamp > aChunkToBeat.ChunkHeader().mDoneTimeStamp" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2244 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->ChunkHeader().mDoneTimeStamp > aChunkToBeat.ChunkHeader().mDoneTimeStamp" ")"); do { MOZ_CrashSequence(__null, 2244); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2244 | aChunkToBeat.ChunkHeader().mDoneTimeStamp)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunk->ChunkHeader().mDoneTimeStamp > aChunkToBeat .ChunkHeader().mDoneTimeStamp)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(chunk->ChunkHeader().mDoneTimeStamp > aChunkToBeat.ChunkHeader().mDoneTimeStamp))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("chunk->ChunkHeader().mDoneTimeStamp > aChunkToBeat.ChunkHeader().mDoneTimeStamp" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2244 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunk->ChunkHeader().mDoneTimeStamp > aChunkToBeat.ChunkHeader().mDoneTimeStamp" ")"); do { MOZ_CrashSequence(__null, 2244); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2245 | return chunk; | |||
| 2246 | }; | |||
| 2247 | ||||
| 2248 | update1 = Update(1, 2, nullptr, nullptr); | |||
| 2249 | ||||
| 2250 | // Create initial update with 2 released chunks and 1 unreleased chunk. | |||
| 2251 | auto released = ProfileBufferChunk::Create(10); | |||
| 2252 | ProfileBufferChunk* c1 = released.get(); | |||
| 2253 | (void)c1->ReserveInitialBlockAsTail(0); | |||
| 2254 | c1->MarkDone(); | |||
| 2255 | ||||
| 2256 | released->SetLast(CreateBiggerChunkAfter(*c1)); | |||
| 2257 | ProfileBufferChunk* c2 = c1->GetNext(); | |||
| 2258 | ||||
| 2259 | auto unreleased = CreateBiggerChunkAfter(*c2); | |||
| 2260 | ProfileBufferChunk* c3 = unreleased.get(); | |||
| 2261 | ||||
| 2262 | Update update2(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1, | |||
| 2263 | c1); | |||
| 2264 | MOZ_RELEASE_ASSERT(IsSameUpdate(do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update2, Update(c3->BufferBytes(), c1 ->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader ().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1-> BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2-> BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update2, Update (c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader ().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update2, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2269 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update2, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2269); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2265 | update2,do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update2, Update(c3->BufferBytes(), c1 ->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader ().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1-> BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2-> BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update2, Update (c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader ().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update2, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2269 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update2, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2269); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2266 | Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update2, Update(c3->BufferBytes(), c1 ->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader ().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1-> BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2-> BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update2, Update (c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader ().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update2, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2269 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update2, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2269); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2267 | c1->ChunkHeader().mDoneTimeStamp,do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update2, Update(c3->BufferBytes(), c1 ->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader ().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1-> BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2-> BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update2, Update (c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader ().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update2, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2269 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update2, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2269); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2268 | {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()},do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update2, Update(c3->BufferBytes(), c1 ->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader ().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1-> BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2-> BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update2, Update (c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader ().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update2, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2269 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update2, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2269); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2269 | {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}})))do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update2, Update(c3->BufferBytes(), c1 ->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader ().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1-> BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2-> BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update2, Update (c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader ().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update2, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2269 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update2, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2269); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2270 | // Check every field, this time only, after that we'll trust that the | |||
| 2271 | // `SameUpdate` test will be enough. | |||
| 2272 | MOZ_RELEASE_ASSERT(!update2.IsNotUpdate())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!update2.IsNotUpdate())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!update2.IsNotUpdate()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("!update2.IsNotUpdate()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2272 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!update2.IsNotUpdate()" ")"); do { MOZ_CrashSequence(__null, 2272); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2273 | MOZ_RELEASE_ASSERT(!update2.IsFinal())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!update2.IsFinal())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!update2.IsFinal()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!update2.IsFinal()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2273 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!update2.IsFinal()" ")"); do { MOZ_CrashSequence(__null, 2273); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2274 | MOZ_RELEASE_ASSERT(update2.UnreleasedBytes() == c3->BufferBytes())do { static_assert( mozilla::detail::AssertionConditionType< decltype(update2.UnreleasedBytes() == c3->BufferBytes())> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(update2.UnreleasedBytes() == c3->BufferBytes()))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("update2.UnreleasedBytes() == c3->BufferBytes()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2274 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "update2.UnreleasedBytes() == c3->BufferBytes()" ")"); do { MOZ_CrashSequence(__null, 2274); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2275 | MOZ_RELEASE_ASSERT(update2.ReleasedBytes() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(update2.ReleasedBytes() == c1->BufferBytes() + c2 ->BufferBytes())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(update2.ReleasedBytes() == c1 ->BufferBytes() + c2->BufferBytes()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("update2.ReleasedBytes() == c1->BufferBytes() + c2->BufferBytes()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2276 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "update2.ReleasedBytes() == c1->BufferBytes() + c2->BufferBytes()" ")"); do { MOZ_CrashSequence(__null, 2276); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2276 | c1->BufferBytes() + c2->BufferBytes())do { static_assert( mozilla::detail::AssertionConditionType< decltype(update2.ReleasedBytes() == c1->BufferBytes() + c2 ->BufferBytes())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(update2.ReleasedBytes() == c1 ->BufferBytes() + c2->BufferBytes()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("update2.ReleasedBytes() == c1->BufferBytes() + c2->BufferBytes()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2276 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "update2.ReleasedBytes() == c1->BufferBytes() + c2->BufferBytes()" ")"); do { MOZ_CrashSequence(__null, 2276); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2277 | MOZ_RELEASE_ASSERT(update2.OldestDoneTimeStamp() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(update2.OldestDoneTimeStamp() == c1->ChunkHeader( ).mDoneTimeStamp)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(update2.OldestDoneTimeStamp( ) == c1->ChunkHeader().mDoneTimeStamp))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("update2.OldestDoneTimeStamp() == c1->ChunkHeader().mDoneTimeStamp" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2278 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "update2.OldestDoneTimeStamp() == c1->ChunkHeader().mDoneTimeStamp" ")"); do { MOZ_CrashSequence(__null, 2278); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2278 | c1->ChunkHeader().mDoneTimeStamp)do { static_assert( mozilla::detail::AssertionConditionType< decltype(update2.OldestDoneTimeStamp() == c1->ChunkHeader( ).mDoneTimeStamp)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(update2.OldestDoneTimeStamp( ) == c1->ChunkHeader().mDoneTimeStamp))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("update2.OldestDoneTimeStamp() == c1->ChunkHeader().mDoneTimeStamp" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2278 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "update2.OldestDoneTimeStamp() == c1->ChunkHeader().mDoneTimeStamp" ")"); do { MOZ_CrashSequence(__null, 2278); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2279 | MOZ_RELEASE_ASSERT(update2.NewlyReleasedChunksRef().size() == 2)do { static_assert( mozilla::detail::AssertionConditionType< decltype(update2.NewlyReleasedChunksRef().size() == 2)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(update2.NewlyReleasedChunksRef().size() == 2))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("update2.NewlyReleasedChunksRef().size() == 2" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2279 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "update2.NewlyReleasedChunksRef().size() == 2" ")"); do { MOZ_CrashSequence(__null, 2279); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2280 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameMetadata(update2.NewlyReleasedChunksRef()[0], { c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}))> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(IsSameMetadata(update2.NewlyReleasedChunksRef()[0], { c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}))) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameMetadata(update2.NewlyReleasedChunksRef()[0], {c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2282 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameMetadata(update2.NewlyReleasedChunksRef()[0], {c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()})" ")"); do { MOZ_CrashSequence(__null, 2282); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2281 | IsSameMetadata(update2.NewlyReleasedChunksRef()[0],do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameMetadata(update2.NewlyReleasedChunksRef()[0], { c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}))> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(IsSameMetadata(update2.NewlyReleasedChunksRef()[0], { c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}))) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameMetadata(update2.NewlyReleasedChunksRef()[0], {c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2282 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameMetadata(update2.NewlyReleasedChunksRef()[0], {c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()})" ")"); do { MOZ_CrashSequence(__null, 2282); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2282 | {c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}))do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameMetadata(update2.NewlyReleasedChunksRef()[0], { c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}))> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(IsSameMetadata(update2.NewlyReleasedChunksRef()[0], { c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}))) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameMetadata(update2.NewlyReleasedChunksRef()[0], {c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2282 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameMetadata(update2.NewlyReleasedChunksRef()[0], {c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()})" ")"); do { MOZ_CrashSequence(__null, 2282); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2283 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameMetadata(update2.NewlyReleasedChunksRef()[1], { c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}))> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(IsSameMetadata(update2.NewlyReleasedChunksRef()[1], { c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}))) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameMetadata(update2.NewlyReleasedChunksRef()[1], {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2285 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameMetadata(update2.NewlyReleasedChunksRef()[1], {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()})" ")"); do { MOZ_CrashSequence(__null, 2285); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2284 | IsSameMetadata(update2.NewlyReleasedChunksRef()[1],do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameMetadata(update2.NewlyReleasedChunksRef()[1], { c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}))> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(IsSameMetadata(update2.NewlyReleasedChunksRef()[1], { c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}))) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameMetadata(update2.NewlyReleasedChunksRef()[1], {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2285 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameMetadata(update2.NewlyReleasedChunksRef()[1], {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()})" ")"); do { MOZ_CrashSequence(__null, 2285); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2285 | {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}))do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameMetadata(update2.NewlyReleasedChunksRef()[1], { c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}))> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(IsSameMetadata(update2.NewlyReleasedChunksRef()[1], { c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}))) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameMetadata(update2.NewlyReleasedChunksRef()[1], {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2285 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameMetadata(update2.NewlyReleasedChunksRef()[1], {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()})" ")"); do { MOZ_CrashSequence(__null, 2285); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2286 | ||||
| 2287 | // Fold into not-an-update. | |||
| 2288 | update1.Fold(std::move(update2)); | |||
| 2289 | MOZ_RELEASE_ASSERT(IsSameUpdate(do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c3->BufferBytes(), c1 ->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader ().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1-> BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2-> BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader ().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update1, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2294 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2294); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2290 | update1,do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c3->BufferBytes(), c1 ->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader ().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1-> BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2-> BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader ().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update1, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2294 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2294); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2291 | Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c3->BufferBytes(), c1 ->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader ().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1-> BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2-> BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader ().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update1, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2294 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2294); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2292 | c1->ChunkHeader().mDoneTimeStamp,do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c3->BufferBytes(), c1 ->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader ().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1-> BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2-> BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader ().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update1, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2294 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2294); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2293 | {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()},do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c3->BufferBytes(), c1 ->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader ().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1-> BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2-> BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader ().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update1, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2294 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2294); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2294 | {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}})))do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c3->BufferBytes(), c1 ->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader ().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1-> BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2-> BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader ().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update1, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2294 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2294); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2295 | ||||
| 2296 | // Pretend nothing happened. | |||
| 2297 | update2 = Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1, | |||
| 2298 | nullptr); | |||
| 2299 | MOZ_RELEASE_ASSERT(IsSameUpdate(do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update2, Update(c3->BufferBytes(), c1 ->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader ().mDoneTimeStamp, {})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update2, Update (c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update2, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2301 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update2, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {}))" ")"); do { MOZ_CrashSequence(__null, 2301); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2300 | update2, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update2, Update(c3->BufferBytes(), c1 ->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader ().mDoneTimeStamp, {})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update2, Update (c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update2, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2301 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update2, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {}))" ")"); do { MOZ_CrashSequence(__null, 2301); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2301 | c1->ChunkHeader().mDoneTimeStamp, {})))do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update2, Update(c3->BufferBytes(), c1 ->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader ().mDoneTimeStamp, {})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update2, Update (c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update2, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2301 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update2, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {}))" ")"); do { MOZ_CrashSequence(__null, 2301); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2302 | update1.Fold(std::move(update2)); | |||
| 2303 | MOZ_RELEASE_ASSERT(IsSameUpdate(do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c3->BufferBytes(), c1 ->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader ().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1-> BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2-> BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader ().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update1, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2308 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2308); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2304 | update1,do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c3->BufferBytes(), c1 ->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader ().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1-> BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2-> BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader ().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update1, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2308 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2308); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2305 | Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c3->BufferBytes(), c1 ->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader ().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1-> BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2-> BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader ().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update1, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2308 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2308); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2306 | c1->ChunkHeader().mDoneTimeStamp,do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c3->BufferBytes(), c1 ->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader ().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1-> BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2-> BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader ().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update1, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2308 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2308); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2307 | {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()},do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c3->BufferBytes(), c1 ->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader ().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1-> BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2-> BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader ().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update1, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2308 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2308); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2308 | {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}})))do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c3->BufferBytes(), c1 ->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader ().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1-> BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2-> BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader ().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update1, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2308 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c3->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2308); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2309 | ||||
| 2310 | // Pretend there's a new unreleased chunk. | |||
| 2311 | c3->SetLast(CreateBiggerChunkAfter(*c3)); | |||
| 2312 | ProfileBufferChunk* c4 = c3->GetNext(); | |||
| 2313 | update2 = Update(c3->BufferBytes() + c4->BufferBytes(), | |||
| 2314 | c1->BufferBytes() + c2->BufferBytes(), c1, nullptr); | |||
| 2315 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate(update2, Update(c3->BufferBytes() + c4 ->BufferBytes(), c1->BufferBytes() + c2->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate(update2, Update (c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes () + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp , {}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("IsSameUpdate(update2, Update(c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2318 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate(update2, Update(c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {}))" ")"); do { MOZ_CrashSequence(__null, 2318); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2316 | IsSameUpdate(update2, Update(c3->BufferBytes() + c4->BufferBytes(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate(update2, Update(c3->BufferBytes() + c4 ->BufferBytes(), c1->BufferBytes() + c2->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate(update2, Update (c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes () + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp , {}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("IsSameUpdate(update2, Update(c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2318 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate(update2, Update(c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {}))" ")"); do { MOZ_CrashSequence(__null, 2318); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2317 | c1->BufferBytes() + c2->BufferBytes(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate(update2, Update(c3->BufferBytes() + c4 ->BufferBytes(), c1->BufferBytes() + c2->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate(update2, Update (c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes () + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp , {}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("IsSameUpdate(update2, Update(c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2318 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate(update2, Update(c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {}))" ")"); do { MOZ_CrashSequence(__null, 2318); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2318 | c1->ChunkHeader().mDoneTimeStamp, {})))do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate(update2, Update(c3->BufferBytes() + c4 ->BufferBytes(), c1->BufferBytes() + c2->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate(update2, Update (c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes () + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp , {}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("IsSameUpdate(update2, Update(c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2318 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate(update2, Update(c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {}))" ")"); do { MOZ_CrashSequence(__null, 2318); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2319 | update1.Fold(std::move(update2)); | |||
| 2320 | MOZ_RELEASE_ASSERT(IsSameUpdate(do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader ().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes () + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp , {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes() }, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes() }}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("IsSameUpdate( update1, Update(c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2326 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2326); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2321 | update1,do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader ().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes () + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp , {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes() }, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes() }}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("IsSameUpdate( update1, Update(c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2326 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2326); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2322 | Update(c3->BufferBytes() + c4->BufferBytes(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader ().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes () + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp , {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes() }, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes() }}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("IsSameUpdate( update1, Update(c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2326 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2326); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2323 | c1->BufferBytes() + c2->BufferBytes(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader ().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes () + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp , {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes() }, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes() }}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("IsSameUpdate( update1, Update(c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2326 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2326); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2324 | c1->ChunkHeader().mDoneTimeStamp,do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader ().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes () + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp , {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes() }, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes() }}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("IsSameUpdate( update1, Update(c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2326 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2326); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2325 | {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()},do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader ().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes () + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp , {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes() }, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes() }}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("IsSameUpdate( update1, Update(c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2326 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2326); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2326 | {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}})))do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader ().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes () + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp , {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes() }, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes() }}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("IsSameUpdate( update1, Update(c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2326 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c3->BufferBytes() + c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2326); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2327 | ||||
| 2328 | // Pretend the first unreleased chunk c3 has been released. | |||
| 2329 | released->SetLast(std::exchange(unreleased, unreleased->ReleaseNext())); | |||
| 2330 | update2 = | |||
| 2331 | Update(c4->BufferBytes(), | |||
| 2332 | c1->BufferBytes() + c2->BufferBytes() + c3->BufferBytes(), c1, c3); | |||
| 2333 | MOZ_RELEASE_ASSERT(IsSameUpdate(do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update2, Update(c4->BufferBytes(), c1 ->BufferBytes() + c2->BufferBytes() + c3->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader ().mDoneTimeStamp, c3->BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update2, Update (c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes () + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp , {{c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes() }}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("IsSameUpdate( update2, Update(c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes() + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2338 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update2, Update(c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes() + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2338); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2334 | update2,do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update2, Update(c4->BufferBytes(), c1 ->BufferBytes() + c2->BufferBytes() + c3->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader ().mDoneTimeStamp, c3->BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update2, Update (c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes () + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp , {{c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes() }}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("IsSameUpdate( update2, Update(c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes() + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2338 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update2, Update(c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes() + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2338); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2335 | Update(c4->BufferBytes(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update2, Update(c4->BufferBytes(), c1 ->BufferBytes() + c2->BufferBytes() + c3->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader ().mDoneTimeStamp, c3->BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update2, Update (c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes () + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp , {{c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes() }}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("IsSameUpdate( update2, Update(c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes() + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2338 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update2, Update(c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes() + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2338); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2336 | c1->BufferBytes() + c2->BufferBytes() + c3->BufferBytes(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update2, Update(c4->BufferBytes(), c1 ->BufferBytes() + c2->BufferBytes() + c3->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader ().mDoneTimeStamp, c3->BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update2, Update (c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes () + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp , {{c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes() }}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("IsSameUpdate( update2, Update(c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes() + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2338 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update2, Update(c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes() + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2338); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2337 | c1->ChunkHeader().mDoneTimeStamp,do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update2, Update(c4->BufferBytes(), c1 ->BufferBytes() + c2->BufferBytes() + c3->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader ().mDoneTimeStamp, c3->BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update2, Update (c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes () + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp , {{c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes() }}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("IsSameUpdate( update2, Update(c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes() + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2338 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update2, Update(c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes() + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2338); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2338 | {{c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}})))do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update2, Update(c4->BufferBytes(), c1 ->BufferBytes() + c2->BufferBytes() + c3->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader ().mDoneTimeStamp, c3->BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update2, Update (c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes () + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp , {{c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes() }}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("IsSameUpdate( update2, Update(c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes() + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2338 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update2, Update(c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes() + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2338); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2339 | update1.Fold(std::move(update2)); | |||
| 2340 | MOZ_RELEASE_ASSERT(IsSameUpdate(do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c4->BufferBytes(), c1 ->BufferBytes() + c2->BufferBytes() + c3->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader ().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader ().mDoneTimeStamp, c3->BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes () + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp , {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes() }, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes() }, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes() }}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("IsSameUpdate( update1, Update(c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes() + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2347 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes() + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2347); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2341 | update1,do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c4->BufferBytes(), c1 ->BufferBytes() + c2->BufferBytes() + c3->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader ().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader ().mDoneTimeStamp, c3->BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes () + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp , {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes() }, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes() }, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes() }}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("IsSameUpdate( update1, Update(c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes() + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2347 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes() + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2347); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2342 | Update(c4->BufferBytes(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c4->BufferBytes(), c1 ->BufferBytes() + c2->BufferBytes() + c3->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader ().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader ().mDoneTimeStamp, c3->BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes () + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp , {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes() }, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes() }, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes() }}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("IsSameUpdate( update1, Update(c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes() + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2347 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes() + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2347); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2343 | c1->BufferBytes() + c2->BufferBytes() + c3->BufferBytes(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c4->BufferBytes(), c1 ->BufferBytes() + c2->BufferBytes() + c3->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader ().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader ().mDoneTimeStamp, c3->BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes () + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp , {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes() }, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes() }, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes() }}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("IsSameUpdate( update1, Update(c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes() + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2347 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes() + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2347); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2344 | c1->ChunkHeader().mDoneTimeStamp,do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c4->BufferBytes(), c1 ->BufferBytes() + c2->BufferBytes() + c3->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader ().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader ().mDoneTimeStamp, c3->BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes () + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp , {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes() }, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes() }, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes() }}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("IsSameUpdate( update1, Update(c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes() + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2347 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes() + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2347); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2345 | {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()},do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c4->BufferBytes(), c1 ->BufferBytes() + c2->BufferBytes() + c3->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader ().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader ().mDoneTimeStamp, c3->BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes () + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp , {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes() }, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes() }, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes() }}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("IsSameUpdate( update1, Update(c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes() + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2347 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes() + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2347); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2346 | {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()},do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c4->BufferBytes(), c1 ->BufferBytes() + c2->BufferBytes() + c3->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader ().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader ().mDoneTimeStamp, c3->BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes () + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp , {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes() }, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes() }, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes() }}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("IsSameUpdate( update1, Update(c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes() + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2347 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes() + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2347); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2347 | {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}})))do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c4->BufferBytes(), c1 ->BufferBytes() + c2->BufferBytes() + c3->BufferBytes (), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader ().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader ().mDoneTimeStamp, c3->BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes () + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp , {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes() }, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes() }, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes() }}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("IsSameUpdate( update1, Update(c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes() + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2347 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c4->BufferBytes(), c1->BufferBytes() + c2->BufferBytes() + c3->BufferBytes(), c1->ChunkHeader().mDoneTimeStamp, {{c1->ChunkHeader().mDoneTimeStamp, c1->BufferBytes()}, {c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2347); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2348 | ||||
| 2349 | // Pretend c1 has been destroyed, so the oldest timestamp is now at c2. | |||
| 2350 | released = released->ReleaseNext(); | |||
| 2351 | c1 = nullptr; | |||
| 2352 | update2 = Update(c4->BufferBytes(), c2->BufferBytes() + c3->BufferBytes(), c2, | |||
| 2353 | nullptr); | |||
| 2354 | MOZ_RELEASE_ASSERT(IsSameUpdate(do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update2, Update(c4->BufferBytes(), c2 ->BufferBytes() + c3->BufferBytes(), c2->ChunkHeader ().mDoneTimeStamp, {})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update2, Update (c4->BufferBytes(), c2->BufferBytes() + c3->BufferBytes (), c2->ChunkHeader().mDoneTimeStamp, {}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update2, Update(c4->BufferBytes(), c2->BufferBytes() + c3->BufferBytes(), c2->ChunkHeader().mDoneTimeStamp, {}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2356 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update2, Update(c4->BufferBytes(), c2->BufferBytes() + c3->BufferBytes(), c2->ChunkHeader().mDoneTimeStamp, {}))" ")"); do { MOZ_CrashSequence(__null, 2356); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2355 | update2, Update(c4->BufferBytes(), c2->BufferBytes() + c3->BufferBytes(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update2, Update(c4->BufferBytes(), c2 ->BufferBytes() + c3->BufferBytes(), c2->ChunkHeader ().mDoneTimeStamp, {})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update2, Update (c4->BufferBytes(), c2->BufferBytes() + c3->BufferBytes (), c2->ChunkHeader().mDoneTimeStamp, {}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update2, Update(c4->BufferBytes(), c2->BufferBytes() + c3->BufferBytes(), c2->ChunkHeader().mDoneTimeStamp, {}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2356 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update2, Update(c4->BufferBytes(), c2->BufferBytes() + c3->BufferBytes(), c2->ChunkHeader().mDoneTimeStamp, {}))" ")"); do { MOZ_CrashSequence(__null, 2356); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2356 | c2->ChunkHeader().mDoneTimeStamp, {})))do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update2, Update(c4->BufferBytes(), c2 ->BufferBytes() + c3->BufferBytes(), c2->ChunkHeader ().mDoneTimeStamp, {})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update2, Update (c4->BufferBytes(), c2->BufferBytes() + c3->BufferBytes (), c2->ChunkHeader().mDoneTimeStamp, {}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update2, Update(c4->BufferBytes(), c2->BufferBytes() + c3->BufferBytes(), c2->ChunkHeader().mDoneTimeStamp, {}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2356 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update2, Update(c4->BufferBytes(), c2->BufferBytes() + c3->BufferBytes(), c2->ChunkHeader().mDoneTimeStamp, {}))" ")"); do { MOZ_CrashSequence(__null, 2356); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2357 | update1.Fold(std::move(update2)); | |||
| 2358 | MOZ_RELEASE_ASSERT(IsSameUpdate(do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c4->BufferBytes(), c2 ->BufferBytes() + c3->BufferBytes(), c2->ChunkHeader ().mDoneTimeStamp, {{c2->ChunkHeader().mDoneTimeStamp, c2-> BufferBytes()}, {c3->ChunkHeader().mDoneTimeStamp, c3-> BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c4->BufferBytes(), c2->BufferBytes() + c3->BufferBytes (), c2->ChunkHeader().mDoneTimeStamp, {{c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader ().mDoneTimeStamp, c3->BufferBytes()}}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update1, Update(c4->BufferBytes(), c2->BufferBytes() + c3->BufferBytes(), c2->ChunkHeader().mDoneTimeStamp, {{c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2363 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c4->BufferBytes(), c2->BufferBytes() + c3->BufferBytes(), c2->ChunkHeader().mDoneTimeStamp, {{c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2363); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2359 | update1,do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c4->BufferBytes(), c2 ->BufferBytes() + c3->BufferBytes(), c2->ChunkHeader ().mDoneTimeStamp, {{c2->ChunkHeader().mDoneTimeStamp, c2-> BufferBytes()}, {c3->ChunkHeader().mDoneTimeStamp, c3-> BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c4->BufferBytes(), c2->BufferBytes() + c3->BufferBytes (), c2->ChunkHeader().mDoneTimeStamp, {{c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader ().mDoneTimeStamp, c3->BufferBytes()}}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update1, Update(c4->BufferBytes(), c2->BufferBytes() + c3->BufferBytes(), c2->ChunkHeader().mDoneTimeStamp, {{c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2363 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c4->BufferBytes(), c2->BufferBytes() + c3->BufferBytes(), c2->ChunkHeader().mDoneTimeStamp, {{c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2363); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2360 | Update(c4->BufferBytes(), c2->BufferBytes() + c3->BufferBytes(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c4->BufferBytes(), c2 ->BufferBytes() + c3->BufferBytes(), c2->ChunkHeader ().mDoneTimeStamp, {{c2->ChunkHeader().mDoneTimeStamp, c2-> BufferBytes()}, {c3->ChunkHeader().mDoneTimeStamp, c3-> BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c4->BufferBytes(), c2->BufferBytes() + c3->BufferBytes (), c2->ChunkHeader().mDoneTimeStamp, {{c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader ().mDoneTimeStamp, c3->BufferBytes()}}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update1, Update(c4->BufferBytes(), c2->BufferBytes() + c3->BufferBytes(), c2->ChunkHeader().mDoneTimeStamp, {{c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2363 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c4->BufferBytes(), c2->BufferBytes() + c3->BufferBytes(), c2->ChunkHeader().mDoneTimeStamp, {{c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2363); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2361 | c2->ChunkHeader().mDoneTimeStamp,do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c4->BufferBytes(), c2 ->BufferBytes() + c3->BufferBytes(), c2->ChunkHeader ().mDoneTimeStamp, {{c2->ChunkHeader().mDoneTimeStamp, c2-> BufferBytes()}, {c3->ChunkHeader().mDoneTimeStamp, c3-> BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c4->BufferBytes(), c2->BufferBytes() + c3->BufferBytes (), c2->ChunkHeader().mDoneTimeStamp, {{c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader ().mDoneTimeStamp, c3->BufferBytes()}}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update1, Update(c4->BufferBytes(), c2->BufferBytes() + c3->BufferBytes(), c2->ChunkHeader().mDoneTimeStamp, {{c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2363 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c4->BufferBytes(), c2->BufferBytes() + c3->BufferBytes(), c2->ChunkHeader().mDoneTimeStamp, {{c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2363); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2362 | {{c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()},do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c4->BufferBytes(), c2 ->BufferBytes() + c3->BufferBytes(), c2->ChunkHeader ().mDoneTimeStamp, {{c2->ChunkHeader().mDoneTimeStamp, c2-> BufferBytes()}, {c3->ChunkHeader().mDoneTimeStamp, c3-> BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c4->BufferBytes(), c2->BufferBytes() + c3->BufferBytes (), c2->ChunkHeader().mDoneTimeStamp, {{c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader ().mDoneTimeStamp, c3->BufferBytes()}}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update1, Update(c4->BufferBytes(), c2->BufferBytes() + c3->BufferBytes(), c2->ChunkHeader().mDoneTimeStamp, {{c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2363 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c4->BufferBytes(), c2->BufferBytes() + c3->BufferBytes(), c2->ChunkHeader().mDoneTimeStamp, {{c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2363); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2363 | {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}})))do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c4->BufferBytes(), c2 ->BufferBytes() + c3->BufferBytes(), c2->ChunkHeader ().mDoneTimeStamp, {{c2->ChunkHeader().mDoneTimeStamp, c2-> BufferBytes()}, {c3->ChunkHeader().mDoneTimeStamp, c3-> BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c4->BufferBytes(), c2->BufferBytes() + c3->BufferBytes (), c2->ChunkHeader().mDoneTimeStamp, {{c2->ChunkHeader ().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader ().mDoneTimeStamp, c3->BufferBytes()}}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update1, Update(c4->BufferBytes(), c2->BufferBytes() + c3->BufferBytes(), c2->ChunkHeader().mDoneTimeStamp, {{c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2363 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c4->BufferBytes(), c2->BufferBytes() + c3->BufferBytes(), c2->ChunkHeader().mDoneTimeStamp, {{c2->ChunkHeader().mDoneTimeStamp, c2->BufferBytes()}, {c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2363); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2364 | ||||
| 2365 | // Pretend c2 has been recycled to make unreleased c5, and c4 has been | |||
| 2366 | // released. | |||
| 2367 | auto recycled = std::exchange(released, released->ReleaseNext()); | |||
| 2368 | recycled->MarkRecycled(); | |||
| 2369 | (void)recycled->ReserveInitialBlockAsTail(0); | |||
| 2370 | recycled->MarkDone(); | |||
| 2371 | released->SetLast(std::move(unreleased)); | |||
| 2372 | unreleased = std::move(recycled); | |||
| 2373 | ProfileBufferChunk* c5 = c2; | |||
| 2374 | c2 = nullptr; | |||
| 2375 | update2 = | |||
| 2376 | Update(c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes(), c3, c4); | |||
| 2377 | MOZ_RELEASE_ASSERT(IsSameUpdate(do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update2, Update(c5->BufferBytes(), c3 ->BufferBytes() + c4->BufferBytes(), c3->ChunkHeader ().mDoneTimeStamp, {{c4->ChunkHeader().mDoneTimeStamp, c4-> BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update2, Update (c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes (), c3->ChunkHeader().mDoneTimeStamp, {{c4->ChunkHeader ().mDoneTimeStamp, c4->BufferBytes()}}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update2, Update(c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes(), c3->ChunkHeader().mDoneTimeStamp, {{c4->ChunkHeader().mDoneTimeStamp, c4->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2381 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update2, Update(c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes(), c3->ChunkHeader().mDoneTimeStamp, {{c4->ChunkHeader().mDoneTimeStamp, c4->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2381); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2378 | update2,do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update2, Update(c5->BufferBytes(), c3 ->BufferBytes() + c4->BufferBytes(), c3->ChunkHeader ().mDoneTimeStamp, {{c4->ChunkHeader().mDoneTimeStamp, c4-> BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update2, Update (c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes (), c3->ChunkHeader().mDoneTimeStamp, {{c4->ChunkHeader ().mDoneTimeStamp, c4->BufferBytes()}}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update2, Update(c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes(), c3->ChunkHeader().mDoneTimeStamp, {{c4->ChunkHeader().mDoneTimeStamp, c4->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2381 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update2, Update(c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes(), c3->ChunkHeader().mDoneTimeStamp, {{c4->ChunkHeader().mDoneTimeStamp, c4->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2381); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2379 | Update(c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update2, Update(c5->BufferBytes(), c3 ->BufferBytes() + c4->BufferBytes(), c3->ChunkHeader ().mDoneTimeStamp, {{c4->ChunkHeader().mDoneTimeStamp, c4-> BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update2, Update (c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes (), c3->ChunkHeader().mDoneTimeStamp, {{c4->ChunkHeader ().mDoneTimeStamp, c4->BufferBytes()}}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update2, Update(c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes(), c3->ChunkHeader().mDoneTimeStamp, {{c4->ChunkHeader().mDoneTimeStamp, c4->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2381 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update2, Update(c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes(), c3->ChunkHeader().mDoneTimeStamp, {{c4->ChunkHeader().mDoneTimeStamp, c4->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2381); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2380 | c3->ChunkHeader().mDoneTimeStamp,do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update2, Update(c5->BufferBytes(), c3 ->BufferBytes() + c4->BufferBytes(), c3->ChunkHeader ().mDoneTimeStamp, {{c4->ChunkHeader().mDoneTimeStamp, c4-> BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update2, Update (c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes (), c3->ChunkHeader().mDoneTimeStamp, {{c4->ChunkHeader ().mDoneTimeStamp, c4->BufferBytes()}}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update2, Update(c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes(), c3->ChunkHeader().mDoneTimeStamp, {{c4->ChunkHeader().mDoneTimeStamp, c4->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2381 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update2, Update(c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes(), c3->ChunkHeader().mDoneTimeStamp, {{c4->ChunkHeader().mDoneTimeStamp, c4->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2381); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2381 | {{c4->ChunkHeader().mDoneTimeStamp, c4->BufferBytes()}})))do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update2, Update(c5->BufferBytes(), c3 ->BufferBytes() + c4->BufferBytes(), c3->ChunkHeader ().mDoneTimeStamp, {{c4->ChunkHeader().mDoneTimeStamp, c4-> BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update2, Update (c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes (), c3->ChunkHeader().mDoneTimeStamp, {{c4->ChunkHeader ().mDoneTimeStamp, c4->BufferBytes()}}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update2, Update(c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes(), c3->ChunkHeader().mDoneTimeStamp, {{c4->ChunkHeader().mDoneTimeStamp, c4->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2381 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update2, Update(c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes(), c3->ChunkHeader().mDoneTimeStamp, {{c4->ChunkHeader().mDoneTimeStamp, c4->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2381); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2382 | update1.Fold(std::move(update2)); | |||
| 2383 | MOZ_RELEASE_ASSERT(IsSameUpdate(do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c5->BufferBytes(), c3 ->BufferBytes() + c4->BufferBytes(), c3->ChunkHeader ().mDoneTimeStamp, {{c3->ChunkHeader().mDoneTimeStamp, c3-> BufferBytes()}, {c4->ChunkHeader().mDoneTimeStamp, c4-> BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes (), c3->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader ().mDoneTimeStamp, c3->BufferBytes()}, {c4->ChunkHeader ().mDoneTimeStamp, c4->BufferBytes()}}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update1, Update(c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes(), c3->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}, {c4->ChunkHeader().mDoneTimeStamp, c4->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2388 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes(), c3->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}, {c4->ChunkHeader().mDoneTimeStamp, c4->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2388); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2384 | update1,do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c5->BufferBytes(), c3 ->BufferBytes() + c4->BufferBytes(), c3->ChunkHeader ().mDoneTimeStamp, {{c3->ChunkHeader().mDoneTimeStamp, c3-> BufferBytes()}, {c4->ChunkHeader().mDoneTimeStamp, c4-> BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes (), c3->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader ().mDoneTimeStamp, c3->BufferBytes()}, {c4->ChunkHeader ().mDoneTimeStamp, c4->BufferBytes()}}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update1, Update(c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes(), c3->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}, {c4->ChunkHeader().mDoneTimeStamp, c4->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2388 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes(), c3->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}, {c4->ChunkHeader().mDoneTimeStamp, c4->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2388); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2385 | Update(c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes(),do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c5->BufferBytes(), c3 ->BufferBytes() + c4->BufferBytes(), c3->ChunkHeader ().mDoneTimeStamp, {{c3->ChunkHeader().mDoneTimeStamp, c3-> BufferBytes()}, {c4->ChunkHeader().mDoneTimeStamp, c4-> BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes (), c3->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader ().mDoneTimeStamp, c3->BufferBytes()}, {c4->ChunkHeader ().mDoneTimeStamp, c4->BufferBytes()}}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update1, Update(c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes(), c3->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}, {c4->ChunkHeader().mDoneTimeStamp, c4->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2388 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes(), c3->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}, {c4->ChunkHeader().mDoneTimeStamp, c4->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2388); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2386 | c3->ChunkHeader().mDoneTimeStamp,do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c5->BufferBytes(), c3 ->BufferBytes() + c4->BufferBytes(), c3->ChunkHeader ().mDoneTimeStamp, {{c3->ChunkHeader().mDoneTimeStamp, c3-> BufferBytes()}, {c4->ChunkHeader().mDoneTimeStamp, c4-> BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes (), c3->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader ().mDoneTimeStamp, c3->BufferBytes()}, {c4->ChunkHeader ().mDoneTimeStamp, c4->BufferBytes()}}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update1, Update(c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes(), c3->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}, {c4->ChunkHeader().mDoneTimeStamp, c4->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2388 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes(), c3->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}, {c4->ChunkHeader().mDoneTimeStamp, c4->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2388); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2387 | {{c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()},do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c5->BufferBytes(), c3 ->BufferBytes() + c4->BufferBytes(), c3->ChunkHeader ().mDoneTimeStamp, {{c3->ChunkHeader().mDoneTimeStamp, c3-> BufferBytes()}, {c4->ChunkHeader().mDoneTimeStamp, c4-> BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes (), c3->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader ().mDoneTimeStamp, c3->BufferBytes()}, {c4->ChunkHeader ().mDoneTimeStamp, c4->BufferBytes()}}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update1, Update(c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes(), c3->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}, {c4->ChunkHeader().mDoneTimeStamp, c4->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2388 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes(), c3->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}, {c4->ChunkHeader().mDoneTimeStamp, c4->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2388); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2388 | {c4->ChunkHeader().mDoneTimeStamp, c4->BufferBytes()}})))do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate( update1, Update(c5->BufferBytes(), c3 ->BufferBytes() + c4->BufferBytes(), c3->ChunkHeader ().mDoneTimeStamp, {{c3->ChunkHeader().mDoneTimeStamp, c3-> BufferBytes()}, {c4->ChunkHeader().mDoneTimeStamp, c4-> BufferBytes()}})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate( update1, Update (c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes (), c3->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader ().mDoneTimeStamp, c3->BufferBytes()}, {c4->ChunkHeader ().mDoneTimeStamp, c4->BufferBytes()}}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate( update1, Update(c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes(), c3->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}, {c4->ChunkHeader().mDoneTimeStamp, c4->BufferBytes()}}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2388 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate( update1, Update(c5->BufferBytes(), c3->BufferBytes() + c4->BufferBytes(), c3->ChunkHeader().mDoneTimeStamp, {{c3->ChunkHeader().mDoneTimeStamp, c3->BufferBytes()}, {c4->ChunkHeader().mDoneTimeStamp, c4->BufferBytes()}}))" ")"); do { MOZ_CrashSequence(__null, 2388); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2389 | ||||
| 2390 | // And send a final update. | |||
| 2391 | update1.Fold(Update(nullptr)); | |||
| 2392 | MOZ_RELEASE_ASSERT(update1.IsFinal())do { static_assert( mozilla::detail::AssertionConditionType< decltype(update1.IsFinal())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(update1.IsFinal()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("update1.IsFinal()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2392 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "update1.IsFinal()" ")"); do { MOZ_CrashSequence(__null, 2392); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2393 | MOZ_RELEASE_ASSERT(!update1.IsNotUpdate())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!update1.IsNotUpdate())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!update1.IsNotUpdate()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("!update1.IsNotUpdate()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2393 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!update1.IsNotUpdate()" ")"); do { MOZ_CrashSequence(__null, 2393); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2394 | ||||
| 2395 | printf("TestControlledChunkManagerUpdate done\n"); | |||
| 2396 | } | |||
| 2397 | ||||
| 2398 | static void TestControlledChunkManagerWithLocalLimit() { | |||
| 2399 | printf("TestControlledChunkManagerWithLocalLimit...\n"); | |||
| 2400 | ||||
| 2401 | // Construct a ProfileBufferChunkManagerWithLocalLimit with chunk of minimum | |||
| 2402 | // size >=100, up to 1000 bytes. | |||
| 2403 | constexpr ProfileBufferChunk::Length MaxTotalBytes = 1000; | |||
| 2404 | constexpr ProfileBufferChunk::Length ChunkMinBufferBytes = 100; | |||
| 2405 | ProfileBufferChunkManagerWithLocalLimit cmll{MaxTotalBytes, | |||
| 2406 | ChunkMinBufferBytes}; | |||
| 2407 | ||||
| 2408 | // Reference to chunk manager base class. | |||
| 2409 | ProfileBufferChunkManager& cm = cmll; | |||
| 2410 | ||||
| 2411 | // Reference to controlled chunk manager base class. | |||
| 2412 | ProfileBufferControlledChunkManager& ccm = cmll; | |||
| 2413 | ||||
| 2414 | #ifdef DEBUG1 | |||
| 2415 | const char* chunkManagerRegisterer = | |||
| 2416 | "TestControlledChunkManagerWithLocalLimit"; | |||
| 2417 | cm.RegisteredWith(chunkManagerRegisterer); | |||
| 2418 | #endif // DEBUG | |||
| 2419 | ||||
| 2420 | MOZ_RELEASE_ASSERT(cm.MaxTotalSize() == MaxTotalBytes,do { static_assert( mozilla::detail::AssertionConditionType< decltype(cm.MaxTotalSize() == MaxTotalBytes)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(cm.MaxTotalSize() == MaxTotalBytes ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "cm.MaxTotalSize() == MaxTotalBytes" " (" "Max total size should be exactly as given" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2421); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "cm.MaxTotalSize() == MaxTotalBytes" ") (" "Max total size should be exactly as given" ")"); do { MOZ_CrashSequence(__null, 2421); __attribute__((nomerge)) :: abort(); } while (false); } } while (false) | |||
| 2421 | "Max total size should be exactly as given")do { static_assert( mozilla::detail::AssertionConditionType< decltype(cm.MaxTotalSize() == MaxTotalBytes)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(cm.MaxTotalSize() == MaxTotalBytes ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "cm.MaxTotalSize() == MaxTotalBytes" " (" "Max total size should be exactly as given" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2421); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "cm.MaxTotalSize() == MaxTotalBytes" ") (" "Max total size should be exactly as given" ")"); do { MOZ_CrashSequence(__null, 2421); __attribute__((nomerge)) :: abort(); } while (false); } } while (false); | |||
| 2422 | ||||
| 2423 | unsigned destroyedChunks = 0; | |||
| 2424 | unsigned destroyedBytes = 0; | |||
| 2425 | cm.SetChunkDestroyedCallback([&](const ProfileBufferChunk& aChunks) { | |||
| 2426 | for (const ProfileBufferChunk* chunk = &aChunks; chunk; | |||
| 2427 | chunk = chunk->GetNext()) { | |||
| 2428 | destroyedChunks += 1; | |||
| 2429 | destroyedBytes += chunk->BufferBytes(); | |||
| 2430 | } | |||
| 2431 | }); | |||
| 2432 | ||||
| 2433 | using Update = ProfileBufferControlledChunkManager::Update; | |||
| 2434 | unsigned updateCount = 0; | |||
| 2435 | ProfileBufferControlledChunkManager::Update update; | |||
| 2436 | MOZ_RELEASE_ASSERT(update.IsNotUpdate())do { static_assert( mozilla::detail::AssertionConditionType< decltype(update.IsNotUpdate())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(update.IsNotUpdate()))), 0)) ) { do { } while (false); MOZ_ReportAssertionFailure("update.IsNotUpdate()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2436 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "update.IsNotUpdate()" ")"); do { MOZ_CrashSequence(__null, 2436); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2437 | auto updateCallback = [&](Update&& aUpdate) { | |||
| 2438 | ++updateCount; | |||
| 2439 | update.Fold(std::move(aUpdate)); | |||
| 2440 | }; | |||
| 2441 | ccm.SetUpdateCallback(updateCallback); | |||
| 2442 | MOZ_RELEASE_ASSERT(updateCount == 1,do { static_assert( mozilla::detail::AssertionConditionType< decltype(updateCount == 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(updateCount == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("updateCount == 1" " (" "SetUpdateCallback should have triggered an update" ")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2443 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "updateCount == 1" ") (" "SetUpdateCallback should have triggered an update" ")" ); do { MOZ_CrashSequence(__null, 2443); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2443 | "SetUpdateCallback should have triggered an update")do { static_assert( mozilla::detail::AssertionConditionType< decltype(updateCount == 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(updateCount == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("updateCount == 1" " (" "SetUpdateCallback should have triggered an update" ")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2443 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "updateCount == 1" ") (" "SetUpdateCallback should have triggered an update" ")" ); do { MOZ_CrashSequence(__null, 2443); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2444 | MOZ_RELEASE_ASSERT(IsSameUpdate(update, Update(0, 0, TimeStamp{}, {})))do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate(update, Update(0, 0, TimeStamp{}, {}))) >::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(IsSameUpdate(update, Update(0, 0, TimeStamp{}, {}))) )), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate(update, Update(0, 0, TimeStamp{}, {}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2444 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate(update, Update(0, 0, TimeStamp{}, {}))" ")"); do { MOZ_CrashSequence(__null, 2444); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2445 | updateCount = 0; | |||
| 2446 | update.Clear(); | |||
| 2447 | ||||
| 2448 | UniquePtr<ProfileBufferChunk> extantReleasedChunks = | |||
| 2449 | cm.GetExtantReleasedChunks(); | |||
| 2450 | MOZ_RELEASE_ASSERT(!extantReleasedChunks, "Unexpected released chunk(s)")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!extantReleasedChunks)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!extantReleasedChunks))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("!extantReleasedChunks" " (" "Unexpected released chunk(s)" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2450); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!extantReleasedChunks" ") (" "Unexpected released chunk(s)" ")"); do { MOZ_CrashSequence (__null, 2450); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 2451 | MOZ_RELEASE_ASSERT(updateCount == 1,do { static_assert( mozilla::detail::AssertionConditionType< decltype(updateCount == 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(updateCount == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("updateCount == 1" " (" "GetExtantReleasedChunks should have triggered an update" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2452); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "updateCount == 1" ") (" "GetExtantReleasedChunks should have triggered an update" ")"); do { MOZ_CrashSequence(__null, 2452); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2452 | "GetExtantReleasedChunks should have triggered an update")do { static_assert( mozilla::detail::AssertionConditionType< decltype(updateCount == 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(updateCount == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("updateCount == 1" " (" "GetExtantReleasedChunks should have triggered an update" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2452); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "updateCount == 1" ") (" "GetExtantReleasedChunks should have triggered an update" ")"); do { MOZ_CrashSequence(__null, 2452); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2453 | MOZ_RELEASE_ASSERT(IsSameUpdate(update, Update(0, 0, TimeStamp{}, {})))do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate(update, Update(0, 0, TimeStamp{}, {}))) >::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(IsSameUpdate(update, Update(0, 0, TimeStamp{}, {}))) )), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate(update, Update(0, 0, TimeStamp{}, {}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2453 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate(update, Update(0, 0, TimeStamp{}, {}))" ")"); do { MOZ_CrashSequence(__null, 2453); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2454 | updateCount = 0; | |||
| 2455 | update.Clear(); | |||
| 2456 | ||||
| 2457 | // First request. | |||
| 2458 | UniquePtr<ProfileBufferChunk> chunk = cm.GetChunk(); | |||
| 2459 | MOZ_RELEASE_ASSERT(!!chunk,do { static_assert( mozilla::detail::AssertionConditionType< decltype(!!chunk)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!!chunk))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!!chunk" " (" "First chunk immediate request should always work" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2460); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!!chunk" ") (" "First chunk immediate request should always work" ")" ); do { MOZ_CrashSequence(__null, 2460); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2460 | "First chunk immediate request should always work")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!!chunk)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!!chunk))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!!chunk" " (" "First chunk immediate request should always work" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2460); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!!chunk" ") (" "First chunk immediate request should always work" ")" ); do { MOZ_CrashSequence(__null, 2460); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2461 | const auto chunkActualBufferBytes = chunk->BufferBytes(); | |||
| 2462 | MOZ_RELEASE_ASSERT(updateCount == 1,do { static_assert( mozilla::detail::AssertionConditionType< decltype(updateCount == 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(updateCount == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("updateCount == 1" " (" "GetChunk should have triggered an update" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2463); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "updateCount == 1" ") (" "GetChunk should have triggered an update" ")"); do { MOZ_CrashSequence (__null, 2463); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false) | |||
| 2463 | "GetChunk should have triggered an update")do { static_assert( mozilla::detail::AssertionConditionType< decltype(updateCount == 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(updateCount == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("updateCount == 1" " (" "GetChunk should have triggered an update" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2463); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "updateCount == 1" ") (" "GetChunk should have triggered an update" ")"); do { MOZ_CrashSequence (__null, 2463); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 2464 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate(update, Update(chunk->BufferBytes(), 0, TimeStamp{}, {})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate(update, Update( chunk->BufferBytes(), 0, TimeStamp{}, {}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate(update, Update(chunk->BufferBytes(), 0, TimeStamp{}, {}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2465 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate(update, Update(chunk->BufferBytes(), 0, TimeStamp{}, {}))" ")"); do { MOZ_CrashSequence(__null, 2465); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2465 | IsSameUpdate(update, Update(chunk->BufferBytes(), 0, TimeStamp{}, {})))do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate(update, Update(chunk->BufferBytes(), 0, TimeStamp{}, {})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate(update, Update( chunk->BufferBytes(), 0, TimeStamp{}, {}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate(update, Update(chunk->BufferBytes(), 0, TimeStamp{}, {}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2465 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate(update, Update(chunk->BufferBytes(), 0, TimeStamp{}, {}))" ")"); do { MOZ_CrashSequence(__null, 2465); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2466 | updateCount = 0; | |||
| 2467 | update.Clear(); | |||
| 2468 | ||||
| 2469 | extantReleasedChunks = cm.GetExtantReleasedChunks(); | |||
| 2470 | MOZ_RELEASE_ASSERT(!extantReleasedChunks, "Unexpected released chunk(s)")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!extantReleasedChunks)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!extantReleasedChunks))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("!extantReleasedChunks" " (" "Unexpected released chunk(s)" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2470); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!extantReleasedChunks" ") (" "Unexpected released chunk(s)" ")"); do { MOZ_CrashSequence (__null, 2470); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 2471 | MOZ_RELEASE_ASSERT(updateCount == 1,do { static_assert( mozilla::detail::AssertionConditionType< decltype(updateCount == 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(updateCount == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("updateCount == 1" " (" "GetExtantReleasedChunks should have triggered an update" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2472); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "updateCount == 1" ") (" "GetExtantReleasedChunks should have triggered an update" ")"); do { MOZ_CrashSequence(__null, 2472); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2472 | "GetExtantReleasedChunks should have triggered an update")do { static_assert( mozilla::detail::AssertionConditionType< decltype(updateCount == 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(updateCount == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("updateCount == 1" " (" "GetExtantReleasedChunks should have triggered an update" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2472); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "updateCount == 1" ") (" "GetExtantReleasedChunks should have triggered an update" ")"); do { MOZ_CrashSequence(__null, 2472); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2473 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate(update, Update(chunk->BufferBytes(), 0, TimeStamp{}, {})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate(update, Update( chunk->BufferBytes(), 0, TimeStamp{}, {}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate(update, Update(chunk->BufferBytes(), 0, TimeStamp{}, {}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2474 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate(update, Update(chunk->BufferBytes(), 0, TimeStamp{}, {}))" ")"); do { MOZ_CrashSequence(__null, 2474); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2474 | IsSameUpdate(update, Update(chunk->BufferBytes(), 0, TimeStamp{}, {})))do { static_assert( mozilla::detail::AssertionConditionType< decltype(IsSameUpdate(update, Update(chunk->BufferBytes(), 0, TimeStamp{}, {})))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(IsSameUpdate(update, Update( chunk->BufferBytes(), 0, TimeStamp{}, {}))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("IsSameUpdate(update, Update(chunk->BufferBytes(), 0, TimeStamp{}, {}))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2474 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "IsSameUpdate(update, Update(chunk->BufferBytes(), 0, TimeStamp{}, {}))" ")"); do { MOZ_CrashSequence(__null, 2474); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2475 | updateCount = 0; | |||
| 2476 | update.Clear(); | |||
| 2477 | ||||
| 2478 | // For this test, we need to be able to get at least 2 chunks without hitting | |||
| 2479 | // the limit. (If this failed, it wouldn't necessary be a problem with | |||
| 2480 | // ProfileBufferChunkManagerWithLocalLimit, fiddle with constants at the top | |||
| 2481 | // of this test.) | |||
| 2482 | MOZ_RELEASE_ASSERT(chunkActualBufferBytes < 2 * MaxTotalBytes)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunkActualBufferBytes < 2 * MaxTotalBytes)>:: isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(chunkActualBufferBytes < 2 * MaxTotalBytes))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("chunkActualBufferBytes < 2 * MaxTotalBytes" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2482 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunkActualBufferBytes < 2 * MaxTotalBytes" ")"); do { MOZ_CrashSequence(__null, 2482); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2483 | ||||
| 2484 | ProfileBufferChunk::Length previousUnreleasedBytes = chunk->BufferBytes(); | |||
| 2485 | ProfileBufferChunk::Length previousReleasedBytes = 0; | |||
| 2486 | TimeStamp previousOldestDoneTimeStamp; | |||
| 2487 | ||||
| 2488 | // We will do enough loops to go through the maximum size a number of times. | |||
| 2489 | const unsigned Rollovers = 3; | |||
| 2490 | const unsigned Loops = Rollovers * MaxTotalBytes / chunkActualBufferBytes; | |||
| 2491 | for (unsigned i = 0; i < Loops; ++i) { | |||
| 2492 | // Add some data to the chunk. | |||
| 2493 | const ProfileBufferIndex index = | |||
| 2494 | ProfileBufferIndex(chunkActualBufferBytes) * i + 1; | |||
| 2495 | chunk->SetRangeStart(index); | |||
| 2496 | (void)chunk->ReserveInitialBlockAsTail(1); | |||
| 2497 | (void)chunk->ReserveBlock(2); | |||
| 2498 | ||||
| 2499 | // Request a new chunk. | |||
| 2500 | UniquePtr<ProfileBufferChunk> newChunk; | |||
| 2501 | cm.RequestChunk([&](UniquePtr<ProfileBufferChunk> aChunk) { | |||
| 2502 | newChunk = std::move(aChunk); | |||
| 2503 | }); | |||
| 2504 | MOZ_RELEASE_ASSERT(updateCount == 0,do { static_assert( mozilla::detail::AssertionConditionType< decltype(updateCount == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(updateCount == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("updateCount == 0" " (" "RequestChunk() shouldn't have triggered an update" ")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2505 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "updateCount == 0" ") (" "RequestChunk() shouldn't have triggered an update" ")" ); do { MOZ_CrashSequence(__null, 2505); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2505 | "RequestChunk() shouldn't have triggered an update")do { static_assert( mozilla::detail::AssertionConditionType< decltype(updateCount == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(updateCount == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("updateCount == 0" " (" "RequestChunk() shouldn't have triggered an update" ")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2505 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "updateCount == 0" ") (" "RequestChunk() shouldn't have triggered an update" ")" ); do { MOZ_CrashSequence(__null, 2505); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2506 | cm.FulfillChunkRequests(); | |||
| 2507 | MOZ_RELEASE_ASSERT(!!newChunk, "Chunk request should always work")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!!newChunk)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!!newChunk))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!!newChunk" " (" "Chunk request should always work" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2507); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!!newChunk" ") (" "Chunk request should always work" ")"); do { MOZ_CrashSequence (__null, 2507); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 2508 | MOZ_RELEASE_ASSERT(newChunk->BufferBytes() == chunkActualBufferBytes,do { static_assert( mozilla::detail::AssertionConditionType< decltype(newChunk->BufferBytes() == chunkActualBufferBytes )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(newChunk->BufferBytes() == chunkActualBufferBytes ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "newChunk->BufferBytes() == chunkActualBufferBytes" " (" "Unexpected chunk size" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2509); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "newChunk->BufferBytes() == chunkActualBufferBytes" ") (" "Unexpected chunk size" ")"); do { MOZ_CrashSequence(__null , 2509); __attribute__((nomerge)) ::abort(); } while (false); } } while (false) | |||
| 2509 | "Unexpected chunk size")do { static_assert( mozilla::detail::AssertionConditionType< decltype(newChunk->BufferBytes() == chunkActualBufferBytes )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(newChunk->BufferBytes() == chunkActualBufferBytes ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "newChunk->BufferBytes() == chunkActualBufferBytes" " (" "Unexpected chunk size" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2509); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "newChunk->BufferBytes() == chunkActualBufferBytes" ") (" "Unexpected chunk size" ")"); do { MOZ_CrashSequence(__null , 2509); __attribute__((nomerge)) ::abort(); } while (false); } } while (false); | |||
| 2510 | MOZ_RELEASE_ASSERT(!newChunk->GetNext(), "There should only be one chunk")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!newChunk->GetNext())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!newChunk->GetNext()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("!newChunk->GetNext()" " (" "There should only be one chunk" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2510); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!newChunk->GetNext()" ") (" "There should only be one chunk" ")"); do { MOZ_CrashSequence (__null, 2510); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 2511 | ||||
| 2512 | MOZ_RELEASE_ASSERT(updateCount == 1,do { static_assert( mozilla::detail::AssertionConditionType< decltype(updateCount == 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(updateCount == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("updateCount == 1" " (" "FulfillChunkRequests() after a request should have " "triggered an update" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2514); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "updateCount == 1" ") (" "FulfillChunkRequests() after a request should have " "triggered an update" ")"); do { MOZ_CrashSequence(__null, 2514); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2513 | "FulfillChunkRequests() after a request should have "do { static_assert( mozilla::detail::AssertionConditionType< decltype(updateCount == 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(updateCount == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("updateCount == 1" " (" "FulfillChunkRequests() after a request should have " "triggered an update" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2514); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "updateCount == 1" ") (" "FulfillChunkRequests() after a request should have " "triggered an update" ")"); do { MOZ_CrashSequence(__null, 2514); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2514 | "triggered an update")do { static_assert( mozilla::detail::AssertionConditionType< decltype(updateCount == 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(updateCount == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("updateCount == 1" " (" "FulfillChunkRequests() after a request should have " "triggered an update" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2514); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "updateCount == 1" ") (" "FulfillChunkRequests() after a request should have " "triggered an update" ")"); do { MOZ_CrashSequence(__null, 2514); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2515 | MOZ_RELEASE_ASSERT(!update.IsFinal())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!update.IsFinal())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!update.IsFinal()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!update.IsFinal()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2515 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!update.IsFinal()" ")"); do { MOZ_CrashSequence(__null, 2515); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2516 | MOZ_RELEASE_ASSERT(!update.IsNotUpdate())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!update.IsNotUpdate())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!update.IsNotUpdate()))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("!update.IsNotUpdate()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2516 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!update.IsNotUpdate()" ")"); do { MOZ_CrashSequence(__null, 2516); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2517 | MOZ_RELEASE_ASSERT(update.UnreleasedBytes() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(update.UnreleasedBytes() == previousUnreleasedBytes + newChunk->BufferBytes())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(update.UnreleasedBytes() == previousUnreleasedBytes + newChunk->BufferBytes()))), 0))) { do { } while (false) ; MOZ_ReportAssertionFailure("update.UnreleasedBytes() == previousUnreleasedBytes + newChunk->BufferBytes()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2518 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "update.UnreleasedBytes() == previousUnreleasedBytes + newChunk->BufferBytes()" ")"); do { MOZ_CrashSequence(__null, 2518); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2518 | previousUnreleasedBytes + newChunk->BufferBytes())do { static_assert( mozilla::detail::AssertionConditionType< decltype(update.UnreleasedBytes() == previousUnreleasedBytes + newChunk->BufferBytes())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(update.UnreleasedBytes() == previousUnreleasedBytes + newChunk->BufferBytes()))), 0))) { do { } while (false) ; MOZ_ReportAssertionFailure("update.UnreleasedBytes() == previousUnreleasedBytes + newChunk->BufferBytes()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2518 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "update.UnreleasedBytes() == previousUnreleasedBytes + newChunk->BufferBytes()" ")"); do { MOZ_CrashSequence(__null, 2518); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2519 | previousUnreleasedBytes = update.UnreleasedBytes(); | |||
| 2520 | MOZ_RELEASE_ASSERT(update.ReleasedBytes() <= previousReleasedBytes)do { static_assert( mozilla::detail::AssertionConditionType< decltype(update.ReleasedBytes() <= previousReleasedBytes)> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(update.ReleasedBytes() <= previousReleasedBytes)) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("update.ReleasedBytes() <= previousReleasedBytes" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2520 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "update.ReleasedBytes() <= previousReleasedBytes" ")"); do { MOZ_CrashSequence(__null, 2520); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2521 | previousReleasedBytes = update.ReleasedBytes(); | |||
| 2522 | MOZ_RELEASE_ASSERT(previousOldestDoneTimeStamp.IsNull() ||do { static_assert( mozilla::detail::AssertionConditionType< decltype(previousOldestDoneTimeStamp.IsNull() || update.OldestDoneTimeStamp () >= previousOldestDoneTimeStamp)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(previousOldestDoneTimeStamp. IsNull() || update.OldestDoneTimeStamp() >= previousOldestDoneTimeStamp ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "previousOldestDoneTimeStamp.IsNull() || update.OldestDoneTimeStamp() >= previousOldestDoneTimeStamp" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2524 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "previousOldestDoneTimeStamp.IsNull() || update.OldestDoneTimeStamp() >= previousOldestDoneTimeStamp" ")"); do { MOZ_CrashSequence(__null, 2524); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2523 | update.OldestDoneTimeStamp() >=do { static_assert( mozilla::detail::AssertionConditionType< decltype(previousOldestDoneTimeStamp.IsNull() || update.OldestDoneTimeStamp () >= previousOldestDoneTimeStamp)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(previousOldestDoneTimeStamp. IsNull() || update.OldestDoneTimeStamp() >= previousOldestDoneTimeStamp ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "previousOldestDoneTimeStamp.IsNull() || update.OldestDoneTimeStamp() >= previousOldestDoneTimeStamp" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2524 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "previousOldestDoneTimeStamp.IsNull() || update.OldestDoneTimeStamp() >= previousOldestDoneTimeStamp" ")"); do { MOZ_CrashSequence(__null, 2524); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2524 | previousOldestDoneTimeStamp)do { static_assert( mozilla::detail::AssertionConditionType< decltype(previousOldestDoneTimeStamp.IsNull() || update.OldestDoneTimeStamp () >= previousOldestDoneTimeStamp)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(previousOldestDoneTimeStamp. IsNull() || update.OldestDoneTimeStamp() >= previousOldestDoneTimeStamp ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "previousOldestDoneTimeStamp.IsNull() || update.OldestDoneTimeStamp() >= previousOldestDoneTimeStamp" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2524 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "previousOldestDoneTimeStamp.IsNull() || update.OldestDoneTimeStamp() >= previousOldestDoneTimeStamp" ")"); do { MOZ_CrashSequence(__null, 2524); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2525 | previousOldestDoneTimeStamp = update.OldestDoneTimeStamp(); | |||
| 2526 | MOZ_RELEASE_ASSERT(update.NewlyReleasedChunksRef().empty())do { static_assert( mozilla::detail::AssertionConditionType< decltype(update.NewlyReleasedChunksRef().empty())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(update.NewlyReleasedChunksRef().empty()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("update.NewlyReleasedChunksRef().empty()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2526 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "update.NewlyReleasedChunksRef().empty()" ")"); do { MOZ_CrashSequence(__null, 2526); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2527 | updateCount = 0; | |||
| 2528 | update.Clear(); | |||
| 2529 | ||||
| 2530 | // Make sure the "Done" timestamp below cannot be the same as from the | |||
| 2531 | // previous loop. | |||
| 2532 | const TimeStamp now = TimeStamp::Now(); | |||
| 2533 | while (TimeStamp::Now() == now) { | |||
| 2534 | ::SleepMilli(1); | |||
| 2535 | } | |||
| 2536 | ||||
| 2537 | // Mark previous chunk done and release it. | |||
| 2538 | WaitUntilTimeStampChanges(); // Force "done" timestamp to change. | |||
| 2539 | chunk->MarkDone(); | |||
| 2540 | const auto doneTimeStamp = chunk->ChunkHeader().mDoneTimeStamp; | |||
| 2541 | const auto bufferBytes = chunk->BufferBytes(); | |||
| 2542 | cm.ReleaseChunk(std::move(chunk)); | |||
| 2543 | ||||
| 2544 | MOZ_RELEASE_ASSERT(updateCount == 1,do { static_assert( mozilla::detail::AssertionConditionType< decltype(updateCount == 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(updateCount == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("updateCount == 1" " (" "ReleaseChunk() should have triggered an update" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2545); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "updateCount == 1" ") (" "ReleaseChunk() should have triggered an update" ")"); do { MOZ_CrashSequence(__null, 2545); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2545 | "ReleaseChunk() should have triggered an update")do { static_assert( mozilla::detail::AssertionConditionType< decltype(updateCount == 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(updateCount == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("updateCount == 1" " (" "ReleaseChunk() should have triggered an update" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2545); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "updateCount == 1" ") (" "ReleaseChunk() should have triggered an update" ")"); do { MOZ_CrashSequence(__null, 2545); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2546 | MOZ_RELEASE_ASSERT(!update.IsFinal())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!update.IsFinal())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!update.IsFinal()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!update.IsFinal()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2546 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!update.IsFinal()" ")"); do { MOZ_CrashSequence(__null, 2546); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2547 | MOZ_RELEASE_ASSERT(!update.IsNotUpdate())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!update.IsNotUpdate())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!update.IsNotUpdate()))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("!update.IsNotUpdate()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2547 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!update.IsNotUpdate()" ")"); do { MOZ_CrashSequence(__null, 2547); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2548 | MOZ_RELEASE_ASSERT(update.UnreleasedBytes() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(update.UnreleasedBytes() == previousUnreleasedBytes - bufferBytes)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(update.UnreleasedBytes() == previousUnreleasedBytes - bufferBytes))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("update.UnreleasedBytes() == previousUnreleasedBytes - bufferBytes" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2549 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "update.UnreleasedBytes() == previousUnreleasedBytes - bufferBytes" ")"); do { MOZ_CrashSequence(__null, 2549); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2549 | previousUnreleasedBytes - bufferBytes)do { static_assert( mozilla::detail::AssertionConditionType< decltype(update.UnreleasedBytes() == previousUnreleasedBytes - bufferBytes)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(update.UnreleasedBytes() == previousUnreleasedBytes - bufferBytes))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("update.UnreleasedBytes() == previousUnreleasedBytes - bufferBytes" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2549 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "update.UnreleasedBytes() == previousUnreleasedBytes - bufferBytes" ")"); do { MOZ_CrashSequence(__null, 2549); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2550 | previousUnreleasedBytes = update.UnreleasedBytes(); | |||
| 2551 | MOZ_RELEASE_ASSERT(update.ReleasedBytes() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(update.ReleasedBytes() == previousReleasedBytes + bufferBytes )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(update.ReleasedBytes() == previousReleasedBytes + bufferBytes ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "update.ReleasedBytes() == previousReleasedBytes + bufferBytes" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2552 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "update.ReleasedBytes() == previousReleasedBytes + bufferBytes" ")"); do { MOZ_CrashSequence(__null, 2552); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2552 | previousReleasedBytes + bufferBytes)do { static_assert( mozilla::detail::AssertionConditionType< decltype(update.ReleasedBytes() == previousReleasedBytes + bufferBytes )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(update.ReleasedBytes() == previousReleasedBytes + bufferBytes ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "update.ReleasedBytes() == previousReleasedBytes + bufferBytes" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2552 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "update.ReleasedBytes() == previousReleasedBytes + bufferBytes" ")"); do { MOZ_CrashSequence(__null, 2552); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2553 | previousReleasedBytes = update.ReleasedBytes(); | |||
| 2554 | MOZ_RELEASE_ASSERT(previousOldestDoneTimeStamp.IsNull() ||do { static_assert( mozilla::detail::AssertionConditionType< decltype(previousOldestDoneTimeStamp.IsNull() || update.OldestDoneTimeStamp () >= previousOldestDoneTimeStamp)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(previousOldestDoneTimeStamp. IsNull() || update.OldestDoneTimeStamp() >= previousOldestDoneTimeStamp ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "previousOldestDoneTimeStamp.IsNull() || update.OldestDoneTimeStamp() >= previousOldestDoneTimeStamp" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2556 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "previousOldestDoneTimeStamp.IsNull() || update.OldestDoneTimeStamp() >= previousOldestDoneTimeStamp" ")"); do { MOZ_CrashSequence(__null, 2556); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2555 | update.OldestDoneTimeStamp() >=do { static_assert( mozilla::detail::AssertionConditionType< decltype(previousOldestDoneTimeStamp.IsNull() || update.OldestDoneTimeStamp () >= previousOldestDoneTimeStamp)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(previousOldestDoneTimeStamp. IsNull() || update.OldestDoneTimeStamp() >= previousOldestDoneTimeStamp ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "previousOldestDoneTimeStamp.IsNull() || update.OldestDoneTimeStamp() >= previousOldestDoneTimeStamp" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2556 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "previousOldestDoneTimeStamp.IsNull() || update.OldestDoneTimeStamp() >= previousOldestDoneTimeStamp" ")"); do { MOZ_CrashSequence(__null, 2556); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2556 | previousOldestDoneTimeStamp)do { static_assert( mozilla::detail::AssertionConditionType< decltype(previousOldestDoneTimeStamp.IsNull() || update.OldestDoneTimeStamp () >= previousOldestDoneTimeStamp)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(previousOldestDoneTimeStamp. IsNull() || update.OldestDoneTimeStamp() >= previousOldestDoneTimeStamp ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "previousOldestDoneTimeStamp.IsNull() || update.OldestDoneTimeStamp() >= previousOldestDoneTimeStamp" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2556 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "previousOldestDoneTimeStamp.IsNull() || update.OldestDoneTimeStamp() >= previousOldestDoneTimeStamp" ")"); do { MOZ_CrashSequence(__null, 2556); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2557 | previousOldestDoneTimeStamp = update.OldestDoneTimeStamp(); | |||
| 2558 | MOZ_RELEASE_ASSERT(update.OldestDoneTimeStamp() <= doneTimeStamp)do { static_assert( mozilla::detail::AssertionConditionType< decltype(update.OldestDoneTimeStamp() <= doneTimeStamp)> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(update.OldestDoneTimeStamp() <= doneTimeStamp))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("update.OldestDoneTimeStamp() <= doneTimeStamp" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2558 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "update.OldestDoneTimeStamp() <= doneTimeStamp" ")"); do { MOZ_CrashSequence(__null, 2558); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2559 | MOZ_RELEASE_ASSERT(update.NewlyReleasedChunksRef().size() == 1)do { static_assert( mozilla::detail::AssertionConditionType< decltype(update.NewlyReleasedChunksRef().size() == 1)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(update.NewlyReleasedChunksRef().size() == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("update.NewlyReleasedChunksRef().size() == 1" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2559 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "update.NewlyReleasedChunksRef().size() == 1" ")"); do { MOZ_CrashSequence(__null, 2559); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2560 | MOZ_RELEASE_ASSERT(update.NewlyReleasedChunksRef()[0].mDoneTimeStamp ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(update.NewlyReleasedChunksRef()[0].mDoneTimeStamp == doneTimeStamp)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(update.NewlyReleasedChunksRef( )[0].mDoneTimeStamp == doneTimeStamp))), 0))) { do { } while ( false); MOZ_ReportAssertionFailure("update.NewlyReleasedChunksRef()[0].mDoneTimeStamp == doneTimeStamp" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2561 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "update.NewlyReleasedChunksRef()[0].mDoneTimeStamp == doneTimeStamp" ")"); do { MOZ_CrashSequence(__null, 2561); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2561 | doneTimeStamp)do { static_assert( mozilla::detail::AssertionConditionType< decltype(update.NewlyReleasedChunksRef()[0].mDoneTimeStamp == doneTimeStamp)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(update.NewlyReleasedChunksRef( )[0].mDoneTimeStamp == doneTimeStamp))), 0))) { do { } while ( false); MOZ_ReportAssertionFailure("update.NewlyReleasedChunksRef()[0].mDoneTimeStamp == doneTimeStamp" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2561 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "update.NewlyReleasedChunksRef()[0].mDoneTimeStamp == doneTimeStamp" ")"); do { MOZ_CrashSequence(__null, 2561); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2562 | MOZ_RELEASE_ASSERT(update.NewlyReleasedChunksRef()[0].mBufferBytes ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(update.NewlyReleasedChunksRef()[0].mBufferBytes == bufferBytes )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(update.NewlyReleasedChunksRef()[0].mBufferBytes == bufferBytes ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "update.NewlyReleasedChunksRef()[0].mBufferBytes == bufferBytes" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2563 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "update.NewlyReleasedChunksRef()[0].mBufferBytes == bufferBytes" ")"); do { MOZ_CrashSequence(__null, 2563); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2563 | bufferBytes)do { static_assert( mozilla::detail::AssertionConditionType< decltype(update.NewlyReleasedChunksRef()[0].mBufferBytes == bufferBytes )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(update.NewlyReleasedChunksRef()[0].mBufferBytes == bufferBytes ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "update.NewlyReleasedChunksRef()[0].mBufferBytes == bufferBytes" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2563 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "update.NewlyReleasedChunksRef()[0].mBufferBytes == bufferBytes" ")"); do { MOZ_CrashSequence(__null, 2563); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2564 | updateCount = 0; | |||
| 2565 | update.Clear(); | |||
| 2566 | ||||
| 2567 | // And cycle to the new chunk. | |||
| 2568 | chunk = std::move(newChunk); | |||
| 2569 | } | |||
| 2570 | ||||
| 2571 | // Enough testing! Clean-up. | |||
| 2572 | (void)chunk->ReserveInitialBlockAsTail(0); | |||
| 2573 | chunk->MarkDone(); | |||
| 2574 | cm.ForgetUnreleasedChunks(); | |||
| 2575 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(updateCount == 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(updateCount == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("updateCount == 1" " (" "ForgetUnreleasedChunks() should have triggered an update" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2577); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "updateCount == 1" ") (" "ForgetUnreleasedChunks() should have triggered an update" ")"); do { MOZ_CrashSequence(__null, 2577); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2576 | updateCount == 1,do { static_assert( mozilla::detail::AssertionConditionType< decltype(updateCount == 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(updateCount == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("updateCount == 1" " (" "ForgetUnreleasedChunks() should have triggered an update" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2577); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "updateCount == 1" ") (" "ForgetUnreleasedChunks() should have triggered an update" ")"); do { MOZ_CrashSequence(__null, 2577); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2577 | "ForgetUnreleasedChunks() should have triggered an update")do { static_assert( mozilla::detail::AssertionConditionType< decltype(updateCount == 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(updateCount == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("updateCount == 1" " (" "ForgetUnreleasedChunks() should have triggered an update" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2577); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "updateCount == 1" ") (" "ForgetUnreleasedChunks() should have triggered an update" ")"); do { MOZ_CrashSequence(__null, 2577); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2578 | MOZ_RELEASE_ASSERT(!update.IsFinal())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!update.IsFinal())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!update.IsFinal()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!update.IsFinal()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2578 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!update.IsFinal()" ")"); do { MOZ_CrashSequence(__null, 2578); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2579 | MOZ_RELEASE_ASSERT(!update.IsNotUpdate())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!update.IsNotUpdate())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!update.IsNotUpdate()))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("!update.IsNotUpdate()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2579 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!update.IsNotUpdate()" ")"); do { MOZ_CrashSequence(__null, 2579); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2580 | MOZ_RELEASE_ASSERT(update.UnreleasedBytes() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(update.UnreleasedBytes() == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(update.UnreleasedBytes() == 0 ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "update.UnreleasedBytes() == 0", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2580); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "update.UnreleasedBytes() == 0" ")"); do { MOZ_CrashSequence(__null, 2580); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2581 | MOZ_RELEASE_ASSERT(update.ReleasedBytes() == previousReleasedBytes)do { static_assert( mozilla::detail::AssertionConditionType< decltype(update.ReleasedBytes() == previousReleasedBytes)> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(update.ReleasedBytes() == previousReleasedBytes))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("update.ReleasedBytes() == previousReleasedBytes" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2581 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "update.ReleasedBytes() == previousReleasedBytes" ")"); do { MOZ_CrashSequence(__null, 2581); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2582 | MOZ_RELEASE_ASSERT(update.NewlyReleasedChunksRef().empty() == 1)do { static_assert( mozilla::detail::AssertionConditionType< decltype(update.NewlyReleasedChunksRef().empty() == 1)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(update.NewlyReleasedChunksRef().empty() == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("update.NewlyReleasedChunksRef().empty() == 1" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2582 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "update.NewlyReleasedChunksRef().empty() == 1" ")"); do { MOZ_CrashSequence(__null, 2582); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2583 | updateCount = 0; | |||
| 2584 | update.Clear(); | |||
| 2585 | ||||
| 2586 | ccm.SetUpdateCallback({}); | |||
| 2587 | MOZ_RELEASE_ASSERT(updateCount == 1,do { static_assert( mozilla::detail::AssertionConditionType< decltype(updateCount == 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(updateCount == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("updateCount == 1" " (" "SetUpdateCallback({}) should have triggered an update" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2588); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "updateCount == 1" ") (" "SetUpdateCallback({}) should have triggered an update" ")"); do { MOZ_CrashSequence(__null, 2588); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2588 | "SetUpdateCallback({}) should have triggered an update")do { static_assert( mozilla::detail::AssertionConditionType< decltype(updateCount == 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(updateCount == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("updateCount == 1" " (" "SetUpdateCallback({}) should have triggered an update" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2588); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "updateCount == 1" ") (" "SetUpdateCallback({}) should have triggered an update" ")"); do { MOZ_CrashSequence(__null, 2588); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2589 | MOZ_RELEASE_ASSERT(update.IsFinal())do { static_assert( mozilla::detail::AssertionConditionType< decltype(update.IsFinal())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(update.IsFinal()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("update.IsFinal()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2589 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "update.IsFinal()" ")"); do { MOZ_CrashSequence(__null, 2589); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2590 | ||||
| 2591 | #ifdef DEBUG1 | |||
| 2592 | cm.DeregisteredFrom(chunkManagerRegisterer); | |||
| 2593 | #endif // DEBUG | |||
| 2594 | ||||
| 2595 | printf("TestControlledChunkManagerWithLocalLimit done\n"); | |||
| 2596 | } | |||
| 2597 | ||||
| 2598 | #define VERIFY_PCB_START_END_PUSHED_CLEARED_FAILED( \{ ProfileChunkedBuffer::State state = (aProfileChunkedBuffer) .GetState(); do { static_assert( mozilla::detail::AssertionConditionType <decltype(state.mRangeStart == (aStart))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (aStart )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeStart == (aStart)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2599); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (aStart)" ")"); do { MOZ_CrashSequence(__null, 2599); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (aEnd))>::isValid, "invalid assertion condition"); if ( (__builtin_expect(!!(!(!!(state.mRangeEnd == (aEnd)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mRangeEnd == (aEnd)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2599 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (aEnd)" ")"); do { MOZ_CrashSequence(__null, 2599); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (aPushed))>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(state.mPushedBlockCount == (aPushed )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mPushedBlockCount == (aPushed)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2599); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (aPushed)" ")"); do { MOZ_CrashSequence(__null, 2599); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (aCleared))>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(state.mClearedBlockCount == (aCleared )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mClearedBlockCount == (aCleared)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2599); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (aCleared)" ")"); do { MOZ_CrashSequence(__null, 2599); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (aFailed))>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(state.mFailedPutBytes == (aFailed )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mFailedPutBytes == (aFailed)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2599); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (aFailed)" ")"); do { MOZ_CrashSequence(__null, 2599); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); } | |||
| 2599 | aProfileChunkedBuffer, aStart, aEnd, aPushed, aCleared, aFailed){ ProfileChunkedBuffer::State state = (aProfileChunkedBuffer) .GetState(); do { static_assert( mozilla::detail::AssertionConditionType <decltype(state.mRangeStart == (aStart))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (aStart )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeStart == (aStart)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2599); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (aStart)" ")"); do { MOZ_CrashSequence(__null, 2599); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (aEnd))>::isValid, "invalid assertion condition"); if ( (__builtin_expect(!!(!(!!(state.mRangeEnd == (aEnd)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mRangeEnd == (aEnd)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2599 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (aEnd)" ")"); do { MOZ_CrashSequence(__null, 2599); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (aPushed))>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(state.mPushedBlockCount == (aPushed )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mPushedBlockCount == (aPushed)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2599); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (aPushed)" ")"); do { MOZ_CrashSequence(__null, 2599); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (aCleared))>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(state.mClearedBlockCount == (aCleared )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mClearedBlockCount == (aCleared)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2599); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (aCleared)" ")"); do { MOZ_CrashSequence(__null, 2599); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (aFailed))>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(state.mFailedPutBytes == (aFailed )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mFailedPutBytes == (aFailed)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2599); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (aFailed)" ")"); do { MOZ_CrashSequence(__null, 2599); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); } \ | |||
| 2600 | { \ | |||
| 2601 | ProfileChunkedBuffer::State state = (aProfileChunkedBuffer).GetState(); \ | |||
| 2602 | MOZ_RELEASE_ASSERT(state.mRangeStart == (aStart))do { static_assert( mozilla::detail::AssertionConditionType< decltype(state.mRangeStart == (aStart))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (aStart )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeStart == (aStart)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2602); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (aStart)" ")"); do { MOZ_CrashSequence(__null, 2602); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); \ | |||
| 2603 | MOZ_RELEASE_ASSERT(state.mRangeEnd == (aEnd))do { static_assert( mozilla::detail::AssertionConditionType< decltype(state.mRangeEnd == (aEnd))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (aEnd)))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mRangeEnd == (aEnd)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2603 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (aEnd)" ")"); do { MOZ_CrashSequence(__null, 2603); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); \ | |||
| 2604 | MOZ_RELEASE_ASSERT(state.mPushedBlockCount == (aPushed))do { static_assert( mozilla::detail::AssertionConditionType< decltype(state.mPushedBlockCount == (aPushed))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mPushedBlockCount == ( aPushed)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mPushedBlockCount == (aPushed)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2604); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (aPushed)" ")"); do { MOZ_CrashSequence(__null, 2604); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); \ | |||
| 2605 | MOZ_RELEASE_ASSERT(state.mClearedBlockCount == (aCleared))do { static_assert( mozilla::detail::AssertionConditionType< decltype(state.mClearedBlockCount == (aCleared))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(state.mClearedBlockCount == (aCleared)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (aCleared)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2605 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (aCleared)" ")"); do { MOZ_CrashSequence(__null, 2605); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); \ | |||
| 2606 | MOZ_RELEASE_ASSERT(state.mFailedPutBytes == (aFailed))do { static_assert( mozilla::detail::AssertionConditionType< decltype(state.mFailedPutBytes == (aFailed))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mFailedPutBytes == (aFailed )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mFailedPutBytes == (aFailed)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2606); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (aFailed)" ")"); do { MOZ_CrashSequence(__null, 2606); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); \ | |||
| 2607 | } | |||
| 2608 | ||||
| 2609 | static void TestChunkedBuffer() { | |||
| 2610 | printf("TestChunkedBuffer...\n"); | |||
| 2611 | ||||
| 2612 | ProfileBufferBlockIndex blockIndex; | |||
| 2613 | MOZ_RELEASE_ASSERT(!blockIndex)do { static_assert( mozilla::detail::AssertionConditionType< decltype(!blockIndex)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!blockIndex))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!blockIndex", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2613); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!blockIndex" ")"); do { MOZ_CrashSequence(__null, 2613); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2614 | MOZ_RELEASE_ASSERT(blockIndex == nullptr)do { static_assert( mozilla::detail::AssertionConditionType< decltype(blockIndex == nullptr)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(blockIndex == nullptr))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("blockIndex == nullptr" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2614 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "blockIndex == nullptr" ")"); do { MOZ_CrashSequence(__null, 2614); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2615 | ||||
| 2616 | // Create an out-of-session ProfileChunkedBuffer. | |||
| 2617 | ProfileChunkedBuffer cb(ProfileChunkedBuffer::ThreadSafety::WithMutex); | |||
| 2618 | ||||
| 2619 | MOZ_RELEASE_ASSERT(cb.BufferLength().isNothing())do { static_assert( mozilla::detail::AssertionConditionType< decltype(cb.BufferLength().isNothing())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(cb.BufferLength().isNothing( )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("cb.BufferLength().isNothing()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2619); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "cb.BufferLength().isNothing()" ")"); do { MOZ_CrashSequence(__null, 2619); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2620 | ||||
| 2621 | VERIFY_PCB_START_END_PUSHED_CLEARED_FAILED(cb, 1, 1, 0, 0, 0){ ProfileChunkedBuffer::State state = (cb).GetState(); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeStart == (1))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mRangeStart == (1)))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("state.mRangeStart == (1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2621); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1)" ")"); do { MOZ_CrashSequence(__null, 2621); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mRangeEnd == (1)))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("state.mRangeEnd == (1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2621); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1)" ")"); do { MOZ_CrashSequence(__null, 2621); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2621 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 2621); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2621 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 2621); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2621 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 2621); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }; | |||
| 2622 | ||||
| 2623 | int result = 0; | |||
| 2624 | result = cb.ReserveAndPut( | |||
| 2625 | []() { | |||
| 2626 | MOZ_RELEASE_ASSERT(false)do { static_assert( mozilla::detail::AssertionConditionType< decltype(false)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(false))), 0))) { do { } while ( false); MOZ_ReportAssertionFailure("false", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2626); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "false" ")"); do { MOZ_CrashSequence(__null, 2626); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2627 | return 1; | |||
| 2628 | }, | |||
| 2629 | [](Maybe<ProfileBufferEntryWriter>& aEW) { return aEW ? 2 : 3; }); | |||
| 2630 | MOZ_RELEASE_ASSERT(result == 3)do { static_assert( mozilla::detail::AssertionConditionType< decltype(result == 3)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(result == 3))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("result == 3", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2630); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "result == 3" ")"); do { MOZ_CrashSequence(__null, 2630); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2631 | VERIFY_PCB_START_END_PUSHED_CLEARED_FAILED(cb, 1, 1, 0, 0, 0){ ProfileChunkedBuffer::State state = (cb).GetState(); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeStart == (1))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mRangeStart == (1)))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("state.mRangeStart == (1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2631); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1)" ")"); do { MOZ_CrashSequence(__null, 2631); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mRangeEnd == (1)))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("state.mRangeEnd == (1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2631); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1)" ")"); do { MOZ_CrashSequence(__null, 2631); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2631 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 2631); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2631 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 2631); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2631 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 2631); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }; | |||
| 2632 | ||||
| 2633 | result = 0; | |||
| 2634 | result = cb.Put( | |||
| 2635 | 1, [](Maybe<ProfileBufferEntryWriter>& aEW) { return aEW ? 1 : 2; }); | |||
| 2636 | MOZ_RELEASE_ASSERT(result == 2)do { static_assert( mozilla::detail::AssertionConditionType< decltype(result == 2)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(result == 2))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("result == 2", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2636); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "result == 2" ")"); do { MOZ_CrashSequence(__null, 2636); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2637 | VERIFY_PCB_START_END_PUSHED_CLEARED_FAILED(cb, 1, 1, 0, 0, 0){ ProfileChunkedBuffer::State state = (cb).GetState(); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeStart == (1))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mRangeStart == (1)))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("state.mRangeStart == (1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2637); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1)" ")"); do { MOZ_CrashSequence(__null, 2637); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mRangeEnd == (1)))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("state.mRangeEnd == (1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2637); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1)" ")"); do { MOZ_CrashSequence(__null, 2637); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2637 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 2637); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2637 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 2637); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2637 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 2637); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }; | |||
| 2638 | ||||
| 2639 | blockIndex = cb.PutFrom(&result, 1); | |||
| 2640 | MOZ_RELEASE_ASSERT(!blockIndex)do { static_assert( mozilla::detail::AssertionConditionType< decltype(!blockIndex)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!blockIndex))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!blockIndex", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2640); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!blockIndex" ")"); do { MOZ_CrashSequence(__null, 2640); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2641 | VERIFY_PCB_START_END_PUSHED_CLEARED_FAILED(cb, 1, 1, 0, 0, 0){ ProfileChunkedBuffer::State state = (cb).GetState(); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeStart == (1))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mRangeStart == (1)))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("state.mRangeStart == (1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2641); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1)" ")"); do { MOZ_CrashSequence(__null, 2641); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mRangeEnd == (1)))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("state.mRangeEnd == (1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2641); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1)" ")"); do { MOZ_CrashSequence(__null, 2641); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2641 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 2641); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2641 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 2641); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2641 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 2641); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }; | |||
| 2642 | ||||
| 2643 | blockIndex = cb.PutObjects(123, result, "hello"); | |||
| 2644 | MOZ_RELEASE_ASSERT(!blockIndex)do { static_assert( mozilla::detail::AssertionConditionType< decltype(!blockIndex)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!blockIndex))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!blockIndex", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2644); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!blockIndex" ")"); do { MOZ_CrashSequence(__null, 2644); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2645 | VERIFY_PCB_START_END_PUSHED_CLEARED_FAILED(cb, 1, 1, 0, 0, 0){ ProfileChunkedBuffer::State state = (cb).GetState(); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeStart == (1))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mRangeStart == (1)))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("state.mRangeStart == (1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2645); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1)" ")"); do { MOZ_CrashSequence(__null, 2645); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mRangeEnd == (1)))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("state.mRangeEnd == (1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2645); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1)" ")"); do { MOZ_CrashSequence(__null, 2645); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2645 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 2645); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2645 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 2645); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2645 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 2645); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }; | |||
| 2646 | ||||
| 2647 | blockIndex = cb.PutObject(123); | |||
| 2648 | MOZ_RELEASE_ASSERT(!blockIndex)do { static_assert( mozilla::detail::AssertionConditionType< decltype(!blockIndex)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!blockIndex))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!blockIndex", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2648); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!blockIndex" ")"); do { MOZ_CrashSequence(__null, 2648); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2649 | VERIFY_PCB_START_END_PUSHED_CLEARED_FAILED(cb, 1, 1, 0, 0, 0){ ProfileChunkedBuffer::State state = (cb).GetState(); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeStart == (1))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mRangeStart == (1)))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("state.mRangeStart == (1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2649); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1)" ")"); do { MOZ_CrashSequence(__null, 2649); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mRangeEnd == (1)))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("state.mRangeEnd == (1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2649); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1)" ")"); do { MOZ_CrashSequence(__null, 2649); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2649 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 2649); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2649 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 2649); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2649 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 2649); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }; | |||
| 2650 | ||||
| 2651 | auto chunks = cb.GetAllChunks(); | |||
| 2652 | static_assert(std::is_same_v<decltype(chunks), UniquePtr<ProfileBufferChunk>>, | |||
| 2653 | "ProfileChunkedBuffer::GetAllChunks() should return a " | |||
| 2654 | "UniquePtr<ProfileBufferChunk>"); | |||
| 2655 | MOZ_RELEASE_ASSERT(!chunks, "Expected no chunks when out-of-session")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!chunks)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!chunks))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!chunks" " (" "Expected no chunks when out-of-session" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2655); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!chunks" ") (" "Expected no chunks when out-of-session" ")"); do { MOZ_CrashSequence (__null, 2655); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 2656 | ||||
| 2657 | bool ran = false; | |||
| 2658 | result = 0; | |||
| 2659 | result = cb.Read([&](ProfileChunkedBuffer::Reader* aReader) { | |||
| 2660 | ran = true; | |||
| 2661 | MOZ_RELEASE_ASSERT(!aReader)do { static_assert( mozilla::detail::AssertionConditionType< decltype(!aReader)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!aReader))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!aReader", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2661); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!aReader" ")"); do { MOZ_CrashSequence(__null, 2661); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2662 | return 3; | |||
| 2663 | }); | |||
| 2664 | MOZ_RELEASE_ASSERT(ran)do { static_assert( mozilla::detail::AssertionConditionType< decltype(ran)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(ran))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("ran", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2664); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "ran" ")"); do { MOZ_CrashSequence(__null, 2664); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2665 | MOZ_RELEASE_ASSERT(result == 3)do { static_assert( mozilla::detail::AssertionConditionType< decltype(result == 3)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(result == 3))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("result == 3", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2665); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "result == 3" ")"); do { MOZ_CrashSequence(__null, 2665); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2666 | ||||
| 2667 | cb.ReadEach([](ProfileBufferEntryReader&) { MOZ_RELEASE_ASSERT(false)do { static_assert( mozilla::detail::AssertionConditionType< decltype(false)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(false))), 0))) { do { } while ( false); MOZ_ReportAssertionFailure("false", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2667); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "false" ")"); do { MOZ_CrashSequence(__null, 2667); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }); | |||
| 2668 | ||||
| 2669 | result = 0; | |||
| 2670 | result = cb.ReadAt(nullptr, [](Maybe<ProfileBufferEntryReader>&& er) { | |||
| 2671 | MOZ_RELEASE_ASSERT(er.isNothing())do { static_assert( mozilla::detail::AssertionConditionType< decltype(er.isNothing())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(er.isNothing()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("er.isNothing()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2671 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "er.isNothing()" ")"); do { MOZ_CrashSequence(__null, 2671); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2672 | return 4; | |||
| 2673 | }); | |||
| 2674 | MOZ_RELEASE_ASSERT(result == 4)do { static_assert( mozilla::detail::AssertionConditionType< decltype(result == 4)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(result == 4))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("result == 4", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2674); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "result == 4" ")"); do { MOZ_CrashSequence(__null, 2674); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2675 | ||||
| 2676 | // Use ProfileBufferChunkManagerWithLocalLimit, which will give away | |||
| 2677 | // ProfileBufferChunks that can contain 128 bytes, using up to 1KB of memory | |||
| 2678 | // (including usable 128 bytes and headers). | |||
| 2679 | constexpr size_t bufferMaxSize = 1024; | |||
| 2680 | constexpr ProfileChunkedBuffer::Length chunkMinSize = 128; | |||
| 2681 | ProfileBufferChunkManagerWithLocalLimit cm(bufferMaxSize, chunkMinSize); | |||
| 2682 | cb.SetChunkManager(cm); | |||
| 2683 | VERIFY_PCB_START_END_PUSHED_CLEARED_FAILED(cb, 1, 1, 0, 0, 0){ ProfileChunkedBuffer::State state = (cb).GetState(); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeStart == (1))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mRangeStart == (1)))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("state.mRangeStart == (1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2683); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1)" ")"); do { MOZ_CrashSequence(__null, 2683); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mRangeEnd == (1)))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("state.mRangeEnd == (1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2683); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1)" ")"); do { MOZ_CrashSequence(__null, 2683); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2683 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 2683); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2683 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 2683); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2683 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 2683); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }; | |||
| 2684 | ||||
| 2685 | // Let the chunk manager fulfill the initial request for an extra chunk. | |||
| 2686 | cm.FulfillChunkRequests(); | |||
| 2687 | ||||
| 2688 | MOZ_RELEASE_ASSERT(cm.MaxTotalSize() == bufferMaxSize)do { static_assert( mozilla::detail::AssertionConditionType< decltype(cm.MaxTotalSize() == bufferMaxSize)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(cm.MaxTotalSize() == bufferMaxSize ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "cm.MaxTotalSize() == bufferMaxSize", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2688); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "cm.MaxTotalSize() == bufferMaxSize" ")"); do { MOZ_CrashSequence(__null, 2688); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2689 | MOZ_RELEASE_ASSERT(cb.BufferLength().isSome())do { static_assert( mozilla::detail::AssertionConditionType< decltype(cb.BufferLength().isSome())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(cb.BufferLength().isSome())) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("cb.BufferLength().isSome()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2689 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "cb.BufferLength().isSome()" ")"); do { MOZ_CrashSequence(__null, 2689); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2690 | MOZ_RELEASE_ASSERT(*cb.BufferLength() == bufferMaxSize)do { static_assert( mozilla::detail::AssertionConditionType< decltype(*cb.BufferLength() == bufferMaxSize)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(*cb.BufferLength() == bufferMaxSize ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "*cb.BufferLength() == bufferMaxSize", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2690); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "*cb.BufferLength() == bufferMaxSize" ")"); do { MOZ_CrashSequence(__null, 2690); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2691 | VERIFY_PCB_START_END_PUSHED_CLEARED_FAILED(cb, 1, 1, 0, 0, 0){ ProfileChunkedBuffer::State state = (cb).GetState(); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeStart == (1))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mRangeStart == (1)))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("state.mRangeStart == (1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2691); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1)" ")"); do { MOZ_CrashSequence(__null, 2691); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mRangeEnd == (1)))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("state.mRangeEnd == (1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2691); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1)" ")"); do { MOZ_CrashSequence(__null, 2691); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2691 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 2691); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2691 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 2691); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2691 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 2691); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }; | |||
| 2692 | ||||
| 2693 | // Write an int with the main `ReserveAndPut` function. | |||
| 2694 | const int test = 123; | |||
| 2695 | ran = false; | |||
| 2696 | blockIndex = nullptr; | |||
| 2697 | bool success = cb.ReserveAndPut( | |||
| 2698 | []() { return sizeof(test); }, | |||
| 2699 | [&](Maybe<ProfileBufferEntryWriter>& aEW) { | |||
| 2700 | ran = true; | |||
| 2701 | if (!aEW) { | |||
| 2702 | return false; | |||
| 2703 | } | |||
| 2704 | blockIndex = aEW->CurrentBlockIndex(); | |||
| 2705 | MOZ_RELEASE_ASSERT(aEW->RemainingBytes() == sizeof(test))do { static_assert( mozilla::detail::AssertionConditionType< decltype(aEW->RemainingBytes() == sizeof(test))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(aEW->RemainingBytes() == sizeof(test)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("aEW->RemainingBytes() == sizeof(test)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2705 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aEW->RemainingBytes() == sizeof(test)" ")"); do { MOZ_CrashSequence(__null, 2705); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2706 | aEW->WriteObject(test); | |||
| 2707 | MOZ_RELEASE_ASSERT(aEW->RemainingBytes() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(aEW->RemainingBytes() == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(aEW->RemainingBytes() == 0 ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "aEW->RemainingBytes() == 0", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2707); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aEW->RemainingBytes() == 0" ")"); do { MOZ_CrashSequence(__null, 2707); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2708 | return true; | |||
| 2709 | }); | |||
| 2710 | MOZ_RELEASE_ASSERT(ran)do { static_assert( mozilla::detail::AssertionConditionType< decltype(ran)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(ran))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("ran", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2710); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "ran" ")"); do { MOZ_CrashSequence(__null, 2710); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2711 | MOZ_RELEASE_ASSERT(success)do { static_assert( mozilla::detail::AssertionConditionType< decltype(success)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(success))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("success", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2711); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "success" ")"); do { MOZ_CrashSequence(__null, 2711); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2712 | MOZ_RELEASE_ASSERT(blockIndex.ConvertToProfileBufferIndex() == 1)do { static_assert( mozilla::detail::AssertionConditionType< decltype(blockIndex.ConvertToProfileBufferIndex() == 1)>:: isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(blockIndex.ConvertToProfileBufferIndex() == 1))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("blockIndex.ConvertToProfileBufferIndex() == 1" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2712 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "blockIndex.ConvertToProfileBufferIndex() == 1" ")"); do { MOZ_CrashSequence(__null, 2712); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2713 | VERIFY_PCB_START_END_PUSHED_CLEARED_FAILED({ ProfileChunkedBuffer::State state = (cb).GetState(); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeStart == (1))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mRangeStart == (1)))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("state.mRangeStart == (1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2714); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1)" ")"); do { MOZ_CrashSequence(__null, 2714); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1 + ULEB128Size(sizeof(test)) + sizeof(test)))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(state.mRangeEnd == (1 + ULEB128Size(sizeof(test)) + sizeof (test))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (1 + ULEB128Size(sizeof(test)) + sizeof(test))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2714 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1 + ULEB128Size(sizeof(test)) + sizeof(test))" ")"); do { MOZ_CrashSequence(__null, 2714); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (1))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2714 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (1)" ")"); do { MOZ_CrashSequence(__null, 2714); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2714 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 2714); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2714 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 2714); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); } | |||
| 2714 | cb, 1, 1 + ULEB128Size(sizeof(test)) + sizeof(test), 1, 0, 0){ ProfileChunkedBuffer::State state = (cb).GetState(); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeStart == (1))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mRangeStart == (1)))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("state.mRangeStart == (1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2714); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1)" ")"); do { MOZ_CrashSequence(__null, 2714); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1 + ULEB128Size(sizeof(test)) + sizeof(test)))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(state.mRangeEnd == (1 + ULEB128Size(sizeof(test)) + sizeof (test))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (1 + ULEB128Size(sizeof(test)) + sizeof(test))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2714 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1 + ULEB128Size(sizeof(test)) + sizeof(test))" ")"); do { MOZ_CrashSequence(__null, 2714); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (1))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2714 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (1)" ")"); do { MOZ_CrashSequence(__null, 2714); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2714 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 2714); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2714 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 2714); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }; | |||
| 2715 | ||||
| 2716 | ran = false; | |||
| 2717 | result = 0; | |||
| 2718 | result = cb.Read([&](ProfileChunkedBuffer::Reader* aReader) { | |||
| 2719 | ran = true; | |||
| 2720 | MOZ_RELEASE_ASSERT(!!aReader)do { static_assert( mozilla::detail::AssertionConditionType< decltype(!!aReader)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!!aReader))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!!aReader", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2720); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!!aReader" ")"); do { MOZ_CrashSequence(__null, 2720); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2721 | // begin() and end() should be at the range edges (verified above). | |||
| 2722 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(aReader->begin().CurrentBlockIndex().ConvertToProfileBufferIndex () == 1)>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(aReader->begin().CurrentBlockIndex().ConvertToProfileBufferIndex () == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("aReader->begin().CurrentBlockIndex().ConvertToProfileBufferIndex() == 1" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2724 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aReader->begin().CurrentBlockIndex().ConvertToProfileBufferIndex() == 1" ")"); do { MOZ_CrashSequence(__null, 2724); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2723 | aReader->begin().CurrentBlockIndex().ConvertToProfileBufferIndex() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(aReader->begin().CurrentBlockIndex().ConvertToProfileBufferIndex () == 1)>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(aReader->begin().CurrentBlockIndex().ConvertToProfileBufferIndex () == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("aReader->begin().CurrentBlockIndex().ConvertToProfileBufferIndex() == 1" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2724 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aReader->begin().CurrentBlockIndex().ConvertToProfileBufferIndex() == 1" ")"); do { MOZ_CrashSequence(__null, 2724); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2724 | 1)do { static_assert( mozilla::detail::AssertionConditionType< decltype(aReader->begin().CurrentBlockIndex().ConvertToProfileBufferIndex () == 1)>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(aReader->begin().CurrentBlockIndex().ConvertToProfileBufferIndex () == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("aReader->begin().CurrentBlockIndex().ConvertToProfileBufferIndex() == 1" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2724 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aReader->begin().CurrentBlockIndex().ConvertToProfileBufferIndex() == 1" ")"); do { MOZ_CrashSequence(__null, 2724); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2725 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(aReader->end().CurrentBlockIndex().ConvertToProfileBufferIndex () == 0)>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(aReader->end().CurrentBlockIndex().ConvertToProfileBufferIndex () == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("aReader->end().CurrentBlockIndex().ConvertToProfileBufferIndex() == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2726 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aReader->end().CurrentBlockIndex().ConvertToProfileBufferIndex() == 0" ")"); do { MOZ_CrashSequence(__null, 2726); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2726 | aReader->end().CurrentBlockIndex().ConvertToProfileBufferIndex() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(aReader->end().CurrentBlockIndex().ConvertToProfileBufferIndex () == 0)>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(aReader->end().CurrentBlockIndex().ConvertToProfileBufferIndex () == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("aReader->end().CurrentBlockIndex().ConvertToProfileBufferIndex() == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2726 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aReader->end().CurrentBlockIndex().ConvertToProfileBufferIndex() == 0" ")"); do { MOZ_CrashSequence(__null, 2726); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2727 | // Null ProfileBufferBlockIndex clamped to the beginning. | |||
| 2728 | MOZ_RELEASE_ASSERT(aReader->At(nullptr) == aReader->begin())do { static_assert( mozilla::detail::AssertionConditionType< decltype(aReader->At(nullptr) == aReader->begin())>:: isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(aReader->At(nullptr) == aReader->begin()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("aReader->At(nullptr) == aReader->begin()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2728 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aReader->At(nullptr) == aReader->begin()" ")"); do { MOZ_CrashSequence(__null, 2728); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2729 | MOZ_RELEASE_ASSERT(aReader->At(blockIndex) == aReader->begin())do { static_assert( mozilla::detail::AssertionConditionType< decltype(aReader->At(blockIndex) == aReader->begin())> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(aReader->At(blockIndex) == aReader->begin()))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("aReader->At(blockIndex) == aReader->begin()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2729 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aReader->At(blockIndex) == aReader->begin()" ")"); do { MOZ_CrashSequence(__null, 2729); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2730 | // At(begin) same as begin(). | |||
| 2731 | MOZ_RELEASE_ASSERT(aReader->At(aReader->begin().CurrentBlockIndex()) ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(aReader->At(aReader->begin().CurrentBlockIndex ()) == aReader->begin())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(aReader->At(aReader->begin ().CurrentBlockIndex()) == aReader->begin()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("aReader->At(aReader->begin().CurrentBlockIndex()) == aReader->begin()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2732 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aReader->At(aReader->begin().CurrentBlockIndex()) == aReader->begin()" ")"); do { MOZ_CrashSequence(__null, 2732); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2732 | aReader->begin())do { static_assert( mozilla::detail::AssertionConditionType< decltype(aReader->At(aReader->begin().CurrentBlockIndex ()) == aReader->begin())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(aReader->At(aReader->begin ().CurrentBlockIndex()) == aReader->begin()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("aReader->At(aReader->begin().CurrentBlockIndex()) == aReader->begin()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2732 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aReader->At(aReader->begin().CurrentBlockIndex()) == aReader->begin()" ")"); do { MOZ_CrashSequence(__null, 2732); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2733 | // At(past block) same as end(). | |||
| 2734 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(aReader->At(ProfileBufferBlockIndex::CreateFromProfileBufferIndex ( 1 + 1 + sizeof(test))) == aReader->end())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(aReader->At(ProfileBufferBlockIndex ::CreateFromProfileBufferIndex( 1 + 1 + sizeof(test))) == aReader ->end()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("aReader->At(ProfileBufferBlockIndex::CreateFromProfileBufferIndex( 1 + 1 + sizeof(test))) == aReader->end()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2736 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aReader->At(ProfileBufferBlockIndex::CreateFromProfileBufferIndex( 1 + 1 + sizeof(test))) == aReader->end()" ")"); do { MOZ_CrashSequence(__null, 2736); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2735 | aReader->At(ProfileBufferBlockIndex::CreateFromProfileBufferIndex(do { static_assert( mozilla::detail::AssertionConditionType< decltype(aReader->At(ProfileBufferBlockIndex::CreateFromProfileBufferIndex ( 1 + 1 + sizeof(test))) == aReader->end())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(aReader->At(ProfileBufferBlockIndex ::CreateFromProfileBufferIndex( 1 + 1 + sizeof(test))) == aReader ->end()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("aReader->At(ProfileBufferBlockIndex::CreateFromProfileBufferIndex( 1 + 1 + sizeof(test))) == aReader->end()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2736 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aReader->At(ProfileBufferBlockIndex::CreateFromProfileBufferIndex( 1 + 1 + sizeof(test))) == aReader->end()" ")"); do { MOZ_CrashSequence(__null, 2736); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2736 | 1 + 1 + sizeof(test))) == aReader->end())do { static_assert( mozilla::detail::AssertionConditionType< decltype(aReader->At(ProfileBufferBlockIndex::CreateFromProfileBufferIndex ( 1 + 1 + sizeof(test))) == aReader->end())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(aReader->At(ProfileBufferBlockIndex ::CreateFromProfileBufferIndex( 1 + 1 + sizeof(test))) == aReader ->end()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("aReader->At(ProfileBufferBlockIndex::CreateFromProfileBufferIndex( 1 + 1 + sizeof(test))) == aReader->end()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2736 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aReader->At(ProfileBufferBlockIndex::CreateFromProfileBufferIndex( 1 + 1 + sizeof(test))) == aReader->end()" ")"); do { MOZ_CrashSequence(__null, 2736); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2737 | ||||
| 2738 | size_t read = 0; | |||
| 2739 | aReader->ForEach([&](ProfileBufferEntryReader& er) { | |||
| 2740 | ++read; | |||
| 2741 | MOZ_RELEASE_ASSERT(er.RemainingBytes() == sizeof(test))do { static_assert( mozilla::detail::AssertionConditionType< decltype(er.RemainingBytes() == sizeof(test))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(er.RemainingBytes() == sizeof (test)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("er.RemainingBytes() == sizeof(test)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2741); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "er.RemainingBytes() == sizeof(test)" ")"); do { MOZ_CrashSequence(__null, 2741); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2742 | const auto value = er.ReadObject<decltype(test)>(); | |||
| 2743 | MOZ_RELEASE_ASSERT(value == test)do { static_assert( mozilla::detail::AssertionConditionType< decltype(value == test)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(value == test))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("value == test", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2743 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "value == test" ")"); do { MOZ_CrashSequence(__null, 2743); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2744 | MOZ_RELEASE_ASSERT(er.RemainingBytes() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(er.RemainingBytes() == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(er.RemainingBytes() == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("er.RemainingBytes() == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2744 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "er.RemainingBytes() == 0" ")"); do { MOZ_CrashSequence(__null, 2744); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2745 | }); | |||
| 2746 | MOZ_RELEASE_ASSERT(read == 1)do { static_assert( mozilla::detail::AssertionConditionType< decltype(read == 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(read == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("read == 1", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2746); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "read == 1" ")"); do { MOZ_CrashSequence(__null, 2746); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2747 | ||||
| 2748 | read = 0; | |||
| 2749 | for (auto er : *aReader) { | |||
| 2750 | static_assert(std::is_same_v<decltype(er), ProfileBufferEntryReader>, | |||
| 2751 | "ProfileChunkedBuffer::Reader range-for should produce " | |||
| 2752 | "ProfileBufferEntryReader objects"); | |||
| 2753 | ++read; | |||
| 2754 | MOZ_RELEASE_ASSERT(er.RemainingBytes() == sizeof(test))do { static_assert( mozilla::detail::AssertionConditionType< decltype(er.RemainingBytes() == sizeof(test))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(er.RemainingBytes() == sizeof (test)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("er.RemainingBytes() == sizeof(test)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2754); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "er.RemainingBytes() == sizeof(test)" ")"); do { MOZ_CrashSequence(__null, 2754); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2755 | const auto value = er.ReadObject<decltype(test)>(); | |||
| 2756 | MOZ_RELEASE_ASSERT(value == test)do { static_assert( mozilla::detail::AssertionConditionType< decltype(value == test)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(value == test))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("value == test", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2756 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "value == test" ")"); do { MOZ_CrashSequence(__null, 2756); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2757 | MOZ_RELEASE_ASSERT(er.RemainingBytes() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(er.RemainingBytes() == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(er.RemainingBytes() == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("er.RemainingBytes() == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2757 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "er.RemainingBytes() == 0" ")"); do { MOZ_CrashSequence(__null, 2757); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2758 | }; | |||
| 2759 | MOZ_RELEASE_ASSERT(read == 1)do { static_assert( mozilla::detail::AssertionConditionType< decltype(read == 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(read == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("read == 1", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2759); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "read == 1" ")"); do { MOZ_CrashSequence(__null, 2759); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2760 | return 5; | |||
| 2761 | }); | |||
| 2762 | MOZ_RELEASE_ASSERT(ran)do { static_assert( mozilla::detail::AssertionConditionType< decltype(ran)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(ran))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("ran", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2762); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "ran" ")"); do { MOZ_CrashSequence(__null, 2762); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2763 | MOZ_RELEASE_ASSERT(result == 5)do { static_assert( mozilla::detail::AssertionConditionType< decltype(result == 5)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(result == 5))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("result == 5", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2763); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "result == 5" ")"); do { MOZ_CrashSequence(__null, 2763); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2764 | ||||
| 2765 | // Read the int directly from the ProfileChunkedBuffer, without block index. | |||
| 2766 | size_t read = 0; | |||
| 2767 | cb.ReadEach([&](ProfileBufferEntryReader& er) { | |||
| 2768 | ++read; | |||
| 2769 | MOZ_RELEASE_ASSERT(er.RemainingBytes() == sizeof(test))do { static_assert( mozilla::detail::AssertionConditionType< decltype(er.RemainingBytes() == sizeof(test))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(er.RemainingBytes() == sizeof (test)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("er.RemainingBytes() == sizeof(test)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2769); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "er.RemainingBytes() == sizeof(test)" ")"); do { MOZ_CrashSequence(__null, 2769); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2770 | const auto value = er.ReadObject<decltype(test)>(); | |||
| 2771 | MOZ_RELEASE_ASSERT(value == test)do { static_assert( mozilla::detail::AssertionConditionType< decltype(value == test)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(value == test))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("value == test", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2771 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "value == test" ")"); do { MOZ_CrashSequence(__null, 2771); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2772 | MOZ_RELEASE_ASSERT(er.RemainingBytes() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(er.RemainingBytes() == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(er.RemainingBytes() == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("er.RemainingBytes() == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2772 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "er.RemainingBytes() == 0" ")"); do { MOZ_CrashSequence(__null, 2772); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2773 | }); | |||
| 2774 | MOZ_RELEASE_ASSERT(read == 1)do { static_assert( mozilla::detail::AssertionConditionType< decltype(read == 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(read == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("read == 1", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2774); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "read == 1" ")"); do { MOZ_CrashSequence(__null, 2774); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2775 | ||||
| 2776 | // Read the int directly from the ProfileChunkedBuffer, with block index. | |||
| 2777 | read = 0; | |||
| 2778 | blockIndex = nullptr; | |||
| 2779 | cb.ReadEach( | |||
| 2780 | [&](ProfileBufferEntryReader& er, ProfileBufferBlockIndex aBlockIndex) { | |||
| 2781 | ++read; | |||
| 2782 | MOZ_RELEASE_ASSERT(!!aBlockIndex)do { static_assert( mozilla::detail::AssertionConditionType< decltype(!!aBlockIndex)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!!aBlockIndex))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!!aBlockIndex", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2782 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!!aBlockIndex" ")"); do { MOZ_CrashSequence(__null, 2782); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2783 | MOZ_RELEASE_ASSERT(!blockIndex)do { static_assert( mozilla::detail::AssertionConditionType< decltype(!blockIndex)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!blockIndex))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!blockIndex", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2783); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!blockIndex" ")"); do { MOZ_CrashSequence(__null, 2783); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2784 | blockIndex = aBlockIndex; | |||
| 2785 | MOZ_RELEASE_ASSERT(er.RemainingBytes() == sizeof(test))do { static_assert( mozilla::detail::AssertionConditionType< decltype(er.RemainingBytes() == sizeof(test))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(er.RemainingBytes() == sizeof (test)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("er.RemainingBytes() == sizeof(test)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2785); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "er.RemainingBytes() == sizeof(test)" ")"); do { MOZ_CrashSequence(__null, 2785); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2786 | const auto value = er.ReadObject<decltype(test)>(); | |||
| 2787 | MOZ_RELEASE_ASSERT(value == test)do { static_assert( mozilla::detail::AssertionConditionType< decltype(value == test)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(value == test))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("value == test", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2787 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "value == test" ")"); do { MOZ_CrashSequence(__null, 2787); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2788 | MOZ_RELEASE_ASSERT(er.RemainingBytes() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(er.RemainingBytes() == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(er.RemainingBytes() == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("er.RemainingBytes() == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2788 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "er.RemainingBytes() == 0" ")"); do { MOZ_CrashSequence(__null, 2788); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2789 | }); | |||
| 2790 | MOZ_RELEASE_ASSERT(read == 1)do { static_assert( mozilla::detail::AssertionConditionType< decltype(read == 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(read == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("read == 1", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2790); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "read == 1" ")"); do { MOZ_CrashSequence(__null, 2790); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2791 | MOZ_RELEASE_ASSERT(!!blockIndex)do { static_assert( mozilla::detail::AssertionConditionType< decltype(!!blockIndex)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!!blockIndex))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!!blockIndex", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2791); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!!blockIndex" ")"); do { MOZ_CrashSequence(__null, 2791); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2792 | MOZ_RELEASE_ASSERT(blockIndex != nullptr)do { static_assert( mozilla::detail::AssertionConditionType< decltype(blockIndex != nullptr)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(blockIndex != nullptr))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("blockIndex != nullptr" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2792 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "blockIndex != nullptr" ")"); do { MOZ_CrashSequence(__null, 2792); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2793 | ||||
| 2794 | // Read the int from its block index. | |||
| 2795 | read = 0; | |||
| 2796 | result = 0; | |||
| 2797 | result = cb.ReadAt(blockIndex, [&](Maybe<ProfileBufferEntryReader>&& er) { | |||
| 2798 | ++read; | |||
| 2799 | MOZ_RELEASE_ASSERT(er.isSome())do { static_assert( mozilla::detail::AssertionConditionType< decltype(er.isSome())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(er.isSome()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("er.isSome()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2799); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "er.isSome()" ")"); do { MOZ_CrashSequence(__null, 2799); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2800 | MOZ_RELEASE_ASSERT(er->CurrentBlockIndex() == blockIndex)do { static_assert( mozilla::detail::AssertionConditionType< decltype(er->CurrentBlockIndex() == blockIndex)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(er->CurrentBlockIndex() == blockIndex))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("er->CurrentBlockIndex() == blockIndex" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2800 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "er->CurrentBlockIndex() == blockIndex" ")"); do { MOZ_CrashSequence(__null, 2800); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2801 | MOZ_RELEASE_ASSERT(!er->NextBlockIndex())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!er->NextBlockIndex())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!er->NextBlockIndex()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!er->NextBlockIndex()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2801 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!er->NextBlockIndex()" ")"); do { MOZ_CrashSequence(__null, 2801); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2802 | MOZ_RELEASE_ASSERT(er->RemainingBytes() == sizeof(test))do { static_assert( mozilla::detail::AssertionConditionType< decltype(er->RemainingBytes() == sizeof(test))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(er->RemainingBytes() == sizeof(test)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("er->RemainingBytes() == sizeof(test)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2802 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "er->RemainingBytes() == sizeof(test)" ")"); do { MOZ_CrashSequence(__null, 2802); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2803 | const auto value = er->ReadObject<decltype(test)>(); | |||
| 2804 | MOZ_RELEASE_ASSERT(value == test)do { static_assert( mozilla::detail::AssertionConditionType< decltype(value == test)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(value == test))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("value == test", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2804 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "value == test" ")"); do { MOZ_CrashSequence(__null, 2804); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2805 | MOZ_RELEASE_ASSERT(er->RemainingBytes() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(er->RemainingBytes() == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(er->RemainingBytes() == 0 ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "er->RemainingBytes() == 0", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2805); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "er->RemainingBytes() == 0" ")"); do { MOZ_CrashSequence(__null, 2805); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2806 | return 6; | |||
| 2807 | }); | |||
| 2808 | MOZ_RELEASE_ASSERT(result == 6)do { static_assert( mozilla::detail::AssertionConditionType< decltype(result == 6)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(result == 6))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("result == 6", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2808); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "result == 6" ")"); do { MOZ_CrashSequence(__null, 2808); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2809 | MOZ_RELEASE_ASSERT(read == 1)do { static_assert( mozilla::detail::AssertionConditionType< decltype(read == 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(read == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("read == 1", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2809); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "read == 1" ")"); do { MOZ_CrashSequence(__null, 2809); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2810 | ||||
| 2811 | MOZ_RELEASE_ASSERT(!cb.IsIndexInCurrentChunk(ProfileBufferIndex{}))do { static_assert( mozilla::detail::AssertionConditionType< decltype(!cb.IsIndexInCurrentChunk(ProfileBufferIndex{}))> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(!cb.IsIndexInCurrentChunk(ProfileBufferIndex{})))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("!cb.IsIndexInCurrentChunk(ProfileBufferIndex{})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2811 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!cb.IsIndexInCurrentChunk(ProfileBufferIndex{})" ")"); do { MOZ_CrashSequence(__null, 2811); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2812 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(cb.IsIndexInCurrentChunk(blockIndex.ConvertToProfileBufferIndex ()))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(cb.IsIndexInCurrentChunk(blockIndex.ConvertToProfileBufferIndex ())))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("cb.IsIndexInCurrentChunk(blockIndex.ConvertToProfileBufferIndex())" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2813 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "cb.IsIndexInCurrentChunk(blockIndex.ConvertToProfileBufferIndex())" ")"); do { MOZ_CrashSequence(__null, 2813); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2813 | cb.IsIndexInCurrentChunk(blockIndex.ConvertToProfileBufferIndex()))do { static_assert( mozilla::detail::AssertionConditionType< decltype(cb.IsIndexInCurrentChunk(blockIndex.ConvertToProfileBufferIndex ()))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(cb.IsIndexInCurrentChunk(blockIndex.ConvertToProfileBufferIndex ())))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("cb.IsIndexInCurrentChunk(blockIndex.ConvertToProfileBufferIndex())" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2813 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "cb.IsIndexInCurrentChunk(blockIndex.ConvertToProfileBufferIndex())" ")"); do { MOZ_CrashSequence(__null, 2813); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2814 | MOZ_RELEASE_ASSERT(cb.IsIndexInCurrentChunk(cb.GetState().mRangeEnd - 1))do { static_assert( mozilla::detail::AssertionConditionType< decltype(cb.IsIndexInCurrentChunk(cb.GetState().mRangeEnd - 1 ))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(cb.IsIndexInCurrentChunk(cb.GetState().mRangeEnd - 1 )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("cb.IsIndexInCurrentChunk(cb.GetState().mRangeEnd - 1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2814); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "cb.IsIndexInCurrentChunk(cb.GetState().mRangeEnd - 1)" ")"); do { MOZ_CrashSequence(__null, 2814); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2815 | MOZ_RELEASE_ASSERT(!cb.IsIndexInCurrentChunk(cb.GetState().mRangeEnd))do { static_assert( mozilla::detail::AssertionConditionType< decltype(!cb.IsIndexInCurrentChunk(cb.GetState().mRangeEnd))> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(!cb.IsIndexInCurrentChunk(cb.GetState().mRangeEnd))) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!cb.IsIndexInCurrentChunk(cb.GetState().mRangeEnd)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2815 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!cb.IsIndexInCurrentChunk(cb.GetState().mRangeEnd)" ")"); do { MOZ_CrashSequence(__null, 2815); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2816 | ||||
| 2817 | // No changes after reads. | |||
| 2818 | VERIFY_PCB_START_END_PUSHED_CLEARED_FAILED({ ProfileChunkedBuffer::State state = (cb).GetState(); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeStart == (1))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mRangeStart == (1)))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("state.mRangeStart == (1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2819); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1)" ")"); do { MOZ_CrashSequence(__null, 2819); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1 + ULEB128Size(sizeof(test)) + sizeof(test)))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(state.mRangeEnd == (1 + ULEB128Size(sizeof(test)) + sizeof (test))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (1 + ULEB128Size(sizeof(test)) + sizeof(test))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2819 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1 + ULEB128Size(sizeof(test)) + sizeof(test))" ")"); do { MOZ_CrashSequence(__null, 2819); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (1))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2819 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (1)" ")"); do { MOZ_CrashSequence(__null, 2819); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2819 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 2819); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2819 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 2819); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); } | |||
| 2819 | cb, 1, 1 + ULEB128Size(sizeof(test)) + sizeof(test), 1, 0, 0){ ProfileChunkedBuffer::State state = (cb).GetState(); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeStart == (1))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mRangeStart == (1)))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("state.mRangeStart == (1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2819); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1)" ")"); do { MOZ_CrashSequence(__null, 2819); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1 + ULEB128Size(sizeof(test)) + sizeof(test)))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(state.mRangeEnd == (1 + ULEB128Size(sizeof(test)) + sizeof (test))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (1 + ULEB128Size(sizeof(test)) + sizeof(test))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2819 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1 + ULEB128Size(sizeof(test)) + sizeof(test))" ")"); do { MOZ_CrashSequence(__null, 2819); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (1))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2819 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (1)" ")"); do { MOZ_CrashSequence(__null, 2819); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2819 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 2819); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2819 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 2819); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }; | |||
| 2820 | ||||
| 2821 | // Steal the underlying ProfileBufferChunks from the ProfileChunkedBuffer. | |||
| 2822 | chunks = cb.GetAllChunks(); | |||
| 2823 | MOZ_RELEASE_ASSERT(!!chunks, "Expected at least one chunk")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!!chunks)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!!chunks))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!!chunks" " (" "Expected at least one chunk" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2823); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!!chunks" ") (" "Expected at least one chunk" ")"); do { MOZ_CrashSequence (__null, 2823); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 2824 | MOZ_RELEASE_ASSERT(!!chunks->GetNext(), "Expected two chunks")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!!chunks->GetNext())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!!chunks->GetNext()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("!!chunks->GetNext()" " (" "Expected two chunks" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2824); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!!chunks->GetNext()" ") (" "Expected two chunks" ")"); do { MOZ_CrashSequence(__null , 2824); __attribute__((nomerge)) ::abort(); } while (false); } } while (false); | |||
| 2825 | MOZ_RELEASE_ASSERT(!chunks->GetNext()->GetNext(), "Expected only two chunks")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!chunks->GetNext()->GetNext())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!chunks->GetNext()->GetNext ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!chunks->GetNext()->GetNext()" " (" "Expected only two chunks" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2825); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!chunks->GetNext()->GetNext()" ") (" "Expected only two chunks" ")"); do { MOZ_CrashSequence (__null, 2825); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 2826 | const ProfileChunkedBuffer::Length chunkActualSize = chunks->BufferBytes(); | |||
| 2827 | MOZ_RELEASE_ASSERT(chunkActualSize >= chunkMinSize)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunkActualSize >= chunkMinSize)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(chunkActualSize >= chunkMinSize ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "chunkActualSize >= chunkMinSize", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2827); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunkActualSize >= chunkMinSize" ")"); do { MOZ_CrashSequence(__null, 2827); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2828 | MOZ_RELEASE_ASSERT(chunks->RangeStart() == 1)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunks->RangeStart() == 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(chunks->RangeStart() == 1 ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "chunks->RangeStart() == 1", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2828); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunks->RangeStart() == 1" ")"); do { MOZ_CrashSequence(__null, 2828); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2829 | MOZ_RELEASE_ASSERT(chunks->OffsetFirstBlock() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunks->OffsetFirstBlock() == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(chunks->OffsetFirstBlock( ) == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("chunks->OffsetFirstBlock() == 0", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2829); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunks->OffsetFirstBlock() == 0" ")"); do { MOZ_CrashSequence(__null, 2829); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2830 | MOZ_RELEASE_ASSERT(chunks->OffsetPastLastBlock() == 1 + sizeof(test))do { static_assert( mozilla::detail::AssertionConditionType< decltype(chunks->OffsetPastLastBlock() == 1 + sizeof(test) )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(chunks->OffsetPastLastBlock() == 1 + sizeof(test) ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "chunks->OffsetPastLastBlock() == 1 + sizeof(test)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2830); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "chunks->OffsetPastLastBlock() == 1 + sizeof(test)" ")"); do { MOZ_CrashSequence(__null, 2830); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2831 | ||||
| 2832 | // GetAllChunks() should have advanced the index one full chunk forward. | |||
| 2833 | VERIFY_PCB_START_END_PUSHED_CLEARED_FAILED(cb, 1 + chunkActualSize,{ ProfileChunkedBuffer::State state = (cb).GetState(); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeStart == (1 + chunkActualSize))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (1 + chunkActualSize )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeStart == (1 + chunkActualSize)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2834); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1 + chunkActualSize)" ")"); do { MOZ_CrashSequence(__null, 2834); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1 + chunkActualSize))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (1 + chunkActualSize )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (1 + chunkActualSize)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2834); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1 + chunkActualSize)" ")"); do { MOZ_CrashSequence(__null, 2834); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (1))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2834 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (1)" ")"); do { MOZ_CrashSequence(__null, 2834); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2834 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 2834); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2834 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 2834); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); } | |||
| 2834 | 1 + chunkActualSize, 1, 0, 0){ ProfileChunkedBuffer::State state = (cb).GetState(); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeStart == (1 + chunkActualSize))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (1 + chunkActualSize )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeStart == (1 + chunkActualSize)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2834); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1 + chunkActualSize)" ")"); do { MOZ_CrashSequence(__null, 2834); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1 + chunkActualSize))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (1 + chunkActualSize )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (1 + chunkActualSize)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2834); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1 + chunkActualSize)" ")"); do { MOZ_CrashSequence(__null, 2834); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (1))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2834 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (1)" ")"); do { MOZ_CrashSequence(__null, 2834); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2834 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 2834); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2834 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 2834); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }; | |||
| 2835 | ||||
| 2836 | // Nothing more to read from the now-empty ProfileChunkedBuffer. | |||
| 2837 | cb.ReadEach([](ProfileBufferEntryReader&) { MOZ_RELEASE_ASSERT(false)do { static_assert( mozilla::detail::AssertionConditionType< decltype(false)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(false))), 0))) { do { } while ( false); MOZ_ReportAssertionFailure("false", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2837); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "false" ")"); do { MOZ_CrashSequence(__null, 2837); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }); | |||
| 2838 | cb.ReadEach([](ProfileBufferEntryReader&, ProfileBufferBlockIndex) { | |||
| 2839 | MOZ_RELEASE_ASSERT(false)do { static_assert( mozilla::detail::AssertionConditionType< decltype(false)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(false))), 0))) { do { } while ( false); MOZ_ReportAssertionFailure("false", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2839); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "false" ")"); do { MOZ_CrashSequence(__null, 2839); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2840 | }); | |||
| 2841 | result = 0; | |||
| 2842 | result = cb.ReadAt(nullptr, [](Maybe<ProfileBufferEntryReader>&& er) { | |||
| 2843 | MOZ_RELEASE_ASSERT(er.isNothing())do { static_assert( mozilla::detail::AssertionConditionType< decltype(er.isNothing())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(er.isNothing()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("er.isNothing()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2843 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "er.isNothing()" ")"); do { MOZ_CrashSequence(__null, 2843); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2844 | return 7; | |||
| 2845 | }); | |||
| 2846 | MOZ_RELEASE_ASSERT(result == 7)do { static_assert( mozilla::detail::AssertionConditionType< decltype(result == 7)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(result == 7))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("result == 7", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2846); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "result == 7" ")"); do { MOZ_CrashSequence(__null, 2846); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2847 | ||||
| 2848 | // Read the int from the stolen chunks. | |||
| 2849 | read = 0; | |||
| 2850 | ProfileChunkedBuffer::ReadEach( | |||
| 2851 | chunks.get(), nullptr, | |||
| 2852 | [&](ProfileBufferEntryReader& er, ProfileBufferBlockIndex aBlockIndex) { | |||
| 2853 | ++read; | |||
| 2854 | MOZ_RELEASE_ASSERT(aBlockIndex == blockIndex)do { static_assert( mozilla::detail::AssertionConditionType< decltype(aBlockIndex == blockIndex)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(aBlockIndex == blockIndex))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("aBlockIndex == blockIndex" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2854 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aBlockIndex == blockIndex" ")"); do { MOZ_CrashSequence(__null, 2854); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2855 | MOZ_RELEASE_ASSERT(er.RemainingBytes() == sizeof(test))do { static_assert( mozilla::detail::AssertionConditionType< decltype(er.RemainingBytes() == sizeof(test))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(er.RemainingBytes() == sizeof (test)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("er.RemainingBytes() == sizeof(test)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2855); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "er.RemainingBytes() == sizeof(test)" ")"); do { MOZ_CrashSequence(__null, 2855); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2856 | const auto value = er.ReadObject<decltype(test)>(); | |||
| 2857 | MOZ_RELEASE_ASSERT(value == test)do { static_assert( mozilla::detail::AssertionConditionType< decltype(value == test)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(value == test))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("value == test", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2857 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "value == test" ")"); do { MOZ_CrashSequence(__null, 2857); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2858 | MOZ_RELEASE_ASSERT(er.RemainingBytes() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(er.RemainingBytes() == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(er.RemainingBytes() == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("er.RemainingBytes() == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2858 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "er.RemainingBytes() == 0" ")"); do { MOZ_CrashSequence(__null, 2858); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2859 | }); | |||
| 2860 | MOZ_RELEASE_ASSERT(read == 1)do { static_assert( mozilla::detail::AssertionConditionType< decltype(read == 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(read == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("read == 1", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2860); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "read == 1" ")"); do { MOZ_CrashSequence(__null, 2860); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2861 | ||||
| 2862 | // No changes after reads. | |||
| 2863 | VERIFY_PCB_START_END_PUSHED_CLEARED_FAILED(cb, 1 + chunkActualSize,{ ProfileChunkedBuffer::State state = (cb).GetState(); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeStart == (1 + chunkActualSize))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (1 + chunkActualSize )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeStart == (1 + chunkActualSize)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2864); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1 + chunkActualSize)" ")"); do { MOZ_CrashSequence(__null, 2864); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1 + chunkActualSize))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (1 + chunkActualSize )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (1 + chunkActualSize)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2864); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1 + chunkActualSize)" ")"); do { MOZ_CrashSequence(__null, 2864); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (1))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2864 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (1)" ")"); do { MOZ_CrashSequence(__null, 2864); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2864 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 2864); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2864 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 2864); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); } | |||
| 2864 | 1 + chunkActualSize, 1, 0, 0){ ProfileChunkedBuffer::State state = (cb).GetState(); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeStart == (1 + chunkActualSize))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (1 + chunkActualSize )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeStart == (1 + chunkActualSize)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2864); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1 + chunkActualSize)" ")"); do { MOZ_CrashSequence(__null, 2864); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1 + chunkActualSize))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (1 + chunkActualSize )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (1 + chunkActualSize)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2864); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1 + chunkActualSize)" ")"); do { MOZ_CrashSequence(__null, 2864); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (1))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2864 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (1)" ")"); do { MOZ_CrashSequence(__null, 2864); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2864 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 2864); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2864 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 2864); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }; | |||
| 2865 | ||||
| 2866 | // Write lots of numbers (by memcpy), which should trigger Chunk destructions. | |||
| 2867 | ProfileBufferBlockIndex firstBlockIndex; | |||
| 2868 | MOZ_RELEASE_ASSERT(!firstBlockIndex)do { static_assert( mozilla::detail::AssertionConditionType< decltype(!firstBlockIndex)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!firstBlockIndex))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!firstBlockIndex" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2868 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!firstBlockIndex" ")"); do { MOZ_CrashSequence(__null, 2868); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2869 | ProfileBufferBlockIndex lastBlockIndex; | |||
| 2870 | MOZ_RELEASE_ASSERT(!lastBlockIndex)do { static_assert( mozilla::detail::AssertionConditionType< decltype(!lastBlockIndex)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!lastBlockIndex))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!lastBlockIndex" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2870 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!lastBlockIndex" ")"); do { MOZ_CrashSequence(__null, 2870); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2871 | const size_t lots = 2 * bufferMaxSize / (1 + sizeof(int)); | |||
| 2872 | for (size_t i = 1; i < lots; ++i) { | |||
| 2873 | ProfileBufferBlockIndex blockIndex = cb.PutFrom(&i, sizeof(i)); | |||
| 2874 | MOZ_RELEASE_ASSERT(!!blockIndex)do { static_assert( mozilla::detail::AssertionConditionType< decltype(!!blockIndex)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!!blockIndex))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!!blockIndex", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2874); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!!blockIndex" ")"); do { MOZ_CrashSequence(__null, 2874); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2875 | MOZ_RELEASE_ASSERT(blockIndex > firstBlockIndex)do { static_assert( mozilla::detail::AssertionConditionType< decltype(blockIndex > firstBlockIndex)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(blockIndex > firstBlockIndex ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "blockIndex > firstBlockIndex", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2875); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "blockIndex > firstBlockIndex" ")"); do { MOZ_CrashSequence(__null, 2875); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2876 | if (!firstBlockIndex) { | |||
| 2877 | firstBlockIndex = blockIndex; | |||
| 2878 | } | |||
| 2879 | MOZ_RELEASE_ASSERT(blockIndex > lastBlockIndex)do { static_assert( mozilla::detail::AssertionConditionType< decltype(blockIndex > lastBlockIndex)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(blockIndex > lastBlockIndex ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "blockIndex > lastBlockIndex", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2879); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "blockIndex > lastBlockIndex" ")"); do { MOZ_CrashSequence(__null, 2879); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2880 | lastBlockIndex = blockIndex; | |||
| 2881 | } | |||
| 2882 | ||||
| 2883 | ProfileChunkedBuffer::State stateAfterPuts = cb.GetState(); | |||
| 2884 | ProfileBufferIndex startAfterPuts = stateAfterPuts.mRangeStart; | |||
| 2885 | MOZ_RELEASE_ASSERT(startAfterPuts > 1 + chunkActualSize)do { static_assert( mozilla::detail::AssertionConditionType< decltype(startAfterPuts > 1 + chunkActualSize)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(startAfterPuts > 1 + chunkActualSize))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("startAfterPuts > 1 + chunkActualSize" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2885 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "startAfterPuts > 1 + chunkActualSize" ")"); do { MOZ_CrashSequence(__null, 2885); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2886 | ProfileBufferIndex endAfterPuts = stateAfterPuts.mRangeEnd; | |||
| 2887 | MOZ_RELEASE_ASSERT(endAfterPuts > startAfterPuts)do { static_assert( mozilla::detail::AssertionConditionType< decltype(endAfterPuts > startAfterPuts)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(endAfterPuts > startAfterPuts ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "endAfterPuts > startAfterPuts", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2887); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "endAfterPuts > startAfterPuts" ")"); do { MOZ_CrashSequence(__null, 2887); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2888 | uint64_t pushedAfterPuts = stateAfterPuts.mPushedBlockCount; | |||
| 2889 | MOZ_RELEASE_ASSERT(pushedAfterPuts > 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(pushedAfterPuts > 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(pushedAfterPuts > 0))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("pushedAfterPuts > 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2889 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "pushedAfterPuts > 0" ")"); do { MOZ_CrashSequence(__null, 2889); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2890 | uint64_t clearedAfterPuts = stateAfterPuts.mClearedBlockCount; | |||
| 2891 | MOZ_RELEASE_ASSERT(clearedAfterPuts > 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(clearedAfterPuts > 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(clearedAfterPuts > 0))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("clearedAfterPuts > 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2891 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "clearedAfterPuts > 0" ")"); do { MOZ_CrashSequence(__null, 2891); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2892 | MOZ_RELEASE_ASSERT(stateAfterPuts.mFailedPutBytes == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(stateAfterPuts.mFailedPutBytes == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(stateAfterPuts.mFailedPutBytes == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("stateAfterPuts.mFailedPutBytes == 0", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2892); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "stateAfterPuts.mFailedPutBytes == 0" ")"); do { MOZ_CrashSequence(__null, 2892); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2893 | MOZ_RELEASE_ASSERT(!cb.IsIndexInCurrentChunk(ProfileBufferIndex{}))do { static_assert( mozilla::detail::AssertionConditionType< decltype(!cb.IsIndexInCurrentChunk(ProfileBufferIndex{}))> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(!cb.IsIndexInCurrentChunk(ProfileBufferIndex{})))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("!cb.IsIndexInCurrentChunk(ProfileBufferIndex{})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2893 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!cb.IsIndexInCurrentChunk(ProfileBufferIndex{})" ")"); do { MOZ_CrashSequence(__null, 2893); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2894 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(!cb.IsIndexInCurrentChunk(blockIndex.ConvertToProfileBufferIndex ()))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(!cb.IsIndexInCurrentChunk(blockIndex.ConvertToProfileBufferIndex ())))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!cb.IsIndexInCurrentChunk(blockIndex.ConvertToProfileBufferIndex())" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2895 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!cb.IsIndexInCurrentChunk(blockIndex.ConvertToProfileBufferIndex())" ")"); do { MOZ_CrashSequence(__null, 2895); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2895 | !cb.IsIndexInCurrentChunk(blockIndex.ConvertToProfileBufferIndex()))do { static_assert( mozilla::detail::AssertionConditionType< decltype(!cb.IsIndexInCurrentChunk(blockIndex.ConvertToProfileBufferIndex ()))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(!cb.IsIndexInCurrentChunk(blockIndex.ConvertToProfileBufferIndex ())))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!cb.IsIndexInCurrentChunk(blockIndex.ConvertToProfileBufferIndex())" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2895 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!cb.IsIndexInCurrentChunk(blockIndex.ConvertToProfileBufferIndex())" ")"); do { MOZ_CrashSequence(__null, 2895); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2896 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(!cb.IsIndexInCurrentChunk(firstBlockIndex.ConvertToProfileBufferIndex ()))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(!cb.IsIndexInCurrentChunk(firstBlockIndex.ConvertToProfileBufferIndex ())))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!cb.IsIndexInCurrentChunk(firstBlockIndex.ConvertToProfileBufferIndex())" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2897 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!cb.IsIndexInCurrentChunk(firstBlockIndex.ConvertToProfileBufferIndex())" ")"); do { MOZ_CrashSequence(__null, 2897); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2897 | !cb.IsIndexInCurrentChunk(firstBlockIndex.ConvertToProfileBufferIndex()))do { static_assert( mozilla::detail::AssertionConditionType< decltype(!cb.IsIndexInCurrentChunk(firstBlockIndex.ConvertToProfileBufferIndex ()))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(!cb.IsIndexInCurrentChunk(firstBlockIndex.ConvertToProfileBufferIndex ())))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!cb.IsIndexInCurrentChunk(firstBlockIndex.ConvertToProfileBufferIndex())" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2897 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!cb.IsIndexInCurrentChunk(firstBlockIndex.ConvertToProfileBufferIndex())" ")"); do { MOZ_CrashSequence(__null, 2897); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2898 | ||||
| 2899 | // Read extant numbers, which should at least follow each other. | |||
| 2900 | read = 0; | |||
| 2901 | size_t i = 0; | |||
| 2902 | cb.ReadEach( | |||
| 2903 | [&](ProfileBufferEntryReader& er, ProfileBufferBlockIndex aBlockIndex) { | |||
| 2904 | ++read; | |||
| 2905 | MOZ_RELEASE_ASSERT(!!aBlockIndex)do { static_assert( mozilla::detail::AssertionConditionType< decltype(!!aBlockIndex)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!!aBlockIndex))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!!aBlockIndex", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2905 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!!aBlockIndex" ")"); do { MOZ_CrashSequence(__null, 2905); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2906 | MOZ_RELEASE_ASSERT(aBlockIndex > firstBlockIndex)do { static_assert( mozilla::detail::AssertionConditionType< decltype(aBlockIndex > firstBlockIndex)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(aBlockIndex > firstBlockIndex ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "aBlockIndex > firstBlockIndex", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2906); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aBlockIndex > firstBlockIndex" ")"); do { MOZ_CrashSequence(__null, 2906); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2907 | MOZ_RELEASE_ASSERT(aBlockIndex <= lastBlockIndex)do { static_assert( mozilla::detail::AssertionConditionType< decltype(aBlockIndex <= lastBlockIndex)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(aBlockIndex <= lastBlockIndex ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "aBlockIndex <= lastBlockIndex", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2907); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aBlockIndex <= lastBlockIndex" ")"); do { MOZ_CrashSequence(__null, 2907); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2908 | MOZ_RELEASE_ASSERT(er.RemainingBytes() == sizeof(size_t))do { static_assert( mozilla::detail::AssertionConditionType< decltype(er.RemainingBytes() == sizeof(size_t))>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(! !(er.RemainingBytes() == sizeof(size_t)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("er.RemainingBytes() == sizeof(size_t)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2908 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "er.RemainingBytes() == sizeof(size_t)" ")"); do { MOZ_CrashSequence(__null, 2908); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2909 | const auto value = er.ReadObject<size_t>(); | |||
| 2910 | if (i == 0) { | |||
| 2911 | i = value; | |||
| 2912 | } else { | |||
| 2913 | MOZ_RELEASE_ASSERT(value == ++i)do { static_assert( mozilla::detail::AssertionConditionType< decltype(value == ++i)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(value == ++i))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("value == ++i", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2913); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "value == ++i" ")"); do { MOZ_CrashSequence(__null, 2913); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2914 | } | |||
| 2915 | MOZ_RELEASE_ASSERT(er.RemainingBytes() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(er.RemainingBytes() == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(er.RemainingBytes() == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("er.RemainingBytes() == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2915 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "er.RemainingBytes() == 0" ")"); do { MOZ_CrashSequence(__null, 2915); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2916 | }); | |||
| 2917 | MOZ_RELEASE_ASSERT(read != 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(read != 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(read != 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("read != 0", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2917); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "read != 0" ")"); do { MOZ_CrashSequence(__null, 2917); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2918 | MOZ_RELEASE_ASSERT(read < lots)do { static_assert( mozilla::detail::AssertionConditionType< decltype(read < lots)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(read < lots))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("read < lots" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2918 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "read < lots" ")"); do { MOZ_CrashSequence(__null, 2918); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2919 | ||||
| 2920 | // Read first extant number. | |||
| 2921 | read = 0; | |||
| 2922 | i = 0; | |||
| 2923 | blockIndex = nullptr; | |||
| 2924 | success = | |||
| 2925 | cb.ReadAt(firstBlockIndex, [&](Maybe<ProfileBufferEntryReader>&& er) { | |||
| 2926 | MOZ_ASSERT(er.isSome())do { static_assert( mozilla::detail::AssertionConditionType< decltype(er.isSome())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(er.isSome()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("er.isSome()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2926); AnnotateMozCrashReason("MOZ_ASSERT" "(" "er.isSome()" ")"); do { MOZ_CrashSequence(__null, 2926); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2927 | ++read; | |||
| 2928 | MOZ_RELEASE_ASSERT(er->CurrentBlockIndex() > firstBlockIndex)do { static_assert( mozilla::detail::AssertionConditionType< decltype(er->CurrentBlockIndex() > firstBlockIndex)> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(er->CurrentBlockIndex() > firstBlockIndex))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("er->CurrentBlockIndex() > firstBlockIndex" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2928 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "er->CurrentBlockIndex() > firstBlockIndex" ")"); do { MOZ_CrashSequence(__null, 2928); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2929 | MOZ_RELEASE_ASSERT(!!er->NextBlockIndex())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!!er->NextBlockIndex())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!!er->NextBlockIndex()))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("!!er->NextBlockIndex()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2929 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!!er->NextBlockIndex()" ")"); do { MOZ_CrashSequence(__null, 2929); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2930 | MOZ_RELEASE_ASSERT(er->NextBlockIndex() > firstBlockIndex)do { static_assert( mozilla::detail::AssertionConditionType< decltype(er->NextBlockIndex() > firstBlockIndex)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(er->NextBlockIndex() > firstBlockIndex))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("er->NextBlockIndex() > firstBlockIndex" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2930 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "er->NextBlockIndex() > firstBlockIndex" ")"); do { MOZ_CrashSequence(__null, 2930); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2931 | MOZ_RELEASE_ASSERT(er->NextBlockIndex() < lastBlockIndex)do { static_assert( mozilla::detail::AssertionConditionType< decltype(er->NextBlockIndex() < lastBlockIndex)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(er->NextBlockIndex() < lastBlockIndex))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("er->NextBlockIndex() < lastBlockIndex" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2931 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "er->NextBlockIndex() < lastBlockIndex" ")"); do { MOZ_CrashSequence(__null, 2931); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2932 | blockIndex = er->NextBlockIndex(); | |||
| 2933 | MOZ_RELEASE_ASSERT(er->RemainingBytes() == sizeof(size_t))do { static_assert( mozilla::detail::AssertionConditionType< decltype(er->RemainingBytes() == sizeof(size_t))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(er->RemainingBytes() == sizeof(size_t)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("er->RemainingBytes() == sizeof(size_t)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2933 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "er->RemainingBytes() == sizeof(size_t)" ")"); do { MOZ_CrashSequence(__null, 2933); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2934 | const auto value = er->ReadObject<size_t>(); | |||
| 2935 | MOZ_RELEASE_ASSERT(i == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(i == 0)>::isValid, "invalid assertion condition") ; if ((__builtin_expect(!!(!(!!(i == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("i == 0", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2935); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "i == 0" ")"); do { MOZ_CrashSequence(__null, 2935); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2936 | i = value; | |||
| 2937 | MOZ_RELEASE_ASSERT(er->RemainingBytes() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(er->RemainingBytes() == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(er->RemainingBytes() == 0 ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "er->RemainingBytes() == 0", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2937); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "er->RemainingBytes() == 0" ")"); do { MOZ_CrashSequence(__null, 2937); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2938 | return 7; | |||
| 2939 | }); | |||
| 2940 | MOZ_RELEASE_ASSERT(success)do { static_assert( mozilla::detail::AssertionConditionType< decltype(success)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(success))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("success", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2940); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "success" ")"); do { MOZ_CrashSequence(__null, 2940); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2941 | MOZ_RELEASE_ASSERT(read == 1)do { static_assert( mozilla::detail::AssertionConditionType< decltype(read == 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(read == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("read == 1", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2941); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "read == 1" ")"); do { MOZ_CrashSequence(__null, 2941); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2942 | // Read other extant numbers one by one. | |||
| 2943 | do { | |||
| 2944 | bool success = | |||
| 2945 | cb.ReadAt(blockIndex, [&](Maybe<ProfileBufferEntryReader>&& er) { | |||
| 2946 | MOZ_ASSERT(er.isSome())do { static_assert( mozilla::detail::AssertionConditionType< decltype(er.isSome())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(er.isSome()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("er.isSome()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2946); AnnotateMozCrashReason("MOZ_ASSERT" "(" "er.isSome()" ")"); do { MOZ_CrashSequence(__null, 2946); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2947 | ++read; | |||
| 2948 | MOZ_RELEASE_ASSERT(er->CurrentBlockIndex() == blockIndex)do { static_assert( mozilla::detail::AssertionConditionType< decltype(er->CurrentBlockIndex() == blockIndex)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(er->CurrentBlockIndex() == blockIndex))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("er->CurrentBlockIndex() == blockIndex" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2948 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "er->CurrentBlockIndex() == blockIndex" ")"); do { MOZ_CrashSequence(__null, 2948); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2949 | MOZ_RELEASE_ASSERT(!er->NextBlockIndex() ||do { static_assert( mozilla::detail::AssertionConditionType< decltype(!er->NextBlockIndex() || er->NextBlockIndex() > blockIndex)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(!er->NextBlockIndex() || er-> NextBlockIndex() > blockIndex))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("!er->NextBlockIndex() || er->NextBlockIndex() > blockIndex" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2950 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!er->NextBlockIndex() || er->NextBlockIndex() > blockIndex" ")"); do { MOZ_CrashSequence(__null, 2950); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2950 | er->NextBlockIndex() > blockIndex)do { static_assert( mozilla::detail::AssertionConditionType< decltype(!er->NextBlockIndex() || er->NextBlockIndex() > blockIndex)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(!er->NextBlockIndex() || er-> NextBlockIndex() > blockIndex))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("!er->NextBlockIndex() || er->NextBlockIndex() > blockIndex" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2950 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!er->NextBlockIndex() || er->NextBlockIndex() > blockIndex" ")"); do { MOZ_CrashSequence(__null, 2950); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2951 | MOZ_RELEASE_ASSERT(!er->NextBlockIndex() ||do { static_assert( mozilla::detail::AssertionConditionType< decltype(!er->NextBlockIndex() || er->NextBlockIndex() > firstBlockIndex)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!er->NextBlockIndex() || er ->NextBlockIndex() > firstBlockIndex))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!er->NextBlockIndex() || er->NextBlockIndex() > firstBlockIndex" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2952 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!er->NextBlockIndex() || er->NextBlockIndex() > firstBlockIndex" ")"); do { MOZ_CrashSequence(__null, 2952); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2952 | er->NextBlockIndex() > firstBlockIndex)do { static_assert( mozilla::detail::AssertionConditionType< decltype(!er->NextBlockIndex() || er->NextBlockIndex() > firstBlockIndex)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!er->NextBlockIndex() || er ->NextBlockIndex() > firstBlockIndex))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!er->NextBlockIndex() || er->NextBlockIndex() > firstBlockIndex" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2952 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!er->NextBlockIndex() || er->NextBlockIndex() > firstBlockIndex" ")"); do { MOZ_CrashSequence(__null, 2952); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2953 | MOZ_RELEASE_ASSERT(!er->NextBlockIndex() ||do { static_assert( mozilla::detail::AssertionConditionType< decltype(!er->NextBlockIndex() || er->NextBlockIndex() <= lastBlockIndex)>::isValid, "invalid assertion condition") ; if ((__builtin_expect(!!(!(!!(!er->NextBlockIndex() || er ->NextBlockIndex() <= lastBlockIndex))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!er->NextBlockIndex() || er->NextBlockIndex() <= lastBlockIndex" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2954 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!er->NextBlockIndex() || er->NextBlockIndex() <= lastBlockIndex" ")"); do { MOZ_CrashSequence(__null, 2954); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2954 | er->NextBlockIndex() <= lastBlockIndex)do { static_assert( mozilla::detail::AssertionConditionType< decltype(!er->NextBlockIndex() || er->NextBlockIndex() <= lastBlockIndex)>::isValid, "invalid assertion condition") ; if ((__builtin_expect(!!(!(!!(!er->NextBlockIndex() || er ->NextBlockIndex() <= lastBlockIndex))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!er->NextBlockIndex() || er->NextBlockIndex() <= lastBlockIndex" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2954 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!er->NextBlockIndex() || er->NextBlockIndex() <= lastBlockIndex" ")"); do { MOZ_CrashSequence(__null, 2954); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2955 | MOZ_RELEASE_ASSERT(er->NextBlockIndex()do { static_assert( mozilla::detail::AssertionConditionType< decltype(er->NextBlockIndex() ? blockIndex < lastBlockIndex : blockIndex == lastBlockIndex)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(er->NextBlockIndex() ? blockIndex < lastBlockIndex : blockIndex == lastBlockIndex))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("er->NextBlockIndex() ? blockIndex < lastBlockIndex : blockIndex == lastBlockIndex" " (" "er->NextBlockIndex() should only be null when " "blockIndex is at the last block" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2959); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "er->NextBlockIndex() ? blockIndex < lastBlockIndex : blockIndex == lastBlockIndex" ") (" "er->NextBlockIndex() should only be null when " "blockIndex is at the last block" ")"); do { MOZ_CrashSequence(__null, 2959); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2956 | ? blockIndex < lastBlockIndexdo { static_assert( mozilla::detail::AssertionConditionType< decltype(er->NextBlockIndex() ? blockIndex < lastBlockIndex : blockIndex == lastBlockIndex)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(er->NextBlockIndex() ? blockIndex < lastBlockIndex : blockIndex == lastBlockIndex))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("er->NextBlockIndex() ? blockIndex < lastBlockIndex : blockIndex == lastBlockIndex" " (" "er->NextBlockIndex() should only be null when " "blockIndex is at the last block" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2959); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "er->NextBlockIndex() ? blockIndex < lastBlockIndex : blockIndex == lastBlockIndex" ") (" "er->NextBlockIndex() should only be null when " "blockIndex is at the last block" ")"); do { MOZ_CrashSequence(__null, 2959); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2957 | : blockIndex == lastBlockIndex,do { static_assert( mozilla::detail::AssertionConditionType< decltype(er->NextBlockIndex() ? blockIndex < lastBlockIndex : blockIndex == lastBlockIndex)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(er->NextBlockIndex() ? blockIndex < lastBlockIndex : blockIndex == lastBlockIndex))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("er->NextBlockIndex() ? blockIndex < lastBlockIndex : blockIndex == lastBlockIndex" " (" "er->NextBlockIndex() should only be null when " "blockIndex is at the last block" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2959); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "er->NextBlockIndex() ? blockIndex < lastBlockIndex : blockIndex == lastBlockIndex" ") (" "er->NextBlockIndex() should only be null when " "blockIndex is at the last block" ")"); do { MOZ_CrashSequence(__null, 2959); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2958 | "er->NextBlockIndex() should only be null when "do { static_assert( mozilla::detail::AssertionConditionType< decltype(er->NextBlockIndex() ? blockIndex < lastBlockIndex : blockIndex == lastBlockIndex)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(er->NextBlockIndex() ? blockIndex < lastBlockIndex : blockIndex == lastBlockIndex))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("er->NextBlockIndex() ? blockIndex < lastBlockIndex : blockIndex == lastBlockIndex" " (" "er->NextBlockIndex() should only be null when " "blockIndex is at the last block" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2959); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "er->NextBlockIndex() ? blockIndex < lastBlockIndex : blockIndex == lastBlockIndex" ") (" "er->NextBlockIndex() should only be null when " "blockIndex is at the last block" ")"); do { MOZ_CrashSequence(__null, 2959); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2959 | "blockIndex is at the last block")do { static_assert( mozilla::detail::AssertionConditionType< decltype(er->NextBlockIndex() ? blockIndex < lastBlockIndex : blockIndex == lastBlockIndex)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(er->NextBlockIndex() ? blockIndex < lastBlockIndex : blockIndex == lastBlockIndex))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("er->NextBlockIndex() ? blockIndex < lastBlockIndex : blockIndex == lastBlockIndex" " (" "er->NextBlockIndex() should only be null when " "blockIndex is at the last block" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2959); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "er->NextBlockIndex() ? blockIndex < lastBlockIndex : blockIndex == lastBlockIndex" ") (" "er->NextBlockIndex() should only be null when " "blockIndex is at the last block" ")"); do { MOZ_CrashSequence(__null, 2959); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2960 | blockIndex = er->NextBlockIndex(); | |||
| 2961 | MOZ_RELEASE_ASSERT(er->RemainingBytes() == sizeof(size_t))do { static_assert( mozilla::detail::AssertionConditionType< decltype(er->RemainingBytes() == sizeof(size_t))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(er->RemainingBytes() == sizeof(size_t)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("er->RemainingBytes() == sizeof(size_t)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2961 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "er->RemainingBytes() == sizeof(size_t)" ")"); do { MOZ_CrashSequence(__null, 2961); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2962 | const auto value = er->ReadObject<size_t>(); | |||
| 2963 | MOZ_RELEASE_ASSERT(value == ++i)do { static_assert( mozilla::detail::AssertionConditionType< decltype(value == ++i)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(value == ++i))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("value == ++i", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2963); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "value == ++i" ")"); do { MOZ_CrashSequence(__null, 2963); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2964 | MOZ_RELEASE_ASSERT(er->RemainingBytes() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(er->RemainingBytes() == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(er->RemainingBytes() == 0 ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "er->RemainingBytes() == 0", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2964); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "er->RemainingBytes() == 0" ")"); do { MOZ_CrashSequence(__null, 2964); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2965 | return true; | |||
| 2966 | }); | |||
| 2967 | MOZ_RELEASE_ASSERT(success)do { static_assert( mozilla::detail::AssertionConditionType< decltype(success)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(success))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("success", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2967); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "success" ")"); do { MOZ_CrashSequence(__null, 2967); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2968 | } while (blockIndex); | |||
| 2969 | MOZ_RELEASE_ASSERT(read > 1)do { static_assert( mozilla::detail::AssertionConditionType< decltype(read > 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(read > 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("read > 1", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2969); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "read > 1" ")"); do { MOZ_CrashSequence(__null, 2969); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2970 | ||||
| 2971 | // No changes after reads. | |||
| 2972 | VERIFY_PCB_START_END_PUSHED_CLEARED_FAILED({ ProfileChunkedBuffer::State state = (cb).GetState(); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeStart == (startAfterPuts))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (startAfterPuts )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeStart == (startAfterPuts)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2973); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (startAfterPuts)" ")"); do { MOZ_CrashSequence(__null, 2973); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (endAfterPuts))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (endAfterPuts )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (endAfterPuts)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2973); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (endAfterPuts)" ")"); do { MOZ_CrashSequence(__null, 2973); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (pushedAfterPuts))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mPushedBlockCount == ( pushedAfterPuts)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mPushedBlockCount == (pushedAfterPuts)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2973); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (pushedAfterPuts)" ")"); do { MOZ_CrashSequence(__null, 2973); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (clearedAfterPuts))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mClearedBlockCount == ( clearedAfterPuts)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mClearedBlockCount == (clearedAfterPuts)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2973); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (clearedAfterPuts)" ")"); do { MOZ_CrashSequence(__null, 2973); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2973 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 2973); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); } | |||
| 2973 | cb, startAfterPuts, endAfterPuts, pushedAfterPuts, clearedAfterPuts, 0){ ProfileChunkedBuffer::State state = (cb).GetState(); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeStart == (startAfterPuts))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (startAfterPuts )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeStart == (startAfterPuts)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2973); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (startAfterPuts)" ")"); do { MOZ_CrashSequence(__null, 2973); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (endAfterPuts))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (endAfterPuts )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (endAfterPuts)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2973); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (endAfterPuts)" ")"); do { MOZ_CrashSequence(__null, 2973); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (pushedAfterPuts))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mPushedBlockCount == ( pushedAfterPuts)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mPushedBlockCount == (pushedAfterPuts)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2973); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (pushedAfterPuts)" ")"); do { MOZ_CrashSequence(__null, 2973); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (clearedAfterPuts))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mClearedBlockCount == ( clearedAfterPuts)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mClearedBlockCount == (clearedAfterPuts)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2973); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (clearedAfterPuts)" ")"); do { MOZ_CrashSequence(__null, 2973); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2973 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 2973); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }; | |||
| 2974 | ||||
| 2975 | #ifdef DEBUG1 | |||
| 2976 | // cb.Dump(); | |||
| 2977 | #endif | |||
| 2978 | ||||
| 2979 | cb.Clear(); | |||
| 2980 | ||||
| 2981 | #ifdef DEBUG1 | |||
| 2982 | // cb.Dump(); | |||
| 2983 | #endif | |||
| 2984 | ||||
| 2985 | ProfileChunkedBuffer::State stateAfterClear = cb.GetState(); | |||
| 2986 | ProfileBufferIndex startAfterClear = stateAfterClear.mRangeStart; | |||
| 2987 | MOZ_RELEASE_ASSERT(startAfterClear > startAfterPuts)do { static_assert( mozilla::detail::AssertionConditionType< decltype(startAfterClear > startAfterPuts)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(startAfterClear > startAfterPuts ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "startAfterClear > startAfterPuts", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2987); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "startAfterClear > startAfterPuts" ")"); do { MOZ_CrashSequence(__null, 2987); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2988 | ProfileBufferIndex endAfterClear = stateAfterClear.mRangeEnd; | |||
| 2989 | MOZ_RELEASE_ASSERT(endAfterClear == startAfterClear)do { static_assert( mozilla::detail::AssertionConditionType< decltype(endAfterClear == startAfterClear)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(endAfterClear == startAfterClear ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "endAfterClear == startAfterClear", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2989); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "endAfterClear == startAfterClear" ")"); do { MOZ_CrashSequence(__null, 2989); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2990 | MOZ_RELEASE_ASSERT(stateAfterClear.mPushedBlockCount == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(stateAfterClear.mPushedBlockCount == 0)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(stateAfterClear.mPushedBlockCount == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("stateAfterClear.mPushedBlockCount == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2990 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "stateAfterClear.mPushedBlockCount == 0" ")"); do { MOZ_CrashSequence(__null, 2990); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2991 | MOZ_RELEASE_ASSERT(stateAfterClear.mClearedBlockCount == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(stateAfterClear.mClearedBlockCount == 0)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(stateAfterClear.mClearedBlockCount == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("stateAfterClear.mClearedBlockCount == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2991 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "stateAfterClear.mClearedBlockCount == 0" ")"); do { MOZ_CrashSequence(__null, 2991); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2992 | MOZ_RELEASE_ASSERT(stateAfterClear.mFailedPutBytes == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(stateAfterClear.mFailedPutBytes == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(stateAfterClear.mFailedPutBytes == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("stateAfterClear.mFailedPutBytes == 0", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2992); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "stateAfterClear.mFailedPutBytes == 0" ")"); do { MOZ_CrashSequence(__null, 2992); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2993 | MOZ_RELEASE_ASSERT(!cb.IsIndexInCurrentChunk(ProfileBufferIndex{}))do { static_assert( mozilla::detail::AssertionConditionType< decltype(!cb.IsIndexInCurrentChunk(ProfileBufferIndex{}))> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(!cb.IsIndexInCurrentChunk(ProfileBufferIndex{})))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("!cb.IsIndexInCurrentChunk(ProfileBufferIndex{})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2993 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!cb.IsIndexInCurrentChunk(ProfileBufferIndex{})" ")"); do { MOZ_CrashSequence(__null, 2993); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2994 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(!cb.IsIndexInCurrentChunk(blockIndex.ConvertToProfileBufferIndex ()))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(!cb.IsIndexInCurrentChunk(blockIndex.ConvertToProfileBufferIndex ())))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!cb.IsIndexInCurrentChunk(blockIndex.ConvertToProfileBufferIndex())" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2995 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!cb.IsIndexInCurrentChunk(blockIndex.ConvertToProfileBufferIndex())" ")"); do { MOZ_CrashSequence(__null, 2995); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 2995 | !cb.IsIndexInCurrentChunk(blockIndex.ConvertToProfileBufferIndex()))do { static_assert( mozilla::detail::AssertionConditionType< decltype(!cb.IsIndexInCurrentChunk(blockIndex.ConvertToProfileBufferIndex ()))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(!cb.IsIndexInCurrentChunk(blockIndex.ConvertToProfileBufferIndex ())))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!cb.IsIndexInCurrentChunk(blockIndex.ConvertToProfileBufferIndex())" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 2995 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!cb.IsIndexInCurrentChunk(blockIndex.ConvertToProfileBufferIndex())" ")"); do { MOZ_CrashSequence(__null, 2995); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2996 | MOZ_RELEASE_ASSERT(!cb.IsIndexInCurrentChunk(stateAfterClear.mRangeEnd - 1))do { static_assert( mozilla::detail::AssertionConditionType< decltype(!cb.IsIndexInCurrentChunk(stateAfterClear.mRangeEnd - 1))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(!cb.IsIndexInCurrentChunk(stateAfterClear.mRangeEnd - 1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!cb.IsIndexInCurrentChunk(stateAfterClear.mRangeEnd - 1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2996); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!cb.IsIndexInCurrentChunk(stateAfterClear.mRangeEnd - 1)" ")"); do { MOZ_CrashSequence(__null, 2996); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2997 | MOZ_RELEASE_ASSERT(!cb.IsIndexInCurrentChunk(stateAfterClear.mRangeEnd))do { static_assert( mozilla::detail::AssertionConditionType< decltype(!cb.IsIndexInCurrentChunk(stateAfterClear.mRangeEnd) )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(!cb.IsIndexInCurrentChunk(stateAfterClear.mRangeEnd) ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "!cb.IsIndexInCurrentChunk(stateAfterClear.mRangeEnd)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 2997); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!cb.IsIndexInCurrentChunk(stateAfterClear.mRangeEnd)" ")"); do { MOZ_CrashSequence(__null, 2997); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 2998 | ||||
| 2999 | // Start writer threads. | |||
| 3000 | constexpr int ThreadCount = 32; | |||
| 3001 | std::thread threads[ThreadCount]; | |||
| 3002 | for (int threadNo = 0; threadNo < ThreadCount; ++threadNo) { | |||
| 3003 | threads[threadNo] = std::thread( | |||
| 3004 | [&](int aThreadNo) { | |||
| 3005 | ::SleepMilli(1); | |||
| 3006 | constexpr int pushCount = 1024; | |||
| 3007 | for (int push = 0; push < pushCount; ++push) { | |||
| 3008 | // Reserve as many bytes as the thread number (but at least enough | |||
| 3009 | // to store an int), and write an increasing int. | |||
| 3010 | const bool success = | |||
| 3011 | cb.Put(std::max(aThreadNo, int(sizeof(push))), | |||
| 3012 | [&](Maybe<ProfileBufferEntryWriter>& aEW) { | |||
| 3013 | if (!aEW) { | |||
| 3014 | return false; | |||
| 3015 | } | |||
| 3016 | aEW->WriteObject(aThreadNo * 1000000 + push); | |||
| 3017 | // Advance writer to the end. | |||
| 3018 | for (size_t r = aEW->RemainingBytes(); r != 0; --r) { | |||
| 3019 | aEW->WriteObject<char>('_'); | |||
| 3020 | } | |||
| 3021 | return true; | |||
| 3022 | }); | |||
| 3023 | MOZ_RELEASE_ASSERT(success)do { static_assert( mozilla::detail::AssertionConditionType< decltype(success)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(success))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("success", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3023); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "success" ")"); do { MOZ_CrashSequence(__null, 3023); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3024 | } | |||
| 3025 | }, | |||
| 3026 | threadNo); | |||
| 3027 | } | |||
| 3028 | ||||
| 3029 | // Wait for all writer threads to die. | |||
| 3030 | for (auto&& thread : threads) { | |||
| 3031 | thread.join(); | |||
| 3032 | } | |||
| 3033 | ||||
| 3034 | #ifdef DEBUG1 | |||
| 3035 | // cb.Dump(); | |||
| 3036 | #endif | |||
| 3037 | ||||
| 3038 | ProfileChunkedBuffer::State stateAfterMTPuts = cb.GetState(); | |||
| 3039 | ProfileBufferIndex startAfterMTPuts = stateAfterMTPuts.mRangeStart; | |||
| 3040 | MOZ_RELEASE_ASSERT(startAfterMTPuts > startAfterClear)do { static_assert( mozilla::detail::AssertionConditionType< decltype(startAfterMTPuts > startAfterClear)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(! !(startAfterMTPuts > startAfterClear))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("startAfterMTPuts > startAfterClear" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3040 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "startAfterMTPuts > startAfterClear" ")"); do { MOZ_CrashSequence(__null, 3040); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3041 | ProfileBufferIndex endAfterMTPuts = stateAfterMTPuts.mRangeEnd; | |||
| 3042 | MOZ_RELEASE_ASSERT(endAfterMTPuts > startAfterMTPuts)do { static_assert( mozilla::detail::AssertionConditionType< decltype(endAfterMTPuts > startAfterMTPuts)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(endAfterMTPuts > startAfterMTPuts ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "endAfterMTPuts > startAfterMTPuts", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3042); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "endAfterMTPuts > startAfterMTPuts" ")"); do { MOZ_CrashSequence(__null, 3042); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3043 | MOZ_RELEASE_ASSERT(stateAfterMTPuts.mPushedBlockCount > 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(stateAfterMTPuts.mPushedBlockCount > 0)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(stateAfterMTPuts.mPushedBlockCount > 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("stateAfterMTPuts.mPushedBlockCount > 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3043 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "stateAfterMTPuts.mPushedBlockCount > 0" ")"); do { MOZ_CrashSequence(__null, 3043); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3044 | MOZ_RELEASE_ASSERT(stateAfterMTPuts.mClearedBlockCount > 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(stateAfterMTPuts.mClearedBlockCount > 0)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(stateAfterMTPuts.mClearedBlockCount > 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("stateAfterMTPuts.mClearedBlockCount > 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3044 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "stateAfterMTPuts.mClearedBlockCount > 0" ")"); do { MOZ_CrashSequence(__null, 3044); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3045 | MOZ_RELEASE_ASSERT(stateAfterMTPuts.mFailedPutBytes == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(stateAfterMTPuts.mFailedPutBytes == 0)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(! !(stateAfterMTPuts.mFailedPutBytes == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("stateAfterMTPuts.mFailedPutBytes == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3045 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "stateAfterMTPuts.mFailedPutBytes == 0" ")"); do { MOZ_CrashSequence(__null, 3045); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3046 | ||||
| 3047 | // Reset to out-of-session. | |||
| 3048 | cb.ResetChunkManager(); | |||
| 3049 | ||||
| 3050 | ProfileChunkedBuffer::State stateAfterReset = cb.GetState(); | |||
| 3051 | ProfileBufferIndex startAfterReset = stateAfterReset.mRangeStart; | |||
| 3052 | MOZ_RELEASE_ASSERT(startAfterReset == endAfterMTPuts)do { static_assert( mozilla::detail::AssertionConditionType< decltype(startAfterReset == endAfterMTPuts)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(startAfterReset == endAfterMTPuts ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "startAfterReset == endAfterMTPuts", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3052); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "startAfterReset == endAfterMTPuts" ")"); do { MOZ_CrashSequence(__null, 3052); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3053 | ProfileBufferIndex endAfterReset = stateAfterReset.mRangeEnd; | |||
| 3054 | MOZ_RELEASE_ASSERT(endAfterReset == startAfterReset)do { static_assert( mozilla::detail::AssertionConditionType< decltype(endAfterReset == startAfterReset)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(endAfterReset == startAfterReset ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "endAfterReset == startAfterReset", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3054); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "endAfterReset == startAfterReset" ")"); do { MOZ_CrashSequence(__null, 3054); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3055 | MOZ_RELEASE_ASSERT(stateAfterReset.mPushedBlockCount == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(stateAfterReset.mPushedBlockCount == 0)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(stateAfterReset.mPushedBlockCount == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("stateAfterReset.mPushedBlockCount == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3055 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "stateAfterReset.mPushedBlockCount == 0" ")"); do { MOZ_CrashSequence(__null, 3055); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3056 | MOZ_RELEASE_ASSERT(stateAfterReset.mClearedBlockCount == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(stateAfterReset.mClearedBlockCount == 0)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(stateAfterReset.mClearedBlockCount == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("stateAfterReset.mClearedBlockCount == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3056 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "stateAfterReset.mClearedBlockCount == 0" ")"); do { MOZ_CrashSequence(__null, 3056); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3057 | MOZ_RELEASE_ASSERT(stateAfterReset.mFailedPutBytes == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(stateAfterReset.mFailedPutBytes == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(stateAfterReset.mFailedPutBytes == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("stateAfterReset.mFailedPutBytes == 0", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3057); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "stateAfterReset.mFailedPutBytes == 0" ")"); do { MOZ_CrashSequence(__null, 3057); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3058 | ||||
| 3059 | success = cb.ReserveAndPut( | |||
| 3060 | []() { | |||
| 3061 | MOZ_RELEASE_ASSERT(false)do { static_assert( mozilla::detail::AssertionConditionType< decltype(false)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(false))), 0))) { do { } while ( false); MOZ_ReportAssertionFailure("false", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3061); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "false" ")"); do { MOZ_CrashSequence(__null, 3061); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3062 | return 1; | |||
| 3063 | }, | |||
| 3064 | [](Maybe<ProfileBufferEntryWriter>& aEW) { return !!aEW; }); | |||
| 3065 | MOZ_RELEASE_ASSERT(!success)do { static_assert( mozilla::detail::AssertionConditionType< decltype(!success)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!success))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!success", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3065); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!success" ")"); do { MOZ_CrashSequence(__null, 3065); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3066 | VERIFY_PCB_START_END_PUSHED_CLEARED_FAILED(cb, startAfterReset, endAfterReset,{ ProfileChunkedBuffer::State state = (cb).GetState(); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeStart == (startAfterReset))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (startAfterReset )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeStart == (startAfterReset)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3067); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (startAfterReset)" ")"); do { MOZ_CrashSequence(__null, 3067); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (endAfterReset))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (endAfterReset )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (endAfterReset)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3067); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (endAfterReset)" ")"); do { MOZ_CrashSequence(__null, 3067); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3067 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3067); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3067 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3067); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3067 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 3067); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); } | |||
| 3067 | 0, 0, 0){ ProfileChunkedBuffer::State state = (cb).GetState(); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeStart == (startAfterReset))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (startAfterReset )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeStart == (startAfterReset)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3067); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (startAfterReset)" ")"); do { MOZ_CrashSequence(__null, 3067); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (endAfterReset))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (endAfterReset )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (endAfterReset)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3067); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (endAfterReset)" ")"); do { MOZ_CrashSequence(__null, 3067); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3067 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3067); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3067 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3067); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3067 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 3067); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }; | |||
| 3068 | ||||
| 3069 | success = | |||
| 3070 | cb.Put(1, [](Maybe<ProfileBufferEntryWriter>& aEW) { return !!aEW; }); | |||
| 3071 | MOZ_RELEASE_ASSERT(!success)do { static_assert( mozilla::detail::AssertionConditionType< decltype(!success)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!success))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!success", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3071); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!success" ")"); do { MOZ_CrashSequence(__null, 3071); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3072 | VERIFY_PCB_START_END_PUSHED_CLEARED_FAILED(cb, startAfterReset, endAfterReset,{ ProfileChunkedBuffer::State state = (cb).GetState(); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeStart == (startAfterReset))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (startAfterReset )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeStart == (startAfterReset)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3073); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (startAfterReset)" ")"); do { MOZ_CrashSequence(__null, 3073); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (endAfterReset))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (endAfterReset )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (endAfterReset)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3073); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (endAfterReset)" ")"); do { MOZ_CrashSequence(__null, 3073); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3073 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3073); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3073 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3073); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3073 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 3073); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); } | |||
| 3073 | 0, 0, 0){ ProfileChunkedBuffer::State state = (cb).GetState(); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeStart == (startAfterReset))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (startAfterReset )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeStart == (startAfterReset)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3073); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (startAfterReset)" ")"); do { MOZ_CrashSequence(__null, 3073); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (endAfterReset))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (endAfterReset )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (endAfterReset)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3073); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (endAfterReset)" ")"); do { MOZ_CrashSequence(__null, 3073); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3073 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3073); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3073 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3073); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3073 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 3073); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }; | |||
| 3074 | ||||
| 3075 | blockIndex = cb.PutFrom(&success, 1); | |||
| 3076 | MOZ_RELEASE_ASSERT(!blockIndex)do { static_assert( mozilla::detail::AssertionConditionType< decltype(!blockIndex)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!blockIndex))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!blockIndex", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3076); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!blockIndex" ")"); do { MOZ_CrashSequence(__null, 3076); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3077 | VERIFY_PCB_START_END_PUSHED_CLEARED_FAILED(cb, startAfterReset, endAfterReset,{ ProfileChunkedBuffer::State state = (cb).GetState(); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeStart == (startAfterReset))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (startAfterReset )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeStart == (startAfterReset)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3078); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (startAfterReset)" ")"); do { MOZ_CrashSequence(__null, 3078); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (endAfterReset))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (endAfterReset )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (endAfterReset)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3078); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (endAfterReset)" ")"); do { MOZ_CrashSequence(__null, 3078); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3078 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3078); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3078 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3078); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3078 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 3078); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); } | |||
| 3078 | 0, 0, 0){ ProfileChunkedBuffer::State state = (cb).GetState(); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeStart == (startAfterReset))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (startAfterReset )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeStart == (startAfterReset)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3078); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (startAfterReset)" ")"); do { MOZ_CrashSequence(__null, 3078); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (endAfterReset))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (endAfterReset )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (endAfterReset)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3078); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (endAfterReset)" ")"); do { MOZ_CrashSequence(__null, 3078); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3078 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3078); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3078 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3078); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3078 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 3078); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }; | |||
| 3079 | ||||
| 3080 | blockIndex = cb.PutObjects(123, success, "hello"); | |||
| 3081 | MOZ_RELEASE_ASSERT(!blockIndex)do { static_assert( mozilla::detail::AssertionConditionType< decltype(!blockIndex)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!blockIndex))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!blockIndex", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3081); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!blockIndex" ")"); do { MOZ_CrashSequence(__null, 3081); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3082 | VERIFY_PCB_START_END_PUSHED_CLEARED_FAILED(cb, startAfterReset, endAfterReset,{ ProfileChunkedBuffer::State state = (cb).GetState(); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeStart == (startAfterReset))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (startAfterReset )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeStart == (startAfterReset)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3083); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (startAfterReset)" ")"); do { MOZ_CrashSequence(__null, 3083); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (endAfterReset))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (endAfterReset )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (endAfterReset)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3083); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (endAfterReset)" ")"); do { MOZ_CrashSequence(__null, 3083); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3083 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3083); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3083 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3083); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3083 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 3083); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); } | |||
| 3083 | 0, 0, 0){ ProfileChunkedBuffer::State state = (cb).GetState(); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeStart == (startAfterReset))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (startAfterReset )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeStart == (startAfterReset)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3083); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (startAfterReset)" ")"); do { MOZ_CrashSequence(__null, 3083); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (endAfterReset))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (endAfterReset )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (endAfterReset)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3083); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (endAfterReset)" ")"); do { MOZ_CrashSequence(__null, 3083); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3083 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3083); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3083 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3083); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3083 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 3083); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }; | |||
| 3084 | ||||
| 3085 | blockIndex = cb.PutObject(123); | |||
| 3086 | MOZ_RELEASE_ASSERT(!blockIndex)do { static_assert( mozilla::detail::AssertionConditionType< decltype(!blockIndex)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!blockIndex))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!blockIndex", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3086); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!blockIndex" ")"); do { MOZ_CrashSequence(__null, 3086); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3087 | VERIFY_PCB_START_END_PUSHED_CLEARED_FAILED(cb, startAfterReset, endAfterReset,{ ProfileChunkedBuffer::State state = (cb).GetState(); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeStart == (startAfterReset))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (startAfterReset )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeStart == (startAfterReset)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3088); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (startAfterReset)" ")"); do { MOZ_CrashSequence(__null, 3088); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (endAfterReset))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (endAfterReset )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (endAfterReset)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3088); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (endAfterReset)" ")"); do { MOZ_CrashSequence(__null, 3088); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3088 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3088); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3088 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3088); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3088 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 3088); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); } | |||
| 3088 | 0, 0, 0){ ProfileChunkedBuffer::State state = (cb).GetState(); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeStart == (startAfterReset))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (startAfterReset )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeStart == (startAfterReset)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3088); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (startAfterReset)" ")"); do { MOZ_CrashSequence(__null, 3088); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (endAfterReset))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (endAfterReset )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (endAfterReset)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3088); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (endAfterReset)" ")"); do { MOZ_CrashSequence(__null, 3088); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3088 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3088); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3088 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3088); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3088 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 3088); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }; | |||
| 3089 | ||||
| 3090 | chunks = cb.GetAllChunks(); | |||
| 3091 | MOZ_RELEASE_ASSERT(!chunks, "Expected no chunks when out-of-session")do { static_assert( mozilla::detail::AssertionConditionType< decltype(!chunks)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!chunks))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!chunks" " (" "Expected no chunks when out-of-session" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3091); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!chunks" ") (" "Expected no chunks when out-of-session" ")"); do { MOZ_CrashSequence (__null, 3091); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 3092 | VERIFY_PCB_START_END_PUSHED_CLEARED_FAILED(cb, startAfterReset, endAfterReset,{ ProfileChunkedBuffer::State state = (cb).GetState(); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeStart == (startAfterReset))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (startAfterReset )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeStart == (startAfterReset)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3093); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (startAfterReset)" ")"); do { MOZ_CrashSequence(__null, 3093); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (endAfterReset))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (endAfterReset )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (endAfterReset)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3093); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (endAfterReset)" ")"); do { MOZ_CrashSequence(__null, 3093); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3093 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3093); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3093 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3093); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3093 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 3093); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); } | |||
| 3093 | 0, 0, 0){ ProfileChunkedBuffer::State state = (cb).GetState(); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeStart == (startAfterReset))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (startAfterReset )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeStart == (startAfterReset)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3093); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (startAfterReset)" ")"); do { MOZ_CrashSequence(__null, 3093); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (endAfterReset))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (endAfterReset )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (endAfterReset)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3093); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (endAfterReset)" ")"); do { MOZ_CrashSequence(__null, 3093); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3093 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3093); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3093 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3093); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3093 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 3093); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }; | |||
| 3094 | ||||
| 3095 | cb.ReadEach([](ProfileBufferEntryReader&) { MOZ_RELEASE_ASSERT(false)do { static_assert( mozilla::detail::AssertionConditionType< decltype(false)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(false))), 0))) { do { } while ( false); MOZ_ReportAssertionFailure("false", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3095); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "false" ")"); do { MOZ_CrashSequence(__null, 3095); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }); | |||
| 3096 | VERIFY_PCB_START_END_PUSHED_CLEARED_FAILED(cb, startAfterReset, endAfterReset,{ ProfileChunkedBuffer::State state = (cb).GetState(); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeStart == (startAfterReset))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (startAfterReset )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeStart == (startAfterReset)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3097); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (startAfterReset)" ")"); do { MOZ_CrashSequence(__null, 3097); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (endAfterReset))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (endAfterReset )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (endAfterReset)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3097); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (endAfterReset)" ")"); do { MOZ_CrashSequence(__null, 3097); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3097 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3097); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3097 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3097); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3097 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 3097); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); } | |||
| 3097 | 0, 0, 0){ ProfileChunkedBuffer::State state = (cb).GetState(); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeStart == (startAfterReset))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (startAfterReset )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeStart == (startAfterReset)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3097); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (startAfterReset)" ")"); do { MOZ_CrashSequence(__null, 3097); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (endAfterReset))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (endAfterReset )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (endAfterReset)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3097); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (endAfterReset)" ")"); do { MOZ_CrashSequence(__null, 3097); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3097 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3097); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3097 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3097); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3097 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 3097); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }; | |||
| 3098 | ||||
| 3099 | success = cb.ReadAt(nullptr, [](Maybe<ProfileBufferEntryReader>&& er) { | |||
| 3100 | MOZ_RELEASE_ASSERT(er.isNothing())do { static_assert( mozilla::detail::AssertionConditionType< decltype(er.isNothing())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(er.isNothing()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("er.isNothing()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3100 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "er.isNothing()" ")"); do { MOZ_CrashSequence(__null, 3100); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3101 | return true; | |||
| 3102 | }); | |||
| 3103 | MOZ_RELEASE_ASSERT(success)do { static_assert( mozilla::detail::AssertionConditionType< decltype(success)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(success))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("success", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3103); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "success" ")"); do { MOZ_CrashSequence(__null, 3103); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3104 | VERIFY_PCB_START_END_PUSHED_CLEARED_FAILED(cb, startAfterReset, endAfterReset,{ ProfileChunkedBuffer::State state = (cb).GetState(); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeStart == (startAfterReset))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (startAfterReset )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeStart == (startAfterReset)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3105); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (startAfterReset)" ")"); do { MOZ_CrashSequence(__null, 3105); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (endAfterReset))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (endAfterReset )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (endAfterReset)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3105); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (endAfterReset)" ")"); do { MOZ_CrashSequence(__null, 3105); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3105 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3105); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3105 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3105); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3105 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 3105); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); } | |||
| 3105 | 0, 0, 0){ ProfileChunkedBuffer::State state = (cb).GetState(); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeStart == (startAfterReset))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (startAfterReset )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeStart == (startAfterReset)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3105); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (startAfterReset)" ")"); do { MOZ_CrashSequence(__null, 3105); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (endAfterReset))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (endAfterReset )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (endAfterReset)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3105); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (endAfterReset)" ")"); do { MOZ_CrashSequence(__null, 3105); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3105 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3105); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3105 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3105); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3105 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 3105); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }; | |||
| 3106 | ||||
| 3107 | printf("TestChunkedBuffer done\n"); | |||
| 3108 | } | |||
| 3109 | ||||
| 3110 | static void TestChunkedBufferSingle() { | |||
| 3111 | printf("TestChunkedBufferSingle...\n"); | |||
| 3112 | ||||
| 3113 | constexpr ProfileChunkedBuffer::Length chunkMinSize = 128; | |||
| 3114 | ||||
| 3115 | // Create a ProfileChunkedBuffer that will own&use a | |||
| 3116 | // ProfileBufferChunkManagerSingle, which will give away one | |||
| 3117 | // ProfileBufferChunk that can contain 128 bytes. | |||
| 3118 | ProfileChunkedBuffer cbSingle( | |||
| 3119 | ProfileChunkedBuffer::ThreadSafety::WithoutMutex, | |||
| 3120 | MakeUnique<ProfileBufferChunkManagerSingle>(chunkMinSize)); | |||
| 3121 | ||||
| 3122 | MOZ_RELEASE_ASSERT(cbSingle.BufferLength().isSome())do { static_assert( mozilla::detail::AssertionConditionType< decltype(cbSingle.BufferLength().isSome())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(cbSingle.BufferLength().isSome ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("cbSingle.BufferLength().isSome()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3122); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "cbSingle.BufferLength().isSome()" ")"); do { MOZ_CrashSequence(__null, 3122); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3123 | const ProfileChunkedBuffer::Length bufferBytes = *cbSingle.BufferLength(); | |||
| 3124 | MOZ_RELEASE_ASSERT(bufferBytes >= chunkMinSize)do { static_assert( mozilla::detail::AssertionConditionType< decltype(bufferBytes >= chunkMinSize)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(bufferBytes >= chunkMinSize ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "bufferBytes >= chunkMinSize", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3124); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "bufferBytes >= chunkMinSize" ")"); do { MOZ_CrashSequence(__null, 3124); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3125 | ||||
| 3126 | VERIFY_PCB_START_END_PUSHED_CLEARED_FAILED(cbSingle, 1, 1, 0, 0, 0){ ProfileChunkedBuffer::State state = (cbSingle).GetState(); do { static_assert( mozilla::detail::AssertionConditionType< decltype(state.mRangeStart == (1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mRangeStart == (1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3126 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1)" ")"); do { MOZ_CrashSequence(__null, 3126); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mRangeEnd == (1)))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("state.mRangeEnd == (1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3126); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1)" ")"); do { MOZ_CrashSequence(__null, 3126); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3126 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3126); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3126 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3126); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3126 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 3126); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }; | |||
| 3127 | ||||
| 3128 | // We will write this many blocks to fill the chunk. | |||
| 3129 | constexpr size_t testBlocks = 4; | |||
| 3130 | const ProfileChunkedBuffer::Length blockBytes = bufferBytes / testBlocks; | |||
| 3131 | MOZ_RELEASE_ASSERT(ULEB128Size(blockBytes) == 1,do { static_assert( mozilla::detail::AssertionConditionType< decltype(ULEB128Size(blockBytes) == 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(ULEB128Size(blockBytes) == 1 ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "ULEB128Size(blockBytes) == 1" " (" "This test assumes block sizes are small enough so that " "their ULEB128-encoded size is 1 byte" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3133); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "ULEB128Size(blockBytes) == 1" ") (" "This test assumes block sizes are small enough so that " "their ULEB128-encoded size is 1 byte" ")"); do { MOZ_CrashSequence (__null, 3133); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false) | |||
| 3132 | "This test assumes block sizes are small enough so that "do { static_assert( mozilla::detail::AssertionConditionType< decltype(ULEB128Size(blockBytes) == 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(ULEB128Size(blockBytes) == 1 ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "ULEB128Size(blockBytes) == 1" " (" "This test assumes block sizes are small enough so that " "their ULEB128-encoded size is 1 byte" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3133); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "ULEB128Size(blockBytes) == 1" ") (" "This test assumes block sizes are small enough so that " "their ULEB128-encoded size is 1 byte" ")"); do { MOZ_CrashSequence (__null, 3133); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false) | |||
| 3133 | "their ULEB128-encoded size is 1 byte")do { static_assert( mozilla::detail::AssertionConditionType< decltype(ULEB128Size(blockBytes) == 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(ULEB128Size(blockBytes) == 1 ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "ULEB128Size(blockBytes) == 1" " (" "This test assumes block sizes are small enough so that " "their ULEB128-encoded size is 1 byte" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3133); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "ULEB128Size(blockBytes) == 1" ") (" "This test assumes block sizes are small enough so that " "their ULEB128-encoded size is 1 byte" ")"); do { MOZ_CrashSequence (__null, 3133); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 3134 | const ProfileChunkedBuffer::Length entryBytes = | |||
| 3135 | blockBytes - ULEB128Size(blockBytes); | |||
| 3136 | ||||
| 3137 | // First buffer-filling test: Try to write a too-big entry at the end of the | |||
| 3138 | // chunk. | |||
| 3139 | ||||
| 3140 | // Write all but one block. | |||
| 3141 | for (size_t i = 0; i < testBlocks - 1; ++i) { | |||
| 3142 | cbSingle.Put(entryBytes, [&](Maybe<ProfileBufferEntryWriter>& aEW) { | |||
| 3143 | MOZ_RELEASE_ASSERT(aEW.isSome())do { static_assert( mozilla::detail::AssertionConditionType< decltype(aEW.isSome())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(aEW.isSome()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("aEW.isSome()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3143); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aEW.isSome()" ")"); do { MOZ_CrashSequence(__null, 3143); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3144 | while (aEW->RemainingBytes() > 0) { | |||
| 3145 | **aEW = '0' + i; | |||
| 3146 | ++(*aEW); | |||
| 3147 | } | |||
| 3148 | }); | |||
| 3149 | VERIFY_PCB_START_END_PUSHED_CLEARED_FAILED({ ProfileChunkedBuffer::State state = (cbSingle).GetState(); do { static_assert( mozilla::detail::AssertionConditionType< decltype(state.mRangeStart == (1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mRangeStart == (1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3150 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1)" ")"); do { MOZ_CrashSequence(__null, 3150); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1 + blockBytes * (i + 1)))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (1 + blockBytes * (i + 1))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (1 + blockBytes * (i + 1))", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3150); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1 + blockBytes * (i + 1))" ")"); do { MOZ_CrashSequence(__null, 3150); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (i + 1))>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(state.mPushedBlockCount == (i + 1 )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mPushedBlockCount == (i + 1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3150); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (i + 1)" ")"); do { MOZ_CrashSequence(__null, 3150); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3150 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3150); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3150 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 3150); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); } | |||
| 3150 | cbSingle, 1, 1 + blockBytes * (i + 1), i + 1, 0, 0){ ProfileChunkedBuffer::State state = (cbSingle).GetState(); do { static_assert( mozilla::detail::AssertionConditionType< decltype(state.mRangeStart == (1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mRangeStart == (1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3150 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1)" ")"); do { MOZ_CrashSequence(__null, 3150); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1 + blockBytes * (i + 1)))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (1 + blockBytes * (i + 1))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (1 + blockBytes * (i + 1))", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3150); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1 + blockBytes * (i + 1))" ")"); do { MOZ_CrashSequence(__null, 3150); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (i + 1))>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(state.mPushedBlockCount == (i + 1 )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mPushedBlockCount == (i + 1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3150); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (i + 1)" ")"); do { MOZ_CrashSequence(__null, 3150); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3150 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3150); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3150 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 3150); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }; | |||
| 3151 | } | |||
| 3152 | ||||
| 3153 | // Write the last block so that it's too big (by 1 byte) to fit in the chunk, | |||
| 3154 | // this should fail. | |||
| 3155 | const ProfileChunkedBuffer::Length remainingBytesForLastBlock = | |||
| 3156 | bufferBytes - blockBytes * (testBlocks - 1); | |||
| 3157 | MOZ_RELEASE_ASSERT(ULEB128Size(remainingBytesForLastBlock) == 1,do { static_assert( mozilla::detail::AssertionConditionType< decltype(ULEB128Size(remainingBytesForLastBlock) == 1)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(ULEB128Size(remainingBytesForLastBlock) == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("ULEB128Size(remainingBytesForLastBlock) == 1" " (" "This test assumes block sizes are small enough so that " "their ULEB128-encoded size is 1 byte" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3159); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "ULEB128Size(remainingBytesForLastBlock) == 1" ") (" "This test assumes block sizes are small enough so that " "their ULEB128-encoded size is 1 byte" ")"); do { MOZ_CrashSequence (__null, 3159); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false) | |||
| 3158 | "This test assumes block sizes are small enough so that "do { static_assert( mozilla::detail::AssertionConditionType< decltype(ULEB128Size(remainingBytesForLastBlock) == 1)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(ULEB128Size(remainingBytesForLastBlock) == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("ULEB128Size(remainingBytesForLastBlock) == 1" " (" "This test assumes block sizes are small enough so that " "their ULEB128-encoded size is 1 byte" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3159); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "ULEB128Size(remainingBytesForLastBlock) == 1" ") (" "This test assumes block sizes are small enough so that " "their ULEB128-encoded size is 1 byte" ")"); do { MOZ_CrashSequence (__null, 3159); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false) | |||
| 3159 | "their ULEB128-encoded size is 1 byte")do { static_assert( mozilla::detail::AssertionConditionType< decltype(ULEB128Size(remainingBytesForLastBlock) == 1)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(ULEB128Size(remainingBytesForLastBlock) == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("ULEB128Size(remainingBytesForLastBlock) == 1" " (" "This test assumes block sizes are small enough so that " "their ULEB128-encoded size is 1 byte" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3159); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "ULEB128Size(remainingBytesForLastBlock) == 1" ") (" "This test assumes block sizes are small enough so that " "their ULEB128-encoded size is 1 byte" ")"); do { MOZ_CrashSequence (__null, 3159); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 3160 | const ProfileChunkedBuffer::Length entryToFitRemainingBytes = | |||
| 3161 | remainingBytesForLastBlock - ULEB128Size(remainingBytesForLastBlock); | |||
| 3162 | cbSingle.Put(entryToFitRemainingBytes + 1, | |||
| 3163 | [&](Maybe<ProfileBufferEntryWriter>& aEW) { | |||
| 3164 | MOZ_RELEASE_ASSERT(aEW.isNothing())do { static_assert( mozilla::detail::AssertionConditionType< decltype(aEW.isNothing())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(aEW.isNothing()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("aEW.isNothing()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3164 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aEW.isNothing()" ")"); do { MOZ_CrashSequence(__null, 3164); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3165 | }); | |||
| 3166 | // The buffer state should not have changed, apart from the failed bytes. | |||
| 3167 | VERIFY_PCB_START_END_PUSHED_CLEARED_FAILED({ ProfileChunkedBuffer::State state = (cbSingle).GetState(); do { static_assert( mozilla::detail::AssertionConditionType< decltype(state.mRangeStart == (1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mRangeStart == (1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3169 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1)" ")"); do { MOZ_CrashSequence(__null, 3169); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1 + blockBytes * (testBlocks - 1)))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (1 + blockBytes * (testBlocks - 1))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (1 + blockBytes * (testBlocks - 1))", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3169); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1 + blockBytes * (testBlocks - 1))" ")"); do { MOZ_CrashSequence(__null, 3169); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (testBlocks - 1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mPushedBlockCount == ( testBlocks - 1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mPushedBlockCount == (testBlocks - 1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3169); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (testBlocks - 1)" ")"); do { MOZ_CrashSequence(__null, 3169); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3169 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3169); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (remainingBytesForLastBlock + 1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mFailedPutBytes == (remainingBytesForLastBlock + 1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mFailedPutBytes == (remainingBytesForLastBlock + 1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3169 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (remainingBytesForLastBlock + 1)" ")"); do { MOZ_CrashSequence(__null, 3169); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); } | |||
| 3168 | cbSingle, 1, 1 + blockBytes * (testBlocks - 1), testBlocks - 1, 0,{ ProfileChunkedBuffer::State state = (cbSingle).GetState(); do { static_assert( mozilla::detail::AssertionConditionType< decltype(state.mRangeStart == (1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mRangeStart == (1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3169 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1)" ")"); do { MOZ_CrashSequence(__null, 3169); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1 + blockBytes * (testBlocks - 1)))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (1 + blockBytes * (testBlocks - 1))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (1 + blockBytes * (testBlocks - 1))", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3169); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1 + blockBytes * (testBlocks - 1))" ")"); do { MOZ_CrashSequence(__null, 3169); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (testBlocks - 1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mPushedBlockCount == ( testBlocks - 1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mPushedBlockCount == (testBlocks - 1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3169); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (testBlocks - 1)" ")"); do { MOZ_CrashSequence(__null, 3169); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3169 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3169); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (remainingBytesForLastBlock + 1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mFailedPutBytes == (remainingBytesForLastBlock + 1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mFailedPutBytes == (remainingBytesForLastBlock + 1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3169 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (remainingBytesForLastBlock + 1)" ")"); do { MOZ_CrashSequence(__null, 3169); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); } | |||
| 3169 | remainingBytesForLastBlock + 1){ ProfileChunkedBuffer::State state = (cbSingle).GetState(); do { static_assert( mozilla::detail::AssertionConditionType< decltype(state.mRangeStart == (1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mRangeStart == (1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3169 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1)" ")"); do { MOZ_CrashSequence(__null, 3169); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1 + blockBytes * (testBlocks - 1)))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (1 + blockBytes * (testBlocks - 1))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (1 + blockBytes * (testBlocks - 1))", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3169); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1 + blockBytes * (testBlocks - 1))" ")"); do { MOZ_CrashSequence(__null, 3169); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (testBlocks - 1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mPushedBlockCount == ( testBlocks - 1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mPushedBlockCount == (testBlocks - 1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3169); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (testBlocks - 1)" ")"); do { MOZ_CrashSequence(__null, 3169); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3169 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3169); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (remainingBytesForLastBlock + 1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mFailedPutBytes == (remainingBytesForLastBlock + 1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mFailedPutBytes == (remainingBytesForLastBlock + 1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3169 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (remainingBytesForLastBlock + 1)" ")"); do { MOZ_CrashSequence(__null, 3169); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }; | |||
| 3170 | ||||
| 3171 | size_t read = 0; | |||
| 3172 | cbSingle.ReadEach([&](ProfileBufferEntryReader& aER) { | |||
| 3173 | MOZ_RELEASE_ASSERT(aER.RemainingBytes() == entryBytes)do { static_assert( mozilla::detail::AssertionConditionType< decltype(aER.RemainingBytes() == entryBytes)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(aER.RemainingBytes() == entryBytes ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "aER.RemainingBytes() == entryBytes", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3173); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aER.RemainingBytes() == entryBytes" ")"); do { MOZ_CrashSequence(__null, 3173); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3174 | while (aER.RemainingBytes() > 0) { | |||
| 3175 | MOZ_RELEASE_ASSERT(*aER == '0' + read)do { static_assert( mozilla::detail::AssertionConditionType< decltype(*aER == '0' + read)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(*aER == '0' + read))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("*aER == '0' + read" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3175 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "*aER == '0' + read" ")"); do { MOZ_CrashSequence(__null, 3175); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3176 | ++aER; | |||
| 3177 | } | |||
| 3178 | ++read; | |||
| 3179 | }); | |||
| 3180 | MOZ_RELEASE_ASSERT(read == testBlocks - 1)do { static_assert( mozilla::detail::AssertionConditionType< decltype(read == testBlocks - 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(read == testBlocks - 1))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("read == testBlocks - 1" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3180 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "read == testBlocks - 1" ")"); do { MOZ_CrashSequence(__null, 3180); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3181 | ||||
| 3182 | // ~Interlude~ Test AppendContent: | |||
| 3183 | // Create another ProfileChunkedBuffer that will use a | |||
| 3184 | // ProfileBufferChunkManagerWithLocalLimit, which will give away | |||
| 3185 | // ProfileBufferChunks that can contain 128 bytes, using up to 1KB of memory | |||
| 3186 | // (including usable 128 bytes and headers). | |||
| 3187 | constexpr size_t bufferMaxSize = 1024; | |||
| 3188 | ProfileBufferChunkManagerWithLocalLimit cmTarget(bufferMaxSize, chunkMinSize); | |||
| 3189 | ProfileChunkedBuffer cbTarget(ProfileChunkedBuffer::ThreadSafety::WithMutex, | |||
| 3190 | cmTarget); | |||
| 3191 | ||||
| 3192 | // It should start empty. | |||
| 3193 | cbTarget.ReadEach( | |||
| 3194 | [](ProfileBufferEntryReader&) { MOZ_RELEASE_ASSERT(false)do { static_assert( mozilla::detail::AssertionConditionType< decltype(false)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(false))), 0))) { do { } while ( false); MOZ_ReportAssertionFailure("false", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3194); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "false" ")"); do { MOZ_CrashSequence(__null, 3194); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }); | |||
| 3195 | VERIFY_PCB_START_END_PUSHED_CLEARED_FAILED(cbTarget, 1, 1, 0, 0, 0){ ProfileChunkedBuffer::State state = (cbTarget).GetState(); do { static_assert( mozilla::detail::AssertionConditionType< decltype(state.mRangeStart == (1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mRangeStart == (1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3195 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1)" ")"); do { MOZ_CrashSequence(__null, 3195); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mRangeEnd == (1)))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("state.mRangeEnd == (1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3195); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1)" ")"); do { MOZ_CrashSequence(__null, 3195); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3195 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3195); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3195 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3195); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3195 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 3195); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }; | |||
| 3196 | ||||
| 3197 | // Copy the contents from cbSingle to cbTarget. | |||
| 3198 | cbTarget.AppendContents(cbSingle); | |||
| 3199 | ||||
| 3200 | // And verify that we now have the same contents in cbTarget. | |||
| 3201 | read = 0; | |||
| 3202 | cbTarget.ReadEach([&](ProfileBufferEntryReader& aER) { | |||
| 3203 | MOZ_RELEASE_ASSERT(aER.RemainingBytes() == entryBytes)do { static_assert( mozilla::detail::AssertionConditionType< decltype(aER.RemainingBytes() == entryBytes)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(aER.RemainingBytes() == entryBytes ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "aER.RemainingBytes() == entryBytes", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3203); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aER.RemainingBytes() == entryBytes" ")"); do { MOZ_CrashSequence(__null, 3203); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3204 | while (aER.RemainingBytes() > 0) { | |||
| 3205 | MOZ_RELEASE_ASSERT(*aER == '0' + read)do { static_assert( mozilla::detail::AssertionConditionType< decltype(*aER == '0' + read)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(*aER == '0' + read))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("*aER == '0' + read" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3205 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "*aER == '0' + read" ")"); do { MOZ_CrashSequence(__null, 3205); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3206 | ++aER; | |||
| 3207 | } | |||
| 3208 | ++read; | |||
| 3209 | }); | |||
| 3210 | MOZ_RELEASE_ASSERT(read == testBlocks - 1)do { static_assert( mozilla::detail::AssertionConditionType< decltype(read == testBlocks - 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(read == testBlocks - 1))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("read == testBlocks - 1" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3210 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "read == testBlocks - 1" ")"); do { MOZ_CrashSequence(__null, 3210); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3211 | // The state should be the same as the source. | |||
| 3212 | VERIFY_PCB_START_END_PUSHED_CLEARED_FAILED({ ProfileChunkedBuffer::State state = (cbTarget).GetState(); do { static_assert( mozilla::detail::AssertionConditionType< decltype(state.mRangeStart == (1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mRangeStart == (1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3213 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1)" ")"); do { MOZ_CrashSequence(__null, 3213); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1 + blockBytes * (testBlocks - 1)))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (1 + blockBytes * (testBlocks - 1))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (1 + blockBytes * (testBlocks - 1))", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3213); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1 + blockBytes * (testBlocks - 1))" ")"); do { MOZ_CrashSequence(__null, 3213); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (testBlocks - 1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mPushedBlockCount == ( testBlocks - 1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mPushedBlockCount == (testBlocks - 1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3213); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (testBlocks - 1)" ")"); do { MOZ_CrashSequence(__null, 3213); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3213 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3213); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3213 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 3213); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); } | |||
| 3213 | cbTarget, 1, 1 + blockBytes * (testBlocks - 1), testBlocks - 1, 0, 0){ ProfileChunkedBuffer::State state = (cbTarget).GetState(); do { static_assert( mozilla::detail::AssertionConditionType< decltype(state.mRangeStart == (1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mRangeStart == (1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3213 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1)" ")"); do { MOZ_CrashSequence(__null, 3213); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1 + blockBytes * (testBlocks - 1)))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (1 + blockBytes * (testBlocks - 1))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (1 + blockBytes * (testBlocks - 1))", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3213); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1 + blockBytes * (testBlocks - 1))" ")"); do { MOZ_CrashSequence(__null, 3213); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (testBlocks - 1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mPushedBlockCount == ( testBlocks - 1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mPushedBlockCount == (testBlocks - 1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3213); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (testBlocks - 1)" ")"); do { MOZ_CrashSequence(__null, 3213); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3213 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3213); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3213 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 3213); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }; | |||
| 3214 | ||||
| 3215 | #ifdef DEBUG1 | |||
| 3216 | // cbSingle.Dump(); | |||
| 3217 | // cbTarget.Dump(); | |||
| 3218 | #endif | |||
| 3219 | ||||
| 3220 | // Because we failed to write a too-big chunk above, the chunk was marked | |||
| 3221 | // full, so that entries should be consistently rejected from now on. | |||
| 3222 | cbSingle.Put(1, [&](Maybe<ProfileBufferEntryWriter>& aEW) { | |||
| 3223 | MOZ_RELEASE_ASSERT(aEW.isNothing())do { static_assert( mozilla::detail::AssertionConditionType< decltype(aEW.isNothing())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(aEW.isNothing()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("aEW.isNothing()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3223 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aEW.isNothing()" ")"); do { MOZ_CrashSequence(__null, 3223); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3224 | }); | |||
| 3225 | VERIFY_PCB_START_END_PUSHED_CLEARED_FAILED({ ProfileChunkedBuffer::State state = (cbSingle).GetState(); do { static_assert( mozilla::detail::AssertionConditionType< decltype(state.mRangeStart == (1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mRangeStart == (1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3227 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1)" ")"); do { MOZ_CrashSequence(__null, 3227); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1 + blockBytes * ((testBlocks - 1))))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (1 + blockBytes * ((testBlocks - 1)))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (1 + blockBytes * ((testBlocks - 1)))", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3227); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1 + blockBytes * ((testBlocks - 1)))" ")"); do { MOZ_CrashSequence(__null, 3227); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (testBlocks - 1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mPushedBlockCount == ( testBlocks - 1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mPushedBlockCount == (testBlocks - 1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3227); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (testBlocks - 1)" ")"); do { MOZ_CrashSequence(__null, 3227); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3227 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3227); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (remainingBytesForLastBlock + 1 + ULEB128Size(1u) + 1))> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (remainingBytesForLastBlock + 1 + ULEB128Size(1u) + 1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mFailedPutBytes == (remainingBytesForLastBlock + 1 + ULEB128Size(1u) + 1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3227 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (remainingBytesForLastBlock + 1 + ULEB128Size(1u) + 1)" ")"); do { MOZ_CrashSequence(__null, 3227); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); } | |||
| 3226 | cbSingle, 1, 1 + blockBytes * ((testBlocks - 1)), testBlocks - 1, 0,{ ProfileChunkedBuffer::State state = (cbSingle).GetState(); do { static_assert( mozilla::detail::AssertionConditionType< decltype(state.mRangeStart == (1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mRangeStart == (1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3227 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1)" ")"); do { MOZ_CrashSequence(__null, 3227); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1 + blockBytes * ((testBlocks - 1))))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (1 + blockBytes * ((testBlocks - 1)))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (1 + blockBytes * ((testBlocks - 1)))", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3227); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1 + blockBytes * ((testBlocks - 1)))" ")"); do { MOZ_CrashSequence(__null, 3227); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (testBlocks - 1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mPushedBlockCount == ( testBlocks - 1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mPushedBlockCount == (testBlocks - 1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3227); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (testBlocks - 1)" ")"); do { MOZ_CrashSequence(__null, 3227); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3227 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3227); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (remainingBytesForLastBlock + 1 + ULEB128Size(1u) + 1))> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (remainingBytesForLastBlock + 1 + ULEB128Size(1u) + 1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mFailedPutBytes == (remainingBytesForLastBlock + 1 + ULEB128Size(1u) + 1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3227 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (remainingBytesForLastBlock + 1 + ULEB128Size(1u) + 1)" ")"); do { MOZ_CrashSequence(__null, 3227); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); } | |||
| 3227 | remainingBytesForLastBlock + 1 + ULEB128Size(1u) + 1){ ProfileChunkedBuffer::State state = (cbSingle).GetState(); do { static_assert( mozilla::detail::AssertionConditionType< decltype(state.mRangeStart == (1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeStart == (1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mRangeStart == (1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3227 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1)" ")"); do { MOZ_CrashSequence(__null, 3227); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1 + blockBytes * ((testBlocks - 1))))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (1 + blockBytes * ((testBlocks - 1)))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (1 + blockBytes * ((testBlocks - 1)))", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3227); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1 + blockBytes * ((testBlocks - 1)))" ")"); do { MOZ_CrashSequence(__null, 3227); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (testBlocks - 1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mPushedBlockCount == ( testBlocks - 1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mPushedBlockCount == (testBlocks - 1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3227); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (testBlocks - 1)" ")"); do { MOZ_CrashSequence(__null, 3227); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3227 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3227); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (remainingBytesForLastBlock + 1 + ULEB128Size(1u) + 1))> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (remainingBytesForLastBlock + 1 + ULEB128Size(1u) + 1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mFailedPutBytes == (remainingBytesForLastBlock + 1 + ULEB128Size(1u) + 1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3227 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (remainingBytesForLastBlock + 1 + ULEB128Size(1u) + 1)" ")"); do { MOZ_CrashSequence(__null, 3227); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }; | |||
| 3228 | ||||
| 3229 | // Clear the buffer before the next test. | |||
| 3230 | ||||
| 3231 | cbSingle.Clear(); | |||
| 3232 | // Clear() should move the index to the next chunk range -- even if it's | |||
| 3233 | // really reusing the same chunk. | |||
| 3234 | VERIFY_PCB_START_END_PUSHED_CLEARED_FAILED(cbSingle, 1 + bufferBytes,{ ProfileChunkedBuffer::State state = (cbSingle).GetState(); do { static_assert( mozilla::detail::AssertionConditionType< decltype(state.mRangeStart == (1 + bufferBytes))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(state.mRangeStart == (1 + bufferBytes)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mRangeStart == (1 + bufferBytes)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3235 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1 + bufferBytes)" ")"); do { MOZ_CrashSequence(__null, 3235); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1 + bufferBytes))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (1 + bufferBytes )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (1 + bufferBytes)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3235); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1 + bufferBytes)" ")"); do { MOZ_CrashSequence(__null, 3235); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3235 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3235); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3235 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3235); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3235 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 3235); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); } | |||
| 3235 | 1 + bufferBytes, 0, 0, 0){ ProfileChunkedBuffer::State state = (cbSingle).GetState(); do { static_assert( mozilla::detail::AssertionConditionType< decltype(state.mRangeStart == (1 + bufferBytes))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(state.mRangeStart == (1 + bufferBytes)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mRangeStart == (1 + bufferBytes)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3235 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1 + bufferBytes)" ")"); do { MOZ_CrashSequence(__null, 3235); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1 + bufferBytes))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (1 + bufferBytes )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (1 + bufferBytes)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3235); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1 + bufferBytes)" ")"); do { MOZ_CrashSequence(__null, 3235); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3235 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3235); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3235 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3235); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3235 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 3235); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }; | |||
| 3236 | cbSingle.ReadEach( | |||
| 3237 | [&](ProfileBufferEntryReader& aER) { MOZ_RELEASE_ASSERT(false)do { static_assert( mozilla::detail::AssertionConditionType< decltype(false)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(false))), 0))) { do { } while ( false); MOZ_ReportAssertionFailure("false", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3237); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "false" ")"); do { MOZ_CrashSequence(__null, 3237); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }); | |||
| 3238 | ||||
| 3239 | // Second buffer-filling test: Try to write a final entry that just fits at | |||
| 3240 | // the end of the chunk. | |||
| 3241 | ||||
| 3242 | // Write all but one block. | |||
| 3243 | for (size_t i = 0; i < testBlocks - 1; ++i) { | |||
| 3244 | cbSingle.Put(entryBytes, [&](Maybe<ProfileBufferEntryWriter>& aEW) { | |||
| 3245 | MOZ_RELEASE_ASSERT(aEW.isSome())do { static_assert( mozilla::detail::AssertionConditionType< decltype(aEW.isSome())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(aEW.isSome()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("aEW.isSome()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3245); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aEW.isSome()" ")"); do { MOZ_CrashSequence(__null, 3245); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3246 | while (aEW->RemainingBytes() > 0) { | |||
| 3247 | **aEW = 'a' + i; | |||
| 3248 | ++(*aEW); | |||
| 3249 | } | |||
| 3250 | }); | |||
| 3251 | VERIFY_PCB_START_END_PUSHED_CLEARED_FAILED({ ProfileChunkedBuffer::State state = (cbSingle).GetState(); do { static_assert( mozilla::detail::AssertionConditionType< decltype(state.mRangeStart == (1 + bufferBytes))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(state.mRangeStart == (1 + bufferBytes)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mRangeStart == (1 + bufferBytes)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3253 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1 + bufferBytes)" ")"); do { MOZ_CrashSequence(__null, 3253); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1 + bufferBytes + blockBytes * (i + 1)))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (1 + bufferBytes + blockBytes * (i + 1))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (1 + bufferBytes + blockBytes * (i + 1))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3253 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1 + bufferBytes + blockBytes * (i + 1))" ")"); do { MOZ_CrashSequence(__null, 3253); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (i + 1))>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(state.mPushedBlockCount == (i + 1 )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mPushedBlockCount == (i + 1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3253); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (i + 1)" ")"); do { MOZ_CrashSequence(__null, 3253); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3253 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3253); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3253 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 3253); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); } | |||
| 3252 | cbSingle, 1 + bufferBytes, 1 + bufferBytes + blockBytes * (i + 1),{ ProfileChunkedBuffer::State state = (cbSingle).GetState(); do { static_assert( mozilla::detail::AssertionConditionType< decltype(state.mRangeStart == (1 + bufferBytes))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(state.mRangeStart == (1 + bufferBytes)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mRangeStart == (1 + bufferBytes)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3253 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1 + bufferBytes)" ")"); do { MOZ_CrashSequence(__null, 3253); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1 + bufferBytes + blockBytes * (i + 1)))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (1 + bufferBytes + blockBytes * (i + 1))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (1 + bufferBytes + blockBytes * (i + 1))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3253 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1 + bufferBytes + blockBytes * (i + 1))" ")"); do { MOZ_CrashSequence(__null, 3253); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (i + 1))>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(state.mPushedBlockCount == (i + 1 )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mPushedBlockCount == (i + 1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3253); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (i + 1)" ")"); do { MOZ_CrashSequence(__null, 3253); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3253 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3253); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3253 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 3253); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); } | |||
| 3253 | i + 1, 0, 0){ ProfileChunkedBuffer::State state = (cbSingle).GetState(); do { static_assert( mozilla::detail::AssertionConditionType< decltype(state.mRangeStart == (1 + bufferBytes))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(state.mRangeStart == (1 + bufferBytes)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mRangeStart == (1 + bufferBytes)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3253 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1 + bufferBytes)" ")"); do { MOZ_CrashSequence(__null, 3253); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1 + bufferBytes + blockBytes * (i + 1)))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (1 + bufferBytes + blockBytes * (i + 1))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (1 + bufferBytes + blockBytes * (i + 1))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3253 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1 + bufferBytes + blockBytes * (i + 1))" ")"); do { MOZ_CrashSequence(__null, 3253); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (i + 1))>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(state.mPushedBlockCount == (i + 1 )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mPushedBlockCount == (i + 1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3253); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (i + 1)" ")"); do { MOZ_CrashSequence(__null, 3253); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3253 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3253); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3253 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 3253); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }; | |||
| 3254 | } | |||
| 3255 | ||||
| 3256 | read = 0; | |||
| 3257 | cbSingle.ReadEach([&](ProfileBufferEntryReader& aER) { | |||
| 3258 | MOZ_RELEASE_ASSERT(aER.RemainingBytes() == entryBytes)do { static_assert( mozilla::detail::AssertionConditionType< decltype(aER.RemainingBytes() == entryBytes)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(aER.RemainingBytes() == entryBytes ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "aER.RemainingBytes() == entryBytes", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3258); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aER.RemainingBytes() == entryBytes" ")"); do { MOZ_CrashSequence(__null, 3258); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3259 | while (aER.RemainingBytes() > 0) { | |||
| 3260 | MOZ_RELEASE_ASSERT(*aER == 'a' + read)do { static_assert( mozilla::detail::AssertionConditionType< decltype(*aER == 'a' + read)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(*aER == 'a' + read))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("*aER == 'a' + read" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3260 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "*aER == 'a' + read" ")"); do { MOZ_CrashSequence(__null, 3260); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3261 | ++aER; | |||
| 3262 | } | |||
| 3263 | ++read; | |||
| 3264 | }); | |||
| 3265 | MOZ_RELEASE_ASSERT(read == testBlocks - 1)do { static_assert( mozilla::detail::AssertionConditionType< decltype(read == testBlocks - 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(read == testBlocks - 1))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("read == testBlocks - 1" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3265 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "read == testBlocks - 1" ")"); do { MOZ_CrashSequence(__null, 3265); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3266 | ||||
| 3267 | // Write the last block so that it fits exactly in the chunk. | |||
| 3268 | cbSingle.Put(entryToFitRemainingBytes, | |||
| 3269 | [&](Maybe<ProfileBufferEntryWriter>& aEW) { | |||
| 3270 | MOZ_RELEASE_ASSERT(aEW.isSome())do { static_assert( mozilla::detail::AssertionConditionType< decltype(aEW.isSome())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(aEW.isSome()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("aEW.isSome()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3270); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aEW.isSome()" ")"); do { MOZ_CrashSequence(__null, 3270); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3271 | while (aEW->RemainingBytes() > 0) { | |||
| 3272 | **aEW = 'a' + (testBlocks - 1); | |||
| 3273 | ++(*aEW); | |||
| 3274 | } | |||
| 3275 | }); | |||
| 3276 | VERIFY_PCB_START_END_PUSHED_CLEARED_FAILED({ ProfileChunkedBuffer::State state = (cbSingle).GetState(); do { static_assert( mozilla::detail::AssertionConditionType< decltype(state.mRangeStart == (1 + bufferBytes))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(state.mRangeStart == (1 + bufferBytes)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mRangeStart == (1 + bufferBytes)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3278 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1 + bufferBytes)" ")"); do { MOZ_CrashSequence(__null, 3278); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1 + bufferBytes + blockBytes * testBlocks))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(state.mRangeEnd == (1 + bufferBytes + blockBytes * testBlocks )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (1 + bufferBytes + blockBytes * testBlocks)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3278 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1 + bufferBytes + blockBytes * testBlocks)" ")"); do { MOZ_CrashSequence(__null, 3278); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (testBlocks))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mPushedBlockCount == ( testBlocks)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mPushedBlockCount == (testBlocks)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3278); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (testBlocks)" ")"); do { MOZ_CrashSequence(__null, 3278); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3278 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3278); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3278 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 3278); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); } | |||
| 3277 | cbSingle, 1 + bufferBytes, 1 + bufferBytes + blockBytes * testBlocks,{ ProfileChunkedBuffer::State state = (cbSingle).GetState(); do { static_assert( mozilla::detail::AssertionConditionType< decltype(state.mRangeStart == (1 + bufferBytes))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(state.mRangeStart == (1 + bufferBytes)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mRangeStart == (1 + bufferBytes)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3278 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1 + bufferBytes)" ")"); do { MOZ_CrashSequence(__null, 3278); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1 + bufferBytes + blockBytes * testBlocks))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(state.mRangeEnd == (1 + bufferBytes + blockBytes * testBlocks )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (1 + bufferBytes + blockBytes * testBlocks)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3278 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1 + bufferBytes + blockBytes * testBlocks)" ")"); do { MOZ_CrashSequence(__null, 3278); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (testBlocks))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mPushedBlockCount == ( testBlocks)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mPushedBlockCount == (testBlocks)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3278); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (testBlocks)" ")"); do { MOZ_CrashSequence(__null, 3278); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3278 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3278); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3278 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 3278); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); } | |||
| 3278 | testBlocks, 0, 0){ ProfileChunkedBuffer::State state = (cbSingle).GetState(); do { static_assert( mozilla::detail::AssertionConditionType< decltype(state.mRangeStart == (1 + bufferBytes))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(state.mRangeStart == (1 + bufferBytes)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mRangeStart == (1 + bufferBytes)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3278 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1 + bufferBytes)" ")"); do { MOZ_CrashSequence(__null, 3278); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1 + bufferBytes + blockBytes * testBlocks))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(state.mRangeEnd == (1 + bufferBytes + blockBytes * testBlocks )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (1 + bufferBytes + blockBytes * testBlocks)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3278 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1 + bufferBytes + blockBytes * testBlocks)" ")"); do { MOZ_CrashSequence(__null, 3278); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (testBlocks))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mPushedBlockCount == ( testBlocks)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mPushedBlockCount == (testBlocks)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3278); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (testBlocks)" ")"); do { MOZ_CrashSequence(__null, 3278); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3278 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3278); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3278 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 3278); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }; | |||
| 3279 | ||||
| 3280 | read = 0; | |||
| 3281 | cbSingle.ReadEach([&](ProfileBufferEntryReader& aER) { | |||
| 3282 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(aER.RemainingBytes() == ((read < testBlocks) ? entryBytes : entryToFitRemainingBytes))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(aER.RemainingBytes() == ((read < testBlocks) ? entryBytes : entryToFitRemainingBytes)))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("aER.RemainingBytes() == ((read < testBlocks) ? entryBytes : entryToFitRemainingBytes)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3284 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aER.RemainingBytes() == ((read < testBlocks) ? entryBytes : entryToFitRemainingBytes)" ")"); do { MOZ_CrashSequence(__null, 3284); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 3283 | aER.RemainingBytes() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(aER.RemainingBytes() == ((read < testBlocks) ? entryBytes : entryToFitRemainingBytes))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(aER.RemainingBytes() == ((read < testBlocks) ? entryBytes : entryToFitRemainingBytes)))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("aER.RemainingBytes() == ((read < testBlocks) ? entryBytes : entryToFitRemainingBytes)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3284 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aER.RemainingBytes() == ((read < testBlocks) ? entryBytes : entryToFitRemainingBytes)" ")"); do { MOZ_CrashSequence(__null, 3284); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 3284 | ((read < testBlocks) ? entryBytes : entryToFitRemainingBytes))do { static_assert( mozilla::detail::AssertionConditionType< decltype(aER.RemainingBytes() == ((read < testBlocks) ? entryBytes : entryToFitRemainingBytes))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(aER.RemainingBytes() == ((read < testBlocks) ? entryBytes : entryToFitRemainingBytes)))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("aER.RemainingBytes() == ((read < testBlocks) ? entryBytes : entryToFitRemainingBytes)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3284 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aER.RemainingBytes() == ((read < testBlocks) ? entryBytes : entryToFitRemainingBytes)" ")"); do { MOZ_CrashSequence(__null, 3284); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3285 | while (aER.RemainingBytes() > 0) { | |||
| 3286 | MOZ_RELEASE_ASSERT(*aER == 'a' + read)do { static_assert( mozilla::detail::AssertionConditionType< decltype(*aER == 'a' + read)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(*aER == 'a' + read))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("*aER == 'a' + read" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3286 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "*aER == 'a' + read" ")"); do { MOZ_CrashSequence(__null, 3286); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3287 | ++aER; | |||
| 3288 | } | |||
| 3289 | ++read; | |||
| 3290 | }); | |||
| 3291 | MOZ_RELEASE_ASSERT(read == testBlocks)do { static_assert( mozilla::detail::AssertionConditionType< decltype(read == testBlocks)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(read == testBlocks))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("read == testBlocks" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3291 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "read == testBlocks" ")"); do { MOZ_CrashSequence(__null, 3291); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3292 | ||||
| 3293 | // Because the single chunk has been filled, it shouldn't be possible to write | |||
| 3294 | // more entries. | |||
| 3295 | cbSingle.Put(1, [&](Maybe<ProfileBufferEntryWriter>& aEW) { | |||
| 3296 | MOZ_RELEASE_ASSERT(aEW.isNothing())do { static_assert( mozilla::detail::AssertionConditionType< decltype(aEW.isNothing())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(aEW.isNothing()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("aEW.isNothing()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3296 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aEW.isNothing()" ")"); do { MOZ_CrashSequence(__null, 3296); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3297 | }); | |||
| 3298 | VERIFY_PCB_START_END_PUSHED_CLEARED_FAILED({ ProfileChunkedBuffer::State state = (cbSingle).GetState(); do { static_assert( mozilla::detail::AssertionConditionType< decltype(state.mRangeStart == (1 + bufferBytes))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(state.mRangeStart == (1 + bufferBytes)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mRangeStart == (1 + bufferBytes)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3300 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1 + bufferBytes)" ")"); do { MOZ_CrashSequence(__null, 3300); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1 + bufferBytes + blockBytes * testBlocks))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(state.mRangeEnd == (1 + bufferBytes + blockBytes * testBlocks )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (1 + bufferBytes + blockBytes * testBlocks)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3300 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1 + bufferBytes + blockBytes * testBlocks)" ")"); do { MOZ_CrashSequence(__null, 3300); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (testBlocks))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mPushedBlockCount == ( testBlocks)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mPushedBlockCount == (testBlocks)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3300); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (testBlocks)" ")"); do { MOZ_CrashSequence(__null, 3300); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3300 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3300); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (ULEB128Size(1u) + 1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mFailedPutBytes == (ULEB128Size (1u) + 1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mFailedPutBytes == (ULEB128Size(1u) + 1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3300); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (ULEB128Size(1u) + 1)" ")"); do { MOZ_CrashSequence(__null, 3300); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); } | |||
| 3299 | cbSingle, 1 + bufferBytes, 1 + bufferBytes + blockBytes * testBlocks,{ ProfileChunkedBuffer::State state = (cbSingle).GetState(); do { static_assert( mozilla::detail::AssertionConditionType< decltype(state.mRangeStart == (1 + bufferBytes))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(state.mRangeStart == (1 + bufferBytes)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mRangeStart == (1 + bufferBytes)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3300 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1 + bufferBytes)" ")"); do { MOZ_CrashSequence(__null, 3300); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1 + bufferBytes + blockBytes * testBlocks))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(state.mRangeEnd == (1 + bufferBytes + blockBytes * testBlocks )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (1 + bufferBytes + blockBytes * testBlocks)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3300 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1 + bufferBytes + blockBytes * testBlocks)" ")"); do { MOZ_CrashSequence(__null, 3300); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (testBlocks))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mPushedBlockCount == ( testBlocks)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mPushedBlockCount == (testBlocks)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3300); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (testBlocks)" ")"); do { MOZ_CrashSequence(__null, 3300); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3300 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3300); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (ULEB128Size(1u) + 1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mFailedPutBytes == (ULEB128Size (1u) + 1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mFailedPutBytes == (ULEB128Size(1u) + 1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3300); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (ULEB128Size(1u) + 1)" ")"); do { MOZ_CrashSequence(__null, 3300); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); } | |||
| 3300 | testBlocks, 0, ULEB128Size(1u) + 1){ ProfileChunkedBuffer::State state = (cbSingle).GetState(); do { static_assert( mozilla::detail::AssertionConditionType< decltype(state.mRangeStart == (1 + bufferBytes))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(state.mRangeStart == (1 + bufferBytes)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mRangeStart == (1 + bufferBytes)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3300 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1 + bufferBytes)" ")"); do { MOZ_CrashSequence(__null, 3300); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1 + bufferBytes + blockBytes * testBlocks))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(state.mRangeEnd == (1 + bufferBytes + blockBytes * testBlocks )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (1 + bufferBytes + blockBytes * testBlocks)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3300 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1 + bufferBytes + blockBytes * testBlocks)" ")"); do { MOZ_CrashSequence(__null, 3300); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (testBlocks))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mPushedBlockCount == ( testBlocks)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mPushedBlockCount == (testBlocks)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3300); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (testBlocks)" ")"); do { MOZ_CrashSequence(__null, 3300); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3300 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3300); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (ULEB128Size(1u) + 1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mFailedPutBytes == (ULEB128Size (1u) + 1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mFailedPutBytes == (ULEB128Size(1u) + 1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3300); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (ULEB128Size(1u) + 1)" ")"); do { MOZ_CrashSequence(__null, 3300); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }; | |||
| 3301 | ||||
| 3302 | cbSingle.Clear(); | |||
| 3303 | // Clear() should move the index to the next chunk range -- even if it's | |||
| 3304 | // really reusing the same chunk. | |||
| 3305 | VERIFY_PCB_START_END_PUSHED_CLEARED_FAILED(cbSingle, 1 + bufferBytes * 2,{ ProfileChunkedBuffer::State state = (cbSingle).GetState(); do { static_assert( mozilla::detail::AssertionConditionType< decltype(state.mRangeStart == (1 + bufferBytes * 2))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(state.mRangeStart == (1 + bufferBytes * 2)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mRangeStart == (1 + bufferBytes * 2)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3306 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1 + bufferBytes * 2)" ")"); do { MOZ_CrashSequence(__null, 3306); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1 + bufferBytes * 2))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (1 + bufferBytes * 2)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (1 + bufferBytes * 2)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3306); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1 + bufferBytes * 2)" ")"); do { MOZ_CrashSequence(__null, 3306); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3306 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3306); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3306 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3306); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3306 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 3306); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); } | |||
| 3306 | 1 + bufferBytes * 2, 0, 0, 0){ ProfileChunkedBuffer::State state = (cbSingle).GetState(); do { static_assert( mozilla::detail::AssertionConditionType< decltype(state.mRangeStart == (1 + bufferBytes * 2))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(state.mRangeStart == (1 + bufferBytes * 2)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mRangeStart == (1 + bufferBytes * 2)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3306 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1 + bufferBytes * 2)" ")"); do { MOZ_CrashSequence(__null, 3306); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1 + bufferBytes * 2))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(state.mRangeEnd == (1 + bufferBytes * 2)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (1 + bufferBytes * 2)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3306); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1 + bufferBytes * 2)" ")"); do { MOZ_CrashSequence(__null, 3306); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3306 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3306); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3306 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3306); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3306 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 3306); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }; | |||
| 3307 | cbSingle.ReadEach( | |||
| 3308 | [&](ProfileBufferEntryReader& aER) { MOZ_RELEASE_ASSERT(false)do { static_assert( mozilla::detail::AssertionConditionType< decltype(false)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(false))), 0))) { do { } while ( false); MOZ_ReportAssertionFailure("false", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3308); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "false" ")"); do { MOZ_CrashSequence(__null, 3308); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }); | |||
| 3309 | ||||
| 3310 | // Clear() recycles the released chunk, so we should be able to record new | |||
| 3311 | // entries. | |||
| 3312 | cbSingle.Put(entryBytes, [&](Maybe<ProfileBufferEntryWriter>& aEW) { | |||
| 3313 | MOZ_RELEASE_ASSERT(aEW.isSome())do { static_assert( mozilla::detail::AssertionConditionType< decltype(aEW.isSome())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(aEW.isSome()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("aEW.isSome()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3313); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aEW.isSome()" ")"); do { MOZ_CrashSequence(__null, 3313); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3314 | while (aEW->RemainingBytes() > 0) { | |||
| 3315 | **aEW = 'x'; | |||
| 3316 | ++(*aEW); | |||
| 3317 | } | |||
| 3318 | }); | |||
| 3319 | VERIFY_PCB_START_END_PUSHED_CLEARED_FAILED({ ProfileChunkedBuffer::State state = (cbSingle).GetState(); do { static_assert( mozilla::detail::AssertionConditionType< decltype(state.mRangeStart == (1 + bufferBytes * 2))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(state.mRangeStart == (1 + bufferBytes * 2)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mRangeStart == (1 + bufferBytes * 2)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3321 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1 + bufferBytes * 2)" ")"); do { MOZ_CrashSequence(__null, 3321); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1 + bufferBytes * 2 + ULEB128Size(entryBytes) + entryBytes ))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mRangeEnd == (1 + bufferBytes * 2 + ULEB128Size (entryBytes) + entryBytes)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (1 + bufferBytes * 2 + ULEB128Size(entryBytes) + entryBytes)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3321 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1 + bufferBytes * 2 + ULEB128Size(entryBytes) + entryBytes)" ")"); do { MOZ_CrashSequence(__null, 3321); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (1))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3321 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (1)" ")"); do { MOZ_CrashSequence(__null, 3321); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3321 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3321); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3321 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 3321); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); } | |||
| 3320 | cbSingle, 1 + bufferBytes * 2,{ ProfileChunkedBuffer::State state = (cbSingle).GetState(); do { static_assert( mozilla::detail::AssertionConditionType< decltype(state.mRangeStart == (1 + bufferBytes * 2))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(state.mRangeStart == (1 + bufferBytes * 2)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mRangeStart == (1 + bufferBytes * 2)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3321 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1 + bufferBytes * 2)" ")"); do { MOZ_CrashSequence(__null, 3321); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1 + bufferBytes * 2 + ULEB128Size(entryBytes) + entryBytes ))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mRangeEnd == (1 + bufferBytes * 2 + ULEB128Size (entryBytes) + entryBytes)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (1 + bufferBytes * 2 + ULEB128Size(entryBytes) + entryBytes)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3321 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1 + bufferBytes * 2 + ULEB128Size(entryBytes) + entryBytes)" ")"); do { MOZ_CrashSequence(__null, 3321); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (1))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3321 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (1)" ")"); do { MOZ_CrashSequence(__null, 3321); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3321 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3321); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3321 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 3321); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); } | |||
| 3321 | 1 + bufferBytes * 2 + ULEB128Size(entryBytes) + entryBytes, 1, 0, 0){ ProfileChunkedBuffer::State state = (cbSingle).GetState(); do { static_assert( mozilla::detail::AssertionConditionType< decltype(state.mRangeStart == (1 + bufferBytes * 2))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(state.mRangeStart == (1 + bufferBytes * 2)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mRangeStart == (1 + bufferBytes * 2)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3321 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeStart == (1 + bufferBytes * 2)" ")"); do { MOZ_CrashSequence(__null, 3321); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mRangeEnd == (1 + bufferBytes * 2 + ULEB128Size(entryBytes) + entryBytes ))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mRangeEnd == (1 + bufferBytes * 2 + ULEB128Size (entryBytes) + entryBytes)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("state.mRangeEnd == (1 + bufferBytes * 2 + ULEB128Size(entryBytes) + entryBytes)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3321 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mRangeEnd == (1 + bufferBytes * 2 + ULEB128Size(entryBytes) + entryBytes)" ")"); do { MOZ_CrashSequence(__null, 3321); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mPushedBlockCount == (1))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mPushedBlockCount == (1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mPushedBlockCount == (1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3321 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mPushedBlockCount == (1)" ")"); do { MOZ_CrashSequence(__null, 3321); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mClearedBlockCount == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mClearedBlockCount == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mClearedBlockCount == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3321 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mClearedBlockCount == (0)" ")"); do { MOZ_CrashSequence(__null, 3321); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); do { static_assert ( mozilla::detail::AssertionConditionType<decltype(state.mFailedPutBytes == (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(state.mFailedPutBytes == (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("state.mFailedPutBytes == (0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3321 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "state.mFailedPutBytes == (0)" ")"); do { MOZ_CrashSequence(__null, 3321); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); }; | |||
| 3322 | read = 0; | |||
| 3323 | cbSingle.ReadEach([&](ProfileBufferEntryReader& aER) { | |||
| 3324 | MOZ_RELEASE_ASSERT(read == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(read == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(read == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("read == 0", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3324); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "read == 0" ")"); do { MOZ_CrashSequence(__null, 3324); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3325 | MOZ_RELEASE_ASSERT(aER.RemainingBytes() == entryBytes)do { static_assert( mozilla::detail::AssertionConditionType< decltype(aER.RemainingBytes() == entryBytes)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(aER.RemainingBytes() == entryBytes ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "aER.RemainingBytes() == entryBytes", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3325); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aER.RemainingBytes() == entryBytes" ")"); do { MOZ_CrashSequence(__null, 3325); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3326 | while (aER.RemainingBytes() > 0) { | |||
| 3327 | MOZ_RELEASE_ASSERT(*aER == 'x')do { static_assert( mozilla::detail::AssertionConditionType< decltype(*aER == 'x')>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(*aER == 'x'))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("*aER == 'x'", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3327); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "*aER == 'x'" ")"); do { MOZ_CrashSequence(__null, 3327); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3328 | ++aER; | |||
| 3329 | } | |||
| 3330 | ++read; | |||
| 3331 | }); | |||
| 3332 | MOZ_RELEASE_ASSERT(read == 1)do { static_assert( mozilla::detail::AssertionConditionType< decltype(read == 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(read == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("read == 1", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3332); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "read == 1" ")"); do { MOZ_CrashSequence(__null, 3332); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3333 | ||||
| 3334 | printf("TestChunkedBufferSingle done\n"); | |||
| 3335 | } | |||
| 3336 | ||||
| 3337 | static void TestModuloBuffer(ModuloBuffer<>& mb, uint32_t MBSize) { | |||
| 3338 | using MB = ModuloBuffer<>; | |||
| 3339 | ||||
| 3340 | MOZ_RELEASE_ASSERT(mb.BufferLength().Value() == MBSize)do { static_assert( mozilla::detail::AssertionConditionType< decltype(mb.BufferLength().Value() == MBSize)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mb.BufferLength().Value() == MBSize))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("mb.BufferLength().Value() == MBSize", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3340); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mb.BufferLength().Value() == MBSize" ")"); do { MOZ_CrashSequence(__null, 3340); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3341 | ||||
| 3342 | // Iterator comparisons. | |||
| 3343 | MOZ_RELEASE_ASSERT(mb.ReaderAt(2) == mb.ReaderAt(2))do { static_assert( mozilla::detail::AssertionConditionType< decltype(mb.ReaderAt(2) == mb.ReaderAt(2))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mb.ReaderAt(2) == mb.ReaderAt (2)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("mb.ReaderAt(2) == mb.ReaderAt(2)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3343); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mb.ReaderAt(2) == mb.ReaderAt(2)" ")"); do { MOZ_CrashSequence(__null, 3343); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3344 | MOZ_RELEASE_ASSERT(mb.ReaderAt(2) != mb.ReaderAt(3))do { static_assert( mozilla::detail::AssertionConditionType< decltype(mb.ReaderAt(2) != mb.ReaderAt(3))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mb.ReaderAt(2) != mb.ReaderAt (3)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("mb.ReaderAt(2) != mb.ReaderAt(3)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3344); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mb.ReaderAt(2) != mb.ReaderAt(3)" ")"); do { MOZ_CrashSequence(__null, 3344); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3345 | MOZ_RELEASE_ASSERT(mb.ReaderAt(2) < mb.ReaderAt(3))do { static_assert( mozilla::detail::AssertionConditionType< decltype(mb.ReaderAt(2) < mb.ReaderAt(3))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mb.ReaderAt(2) < mb.ReaderAt (3)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("mb.ReaderAt(2) < mb.ReaderAt(3)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3345); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mb.ReaderAt(2) < mb.ReaderAt(3)" ")"); do { MOZ_CrashSequence(__null, 3345); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3346 | MOZ_RELEASE_ASSERT(mb.ReaderAt(2) <= mb.ReaderAt(2))do { static_assert( mozilla::detail::AssertionConditionType< decltype(mb.ReaderAt(2) <= mb.ReaderAt(2))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mb.ReaderAt(2) <= mb.ReaderAt (2)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("mb.ReaderAt(2) <= mb.ReaderAt(2)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3346); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mb.ReaderAt(2) <= mb.ReaderAt(2)" ")"); do { MOZ_CrashSequence(__null, 3346); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3347 | MOZ_RELEASE_ASSERT(mb.ReaderAt(2) <= mb.ReaderAt(3))do { static_assert( mozilla::detail::AssertionConditionType< decltype(mb.ReaderAt(2) <= mb.ReaderAt(3))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mb.ReaderAt(2) <= mb.ReaderAt (3)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("mb.ReaderAt(2) <= mb.ReaderAt(3)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3347); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mb.ReaderAt(2) <= mb.ReaderAt(3)" ")"); do { MOZ_CrashSequence(__null, 3347); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3348 | MOZ_RELEASE_ASSERT(mb.ReaderAt(3) > mb.ReaderAt(2))do { static_assert( mozilla::detail::AssertionConditionType< decltype(mb.ReaderAt(3) > mb.ReaderAt(2))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mb.ReaderAt(3) > mb.ReaderAt (2)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("mb.ReaderAt(3) > mb.ReaderAt(2)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3348); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mb.ReaderAt(3) > mb.ReaderAt(2)" ")"); do { MOZ_CrashSequence(__null, 3348); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3349 | MOZ_RELEASE_ASSERT(mb.ReaderAt(2) >= mb.ReaderAt(2))do { static_assert( mozilla::detail::AssertionConditionType< decltype(mb.ReaderAt(2) >= mb.ReaderAt(2))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mb.ReaderAt(2) >= mb.ReaderAt (2)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("mb.ReaderAt(2) >= mb.ReaderAt(2)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3349); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mb.ReaderAt(2) >= mb.ReaderAt(2)" ")"); do { MOZ_CrashSequence(__null, 3349); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3350 | MOZ_RELEASE_ASSERT(mb.ReaderAt(3) >= mb.ReaderAt(2))do { static_assert( mozilla::detail::AssertionConditionType< decltype(mb.ReaderAt(3) >= mb.ReaderAt(2))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mb.ReaderAt(3) >= mb.ReaderAt (2)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("mb.ReaderAt(3) >= mb.ReaderAt(2)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3350); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mb.ReaderAt(3) >= mb.ReaderAt(2)" ")"); do { MOZ_CrashSequence(__null, 3350); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3351 | ||||
| 3352 | // Iterators indices don't wrap around (even though they may be pointing at | |||
| 3353 | // the same location). | |||
| 3354 | MOZ_RELEASE_ASSERT(mb.ReaderAt(2) != mb.ReaderAt(MBSize + 2))do { static_assert( mozilla::detail::AssertionConditionType< decltype(mb.ReaderAt(2) != mb.ReaderAt(MBSize + 2))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(mb.ReaderAt(2) != mb.ReaderAt(MBSize + 2)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("mb.ReaderAt(2) != mb.ReaderAt(MBSize + 2)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3354 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mb.ReaderAt(2) != mb.ReaderAt(MBSize + 2)" ")"); do { MOZ_CrashSequence(__null, 3354); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3355 | MOZ_RELEASE_ASSERT(mb.ReaderAt(MBSize + 2) != mb.ReaderAt(2))do { static_assert( mozilla::detail::AssertionConditionType< decltype(mb.ReaderAt(MBSize + 2) != mb.ReaderAt(2))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(mb.ReaderAt(MBSize + 2) != mb.ReaderAt(2)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("mb.ReaderAt(MBSize + 2) != mb.ReaderAt(2)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3355 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mb.ReaderAt(MBSize + 2) != mb.ReaderAt(2)" ")"); do { MOZ_CrashSequence(__null, 3355); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3356 | ||||
| 3357 | // Dereference. | |||
| 3358 | static_assert(std::is_same<decltype(*mb.ReaderAt(0)), const MB::Byte&>::value, | |||
| 3359 | "Dereferencing from a reader should return const Byte*"); | |||
| 3360 | static_assert(std::is_same<decltype(*mb.WriterAt(0)), MB::Byte&>::value, | |||
| 3361 | "Dereferencing from a writer should return Byte*"); | |||
| 3362 | // Contiguous between 0 and MBSize-1. | |||
| 3363 | MOZ_RELEASE_ASSERT(&*mb.ReaderAt(MBSize - 1) ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(&*mb.ReaderAt(MBSize - 1) == &*mb.ReaderAt(0 ) + (MBSize - 1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(&*mb.ReaderAt(MBSize - 1 ) == &*mb.ReaderAt(0) + (MBSize - 1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("&*mb.ReaderAt(MBSize - 1) == &*mb.ReaderAt(0) + (MBSize - 1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3364 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&*mb.ReaderAt(MBSize - 1) == &*mb.ReaderAt(0) + (MBSize - 1)" ")"); do { MOZ_CrashSequence(__null, 3364); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 3364 | &*mb.ReaderAt(0) + (MBSize - 1))do { static_assert( mozilla::detail::AssertionConditionType< decltype(&*mb.ReaderAt(MBSize - 1) == &*mb.ReaderAt(0 ) + (MBSize - 1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(&*mb.ReaderAt(MBSize - 1 ) == &*mb.ReaderAt(0) + (MBSize - 1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("&*mb.ReaderAt(MBSize - 1) == &*mb.ReaderAt(0) + (MBSize - 1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3364 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&*mb.ReaderAt(MBSize - 1) == &*mb.ReaderAt(0) + (MBSize - 1)" ")"); do { MOZ_CrashSequence(__null, 3364); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3365 | // Wraps around. | |||
| 3366 | MOZ_RELEASE_ASSERT(&*mb.ReaderAt(MBSize) == &*mb.ReaderAt(0))do { static_assert( mozilla::detail::AssertionConditionType< decltype(&*mb.ReaderAt(MBSize) == &*mb.ReaderAt(0))> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(&*mb.ReaderAt(MBSize) == &*mb.ReaderAt(0)))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("&*mb.ReaderAt(MBSize) == &*mb.ReaderAt(0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3366 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&*mb.ReaderAt(MBSize) == &*mb.ReaderAt(0)" ")"); do { MOZ_CrashSequence(__null, 3366); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3367 | MOZ_RELEASE_ASSERT(&*mb.ReaderAt(MBSize + MBSize - 1) ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(&*mb.ReaderAt(MBSize + MBSize - 1) == &*mb.ReaderAt (MBSize - 1))>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(&*mb.ReaderAt(MBSize + MBSize - 1) == &*mb.ReaderAt(MBSize - 1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("&*mb.ReaderAt(MBSize + MBSize - 1) == &*mb.ReaderAt(MBSize - 1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3368 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&*mb.ReaderAt(MBSize + MBSize - 1) == &*mb.ReaderAt(MBSize - 1)" ")"); do { MOZ_CrashSequence(__null, 3368); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 3368 | &*mb.ReaderAt(MBSize - 1))do { static_assert( mozilla::detail::AssertionConditionType< decltype(&*mb.ReaderAt(MBSize + MBSize - 1) == &*mb.ReaderAt (MBSize - 1))>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(&*mb.ReaderAt(MBSize + MBSize - 1) == &*mb.ReaderAt(MBSize - 1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("&*mb.ReaderAt(MBSize + MBSize - 1) == &*mb.ReaderAt(MBSize - 1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3368 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&*mb.ReaderAt(MBSize + MBSize - 1) == &*mb.ReaderAt(MBSize - 1)" ")"); do { MOZ_CrashSequence(__null, 3368); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3369 | MOZ_RELEASE_ASSERT(&*mb.ReaderAt(MBSize + MBSize) == &*mb.ReaderAt(0))do { static_assert( mozilla::detail::AssertionConditionType< decltype(&*mb.ReaderAt(MBSize + MBSize) == &*mb.ReaderAt (0))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(&*mb.ReaderAt(MBSize + MBSize) == &*mb.ReaderAt (0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("&*mb.ReaderAt(MBSize + MBSize) == &*mb.ReaderAt(0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3369 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&*mb.ReaderAt(MBSize + MBSize) == &*mb.ReaderAt(0)" ")"); do { MOZ_CrashSequence(__null, 3369); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3370 | // Power of 2 modulo wrapping. | |||
| 3371 | MOZ_RELEASE_ASSERT(&*mb.ReaderAt(uint32_t(-1)) == &*mb.ReaderAt(MBSize - 1))do { static_assert( mozilla::detail::AssertionConditionType< decltype(&*mb.ReaderAt(uint32_t(-1)) == &*mb.ReaderAt (MBSize - 1))>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(&*mb.ReaderAt(uint32_t(-1)) == &*mb.ReaderAt(MBSize - 1)))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("&*mb.ReaderAt(uint32_t(-1)) == &*mb.ReaderAt(MBSize - 1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3371 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&*mb.ReaderAt(uint32_t(-1)) == &*mb.ReaderAt(MBSize - 1)" ")"); do { MOZ_CrashSequence(__null, 3371); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3372 | MOZ_RELEASE_ASSERT(&*mb.ReaderAt(static_cast<MB::Index>(-1)) ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(&*mb.ReaderAt(static_cast<MB::Index>(-1)) == &*mb.ReaderAt(MBSize - 1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(&*mb.ReaderAt(static_cast <MB::Index>(-1)) == &*mb.ReaderAt(MBSize - 1)))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("&*mb.ReaderAt(static_cast<MB::Index>(-1)) == &*mb.ReaderAt(MBSize - 1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3373 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&*mb.ReaderAt(static_cast<MB::Index>(-1)) == &*mb.ReaderAt(MBSize - 1)" ")"); do { MOZ_CrashSequence(__null, 3373); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 3373 | &*mb.ReaderAt(MBSize - 1))do { static_assert( mozilla::detail::AssertionConditionType< decltype(&*mb.ReaderAt(static_cast<MB::Index>(-1)) == &*mb.ReaderAt(MBSize - 1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(&*mb.ReaderAt(static_cast <MB::Index>(-1)) == &*mb.ReaderAt(MBSize - 1)))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("&*mb.ReaderAt(static_cast<MB::Index>(-1)) == &*mb.ReaderAt(MBSize - 1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3373 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&*mb.ReaderAt(static_cast<MB::Index>(-1)) == &*mb.ReaderAt(MBSize - 1)" ")"); do { MOZ_CrashSequence(__null, 3373); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3374 | ||||
| 3375 | // Arithmetic. | |||
| 3376 | MB::Reader arit = mb.ReaderAt(0); | |||
| 3377 | MOZ_RELEASE_ASSERT(++arit == mb.ReaderAt(1))do { static_assert( mozilla::detail::AssertionConditionType< decltype(++arit == mb.ReaderAt(1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(++arit == mb.ReaderAt(1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("++arit == mb.ReaderAt(1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3377 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "++arit == mb.ReaderAt(1)" ")"); do { MOZ_CrashSequence(__null, 3377); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3378 | MOZ_RELEASE_ASSERT(arit == mb.ReaderAt(1))do { static_assert( mozilla::detail::AssertionConditionType< decltype(arit == mb.ReaderAt(1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(arit == mb.ReaderAt(1)))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("arit == mb.ReaderAt(1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3378 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "arit == mb.ReaderAt(1)" ")"); do { MOZ_CrashSequence(__null, 3378); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3379 | ||||
| 3380 | MOZ_RELEASE_ASSERT(--arit == mb.ReaderAt(0))do { static_assert( mozilla::detail::AssertionConditionType< decltype(--arit == mb.ReaderAt(0))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(--arit == mb.ReaderAt(0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("--arit == mb.ReaderAt(0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3380 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "--arit == mb.ReaderAt(0)" ")"); do { MOZ_CrashSequence(__null, 3380); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3381 | MOZ_RELEASE_ASSERT(arit == mb.ReaderAt(0))do { static_assert( mozilla::detail::AssertionConditionType< decltype(arit == mb.ReaderAt(0))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(arit == mb.ReaderAt(0)))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("arit == mb.ReaderAt(0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3381 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "arit == mb.ReaderAt(0)" ")"); do { MOZ_CrashSequence(__null, 3381); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3382 | ||||
| 3383 | MOZ_RELEASE_ASSERT(arit++ == mb.ReaderAt(0))do { static_assert( mozilla::detail::AssertionConditionType< decltype(arit++ == mb.ReaderAt(0))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(arit++ == mb.ReaderAt(0)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("arit++ == mb.ReaderAt(0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3383 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "arit++ == mb.ReaderAt(0)" ")"); do { MOZ_CrashSequence(__null, 3383); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3384 | MOZ_RELEASE_ASSERT(arit == mb.ReaderAt(1))do { static_assert( mozilla::detail::AssertionConditionType< decltype(arit == mb.ReaderAt(1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(arit == mb.ReaderAt(1)))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("arit == mb.ReaderAt(1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3384 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "arit == mb.ReaderAt(1)" ")"); do { MOZ_CrashSequence(__null, 3384); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3385 | ||||
| 3386 | MOZ_RELEASE_ASSERT(arit-- == mb.ReaderAt(1))do { static_assert( mozilla::detail::AssertionConditionType< decltype(arit-- == mb.ReaderAt(1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(arit-- == mb.ReaderAt(1)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("arit-- == mb.ReaderAt(1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3386 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "arit-- == mb.ReaderAt(1)" ")"); do { MOZ_CrashSequence(__null, 3386); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3387 | MOZ_RELEASE_ASSERT(arit == mb.ReaderAt(0))do { static_assert( mozilla::detail::AssertionConditionType< decltype(arit == mb.ReaderAt(0))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(arit == mb.ReaderAt(0)))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("arit == mb.ReaderAt(0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3387 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "arit == mb.ReaderAt(0)" ")"); do { MOZ_CrashSequence(__null, 3387); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3388 | ||||
| 3389 | MOZ_RELEASE_ASSERT(arit + 3 == mb.ReaderAt(3))do { static_assert( mozilla::detail::AssertionConditionType< decltype(arit + 3 == mb.ReaderAt(3))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(arit + 3 == mb.ReaderAt(3))) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("arit + 3 == mb.ReaderAt(3)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3389 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "arit + 3 == mb.ReaderAt(3)" ")"); do { MOZ_CrashSequence(__null, 3389); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3390 | MOZ_RELEASE_ASSERT(arit == mb.ReaderAt(0))do { static_assert( mozilla::detail::AssertionConditionType< decltype(arit == mb.ReaderAt(0))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(arit == mb.ReaderAt(0)))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("arit == mb.ReaderAt(0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3390 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "arit == mb.ReaderAt(0)" ")"); do { MOZ_CrashSequence(__null, 3390); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3391 | ||||
| 3392 | MOZ_RELEASE_ASSERT(4 + arit == mb.ReaderAt(4))do { static_assert( mozilla::detail::AssertionConditionType< decltype(4 + arit == mb.ReaderAt(4))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(4 + arit == mb.ReaderAt(4))) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("4 + arit == mb.ReaderAt(4)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3392 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "4 + arit == mb.ReaderAt(4)" ")"); do { MOZ_CrashSequence(__null, 3392); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3393 | MOZ_RELEASE_ASSERT(arit == mb.ReaderAt(0))do { static_assert( mozilla::detail::AssertionConditionType< decltype(arit == mb.ReaderAt(0))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(arit == mb.ReaderAt(0)))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("arit == mb.ReaderAt(0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3393 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "arit == mb.ReaderAt(0)" ")"); do { MOZ_CrashSequence(__null, 3393); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3394 | ||||
| 3395 | // (Can't have assignments inside asserts, hence the split.) | |||
| 3396 | const bool checkPlusEq = ((arit += 3) == mb.ReaderAt(3)); | |||
| 3397 | MOZ_RELEASE_ASSERT(checkPlusEq)do { static_assert( mozilla::detail::AssertionConditionType< decltype(checkPlusEq)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(checkPlusEq))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("checkPlusEq", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3397); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "checkPlusEq" ")"); do { MOZ_CrashSequence(__null, 3397); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3398 | MOZ_RELEASE_ASSERT(arit == mb.ReaderAt(3))do { static_assert( mozilla::detail::AssertionConditionType< decltype(arit == mb.ReaderAt(3))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(arit == mb.ReaderAt(3)))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("arit == mb.ReaderAt(3)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3398 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "arit == mb.ReaderAt(3)" ")"); do { MOZ_CrashSequence(__null, 3398); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3399 | ||||
| 3400 | MOZ_RELEASE_ASSERT((arit - 2) == mb.ReaderAt(1))do { static_assert( mozilla::detail::AssertionConditionType< decltype((arit - 2) == mb.ReaderAt(1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!((arit - 2) == mb.ReaderAt(1) ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "(arit - 2) == mb.ReaderAt(1)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3400); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "(arit - 2) == mb.ReaderAt(1)" ")"); do { MOZ_CrashSequence(__null, 3400); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3401 | MOZ_RELEASE_ASSERT(arit == mb.ReaderAt(3))do { static_assert( mozilla::detail::AssertionConditionType< decltype(arit == mb.ReaderAt(3))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(arit == mb.ReaderAt(3)))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("arit == mb.ReaderAt(3)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3401 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "arit == mb.ReaderAt(3)" ")"); do { MOZ_CrashSequence(__null, 3401); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3402 | ||||
| 3403 | const bool checkMinusEq = ((arit -= 2) == mb.ReaderAt(1)); | |||
| 3404 | MOZ_RELEASE_ASSERT(checkMinusEq)do { static_assert( mozilla::detail::AssertionConditionType< decltype(checkMinusEq)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(checkMinusEq))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("checkMinusEq", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3404); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "checkMinusEq" ")"); do { MOZ_CrashSequence(__null, 3404); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3405 | MOZ_RELEASE_ASSERT(arit == mb.ReaderAt(1))do { static_assert( mozilla::detail::AssertionConditionType< decltype(arit == mb.ReaderAt(1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(arit == mb.ReaderAt(1)))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("arit == mb.ReaderAt(1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3405 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "arit == mb.ReaderAt(1)" ")"); do { MOZ_CrashSequence(__null, 3405); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3406 | ||||
| 3407 | // Random access. | |||
| 3408 | MOZ_RELEASE_ASSERT(&arit[3] == &*(arit + 3))do { static_assert( mozilla::detail::AssertionConditionType< decltype(&arit[3] == &*(arit + 3))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(&arit[3] == &*(arit + 3)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("&arit[3] == &*(arit + 3)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3408); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&arit[3] == &*(arit + 3)" ")"); do { MOZ_CrashSequence(__null, 3408); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3409 | MOZ_RELEASE_ASSERT(arit == mb.ReaderAt(1))do { static_assert( mozilla::detail::AssertionConditionType< decltype(arit == mb.ReaderAt(1))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(arit == mb.ReaderAt(1)))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("arit == mb.ReaderAt(1)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3409 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "arit == mb.ReaderAt(1)" ")"); do { MOZ_CrashSequence(__null, 3409); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3410 | ||||
| 3411 | // Iterator difference. | |||
| 3412 | MOZ_RELEASE_ASSERT(mb.ReaderAt(3) - mb.ReaderAt(1) == 2)do { static_assert( mozilla::detail::AssertionConditionType< decltype(mb.ReaderAt(3) - mb.ReaderAt(1) == 2)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mb.ReaderAt(3) - mb.ReaderAt (1) == 2))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("mb.ReaderAt(3) - mb.ReaderAt(1) == 2", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3412); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mb.ReaderAt(3) - mb.ReaderAt(1) == 2" ")"); do { MOZ_CrashSequence(__null, 3412); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3413 | MOZ_RELEASE_ASSERT(mb.ReaderAt(1) - mb.ReaderAt(3) == MB::Index(-2))do { static_assert( mozilla::detail::AssertionConditionType< decltype(mb.ReaderAt(1) - mb.ReaderAt(3) == MB::Index(-2))> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(mb.ReaderAt(1) - mb.ReaderAt(3) == MB::Index(-2)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("mb.ReaderAt(1) - mb.ReaderAt(3) == MB::Index(-2)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3413 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mb.ReaderAt(1) - mb.ReaderAt(3) == MB::Index(-2)" ")"); do { MOZ_CrashSequence(__null, 3413); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3414 | ||||
| 3415 | // Only testing Writer, as Reader is just a subset with no code differences. | |||
| 3416 | MB::Writer it = mb.WriterAt(0); | |||
| 3417 | MOZ_RELEASE_ASSERT(it.CurrentIndex() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(it.CurrentIndex() == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(it.CurrentIndex() == 0))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("it.CurrentIndex() == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3417 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "it.CurrentIndex() == 0" ")"); do { MOZ_CrashSequence(__null, 3417); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3418 | ||||
| 3419 | // Write two characters at the start. | |||
| 3420 | it.WriteObject('x'); | |||
| 3421 | it.WriteObject('y'); | |||
| 3422 | ||||
| 3423 | // Backtrack to read them. | |||
| 3424 | it -= 2; | |||
| 3425 | // PeekObject should read without moving. | |||
| 3426 | MOZ_RELEASE_ASSERT(it.PeekObject<char>() == 'x')do { static_assert( mozilla::detail::AssertionConditionType< decltype(it.PeekObject<char>() == 'x')>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(it.PeekObject<char>() == 'x'))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("it.PeekObject<char>() == 'x'", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3426); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "it.PeekObject<char>() == 'x'" ")"); do { MOZ_CrashSequence(__null, 3426); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3427 | MOZ_RELEASE_ASSERT(it.CurrentIndex() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(it.CurrentIndex() == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(it.CurrentIndex() == 0))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("it.CurrentIndex() == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3427 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "it.CurrentIndex() == 0" ")"); do { MOZ_CrashSequence(__null, 3427); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3428 | // ReadObject should read and move past the character. | |||
| 3429 | MOZ_RELEASE_ASSERT(it.ReadObject<char>() == 'x')do { static_assert( mozilla::detail::AssertionConditionType< decltype(it.ReadObject<char>() == 'x')>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(it.ReadObject<char>() == 'x'))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("it.ReadObject<char>() == 'x'", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3429); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "it.ReadObject<char>() == 'x'" ")"); do { MOZ_CrashSequence(__null, 3429); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3430 | MOZ_RELEASE_ASSERT(it.CurrentIndex() == 1)do { static_assert( mozilla::detail::AssertionConditionType< decltype(it.CurrentIndex() == 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(it.CurrentIndex() == 1))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("it.CurrentIndex() == 1" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3430 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "it.CurrentIndex() == 1" ")"); do { MOZ_CrashSequence(__null, 3430); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3431 | MOZ_RELEASE_ASSERT(it.PeekObject<char>() == 'y')do { static_assert( mozilla::detail::AssertionConditionType< decltype(it.PeekObject<char>() == 'y')>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(it.PeekObject<char>() == 'y'))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("it.PeekObject<char>() == 'y'", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3431); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "it.PeekObject<char>() == 'y'" ")"); do { MOZ_CrashSequence(__null, 3431); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3432 | MOZ_RELEASE_ASSERT(it.CurrentIndex() == 1)do { static_assert( mozilla::detail::AssertionConditionType< decltype(it.CurrentIndex() == 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(it.CurrentIndex() == 1))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("it.CurrentIndex() == 1" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3432 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "it.CurrentIndex() == 1" ")"); do { MOZ_CrashSequence(__null, 3432); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3433 | MOZ_RELEASE_ASSERT(it.ReadObject<char>() == 'y')do { static_assert( mozilla::detail::AssertionConditionType< decltype(it.ReadObject<char>() == 'y')>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(it.ReadObject<char>() == 'y'))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("it.ReadObject<char>() == 'y'", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3433); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "it.ReadObject<char>() == 'y'" ")"); do { MOZ_CrashSequence(__null, 3433); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3434 | MOZ_RELEASE_ASSERT(it.CurrentIndex() == 2)do { static_assert( mozilla::detail::AssertionConditionType< decltype(it.CurrentIndex() == 2)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(it.CurrentIndex() == 2))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("it.CurrentIndex() == 2" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3434 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "it.CurrentIndex() == 2" ")"); do { MOZ_CrashSequence(__null, 3434); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3435 | ||||
| 3436 | // Checking that a reader can be created from a writer. | |||
| 3437 | MB::Reader it2(it); | |||
| 3438 | MOZ_RELEASE_ASSERT(it2.CurrentIndex() == 2)do { static_assert( mozilla::detail::AssertionConditionType< decltype(it2.CurrentIndex() == 2)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(it2.CurrentIndex() == 2))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("it2.CurrentIndex() == 2" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3438 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "it2.CurrentIndex() == 2" ")"); do { MOZ_CrashSequence(__null, 3438); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3439 | // Or assigned. | |||
| 3440 | it2 = it; | |||
| 3441 | MOZ_RELEASE_ASSERT(it2.CurrentIndex() == 2)do { static_assert( mozilla::detail::AssertionConditionType< decltype(it2.CurrentIndex() == 2)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(it2.CurrentIndex() == 2))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("it2.CurrentIndex() == 2" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3441 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "it2.CurrentIndex() == 2" ")"); do { MOZ_CrashSequence(__null, 3441); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3442 | ||||
| 3443 | // Iterator traits. | |||
| 3444 | static_assert(std::is_same<std::iterator_traits<MB::Reader>::difference_type, | |||
| 3445 | MB::Index>::value, | |||
| 3446 | "ModuloBuffer::Reader::difference_type should be Index"); | |||
| 3447 | static_assert(std::is_same<std::iterator_traits<MB::Reader>::value_type, | |||
| 3448 | MB::Byte>::value, | |||
| 3449 | "ModuloBuffer::Reader::value_type should be Byte"); | |||
| 3450 | static_assert(std::is_same<std::iterator_traits<MB::Reader>::pointer, | |||
| 3451 | const MB::Byte*>::value, | |||
| 3452 | "ModuloBuffer::Reader::pointer should be const Byte*"); | |||
| 3453 | static_assert(std::is_same<std::iterator_traits<MB::Reader>::reference, | |||
| 3454 | const MB::Byte&>::value, | |||
| 3455 | "ModuloBuffer::Reader::reference should be const Byte&"); | |||
| 3456 | static_assert(std::is_base_of< | |||
| 3457 | std::input_iterator_tag, | |||
| 3458 | std::iterator_traits<MB::Reader>::iterator_category>::value, | |||
| 3459 | "ModuloBuffer::Reader::iterator_category should be derived " | |||
| 3460 | "from input_iterator_tag"); | |||
| 3461 | static_assert(std::is_base_of< | |||
| 3462 | std::forward_iterator_tag, | |||
| 3463 | std::iterator_traits<MB::Reader>::iterator_category>::value, | |||
| 3464 | "ModuloBuffer::Reader::iterator_category should be derived " | |||
| 3465 | "from forward_iterator_tag"); | |||
| 3466 | static_assert(std::is_base_of< | |||
| 3467 | std::bidirectional_iterator_tag, | |||
| 3468 | std::iterator_traits<MB::Reader>::iterator_category>::value, | |||
| 3469 | "ModuloBuffer::Reader::iterator_category should be derived " | |||
| 3470 | "from bidirectional_iterator_tag"); | |||
| 3471 | static_assert( | |||
| 3472 | std::is_same<std::iterator_traits<MB::Reader>::iterator_category, | |||
| 3473 | std::random_access_iterator_tag>::value, | |||
| 3474 | "ModuloBuffer::Reader::iterator_category should be " | |||
| 3475 | "random_access_iterator_tag"); | |||
| 3476 | ||||
| 3477 | // Use as input iterator by std::string constructor (which is only considered | |||
| 3478 | // with proper input iterators.) | |||
| 3479 | std::string s(mb.ReaderAt(0), mb.ReaderAt(2)); | |||
| 3480 | MOZ_RELEASE_ASSERT(s == "xy")do { static_assert( mozilla::detail::AssertionConditionType< decltype(s == "xy")>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(s == "xy"))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("s == \"xy\"", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3480); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "s == \"xy\"" ")"); do { MOZ_CrashSequence(__null, 3480); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3481 | ||||
| 3482 | // Write 4-byte number at index 2. | |||
| 3483 | it.WriteObject(int32_t(123)); | |||
| 3484 | MOZ_RELEASE_ASSERT(it.CurrentIndex() == 6)do { static_assert( mozilla::detail::AssertionConditionType< decltype(it.CurrentIndex() == 6)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(it.CurrentIndex() == 6))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("it.CurrentIndex() == 6" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3484 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "it.CurrentIndex() == 6" ")"); do { MOZ_CrashSequence(__null, 3484); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3485 | // And another, which should now wrap around (but index continues on.) | |||
| 3486 | it.WriteObject(int32_t(456)); | |||
| 3487 | MOZ_RELEASE_ASSERT(it.CurrentIndex() == MBSize + 2)do { static_assert( mozilla::detail::AssertionConditionType< decltype(it.CurrentIndex() == MBSize + 2)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(it.CurrentIndex() == MBSize + 2))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("it.CurrentIndex() == MBSize + 2", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3487); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "it.CurrentIndex() == MBSize + 2" ")"); do { MOZ_CrashSequence(__null, 3487); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3488 | // Even though index==MBSize+2, we can read the object we wrote at 2. | |||
| 3489 | MOZ_RELEASE_ASSERT(it.ReadObject<int32_t>() == 123)do { static_assert( mozilla::detail::AssertionConditionType< decltype(it.ReadObject<int32_t>() == 123)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(! !(it.ReadObject<int32_t>() == 123))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("it.ReadObject<int32_t>() == 123" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3489 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "it.ReadObject<int32_t>() == 123" ")"); do { MOZ_CrashSequence(__null, 3489); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3490 | MOZ_RELEASE_ASSERT(it.CurrentIndex() == MBSize + 6)do { static_assert( mozilla::detail::AssertionConditionType< decltype(it.CurrentIndex() == MBSize + 6)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(it.CurrentIndex() == MBSize + 6))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("it.CurrentIndex() == MBSize + 6", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3490); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "it.CurrentIndex() == MBSize + 6" ")"); do { MOZ_CrashSequence(__null, 3490); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3491 | // And similarly, index MBSize+6 points at the same location as index 6. | |||
| 3492 | MOZ_RELEASE_ASSERT(it.ReadObject<int32_t>() == 456)do { static_assert( mozilla::detail::AssertionConditionType< decltype(it.ReadObject<int32_t>() == 456)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(! !(it.ReadObject<int32_t>() == 456))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("it.ReadObject<int32_t>() == 456" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3492 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "it.ReadObject<int32_t>() == 456" ")"); do { MOZ_CrashSequence(__null, 3492); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3493 | MOZ_RELEASE_ASSERT(it.CurrentIndex() == MBSize + MBSize + 2)do { static_assert( mozilla::detail::AssertionConditionType< decltype(it.CurrentIndex() == MBSize + MBSize + 2)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(it.CurrentIndex() == MBSize + MBSize + 2))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("it.CurrentIndex() == MBSize + MBSize + 2" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3493 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "it.CurrentIndex() == MBSize + MBSize + 2" ")"); do { MOZ_CrashSequence(__null, 3493); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3494 | } | |||
| 3495 | ||||
| 3496 | void TestModuloBuffer() { | |||
| 3497 | printf("TestModuloBuffer...\n"); | |||
| 3498 | ||||
| 3499 | // Testing ModuloBuffer with default template arguments. | |||
| 3500 | using MB = ModuloBuffer<>; | |||
| 3501 | ||||
| 3502 | // Only 8-byte buffers, to easily test wrap-around. | |||
| 3503 | constexpr uint32_t MBSize = 8; | |||
| 3504 | ||||
| 3505 | // MB with self-allocated heap buffer. | |||
| 3506 | MB mbByLength(MakePowerOfTwo32<MBSize>()); | |||
| 3507 | TestModuloBuffer(mbByLength, MBSize); | |||
| 3508 | ||||
| 3509 | // MB taking ownership of a provided UniquePtr to a buffer. | |||
| 3510 | auto uniqueBuffer = MakeUnique<uint8_t[]>(MBSize); | |||
| 3511 | MB mbByUniquePtr(MakeUnique<uint8_t[]>(MBSize), MakePowerOfTwo32<MBSize>()); | |||
| 3512 | TestModuloBuffer(mbByUniquePtr, MBSize); | |||
| 3513 | ||||
| 3514 | // MB using part of a buffer on the stack. The buffer is three times the | |||
| 3515 | // required size: The middle third is where ModuloBuffer will work, the first | |||
| 3516 | // and last thirds are only used to later verify that ModuloBuffer didn't go | |||
| 3517 | // out of its bounds. | |||
| 3518 | uint8_t buffer[MBSize * 3]; | |||
| 3519 | // Pre-fill the buffer with a known pattern, so we can later see what changed. | |||
| 3520 | for (size_t i = 0; i < MBSize * 3; ++i) { | |||
| 3521 | buffer[i] = uint8_t('A' + i); | |||
| 3522 | } | |||
| 3523 | MB mbByBuffer(&buffer[MBSize], MakePowerOfTwo32<MBSize>()); | |||
| 3524 | TestModuloBuffer(mbByBuffer, MBSize); | |||
| 3525 | ||||
| 3526 | // Check that only the provided stack-based sub-buffer was modified. | |||
| 3527 | uint32_t changed = 0; | |||
| 3528 | for (size_t i = MBSize; i < MBSize * 2; ++i) { | |||
| 3529 | changed += (buffer[i] == uint8_t('A' + i)) ? 0 : 1; | |||
| 3530 | } | |||
| 3531 | // Expect at least 75% changes. | |||
| 3532 | MOZ_RELEASE_ASSERT(changed >= MBSize * 6 / 8)do { static_assert( mozilla::detail::AssertionConditionType< decltype(changed >= MBSize * 6 / 8)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(changed >= MBSize * 6 / 8 ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "changed >= MBSize * 6 / 8", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3532); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "changed >= MBSize * 6 / 8" ")"); do { MOZ_CrashSequence(__null, 3532); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3533 | ||||
| 3534 | // Everything around the sub-buffer should be unchanged. | |||
| 3535 | for (size_t i = 0; i < MBSize; ++i) { | |||
| 3536 | MOZ_RELEASE_ASSERT(buffer[i] == uint8_t('A' + i))do { static_assert( mozilla::detail::AssertionConditionType< decltype(buffer[i] == uint8_t('A' + i))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(buffer[i] == uint8_t('A' + i )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("buffer[i] == uint8_t('A' + i)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3536); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "buffer[i] == uint8_t('A' + i)" ")"); do { MOZ_CrashSequence(__null, 3536); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3537 | } | |||
| 3538 | for (size_t i = MBSize * 2; i < MBSize * 3; ++i) { | |||
| 3539 | MOZ_RELEASE_ASSERT(buffer[i] == uint8_t('A' + i))do { static_assert( mozilla::detail::AssertionConditionType< decltype(buffer[i] == uint8_t('A' + i))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(buffer[i] == uint8_t('A' + i )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("buffer[i] == uint8_t('A' + i)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3539); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "buffer[i] == uint8_t('A' + i)" ")"); do { MOZ_CrashSequence(__null, 3539); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3540 | } | |||
| 3541 | ||||
| 3542 | // Check that move-construction is allowed. This verifies that we do not | |||
| 3543 | // crash from a double free, when `mbByBuffer` and `mbByStolenBuffer` are both | |||
| 3544 | // destroyed at the end of this function. | |||
| 3545 | MB mbByStolenBuffer = std::move(mbByBuffer); | |||
| 3546 | TestModuloBuffer(mbByStolenBuffer, MBSize); | |||
| 3547 | ||||
| 3548 | // Check that only the provided stack-based sub-buffer was modified. | |||
| 3549 | changed = 0; | |||
| 3550 | for (size_t i = MBSize; i < MBSize * 2; ++i) { | |||
| 3551 | changed += (buffer[i] == uint8_t('A' + i)) ? 0 : 1; | |||
| 3552 | } | |||
| 3553 | // Expect at least 75% changes. | |||
| 3554 | MOZ_RELEASE_ASSERT(changed >= MBSize * 6 / 8)do { static_assert( mozilla::detail::AssertionConditionType< decltype(changed >= MBSize * 6 / 8)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(changed >= MBSize * 6 / 8 ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "changed >= MBSize * 6 / 8", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3554); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "changed >= MBSize * 6 / 8" ")"); do { MOZ_CrashSequence(__null, 3554); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3555 | ||||
| 3556 | // Everything around the sub-buffer should be unchanged. | |||
| 3557 | for (size_t i = 0; i < MBSize; ++i) { | |||
| 3558 | MOZ_RELEASE_ASSERT(buffer[i] == uint8_t('A' + i))do { static_assert( mozilla::detail::AssertionConditionType< decltype(buffer[i] == uint8_t('A' + i))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(buffer[i] == uint8_t('A' + i )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("buffer[i] == uint8_t('A' + i)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3558); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "buffer[i] == uint8_t('A' + i)" ")"); do { MOZ_CrashSequence(__null, 3558); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3559 | } | |||
| 3560 | for (size_t i = MBSize * 2; i < MBSize * 3; ++i) { | |||
| 3561 | MOZ_RELEASE_ASSERT(buffer[i] == uint8_t('A' + i))do { static_assert( mozilla::detail::AssertionConditionType< decltype(buffer[i] == uint8_t('A' + i))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(buffer[i] == uint8_t('A' + i )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("buffer[i] == uint8_t('A' + i)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3561); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "buffer[i] == uint8_t('A' + i)" ")"); do { MOZ_CrashSequence(__null, 3561); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3562 | } | |||
| 3563 | ||||
| 3564 | // This test function does a `ReadInto` as directed, and checks that the | |||
| 3565 | // result is the same as if the copy had been done manually byte-by-byte. | |||
| 3566 | // `TestReadInto(3, 7, 2)` copies from index 3 to index 7, 2 bytes long. | |||
| 3567 | // Return the output string (from `ReadInto`) for external checks. | |||
| 3568 | auto TestReadInto = [](MB::Index aReadFrom, MB::Index aWriteTo, | |||
| 3569 | MB::Length aBytes) { | |||
| 3570 | constexpr uint32_t TRISize = 16; | |||
| 3571 | ||||
| 3572 | // Prepare an input buffer, all different elements. | |||
| 3573 | uint8_t input[TRISize + 1] = "ABCDEFGHIJKLMNOP"; | |||
| 3574 | const MB mbInput(input, MakePowerOfTwo32<TRISize>()); | |||
| 3575 | ||||
| 3576 | // Prepare an output buffer, different from input. | |||
| 3577 | uint8_t output[TRISize + 1] = "abcdefghijklmnop"; | |||
| 3578 | MB mbOutput(output, MakePowerOfTwo32<TRISize>()); | |||
| 3579 | ||||
| 3580 | // Run ReadInto. | |||
| 3581 | auto writer = mbOutput.WriterAt(aWriteTo); | |||
| 3582 | mbInput.ReaderAt(aReadFrom).ReadInto(writer, aBytes); | |||
| 3583 | ||||
| 3584 | // Do the same operation manually. | |||
| 3585 | uint8_t outputCheck[TRISize + 1] = "abcdefghijklmnop"; | |||
| 3586 | MB mbOutputCheck(outputCheck, MakePowerOfTwo32<TRISize>()); | |||
| 3587 | auto readerCheck = mbInput.ReaderAt(aReadFrom); | |||
| 3588 | auto writerCheck = mbOutputCheck.WriterAt(aWriteTo); | |||
| 3589 | for (MB::Length i = 0; i < aBytes; ++i) { | |||
| 3590 | *writerCheck++ = *readerCheck++; | |||
| 3591 | } | |||
| 3592 | ||||
| 3593 | // Compare the two outputs. | |||
| 3594 | for (uint32_t i = 0; i < TRISize; ++i) { | |||
| 3595 | #ifdef TEST_MODULOBUFFER_FAILURE_DEBUG | |||
| 3596 | // Only used when debugging failures. | |||
| 3597 | if (output[i] != outputCheck[i]) { | |||
| 3598 | printf( | |||
| 3599 | "*** from=%u to=%u bytes=%u i=%u\ninput: '%s'\noutput: " | |||
| 3600 | "'%s'\ncheck: '%s'\n", | |||
| 3601 | unsigned(aReadFrom), unsigned(aWriteTo), unsigned(aBytes), | |||
| 3602 | unsigned(i), input, output, outputCheck); | |||
| 3603 | } | |||
| 3604 | #endif | |||
| 3605 | MOZ_RELEASE_ASSERT(output[i] == outputCheck[i])do { static_assert( mozilla::detail::AssertionConditionType< decltype(output[i] == outputCheck[i])>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(output[i] == outputCheck[i]) )), 0))) { do { } while (false); MOZ_ReportAssertionFailure("output[i] == outputCheck[i]" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3605 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "output[i] == outputCheck[i]" ")"); do { MOZ_CrashSequence(__null, 3605); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3606 | } | |||
| 3607 | ||||
| 3608 | #ifdef TEST_MODULOBUFFER_HELPER | |||
| 3609 | // Only used when adding more tests. | |||
| 3610 | printf("*** from=%u to=%u bytes=%u output: %s\n", unsigned(aReadFrom), | |||
| 3611 | unsigned(aWriteTo), unsigned(aBytes), output); | |||
| 3612 | #endif | |||
| 3613 | ||||
| 3614 | return std::string(reinterpret_cast<const char*>(output)); | |||
| 3615 | }; | |||
| 3616 | ||||
| 3617 | // A few manual checks: | |||
| 3618 | constexpr uint32_t TRISize = 16; | |||
| 3619 | MOZ_RELEASE_ASSERT(TestReadInto(0, 0, 0) == "abcdefghijklmnop")do { static_assert( mozilla::detail::AssertionConditionType< decltype(TestReadInto(0, 0, 0) == "abcdefghijklmnop")>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(TestReadInto(0, 0, 0) == "abcdefghijklmnop"))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("TestReadInto(0, 0, 0) == \"abcdefghijklmnop\"" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3619 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "TestReadInto(0, 0, 0) == \"abcdefghijklmnop\"" ")"); do { MOZ_CrashSequence(__null, 3619); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3620 | MOZ_RELEASE_ASSERT(TestReadInto(0, 0, TRISize) == "ABCDEFGHIJKLMNOP")do { static_assert( mozilla::detail::AssertionConditionType< decltype(TestReadInto(0, 0, TRISize) == "ABCDEFGHIJKLMNOP")> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(TestReadInto(0, 0, TRISize) == "ABCDEFGHIJKLMNOP"))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("TestReadInto(0, 0, TRISize) == \"ABCDEFGHIJKLMNOP\"" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3620 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "TestReadInto(0, 0, TRISize) == \"ABCDEFGHIJKLMNOP\"" ")"); do { MOZ_CrashSequence(__null, 3620); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3621 | MOZ_RELEASE_ASSERT(TestReadInto(0, 5, TRISize) == "LMNOPABCDEFGHIJK")do { static_assert( mozilla::detail::AssertionConditionType< decltype(TestReadInto(0, 5, TRISize) == "LMNOPABCDEFGHIJK")> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(TestReadInto(0, 5, TRISize) == "LMNOPABCDEFGHIJK"))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("TestReadInto(0, 5, TRISize) == \"LMNOPABCDEFGHIJK\"" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3621 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "TestReadInto(0, 5, TRISize) == \"LMNOPABCDEFGHIJK\"" ")"); do { MOZ_CrashSequence(__null, 3621); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3622 | MOZ_RELEASE_ASSERT(TestReadInto(5, 0, TRISize) == "FGHIJKLMNOPABCDE")do { static_assert( mozilla::detail::AssertionConditionType< decltype(TestReadInto(5, 0, TRISize) == "FGHIJKLMNOPABCDE")> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(TestReadInto(5, 0, TRISize) == "FGHIJKLMNOPABCDE"))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("TestReadInto(5, 0, TRISize) == \"FGHIJKLMNOPABCDE\"" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3622 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "TestReadInto(5, 0, TRISize) == \"FGHIJKLMNOPABCDE\"" ")"); do { MOZ_CrashSequence(__null, 3622); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3623 | ||||
| 3624 | // Test everything! (16^3 = 4096, not too much.) | |||
| 3625 | for (MB::Index r = 0; r < TRISize; ++r) { | |||
| 3626 | for (MB::Index w = 0; w < TRISize; ++w) { | |||
| 3627 | for (MB::Length len = 0; len < TRISize; ++len) { | |||
| 3628 | TestReadInto(r, w, len); | |||
| 3629 | } | |||
| 3630 | } | |||
| 3631 | } | |||
| 3632 | ||||
| 3633 | printf("TestModuloBuffer done\n"); | |||
| 3634 | } | |||
| 3635 | ||||
| 3636 | void TestLiteralEmptyStringView() { | |||
| 3637 | printf("TestLiteralEmptyStringView...\n"); | |||
| 3638 | ||||
| 3639 | static_assert(mozilla::LiteralEmptyStringView<char>() == | |||
| 3640 | std::string_view("")); | |||
| 3641 | static_assert(!!mozilla::LiteralEmptyStringView<char>().data()); | |||
| 3642 | static_assert(mozilla::LiteralEmptyStringView<char>().length() == 0); | |||
| 3643 | ||||
| 3644 | static_assert(mozilla::LiteralEmptyStringView<char16_t>() == | |||
| 3645 | std::basic_string_view<char16_t>(u"")); | |||
| 3646 | static_assert(!!mozilla::LiteralEmptyStringView<char16_t>().data()); | |||
| 3647 | static_assert(mozilla::LiteralEmptyStringView<char16_t>().length() == 0); | |||
| 3648 | ||||
| 3649 | printf("TestLiteralEmptyStringView done\n"); | |||
| 3650 | } | |||
| 3651 | ||||
| 3652 | template <typename CHAR> | |||
| 3653 | void TestProfilerStringView() { | |||
| 3654 | if constexpr (std::is_same_v<CHAR, char>) { | |||
| 3655 | printf("TestProfilerStringView<char>...\n"); | |||
| 3656 | } else if constexpr (std::is_same_v<CHAR, char16_t>) { | |||
| 3657 | printf("TestProfilerStringView<char16_t>...\n"); | |||
| 3658 | } else { | |||
| 3659 | MOZ_RELEASE_ASSERT(false,do { static_assert( mozilla::detail::AssertionConditionType< decltype(false)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(false))), 0))) { do { } while ( false); MOZ_ReportAssertionFailure("false" " (" "TestProfilerStringView only handles char and char16_t" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3660); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "false" ") (" "TestProfilerStringView only handles char and char16_t" ")"); do { MOZ_CrashSequence(__null, 3660); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 3660 | "TestProfilerStringView only handles char and char16_t")do { static_assert( mozilla::detail::AssertionConditionType< decltype(false)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(false))), 0))) { do { } while ( false); MOZ_ReportAssertionFailure("false" " (" "TestProfilerStringView only handles char and char16_t" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3660); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "false" ") (" "TestProfilerStringView only handles char and char16_t" ")"); do { MOZ_CrashSequence(__null, 3660); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3661 | } | |||
| 3662 | ||||
| 3663 | // Used to verify implicit constructions, as this will normally be used in | |||
| 3664 | // function parameters. | |||
| 3665 | auto BSV = [](mozilla::ProfilerStringView<CHAR>&& aBSV) { | |||
| 3666 | return std::move(aBSV); | |||
| 3667 | }; | |||
| 3668 | ||||
| 3669 | // These look like string literals, as expected by some string constructors. | |||
| 3670 | const CHAR empty[0 + 1] = {CHAR('\0')}; | |||
| 3671 | const CHAR hi[2 + 1] = { | |||
| 3672 | CHAR('h'), | |||
| 3673 | CHAR('i'), | |||
| 3674 | CHAR('\0'), | |||
| 3675 | }; | |||
| 3676 | ||||
| 3677 | // Literal empty string. | |||
| 3678 | MOZ_RELEASE_ASSERT(BSV(empty).Length() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(empty).Length() == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(BSV(empty).Length() == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("BSV(empty).Length() == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3678 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(empty).Length() == 0" ")"); do { MOZ_CrashSequence(__null, 3678); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3679 | MOZ_RELEASE_ASSERT(BSV(empty).AsSpan().IsEmpty())do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(empty).AsSpan().IsEmpty())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(BSV(empty).AsSpan().IsEmpty( )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("BSV(empty).AsSpan().IsEmpty()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3679); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(empty).AsSpan().IsEmpty()" ")"); do { MOZ_CrashSequence(__null, 3679); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3680 | MOZ_RELEASE_ASSERT(BSV(empty).IsLiteral())do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(empty).IsLiteral())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(BSV(empty).IsLiteral()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("BSV(empty).IsLiteral()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3680 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(empty).IsLiteral()" ")"); do { MOZ_CrashSequence(__null, 3680); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3681 | MOZ_RELEASE_ASSERT(!BSV(empty).IsReference())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!BSV(empty).IsReference())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!BSV(empty).IsReference()))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("!BSV(empty).IsReference()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3681 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!BSV(empty).IsReference()" ")"); do { MOZ_CrashSequence(__null, 3681); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3682 | ||||
| 3683 | // Literal non-empty string. | |||
| 3684 | MOZ_RELEASE_ASSERT(BSV(hi).Length() == 2)do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(hi).Length() == 2)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(BSV(hi).Length() == 2))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("BSV(hi).Length() == 2" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3684 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(hi).Length() == 2" ")"); do { MOZ_CrashSequence(__null, 3684); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3685 | MOZ_RELEASE_ASSERT(BSV(hi).AsSpan().Elements())do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(hi).AsSpan().Elements())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(BSV(hi).AsSpan().Elements()) )), 0))) { do { } while (false); MOZ_ReportAssertionFailure("BSV(hi).AsSpan().Elements()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3685 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(hi).AsSpan().Elements()" ")"); do { MOZ_CrashSequence(__null, 3685); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3686 | MOZ_RELEASE_ASSERT(BSV(hi).AsSpan().Elements()[0] == CHAR('h'))do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(hi).AsSpan().Elements()[0] == CHAR('h'))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(BSV(hi).AsSpan().Elements()[0] == CHAR('h')))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("BSV(hi).AsSpan().Elements()[0] == CHAR('h')" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3686 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(hi).AsSpan().Elements()[0] == CHAR('h')" ")"); do { MOZ_CrashSequence(__null, 3686); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3687 | MOZ_RELEASE_ASSERT(BSV(hi).AsSpan().Elements()[1] == CHAR('i'))do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(hi).AsSpan().Elements()[1] == CHAR('i'))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(BSV(hi).AsSpan().Elements()[1] == CHAR('i')))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("BSV(hi).AsSpan().Elements()[1] == CHAR('i')" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3687 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(hi).AsSpan().Elements()[1] == CHAR('i')" ")"); do { MOZ_CrashSequence(__null, 3687); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3688 | MOZ_RELEASE_ASSERT(BSV(hi).IsLiteral())do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(hi).IsLiteral())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(BSV(hi).IsLiteral()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("BSV(hi).IsLiteral()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3688 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(hi).IsLiteral()" ")"); do { MOZ_CrashSequence(__null, 3688); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3689 | MOZ_RELEASE_ASSERT(!BSV(hi).IsReference())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!BSV(hi).IsReference())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!BSV(hi).IsReference()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("!BSV(hi).IsReference()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3689 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!BSV(hi).IsReference()" ")"); do { MOZ_CrashSequence(__null, 3689); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3690 | ||||
| 3691 | // std::string_view to a literal empty string. | |||
| 3692 | MOZ_RELEASE_ASSERT(BSV(std::basic_string_view<CHAR>(empty)).Length() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(std::basic_string_view<CHAR>(empty)).Length () == 0)>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(BSV(std::basic_string_view<CHAR>(empty)).Length () == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("BSV(std::basic_string_view<CHAR>(empty)).Length() == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3692 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(std::basic_string_view<CHAR>(empty)).Length() == 0" ")"); do { MOZ_CrashSequence(__null, 3692); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3693 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(std::basic_string_view<CHAR>(empty)).AsSpan ().IsEmpty())>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(BSV(std::basic_string_view<CHAR >(empty)).AsSpan().IsEmpty()))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("BSV(std::basic_string_view<CHAR>(empty)).AsSpan().IsEmpty()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3694 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(std::basic_string_view<CHAR>(empty)).AsSpan().IsEmpty()" ")"); do { MOZ_CrashSequence(__null, 3694); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 3694 | BSV(std::basic_string_view<CHAR>(empty)).AsSpan().IsEmpty())do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(std::basic_string_view<CHAR>(empty)).AsSpan ().IsEmpty())>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(BSV(std::basic_string_view<CHAR >(empty)).AsSpan().IsEmpty()))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("BSV(std::basic_string_view<CHAR>(empty)).AsSpan().IsEmpty()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3694 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(std::basic_string_view<CHAR>(empty)).AsSpan().IsEmpty()" ")"); do { MOZ_CrashSequence(__null, 3694); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3695 | MOZ_RELEASE_ASSERT(!BSV(std::basic_string_view<CHAR>(empty)).IsLiteral())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!BSV(std::basic_string_view<CHAR>(empty)).IsLiteral ())>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(!BSV(std::basic_string_view<CHAR>(empty)).IsLiteral ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!BSV(std::basic_string_view<CHAR>(empty)).IsLiteral()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3695 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!BSV(std::basic_string_view<CHAR>(empty)).IsLiteral()" ")"); do { MOZ_CrashSequence(__null, 3695); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3696 | MOZ_RELEASE_ASSERT(BSV(std::basic_string_view<CHAR>(empty)).IsReference())do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(std::basic_string_view<CHAR>(empty)).IsReference ())>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(BSV(std::basic_string_view<CHAR>(empty)).IsReference ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("BSV(std::basic_string_view<CHAR>(empty)).IsReference()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3696 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(std::basic_string_view<CHAR>(empty)).IsReference()" ")"); do { MOZ_CrashSequence(__null, 3696); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3697 | ||||
| 3698 | // std::string_view to a literal non-empty string. | |||
| 3699 | MOZ_RELEASE_ASSERT(BSV(std::basic_string_view<CHAR>(hi)).Length() == 2)do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(std::basic_string_view<CHAR>(hi)).Length() == 2)>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(BSV(std::basic_string_view<CHAR>(hi)).Length() == 2))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("BSV(std::basic_string_view<CHAR>(hi)).Length() == 2", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3699 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(std::basic_string_view<CHAR>(hi)).Length() == 2" ")"); do { MOZ_CrashSequence(__null, 3699); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3700 | MOZ_RELEASE_ASSERT(BSV(std::basic_string_view<CHAR>(hi)).AsSpan().Elements())do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(std::basic_string_view<CHAR>(hi)).AsSpan() .Elements())>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(BSV(std::basic_string_view<CHAR >(hi)).AsSpan().Elements()))), 0))) { do { } while (false) ; MOZ_ReportAssertionFailure("BSV(std::basic_string_view<CHAR>(hi)).AsSpan().Elements()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3700 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(std::basic_string_view<CHAR>(hi)).AsSpan().Elements()" ")"); do { MOZ_CrashSequence(__null, 3700); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3701 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(std::basic_string_view<CHAR>(hi)).AsSpan() .Elements()[0] == CHAR('h'))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(BSV(std::basic_string_view< CHAR>(hi)).AsSpan().Elements()[0] == CHAR('h')))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("BSV(std::basic_string_view<CHAR>(hi)).AsSpan().Elements()[0] == CHAR('h')" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3703 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(std::basic_string_view<CHAR>(hi)).AsSpan().Elements()[0] == CHAR('h')" ")"); do { MOZ_CrashSequence(__null, 3703); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 3702 | BSV(std::basic_string_view<CHAR>(hi)).AsSpan().Elements()[0] ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(std::basic_string_view<CHAR>(hi)).AsSpan() .Elements()[0] == CHAR('h'))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(BSV(std::basic_string_view< CHAR>(hi)).AsSpan().Elements()[0] == CHAR('h')))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("BSV(std::basic_string_view<CHAR>(hi)).AsSpan().Elements()[0] == CHAR('h')" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3703 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(std::basic_string_view<CHAR>(hi)).AsSpan().Elements()[0] == CHAR('h')" ")"); do { MOZ_CrashSequence(__null, 3703); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 3703 | CHAR('h'))do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(std::basic_string_view<CHAR>(hi)).AsSpan() .Elements()[0] == CHAR('h'))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(BSV(std::basic_string_view< CHAR>(hi)).AsSpan().Elements()[0] == CHAR('h')))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("BSV(std::basic_string_view<CHAR>(hi)).AsSpan().Elements()[0] == CHAR('h')" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3703 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(std::basic_string_view<CHAR>(hi)).AsSpan().Elements()[0] == CHAR('h')" ")"); do { MOZ_CrashSequence(__null, 3703); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3704 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(std::basic_string_view<CHAR>(hi)).AsSpan() .Elements()[1] == CHAR('i'))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(BSV(std::basic_string_view< CHAR>(hi)).AsSpan().Elements()[1] == CHAR('i')))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("BSV(std::basic_string_view<CHAR>(hi)).AsSpan().Elements()[1] == CHAR('i')" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3706 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(std::basic_string_view<CHAR>(hi)).AsSpan().Elements()[1] == CHAR('i')" ")"); do { MOZ_CrashSequence(__null, 3706); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 3705 | BSV(std::basic_string_view<CHAR>(hi)).AsSpan().Elements()[1] ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(std::basic_string_view<CHAR>(hi)).AsSpan() .Elements()[1] == CHAR('i'))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(BSV(std::basic_string_view< CHAR>(hi)).AsSpan().Elements()[1] == CHAR('i')))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("BSV(std::basic_string_view<CHAR>(hi)).AsSpan().Elements()[1] == CHAR('i')" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3706 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(std::basic_string_view<CHAR>(hi)).AsSpan().Elements()[1] == CHAR('i')" ")"); do { MOZ_CrashSequence(__null, 3706); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 3706 | CHAR('i'))do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(std::basic_string_view<CHAR>(hi)).AsSpan() .Elements()[1] == CHAR('i'))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(BSV(std::basic_string_view< CHAR>(hi)).AsSpan().Elements()[1] == CHAR('i')))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("BSV(std::basic_string_view<CHAR>(hi)).AsSpan().Elements()[1] == CHAR('i')" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3706 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(std::basic_string_view<CHAR>(hi)).AsSpan().Elements()[1] == CHAR('i')" ")"); do { MOZ_CrashSequence(__null, 3706); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3707 | MOZ_RELEASE_ASSERT(!BSV(std::basic_string_view<CHAR>(hi)).IsLiteral())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!BSV(std::basic_string_view<CHAR>(hi)).IsLiteral ())>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(!BSV(std::basic_string_view<CHAR>(hi)).IsLiteral ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!BSV(std::basic_string_view<CHAR>(hi)).IsLiteral()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3707); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!BSV(std::basic_string_view<CHAR>(hi)).IsLiteral()" ")"); do { MOZ_CrashSequence(__null, 3707); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3708 | MOZ_RELEASE_ASSERT(BSV(std::basic_string_view<CHAR>(hi)).IsReference())do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(std::basic_string_view<CHAR>(hi)).IsReference ())>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(BSV(std::basic_string_view<CHAR>(hi)).IsReference ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("BSV(std::basic_string_view<CHAR>(hi)).IsReference()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3708 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(std::basic_string_view<CHAR>(hi)).IsReference()" ")"); do { MOZ_CrashSequence(__null, 3708); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3709 | ||||
| 3710 | // Default std::string_view points at nullptr, ProfilerStringView converts it | |||
| 3711 | // to the literal empty string. | |||
| 3712 | MOZ_RELEASE_ASSERT(BSV(std::basic_string_view<CHAR>()).Length() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(std::basic_string_view<CHAR>()).Length() == 0)>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(BSV(std::basic_string_view<CHAR>()).Length() == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("BSV(std::basic_string_view<CHAR>()).Length() == 0", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3712); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(std::basic_string_view<CHAR>()).Length() == 0" ")"); do { MOZ_CrashSequence(__null, 3712); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3713 | MOZ_RELEASE_ASSERT(!std::basic_string_view<CHAR>().data())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!std::basic_string_view<CHAR>().data())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(!std::basic_string_view<CHAR>().data()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!std::basic_string_view<CHAR>().data()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3713 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!std::basic_string_view<CHAR>().data()" ")"); do { MOZ_CrashSequence(__null, 3713); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3714 | MOZ_RELEASE_ASSERT(BSV(std::basic_string_view<CHAR>()).AsSpan().IsEmpty())do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(std::basic_string_view<CHAR>()).AsSpan().IsEmpty ())>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(BSV(std::basic_string_view<CHAR>()).AsSpan().IsEmpty ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("BSV(std::basic_string_view<CHAR>()).AsSpan().IsEmpty()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3714 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(std::basic_string_view<CHAR>()).AsSpan().IsEmpty()" ")"); do { MOZ_CrashSequence(__null, 3714); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3715 | MOZ_RELEASE_ASSERT(BSV(std::basic_string_view<CHAR>()).IsLiteral())do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(std::basic_string_view<CHAR>()).IsLiteral( ))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(BSV(std::basic_string_view<CHAR>()).IsLiteral( )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("BSV(std::basic_string_view<CHAR>()).IsLiteral()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3715); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(std::basic_string_view<CHAR>()).IsLiteral()" ")"); do { MOZ_CrashSequence(__null, 3715); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3716 | MOZ_RELEASE_ASSERT(!BSV(std::basic_string_view<CHAR>()).IsReference())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!BSV(std::basic_string_view<CHAR>()).IsReference ())>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(!BSV(std::basic_string_view<CHAR>()).IsReference ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!BSV(std::basic_string_view<CHAR>()).IsReference()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3716); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!BSV(std::basic_string_view<CHAR>()).IsReference()" ")"); do { MOZ_CrashSequence(__null, 3716); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3717 | ||||
| 3718 | // std::string to a literal empty string. | |||
| 3719 | MOZ_RELEASE_ASSERT(BSV(std::basic_string<CHAR>(empty)).Length() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(std::basic_string<CHAR>(empty)).Length() == 0)>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(BSV(std::basic_string<CHAR>(empty)).Length() == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("BSV(std::basic_string<CHAR>(empty)).Length() == 0", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3719); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(std::basic_string<CHAR>(empty)).Length() == 0" ")"); do { MOZ_CrashSequence(__null, 3719); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3720 | MOZ_RELEASE_ASSERT(BSV(std::basic_string<CHAR>(empty)).AsSpan().IsEmpty())do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(std::basic_string<CHAR>(empty)).AsSpan().IsEmpty ())>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(BSV(std::basic_string<CHAR>(empty)).AsSpan().IsEmpty ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("BSV(std::basic_string<CHAR>(empty)).AsSpan().IsEmpty()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3720 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(std::basic_string<CHAR>(empty)).AsSpan().IsEmpty()" ")"); do { MOZ_CrashSequence(__null, 3720); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3721 | MOZ_RELEASE_ASSERT(!BSV(std::basic_string<CHAR>(empty)).IsLiteral())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!BSV(std::basic_string<CHAR>(empty)).IsLiteral ())>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(!BSV(std::basic_string<CHAR>(empty)).IsLiteral ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!BSV(std::basic_string<CHAR>(empty)).IsLiteral()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3721); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!BSV(std::basic_string<CHAR>(empty)).IsLiteral()" ")"); do { MOZ_CrashSequence(__null, 3721); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3722 | MOZ_RELEASE_ASSERT(BSV(std::basic_string<CHAR>(empty)).IsReference())do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(std::basic_string<CHAR>(empty)).IsReference ())>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(BSV(std::basic_string<CHAR>(empty)).IsReference ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("BSV(std::basic_string<CHAR>(empty)).IsReference()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3722); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(std::basic_string<CHAR>(empty)).IsReference()" ")"); do { MOZ_CrashSequence(__null, 3722); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3723 | ||||
| 3724 | // std::string to a literal non-empty string. | |||
| 3725 | MOZ_RELEASE_ASSERT(BSV(std::basic_string<CHAR>(hi)).Length() == 2)do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(std::basic_string<CHAR>(hi)).Length() == 2 )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(BSV(std::basic_string<CHAR>(hi)).Length() == 2 ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "BSV(std::basic_string<CHAR>(hi)).Length() == 2", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3725); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(std::basic_string<CHAR>(hi)).Length() == 2" ")"); do { MOZ_CrashSequence(__null, 3725); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3726 | MOZ_RELEASE_ASSERT(BSV(std::basic_string<CHAR>(hi)).AsSpan().Elements())do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(std::basic_string<CHAR>(hi)).AsSpan().Elements ())>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(BSV(std::basic_string<CHAR>(hi)).AsSpan().Elements ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("BSV(std::basic_string<CHAR>(hi)).AsSpan().Elements()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3726 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(std::basic_string<CHAR>(hi)).AsSpan().Elements()" ")"); do { MOZ_CrashSequence(__null, 3726); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3727 | MOZ_RELEASE_ASSERT(BSV(std::basic_string<CHAR>(hi)).AsSpan().Elements()[0] ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(std::basic_string<CHAR>(hi)).AsSpan().Elements ()[0] == CHAR('h'))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(BSV(std::basic_string<CHAR >(hi)).AsSpan().Elements()[0] == CHAR('h')))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("BSV(std::basic_string<CHAR>(hi)).AsSpan().Elements()[0] == CHAR('h')" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3728 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(std::basic_string<CHAR>(hi)).AsSpan().Elements()[0] == CHAR('h')" ")"); do { MOZ_CrashSequence(__null, 3728); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 3728 | CHAR('h'))do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(std::basic_string<CHAR>(hi)).AsSpan().Elements ()[0] == CHAR('h'))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(BSV(std::basic_string<CHAR >(hi)).AsSpan().Elements()[0] == CHAR('h')))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("BSV(std::basic_string<CHAR>(hi)).AsSpan().Elements()[0] == CHAR('h')" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3728 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(std::basic_string<CHAR>(hi)).AsSpan().Elements()[0] == CHAR('h')" ")"); do { MOZ_CrashSequence(__null, 3728); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3729 | MOZ_RELEASE_ASSERT(BSV(std::basic_string<CHAR>(hi)).AsSpan().Elements()[1] ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(std::basic_string<CHAR>(hi)).AsSpan().Elements ()[1] == CHAR('i'))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(BSV(std::basic_string<CHAR >(hi)).AsSpan().Elements()[1] == CHAR('i')))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("BSV(std::basic_string<CHAR>(hi)).AsSpan().Elements()[1] == CHAR('i')" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3730 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(std::basic_string<CHAR>(hi)).AsSpan().Elements()[1] == CHAR('i')" ")"); do { MOZ_CrashSequence(__null, 3730); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 3730 | CHAR('i'))do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(std::basic_string<CHAR>(hi)).AsSpan().Elements ()[1] == CHAR('i'))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(BSV(std::basic_string<CHAR >(hi)).AsSpan().Elements()[1] == CHAR('i')))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("BSV(std::basic_string<CHAR>(hi)).AsSpan().Elements()[1] == CHAR('i')" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3730 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(std::basic_string<CHAR>(hi)).AsSpan().Elements()[1] == CHAR('i')" ")"); do { MOZ_CrashSequence(__null, 3730); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3731 | MOZ_RELEASE_ASSERT(!BSV(std::basic_string<CHAR>(hi)).IsLiteral())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!BSV(std::basic_string<CHAR>(hi)).IsLiteral()) >::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(!BSV(std::basic_string<CHAR>(hi)).IsLiteral()) )), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!BSV(std::basic_string<CHAR>(hi)).IsLiteral()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3731 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!BSV(std::basic_string<CHAR>(hi)).IsLiteral()" ")"); do { MOZ_CrashSequence(__null, 3731); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3732 | MOZ_RELEASE_ASSERT(BSV(std::basic_string<CHAR>(hi)).IsReference())do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(std::basic_string<CHAR>(hi)).IsReference() )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(BSV(std::basic_string<CHAR>(hi)).IsReference() ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "BSV(std::basic_string<CHAR>(hi)).IsReference()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3732); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(std::basic_string<CHAR>(hi)).IsReference()" ")"); do { MOZ_CrashSequence(__null, 3732); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3733 | ||||
| 3734 | // Default std::string contains an empty null-terminated string. | |||
| 3735 | MOZ_RELEASE_ASSERT(BSV(std::basic_string<CHAR>()).Length() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(std::basic_string<CHAR>()).Length() == 0)> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(BSV(std::basic_string<CHAR>()).Length() == 0)) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("BSV(std::basic_string<CHAR>()).Length() == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3735 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(std::basic_string<CHAR>()).Length() == 0" ")"); do { MOZ_CrashSequence(__null, 3735); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3736 | MOZ_RELEASE_ASSERT(std::basic_string<CHAR>().data())do { static_assert( mozilla::detail::AssertionConditionType< decltype(std::basic_string<CHAR>().data())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(std::basic_string<CHAR>().data()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("std::basic_string<CHAR>().data()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3736 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "std::basic_string<CHAR>().data()" ")"); do { MOZ_CrashSequence(__null, 3736); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3737 | MOZ_RELEASE_ASSERT(BSV(std::basic_string<CHAR>()).AsSpan().IsEmpty())do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(std::basic_string<CHAR>()).AsSpan().IsEmpty ())>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(BSV(std::basic_string<CHAR>()).AsSpan().IsEmpty ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("BSV(std::basic_string<CHAR>()).AsSpan().IsEmpty()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3737); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(std::basic_string<CHAR>()).AsSpan().IsEmpty()" ")"); do { MOZ_CrashSequence(__null, 3737); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3738 | MOZ_RELEASE_ASSERT(!BSV(std::basic_string<CHAR>()).IsLiteral())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!BSV(std::basic_string<CHAR>()).IsLiteral())> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(!BSV(std::basic_string<CHAR>()).IsLiteral()))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("!BSV(std::basic_string<CHAR>()).IsLiteral()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3738 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!BSV(std::basic_string<CHAR>()).IsLiteral()" ")"); do { MOZ_CrashSequence(__null, 3738); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3739 | MOZ_RELEASE_ASSERT(BSV(std::basic_string<CHAR>()).IsReference())do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(std::basic_string<CHAR>()).IsReference())> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(BSV(std::basic_string<CHAR>()).IsReference())) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("BSV(std::basic_string<CHAR>()).IsReference()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3739 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(std::basic_string<CHAR>()).IsReference()" ")"); do { MOZ_CrashSequence(__null, 3739); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3740 | ||||
| 3741 | // Class that quacks like nsTString (with Data(), Length(), IsLiteral()), to | |||
| 3742 | // check that ProfilerStringView can read from them. | |||
| 3743 | class FakeNsTString { | |||
| 3744 | public: | |||
| 3745 | FakeNsTString(const CHAR* aData, size_t aLength, bool aIsLiteral) | |||
| 3746 | : mData(aData), mLength(aLength), mIsLiteral(aIsLiteral) {} | |||
| 3747 | ||||
| 3748 | const CHAR* Data() const { return mData; } | |||
| 3749 | size_t Length() const { return mLength; } | |||
| 3750 | bool IsLiteral() const { return mIsLiteral; } | |||
| 3751 | ||||
| 3752 | private: | |||
| 3753 | const CHAR* mData; | |||
| 3754 | size_t mLength; | |||
| 3755 | bool mIsLiteral; | |||
| 3756 | }; | |||
| 3757 | ||||
| 3758 | // FakeNsTString to nullptr. | |||
| 3759 | MOZ_RELEASE_ASSERT(BSV(FakeNsTString(nullptr, 0, true)).Length() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(FakeNsTString(nullptr, 0, true)).Length() == 0)> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(BSV(FakeNsTString(nullptr, 0, true)).Length() == 0)) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("BSV(FakeNsTString(nullptr, 0, true)).Length() == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3759 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(FakeNsTString(nullptr, 0, true)).Length() == 0" ")"); do { MOZ_CrashSequence(__null, 3759); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3760 | MOZ_RELEASE_ASSERT(BSV(FakeNsTString(nullptr, 0, true)).AsSpan().IsEmpty())do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(FakeNsTString(nullptr, 0, true)).AsSpan().IsEmpty ())>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(BSV(FakeNsTString(nullptr, 0, true)).AsSpan().IsEmpty ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("BSV(FakeNsTString(nullptr, 0, true)).AsSpan().IsEmpty()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3760); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(FakeNsTString(nullptr, 0, true)).AsSpan().IsEmpty()" ")"); do { MOZ_CrashSequence(__null, 3760); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3761 | MOZ_RELEASE_ASSERT(BSV(FakeNsTString(nullptr, 0, true)).IsLiteral())do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(FakeNsTString(nullptr, 0, true)).IsLiteral())> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(BSV(FakeNsTString(nullptr, 0, true)).IsLiteral()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("BSV(FakeNsTString(nullptr, 0, true)).IsLiteral()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3761 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(FakeNsTString(nullptr, 0, true)).IsLiteral()" ")"); do { MOZ_CrashSequence(__null, 3761); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3762 | MOZ_RELEASE_ASSERT(!BSV(FakeNsTString(nullptr, 0, true)).IsReference())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!BSV(FakeNsTString(nullptr, 0, true)).IsReference()) >::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(!BSV(FakeNsTString(nullptr, 0, true)).IsReference()) )), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!BSV(FakeNsTString(nullptr, 0, true)).IsReference()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3762 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!BSV(FakeNsTString(nullptr, 0, true)).IsReference()" ")"); do { MOZ_CrashSequence(__null, 3762); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3763 | ||||
| 3764 | // FakeNsTString to a literal empty string. | |||
| 3765 | MOZ_RELEASE_ASSERT(BSV(FakeNsTString(empty, 0, true)).Length() == 0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(FakeNsTString(empty, 0, true)).Length() == 0)> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(BSV(FakeNsTString(empty, 0, true)).Length() == 0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("BSV(FakeNsTString(empty, 0, true)).Length() == 0" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3765 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(FakeNsTString(empty, 0, true)).Length() == 0" ")"); do { MOZ_CrashSequence(__null, 3765); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3766 | MOZ_RELEASE_ASSERT(BSV(FakeNsTString(empty, 0, true)).AsSpan().IsEmpty())do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(FakeNsTString(empty, 0, true)).AsSpan().IsEmpty( ))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(BSV(FakeNsTString(empty, 0, true)).AsSpan().IsEmpty( )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("BSV(FakeNsTString(empty, 0, true)).AsSpan().IsEmpty()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3766); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(FakeNsTString(empty, 0, true)).AsSpan().IsEmpty()" ")"); do { MOZ_CrashSequence(__null, 3766); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3767 | MOZ_RELEASE_ASSERT(BSV(FakeNsTString(empty, 0, true)).IsLiteral())do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(FakeNsTString(empty, 0, true)).IsLiteral())>:: isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(BSV(FakeNsTString(empty, 0, true)).IsLiteral()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("BSV(FakeNsTString(empty, 0, true)).IsLiteral()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3767 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(FakeNsTString(empty, 0, true)).IsLiteral()" ")"); do { MOZ_CrashSequence(__null, 3767); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3768 | MOZ_RELEASE_ASSERT(!BSV(FakeNsTString(empty, 0, true)).IsReference())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!BSV(FakeNsTString(empty, 0, true)).IsReference())> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(!BSV(FakeNsTString(empty, 0, true)).IsReference()))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("!BSV(FakeNsTString(empty, 0, true)).IsReference()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3768 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!BSV(FakeNsTString(empty, 0, true)).IsReference()" ")"); do { MOZ_CrashSequence(__null, 3768); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3769 | ||||
| 3770 | // FakeNsTString to a literal non-empty string. | |||
| 3771 | MOZ_RELEASE_ASSERT(BSV(FakeNsTString(hi, 2, true)).Length() == 2)do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(FakeNsTString(hi, 2, true)).Length() == 2)>:: isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(BSV(FakeNsTString(hi, 2, true)).Length() == 2))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("BSV(FakeNsTString(hi, 2, true)).Length() == 2" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3771 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(FakeNsTString(hi, 2, true)).Length() == 2" ")"); do { MOZ_CrashSequence(__null, 3771); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3772 | MOZ_RELEASE_ASSERT(BSV(FakeNsTString(hi, 2, true)).AsSpan().Elements())do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(FakeNsTString(hi, 2, true)).AsSpan().Elements()) >::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(BSV(FakeNsTString(hi, 2, true)).AsSpan().Elements()) )), 0))) { do { } while (false); MOZ_ReportAssertionFailure("BSV(FakeNsTString(hi, 2, true)).AsSpan().Elements()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3772 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(FakeNsTString(hi, 2, true)).AsSpan().Elements()" ")"); do { MOZ_CrashSequence(__null, 3772); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3773 | MOZ_RELEASE_ASSERT(BSV(FakeNsTString(hi, 2, true)).AsSpan().Elements()[0] ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(FakeNsTString(hi, 2, true)).AsSpan().Elements()[ 0] == CHAR('h'))>::isValid, "invalid assertion condition") ; if ((__builtin_expect(!!(!(!!(BSV(FakeNsTString(hi, 2, true )).AsSpan().Elements()[0] == CHAR('h')))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("BSV(FakeNsTString(hi, 2, true)).AsSpan().Elements()[0] == CHAR('h')" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3774 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(FakeNsTString(hi, 2, true)).AsSpan().Elements()[0] == CHAR('h')" ")"); do { MOZ_CrashSequence(__null, 3774); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 3774 | CHAR('h'))do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(FakeNsTString(hi, 2, true)).AsSpan().Elements()[ 0] == CHAR('h'))>::isValid, "invalid assertion condition") ; if ((__builtin_expect(!!(!(!!(BSV(FakeNsTString(hi, 2, true )).AsSpan().Elements()[0] == CHAR('h')))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("BSV(FakeNsTString(hi, 2, true)).AsSpan().Elements()[0] == CHAR('h')" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3774 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(FakeNsTString(hi, 2, true)).AsSpan().Elements()[0] == CHAR('h')" ")"); do { MOZ_CrashSequence(__null, 3774); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3775 | MOZ_RELEASE_ASSERT(BSV(FakeNsTString(hi, 2, true)).AsSpan().Elements()[1] ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(FakeNsTString(hi, 2, true)).AsSpan().Elements()[ 1] == CHAR('i'))>::isValid, "invalid assertion condition") ; if ((__builtin_expect(!!(!(!!(BSV(FakeNsTString(hi, 2, true )).AsSpan().Elements()[1] == CHAR('i')))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("BSV(FakeNsTString(hi, 2, true)).AsSpan().Elements()[1] == CHAR('i')" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3776 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(FakeNsTString(hi, 2, true)).AsSpan().Elements()[1] == CHAR('i')" ")"); do { MOZ_CrashSequence(__null, 3776); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 3776 | CHAR('i'))do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(FakeNsTString(hi, 2, true)).AsSpan().Elements()[ 1] == CHAR('i'))>::isValid, "invalid assertion condition") ; if ((__builtin_expect(!!(!(!!(BSV(FakeNsTString(hi, 2, true )).AsSpan().Elements()[1] == CHAR('i')))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("BSV(FakeNsTString(hi, 2, true)).AsSpan().Elements()[1] == CHAR('i')" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3776 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(FakeNsTString(hi, 2, true)).AsSpan().Elements()[1] == CHAR('i')" ")"); do { MOZ_CrashSequence(__null, 3776); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3777 | MOZ_RELEASE_ASSERT(BSV(FakeNsTString(hi, 2, true)).IsLiteral())do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(FakeNsTString(hi, 2, true)).IsLiteral())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(BSV(FakeNsTString(hi, 2, true)).IsLiteral()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("BSV(FakeNsTString(hi, 2, true)).IsLiteral()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3777 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(FakeNsTString(hi, 2, true)).IsLiteral()" ")"); do { MOZ_CrashSequence(__null, 3777); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3778 | MOZ_RELEASE_ASSERT(!BSV(FakeNsTString(hi, 2, true)).IsReference())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!BSV(FakeNsTString(hi, 2, true)).IsReference())>:: isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(!BSV(FakeNsTString(hi, 2, true)).IsReference()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("!BSV(FakeNsTString(hi, 2, true)).IsReference()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3778 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!BSV(FakeNsTString(hi, 2, true)).IsReference()" ")"); do { MOZ_CrashSequence(__null, 3778); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3779 | ||||
| 3780 | // FakeNsTString to a non-literal non-empty string. | |||
| 3781 | MOZ_RELEASE_ASSERT(BSV(FakeNsTString(hi, 2, false)).Length() == 2)do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(FakeNsTString(hi, 2, false)).Length() == 2)>:: isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(BSV(FakeNsTString(hi, 2, false)).Length() == 2))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("BSV(FakeNsTString(hi, 2, false)).Length() == 2" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3781 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(FakeNsTString(hi, 2, false)).Length() == 2" ")"); do { MOZ_CrashSequence(__null, 3781); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3782 | MOZ_RELEASE_ASSERT(BSV(FakeNsTString(hi, 2, false)).AsSpan().Elements())do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(FakeNsTString(hi, 2, false)).AsSpan().Elements() )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(BSV(FakeNsTString(hi, 2, false)).AsSpan().Elements() ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "BSV(FakeNsTString(hi, 2, false)).AsSpan().Elements()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3782); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(FakeNsTString(hi, 2, false)).AsSpan().Elements()" ")"); do { MOZ_CrashSequence(__null, 3782); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3783 | MOZ_RELEASE_ASSERT(BSV(FakeNsTString(hi, 2, false)).AsSpan().Elements()[0] ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(FakeNsTString(hi, 2, false)).AsSpan().Elements() [0] == CHAR('h'))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(BSV(FakeNsTString(hi, 2, false )).AsSpan().Elements()[0] == CHAR('h')))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("BSV(FakeNsTString(hi, 2, false)).AsSpan().Elements()[0] == CHAR('h')" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3784 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(FakeNsTString(hi, 2, false)).AsSpan().Elements()[0] == CHAR('h')" ")"); do { MOZ_CrashSequence(__null, 3784); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 3784 | CHAR('h'))do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(FakeNsTString(hi, 2, false)).AsSpan().Elements() [0] == CHAR('h'))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(BSV(FakeNsTString(hi, 2, false )).AsSpan().Elements()[0] == CHAR('h')))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("BSV(FakeNsTString(hi, 2, false)).AsSpan().Elements()[0] == CHAR('h')" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3784 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(FakeNsTString(hi, 2, false)).AsSpan().Elements()[0] == CHAR('h')" ")"); do { MOZ_CrashSequence(__null, 3784); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3785 | MOZ_RELEASE_ASSERT(BSV(FakeNsTString(hi, 2, false)).AsSpan().Elements()[1] ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(FakeNsTString(hi, 2, false)).AsSpan().Elements() [1] == CHAR('i'))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(BSV(FakeNsTString(hi, 2, false )).AsSpan().Elements()[1] == CHAR('i')))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("BSV(FakeNsTString(hi, 2, false)).AsSpan().Elements()[1] == CHAR('i')" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3786 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(FakeNsTString(hi, 2, false)).AsSpan().Elements()[1] == CHAR('i')" ")"); do { MOZ_CrashSequence(__null, 3786); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 3786 | CHAR('i'))do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(FakeNsTString(hi, 2, false)).AsSpan().Elements() [1] == CHAR('i'))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(BSV(FakeNsTString(hi, 2, false )).AsSpan().Elements()[1] == CHAR('i')))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("BSV(FakeNsTString(hi, 2, false)).AsSpan().Elements()[1] == CHAR('i')" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3786 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(FakeNsTString(hi, 2, false)).AsSpan().Elements()[1] == CHAR('i')" ")"); do { MOZ_CrashSequence(__null, 3786); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3787 | MOZ_RELEASE_ASSERT(!BSV(FakeNsTString(hi, 2, false)).IsLiteral())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!BSV(FakeNsTString(hi, 2, false)).IsLiteral())>:: isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(!BSV(FakeNsTString(hi, 2, false)).IsLiteral()))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("!BSV(FakeNsTString(hi, 2, false)).IsLiteral()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3787 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!BSV(FakeNsTString(hi, 2, false)).IsLiteral()" ")"); do { MOZ_CrashSequence(__null, 3787); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3788 | MOZ_RELEASE_ASSERT(BSV(FakeNsTString(hi, 2, false)).IsReference())do { static_assert( mozilla::detail::AssertionConditionType< decltype(BSV(FakeNsTString(hi, 2, false)).IsReference())>:: isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(BSV(FakeNsTString(hi, 2, false)).IsReference()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("BSV(FakeNsTString(hi, 2, false)).IsReference()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3788 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "BSV(FakeNsTString(hi, 2, false)).IsReference()" ")"); do { MOZ_CrashSequence(__null, 3788); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3789 | ||||
| 3790 | // Serialization and deserialization (with ownership). | |||
| 3791 | constexpr size_t bufferMaxSize = 1024; | |||
| 3792 | constexpr ProfileChunkedBuffer::Length chunkMinSize = 128; | |||
| 3793 | ProfileBufferChunkManagerWithLocalLimit cm(bufferMaxSize, chunkMinSize); | |||
| 3794 | ProfileChunkedBuffer cb(ProfileChunkedBuffer::ThreadSafety::WithMutex, cm); | |||
| 3795 | ||||
| 3796 | // Literal string, serialized as raw pointer. | |||
| 3797 | MOZ_RELEASE_ASSERT(cb.PutObject(BSV(hi)))do { static_assert( mozilla::detail::AssertionConditionType< decltype(cb.PutObject(BSV(hi)))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(cb.PutObject(BSV(hi))))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("cb.PutObject(BSV(hi))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3797 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "cb.PutObject(BSV(hi))" ")"); do { MOZ_CrashSequence(__null, 3797); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3798 | { | |||
| 3799 | unsigned read = 0; | |||
| 3800 | ProfilerStringView<CHAR> outerBSV; | |||
| 3801 | cb.ReadEach([&](ProfileBufferEntryReader& aER) { | |||
| 3802 | ++read; | |||
| 3803 | auto bsv = aER.ReadObject<ProfilerStringView<CHAR>>(); | |||
| 3804 | MOZ_RELEASE_ASSERT(bsv.Length() == 2)do { static_assert( mozilla::detail::AssertionConditionType< decltype(bsv.Length() == 2)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(bsv.Length() == 2))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("bsv.Length() == 2" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3804 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "bsv.Length() == 2" ")"); do { MOZ_CrashSequence(__null, 3804); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3805 | MOZ_RELEASE_ASSERT(bsv.AsSpan().Elements())do { static_assert( mozilla::detail::AssertionConditionType< decltype(bsv.AsSpan().Elements())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(bsv.AsSpan().Elements()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("bsv.AsSpan().Elements()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3805 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "bsv.AsSpan().Elements()" ")"); do { MOZ_CrashSequence(__null, 3805); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3806 | MOZ_RELEASE_ASSERT(bsv.AsSpan().Elements()[0] == CHAR('h'))do { static_assert( mozilla::detail::AssertionConditionType< decltype(bsv.AsSpan().Elements()[0] == CHAR('h'))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(bsv.AsSpan().Elements()[0] == CHAR('h')))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("bsv.AsSpan().Elements()[0] == CHAR('h')" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3806 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "bsv.AsSpan().Elements()[0] == CHAR('h')" ")"); do { MOZ_CrashSequence(__null, 3806); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3807 | MOZ_RELEASE_ASSERT(bsv.AsSpan().Elements()[1] == CHAR('i'))do { static_assert( mozilla::detail::AssertionConditionType< decltype(bsv.AsSpan().Elements()[1] == CHAR('i'))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(bsv.AsSpan().Elements()[1] == CHAR('i')))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("bsv.AsSpan().Elements()[1] == CHAR('i')" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3807 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "bsv.AsSpan().Elements()[1] == CHAR('i')" ")"); do { MOZ_CrashSequence(__null, 3807); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3808 | MOZ_RELEASE_ASSERT(bsv.IsLiteral())do { static_assert( mozilla::detail::AssertionConditionType< decltype(bsv.IsLiteral())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(bsv.IsLiteral()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("bsv.IsLiteral()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3808 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "bsv.IsLiteral()" ")"); do { MOZ_CrashSequence(__null, 3808); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3809 | MOZ_RELEASE_ASSERT(!bsv.IsReference())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!bsv.IsReference())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!bsv.IsReference()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!bsv.IsReference()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3809 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!bsv.IsReference()" ")"); do { MOZ_CrashSequence(__null, 3809); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3810 | outerBSV = std::move(bsv); | |||
| 3811 | }); | |||
| 3812 | MOZ_RELEASE_ASSERT(read == 1)do { static_assert( mozilla::detail::AssertionConditionType< decltype(read == 1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(read == 1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("read == 1", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3812); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "read == 1" ")"); do { MOZ_CrashSequence(__null, 3812); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3813 | MOZ_RELEASE_ASSERT(outerBSV.Length() == 2)do { static_assert( mozilla::detail::AssertionConditionType< decltype(outerBSV.Length() == 2)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(outerBSV.Length() == 2))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("outerBSV.Length() == 2" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3813 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "outerBSV.Length() == 2" ")"); do { MOZ_CrashSequence(__null, 3813); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3814 | MOZ_RELEASE_ASSERT(outerBSV.AsSpan().Elements())do { static_assert( mozilla::detail::AssertionConditionType< decltype(outerBSV.AsSpan().Elements())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(outerBSV.AsSpan().Elements() ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "outerBSV.AsSpan().Elements()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3814); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "outerBSV.AsSpan().Elements()" ")"); do { MOZ_CrashSequence(__null, 3814); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3815 | MOZ_RELEASE_ASSERT(outerBSV.AsSpan().Elements()[0] == CHAR('h'))do { static_assert( mozilla::detail::AssertionConditionType< decltype(outerBSV.AsSpan().Elements()[0] == CHAR('h'))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(outerBSV.AsSpan().Elements()[0] == CHAR('h')))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("outerBSV.AsSpan().Elements()[0] == CHAR('h')" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3815 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "outerBSV.AsSpan().Elements()[0] == CHAR('h')" ")"); do { MOZ_CrashSequence(__null, 3815); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3816 | MOZ_RELEASE_ASSERT(outerBSV.AsSpan().Elements()[1] == CHAR('i'))do { static_assert( mozilla::detail::AssertionConditionType< decltype(outerBSV.AsSpan().Elements()[1] == CHAR('i'))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(outerBSV.AsSpan().Elements()[1] == CHAR('i')))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("outerBSV.AsSpan().Elements()[1] == CHAR('i')" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3816 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "outerBSV.AsSpan().Elements()[1] == CHAR('i')" ")"); do { MOZ_CrashSequence(__null, 3816); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3817 | MOZ_RELEASE_ASSERT(outerBSV.IsLiteral())do { static_assert( mozilla::detail::AssertionConditionType< decltype(outerBSV.IsLiteral())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(outerBSV.IsLiteral()))), 0)) ) { do { } while (false); MOZ_ReportAssertionFailure("outerBSV.IsLiteral()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3817 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "outerBSV.IsLiteral()" ")"); do { MOZ_CrashSequence(__null, 3817); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3818 | MOZ_RELEASE_ASSERT(!outerBSV.IsReference())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!outerBSV.IsReference())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!outerBSV.IsReference()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("!outerBSV.IsReference()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3818 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!outerBSV.IsReference()" ")"); do { MOZ_CrashSequence(__null, 3818); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3819 | } | |||
| 3820 | ||||
| 3821 | MOZ_RELEASE_ASSERT(cb.GetState().mRangeStart == 1u)do { static_assert( mozilla::detail::AssertionConditionType< decltype(cb.GetState().mRangeStart == 1u)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(cb.GetState().mRangeStart == 1u))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("cb.GetState().mRangeStart == 1u", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3821); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "cb.GetState().mRangeStart == 1u" ")"); do { MOZ_CrashSequence(__null, 3821); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3822 | ||||
| 3823 | cb.Clear(); | |||
| 3824 | ||||
| 3825 | // Non-literal string, content is serialized. | |||
| 3826 | ||||
| 3827 | // We'll try to write 4 strings, such that the 4th one will cross into the | |||
| 3828 | // next chunk. | |||
| 3829 | unsigned guessedChunkBytes = unsigned(cb.GetState().mRangeStart) - 1u; | |||
| 3830 | static constexpr unsigned stringCount = 4u; | |||
| 3831 | const unsigned stringSize = | |||
| 3832 | guessedChunkBytes / stringCount / sizeof(CHAR) + 3u; | |||
| 3833 | ||||
| 3834 | std::basic_string<CHAR> longString; | |||
| 3835 | longString.reserve(stringSize); | |||
| 3836 | for (unsigned i = 0; i < stringSize; ++i) { | |||
| 3837 | longString += CHAR('0' + i); | |||
| 3838 | } | |||
| 3839 | ||||
| 3840 | for (unsigned i = 0; i < stringCount; ++i) { | |||
| 3841 | MOZ_RELEASE_ASSERT(cb.PutObject(BSV(longString)))do { static_assert( mozilla::detail::AssertionConditionType< decltype(cb.PutObject(BSV(longString)))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(cb.PutObject(BSV(longString) )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("cb.PutObject(BSV(longString))", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3841); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "cb.PutObject(BSV(longString))" ")"); do { MOZ_CrashSequence(__null, 3841); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3842 | } | |||
| 3843 | ||||
| 3844 | { | |||
| 3845 | unsigned read = 0; | |||
| 3846 | ProfilerStringView<CHAR> outerBSV; | |||
| 3847 | cb.ReadEach([&](ProfileBufferEntryReader& aER) { | |||
| 3848 | ++read; | |||
| 3849 | { | |||
| 3850 | auto bsv = aER.ReadObject<ProfilerStringView<CHAR>>(); | |||
| 3851 | MOZ_RELEASE_ASSERT(bsv.Length() == stringSize)do { static_assert( mozilla::detail::AssertionConditionType< decltype(bsv.Length() == stringSize)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(bsv.Length() == stringSize)) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("bsv.Length() == stringSize" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3851 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "bsv.Length() == stringSize" ")"); do { MOZ_CrashSequence(__null, 3851); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| ||||
| 3852 | MOZ_RELEASE_ASSERT(bsv.AsSpan().Elements())do { static_assert( mozilla::detail::AssertionConditionType< decltype(bsv.AsSpan().Elements())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(bsv.AsSpan().Elements()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("bsv.AsSpan().Elements()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3852 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "bsv.AsSpan().Elements()" ")"); do { MOZ_CrashSequence(__null, 3852); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3853 | for (unsigned i = 0; i < stringSize; ++i) { | |||
| 3854 | MOZ_RELEASE_ASSERT(bsv.AsSpan().Elements()[i] == CHAR('0' + i))do { static_assert( mozilla::detail::AssertionConditionType< decltype(bsv.AsSpan().Elements()[i] == CHAR('0' + i))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(bsv.AsSpan().Elements()[i] == CHAR('0' + i)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("bsv.AsSpan().Elements()[i] == CHAR('0' + i)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3854 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "bsv.AsSpan().Elements()[i] == CHAR('0' + i)" ")"); do { MOZ_CrashSequence(__null, 3854); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3855 | longString += '0' + i; | |||
| 3856 | } | |||
| 3857 | MOZ_RELEASE_ASSERT(!bsv.IsLiteral())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!bsv.IsLiteral())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!bsv.IsLiteral()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!bsv.IsLiteral()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3857 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!bsv.IsLiteral()" ")"); do { MOZ_CrashSequence(__null, 3857); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3858 | // The first 3 should be references (because they fit in one chunk, so | |||
| 3859 | // they can be referenced directly), which the 4th one have to be copied | |||
| 3860 | // out of two chunks and stitched back together. | |||
| 3861 | MOZ_RELEASE_ASSERT(bsv.IsReference() == (read != 4))do { static_assert( mozilla::detail::AssertionConditionType< decltype(bsv.IsReference() == (read != 4))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(bsv.IsReference() == (read != 4)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("bsv.IsReference() == (read != 4)", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3861); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "bsv.IsReference() == (read != 4)" ")"); do { MOZ_CrashSequence(__null, 3861); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3862 | ||||
| 3863 | // Test move of ownership. | |||
| 3864 | outerBSV = std::move(bsv); | |||
| 3865 | // After a move, references stay complete, while a non-reference had a | |||
| 3866 | // buffer that has been moved out. | |||
| 3867 | // NOLINTNEXTLINE(bugprone-use-after-move,clang-analyzer-cplusplus.Move) | |||
| 3868 | MOZ_RELEASE_ASSERT(bsv.Length() == ((read != 4) ? stringSize : 0))do { static_assert( mozilla::detail::AssertionConditionType< decltype(bsv.Length() == ((read != 4) ? stringSize : 0))>:: isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(bsv.Length() == ((read != 4) ? stringSize : 0)))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("bsv.Length() == ((read != 4) ? stringSize : 0)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3868 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "bsv.Length() == ((read != 4) ? stringSize : 0)" ")"); do { MOZ_CrashSequence(__null, 3868); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| ||||
| 3869 | } | |||
| 3870 | ||||
| 3871 | MOZ_RELEASE_ASSERT(outerBSV.Length() == stringSize)do { static_assert( mozilla::detail::AssertionConditionType< decltype(outerBSV.Length() == stringSize)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(outerBSV.Length() == stringSize ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "outerBSV.Length() == stringSize", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3871); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "outerBSV.Length() == stringSize" ")"); do { MOZ_CrashSequence(__null, 3871); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3872 | MOZ_RELEASE_ASSERT(outerBSV.AsSpan().Elements())do { static_assert( mozilla::detail::AssertionConditionType< decltype(outerBSV.AsSpan().Elements())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(outerBSV.AsSpan().Elements() ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "outerBSV.AsSpan().Elements()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3872); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "outerBSV.AsSpan().Elements()" ")"); do { MOZ_CrashSequence(__null, 3872); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3873 | for (unsigned i = 0; i < stringSize; ++i) { | |||
| 3874 | MOZ_RELEASE_ASSERT(outerBSV.AsSpan().Elements()[i] == CHAR('0' + i))do { static_assert( mozilla::detail::AssertionConditionType< decltype(outerBSV.AsSpan().Elements()[i] == CHAR('0' + i))> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(outerBSV.AsSpan().Elements()[i] == CHAR('0' + i)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("outerBSV.AsSpan().Elements()[i] == CHAR('0' + i)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3874 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "outerBSV.AsSpan().Elements()[i] == CHAR('0' + i)" ")"); do { MOZ_CrashSequence(__null, 3874); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3875 | longString += '0' + i; | |||
| 3876 | } | |||
| 3877 | MOZ_RELEASE_ASSERT(!outerBSV.IsLiteral())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!outerBSV.IsLiteral())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!outerBSV.IsLiteral()))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("!outerBSV.IsLiteral()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3877 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!outerBSV.IsLiteral()" ")"); do { MOZ_CrashSequence(__null, 3877); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3878 | MOZ_RELEASE_ASSERT(outerBSV.IsReference() == (read != 4))do { static_assert( mozilla::detail::AssertionConditionType< decltype(outerBSV.IsReference() == (read != 4))>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(! !(outerBSV.IsReference() == (read != 4)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("outerBSV.IsReference() == (read != 4)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3878 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "outerBSV.IsReference() == (read != 4)" ")"); do { MOZ_CrashSequence(__null, 3878); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3879 | }); | |||
| 3880 | MOZ_RELEASE_ASSERT(read == 4)do { static_assert( mozilla::detail::AssertionConditionType< decltype(read == 4)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(read == 4))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("read == 4", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3880); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "read == 4" ")"); do { MOZ_CrashSequence(__null, 3880); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3881 | } | |||
| 3882 | ||||
| 3883 | if constexpr (std::is_same_v<CHAR, char>) { | |||
| 3884 | printf("TestProfilerStringView<char> done\n"); | |||
| 3885 | } else if constexpr (std::is_same_v<CHAR, char16_t>) { | |||
| 3886 | printf("TestProfilerStringView<char16_t> done\n"); | |||
| 3887 | } | |||
| 3888 | } | |||
| 3889 | ||||
| 3890 | void TestProfilerDependencies() { | |||
| 3891 | TestPowerOfTwoMask(); | |||
| 3892 | TestPowerOfTwo(); | |||
| 3893 | TestLEB128(); | |||
| 3894 | TestJSONTimeOutput(); | |||
| 3895 | TestStreamPayloadHelperTimeDuration(); | |||
| 3896 | TestChunk(); | |||
| 3897 | TestChunkManagerSingle(); | |||
| 3898 | TestChunkManagerWithLocalLimit(); | |||
| 3899 | TestControlledChunkManagerUpdate(); | |||
| 3900 | TestControlledChunkManagerWithLocalLimit(); | |||
| 3901 | TestChunkedBuffer(); | |||
| 3902 | TestChunkedBufferSingle(); | |||
| 3903 | TestModuloBuffer(); | |||
| 3904 | TestLiteralEmptyStringView(); | |||
| 3905 | TestProfilerStringView<char>(); | |||
| 3906 | TestProfilerStringView<char16_t>(); | |||
| 3907 | } | |||
| 3908 | ||||
| 3909 | // Increase the depth, to a maximum (to avoid too-deep recursion). | |||
| 3910 | static constexpr size_t NextDepth(size_t aDepth) { | |||
| 3911 | constexpr size_t MAX_DEPTH = 128; | |||
| 3912 | return (aDepth < MAX_DEPTH) ? (aDepth + 1) : aDepth; | |||
| 3913 | } | |||
| 3914 | ||||
| 3915 | Atomic<bool, Relaxed> sStopFibonacci; | |||
| 3916 | ||||
| 3917 | // Compute fibonacci the hard way (recursively: `f(n)=f(n-1)+f(n-2)`), and | |||
| 3918 | // prevent inlining. | |||
| 3919 | // The template parameter makes each depth be a separate function, to better | |||
| 3920 | // distinguish them in the profiler output. | |||
| 3921 | template <size_t DEPTH = 0> | |||
| 3922 | MOZ_NEVER_INLINE__attribute__((noinline)) unsigned long long Fibonacci(unsigned long long n) { | |||
| 3923 | AUTO_BASE_PROFILER_LABEL_DYNAMIC_STRING("fib", OTHER, std::to_string(DEPTH))Maybe<std::string> autoStr; Maybe<::mozilla::baseprofiler ::AutoProfilerLabel> raiiObjectString; if (::mozilla::baseprofiler ::profiler_is_active()) { autoStr.emplace(std::to_string(DEPTH )); raiiObjectString.emplace( "fib", autoStr->c_str(), ::mozilla ::baseprofiler::ProfilingCategoryPair::OTHER); }; | |||
| 3924 | if (n == 0) { | |||
| 3925 | return 0; | |||
| 3926 | } | |||
| 3927 | if (n == 1) { | |||
| 3928 | return 1; | |||
| 3929 | } | |||
| 3930 | if (DEPTH < 5 && sStopFibonacci) { | |||
| 3931 | return 1'000'000'000; | |||
| 3932 | } | |||
| 3933 | TimeStamp start = TimeStamp::Now(); | |||
| 3934 | static constexpr size_t MAX_MARKER_DEPTH = 10; | |||
| 3935 | unsigned long long f2 = Fibonacci<NextDepth(DEPTH)>(n - 2); | |||
| 3936 | if (DEPTH == 0) { | |||
| 3937 | BASE_PROFILER_MARKER_UNTYPED("Half-way through Fibonacci", OTHER)do { ; ::mozilla::baseprofiler::AddMarker( "Half-way through Fibonacci" , ::mozilla::baseprofiler::category::OTHER); } while (false); | |||
| 3938 | } | |||
| 3939 | unsigned long long f1 = Fibonacci<NextDepth(DEPTH)>(n - 1); | |||
| 3940 | if (DEPTH < MAX_MARKER_DEPTH) { | |||
| 3941 | BASE_PROFILER_MARKER_TEXT("fib", OTHER,do { ; ::mozilla::baseprofiler::AddMarker( "fib", ::mozilla:: baseprofiler::category::OTHER, MarkerTiming::IntervalUntilNowFrom (start), ::mozilla::baseprofiler::markers::TextMarker{}, std:: to_string(DEPTH)); } while (false) | |||
| 3942 | MarkerTiming::IntervalUntilNowFrom(start),do { ; ::mozilla::baseprofiler::AddMarker( "fib", ::mozilla:: baseprofiler::category::OTHER, MarkerTiming::IntervalUntilNowFrom (start), ::mozilla::baseprofiler::markers::TextMarker{}, std:: to_string(DEPTH)); } while (false) | |||
| 3943 | std::to_string(DEPTH))do { ; ::mozilla::baseprofiler::AddMarker( "fib", ::mozilla:: baseprofiler::category::OTHER, MarkerTiming::IntervalUntilNowFrom (start), ::mozilla::baseprofiler::markers::TextMarker{}, std:: to_string(DEPTH)); } while (false); | |||
| 3944 | } | |||
| 3945 | return f2 + f1; | |||
| 3946 | } | |||
| 3947 | ||||
| 3948 | void TestProfiler() { | |||
| 3949 | printf("TestProfiler starting -- pid: %" PRIu64"l" "u" ", tid: %" PRIu64"l" "u" "\n", | |||
| 3950 | uint64_t(baseprofiler::profiler_current_process_id().ToNumber()), | |||
| 3951 | uint64_t(baseprofiler::profiler_current_thread_id().ToNumber())); | |||
| 3952 | // ::SleepMilli(10000); | |||
| 3953 | ||||
| 3954 | TestProfilerDependencies(); | |||
| 3955 | ||||
| 3956 | { | |||
| 3957 | MOZ_RELEASE_ASSERT(!baseprofiler::profiler_is_active())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!baseprofiler::profiler_is_active())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!baseprofiler::profiler_is_active ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!baseprofiler::profiler_is_active()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3957); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!baseprofiler::profiler_is_active()" ")"); do { MOZ_CrashSequence(__null, 3957); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3958 | MOZ_RELEASE_ASSERT(!baseprofiler::profiler_thread_is_being_profiled())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!baseprofiler::profiler_thread_is_being_profiled())> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(!baseprofiler::profiler_thread_is_being_profiled())) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!baseprofiler::profiler_thread_is_being_profiled()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3958 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!baseprofiler::profiler_thread_is_being_profiled()" ")"); do { MOZ_CrashSequence(__null, 3958); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3959 | MOZ_RELEASE_ASSERT(!baseprofiler::profiler_thread_is_sleeping())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!baseprofiler::profiler_thread_is_sleeping())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(!baseprofiler::profiler_thread_is_sleeping()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!baseprofiler::profiler_thread_is_sleeping()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3959 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!baseprofiler::profiler_thread_is_sleeping()" ")"); do { MOZ_CrashSequence(__null, 3959); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3960 | ||||
| 3961 | const baseprofiler::BaseProfilerThreadId mainThreadId = | |||
| 3962 | mozilla::baseprofiler::profiler_current_thread_id(); | |||
| 3963 | ||||
| 3964 | MOZ_RELEASE_ASSERT(mozilla::baseprofiler::profiler_main_thread_id() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::profiler_main_thread_id() == mainThreadId )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(mozilla::baseprofiler::profiler_main_thread_id() == mainThreadId ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "mozilla::baseprofiler::profiler_main_thread_id() == mainThreadId" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3965 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::profiler_main_thread_id() == mainThreadId" ")"); do { MOZ_CrashSequence(__null, 3965); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 3965 | mainThreadId)do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::profiler_main_thread_id() == mainThreadId )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(mozilla::baseprofiler::profiler_main_thread_id() == mainThreadId ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "mozilla::baseprofiler::profiler_main_thread_id() == mainThreadId" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3965 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::profiler_main_thread_id() == mainThreadId" ")"); do { MOZ_CrashSequence(__null, 3965); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3966 | MOZ_RELEASE_ASSERT(mozilla::baseprofiler::profiler_is_main_thread())do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::profiler_is_main_thread())> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(mozilla::baseprofiler::profiler_is_main_thread()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("mozilla::baseprofiler::profiler_is_main_thread()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3966 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::profiler_is_main_thread()" ")"); do { MOZ_CrashSequence(__null, 3966); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3967 | ||||
| 3968 | std::thread testThread([&]() { | |||
| 3969 | const baseprofiler::BaseProfilerThreadId testThreadId = | |||
| 3970 | mozilla::baseprofiler::profiler_current_thread_id(); | |||
| 3971 | MOZ_RELEASE_ASSERT(testThreadId != mainThreadId)do { static_assert( mozilla::detail::AssertionConditionType< decltype(testThreadId != mainThreadId)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(testThreadId != mainThreadId ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "testThreadId != mainThreadId", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3971); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "testThreadId != mainThreadId" ")"); do { MOZ_CrashSequence(__null, 3971); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3972 | ||||
| 3973 | MOZ_RELEASE_ASSERT(mozilla::baseprofiler::profiler_main_thread_id() !=do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::profiler_main_thread_id() != testThreadId )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(mozilla::baseprofiler::profiler_main_thread_id() != testThreadId ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "mozilla::baseprofiler::profiler_main_thread_id() != testThreadId" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3974 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::profiler_main_thread_id() != testThreadId" ")"); do { MOZ_CrashSequence(__null, 3974); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 3974 | testThreadId)do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::profiler_main_thread_id() != testThreadId )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(mozilla::baseprofiler::profiler_main_thread_id() != testThreadId ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "mozilla::baseprofiler::profiler_main_thread_id() != testThreadId" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3974 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::profiler_main_thread_id() != testThreadId" ")"); do { MOZ_CrashSequence(__null, 3974); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3975 | MOZ_RELEASE_ASSERT(!mozilla::baseprofiler::profiler_is_main_thread())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!mozilla::baseprofiler::profiler_is_main_thread())> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(!mozilla::baseprofiler::profiler_is_main_thread()))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("!mozilla::baseprofiler::profiler_is_main_thread()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3975 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!mozilla::baseprofiler::profiler_is_main_thread()" ")"); do { MOZ_CrashSequence(__null, 3975); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3976 | }); | |||
| 3977 | testThread.join(); | |||
| 3978 | ||||
| 3979 | printf("profiler_start()...\n"); | |||
| 3980 | Vector<const char*> filters; | |||
| 3981 | // Profile all registered threads. | |||
| 3982 | MOZ_RELEASE_ASSERT(filters.append(""))do { static_assert( mozilla::detail::AssertionConditionType< decltype(filters.append(""))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(filters.append("")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("filters.append(\"\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3982 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "filters.append(\"\")" ")"); do { MOZ_CrashSequence(__null, 3982); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3983 | const uint32_t features = baseprofiler::ProfilerFeature::StackWalk; | |||
| 3984 | baseprofiler::profiler_start(baseprofiler::BASE_PROFILER_DEFAULT_ENTRIES, | |||
| 3985 | BASE_PROFILER_DEFAULT_INTERVAL1, features, | |||
| 3986 | filters.begin(), filters.length()); | |||
| 3987 | ||||
| 3988 | MOZ_RELEASE_ASSERT(baseprofiler::profiler_is_active())do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::profiler_is_active())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::profiler_is_active ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("baseprofiler::profiler_is_active()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 3988); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::profiler_is_active()" ")"); do { MOZ_CrashSequence(__null, 3988); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3989 | MOZ_RELEASE_ASSERT(baseprofiler::profiler_thread_is_being_profiled())do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::profiler_thread_is_being_profiled())> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(baseprofiler::profiler_thread_is_being_profiled()))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("baseprofiler::profiler_thread_is_being_profiled()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3989 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::profiler_thread_is_being_profiled()" ")"); do { MOZ_CrashSequence(__null, 3989); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3990 | MOZ_RELEASE_ASSERT(!baseprofiler::profiler_thread_is_sleeping())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!baseprofiler::profiler_thread_is_sleeping())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(!baseprofiler::profiler_thread_is_sleeping()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!baseprofiler::profiler_thread_is_sleeping()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 3990 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!baseprofiler::profiler_thread_is_sleeping()" ")"); do { MOZ_CrashSequence(__null, 3990); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 3991 | ||||
| 3992 | sStopFibonacci = false; | |||
| 3993 | ||||
| 3994 | std::thread threadFib([]() { | |||
| 3995 | AUTO_BASE_PROFILER_REGISTER_THREAD("fibonacci")::mozilla::baseprofiler::AutoProfilerRegisterThread raiiObject3995 ("fibonacci"); | |||
| 3996 | SleepMilli(5); | |||
| 3997 | auto cause = baseprofiler::profiler_capture_backtrace(); | |||
| 3998 | AUTO_BASE_PROFILER_MARKER_TEXT(::mozilla::baseprofiler::AutoProfilerTextMarker raiiObject4000 ( "fibonacci", ::mozilla::baseprofiler::category::OTHER, MarkerStack ::TakeBacktrace(std::move(cause)), "First leaf call") | |||
| 3999 | "fibonacci", OTHER, MarkerStack::TakeBacktrace(std::move(cause)),::mozilla::baseprofiler::AutoProfilerTextMarker raiiObject4000 ( "fibonacci", ::mozilla::baseprofiler::category::OTHER, MarkerStack ::TakeBacktrace(std::move(cause)), "First leaf call") | |||
| 4000 | "First leaf call")::mozilla::baseprofiler::AutoProfilerTextMarker raiiObject4000 ( "fibonacci", ::mozilla::baseprofiler::category::OTHER, MarkerStack ::TakeBacktrace(std::move(cause)), "First leaf call"); | |||
| 4001 | static const unsigned long long fibStart = 37; | |||
| 4002 | printf("Fibonacci(%llu)...\n", fibStart); | |||
| 4003 | AUTO_BASE_PROFILER_LABEL("Label around Fibonacci", OTHER)::mozilla::baseprofiler::AutoProfilerLabel raiiObject4003( "Label around Fibonacci" , nullptr, ::mozilla::baseprofiler::ProfilingCategoryPair::OTHER ); | |||
| 4004 | ||||
| 4005 | unsigned long long f = Fibonacci(fibStart); | |||
| 4006 | printf("Fibonacci(%llu) = %llu\n", fibStart, f); | |||
| 4007 | }); | |||
| 4008 | ||||
| 4009 | std::thread threadCancelFib([]() { | |||
| 4010 | AUTO_BASE_PROFILER_REGISTER_THREAD("fibonacci canceller")::mozilla::baseprofiler::AutoProfilerRegisterThread raiiObject4010 ("fibonacci canceller"); | |||
| 4011 | SleepMilli(5); | |||
| 4012 | AUTO_BASE_PROFILER_MARKER_TEXT("fibonacci", OTHER, {}, "Canceller")::mozilla::baseprofiler::AutoProfilerTextMarker raiiObject4012 ( "fibonacci", ::mozilla::baseprofiler::category::OTHER, {}, "Canceller" ); | |||
| 4013 | static const int waitMaxSeconds = 10; | |||
| 4014 | for (int i = 0; i < waitMaxSeconds; ++i) { | |||
| 4015 | if (sStopFibonacci) { | |||
| 4016 | AUTO_BASE_PROFILER_LABEL_DYNAMIC_STRING("fibCancel", OTHER,Maybe<std::string> autoStr; Maybe<::mozilla::baseprofiler ::AutoProfilerLabel> raiiObjectString; if (::mozilla::baseprofiler ::profiler_is_active()) { autoStr.emplace(std::to_string(i)); raiiObjectString.emplace( "fibCancel", autoStr->c_str(), :: mozilla::baseprofiler::ProfilingCategoryPair::OTHER); } | |||
| 4017 | std::to_string(i))Maybe<std::string> autoStr; Maybe<::mozilla::baseprofiler ::AutoProfilerLabel> raiiObjectString; if (::mozilla::baseprofiler ::profiler_is_active()) { autoStr.emplace(std::to_string(i)); raiiObjectString.emplace( "fibCancel", autoStr->c_str(), :: mozilla::baseprofiler::ProfilingCategoryPair::OTHER); }; | |||
| 4018 | return; | |||
| 4019 | } | |||
| 4020 | AUTO_BASE_PROFILER_THREAD_SLEEP::mozilla::baseprofiler::AutoProfilerThreadSleep raiiObject4020; | |||
| 4021 | SleepMilli(1000); | |||
| 4022 | } | |||
| 4023 | AUTO_BASE_PROFILER_LABEL_DYNAMIC_STRING("fibCancel", OTHER,Maybe<std::string> autoStr; Maybe<::mozilla::baseprofiler ::AutoProfilerLabel> raiiObjectString; if (::mozilla::baseprofiler ::profiler_is_active()) { autoStr.emplace("Cancelling!"); raiiObjectString .emplace( "fibCancel", autoStr->c_str(), ::mozilla::baseprofiler ::ProfilingCategoryPair::OTHER); } | |||
| 4024 | "Cancelling!")Maybe<std::string> autoStr; Maybe<::mozilla::baseprofiler ::AutoProfilerLabel> raiiObjectString; if (::mozilla::baseprofiler ::profiler_is_active()) { autoStr.emplace("Cancelling!"); raiiObjectString .emplace( "fibCancel", autoStr->c_str(), ::mozilla::baseprofiler ::ProfilingCategoryPair::OTHER); }; | |||
| 4025 | sStopFibonacci = true; | |||
| 4026 | }); | |||
| 4027 | ||||
| 4028 | { | |||
| 4029 | AUTO_BASE_PROFILER_MARKER_TEXT("main thread", OTHER, {},::mozilla::baseprofiler::AutoProfilerTextMarker raiiObject4030 ( "main thread", ::mozilla::baseprofiler::category::OTHER, {} , "joining fibonacci thread") | |||
| 4030 | "joining fibonacci thread")::mozilla::baseprofiler::AutoProfilerTextMarker raiiObject4030 ( "main thread", ::mozilla::baseprofiler::category::OTHER, {} , "joining fibonacci thread"); | |||
| 4031 | AUTO_BASE_PROFILER_THREAD_SLEEP::mozilla::baseprofiler::AutoProfilerThreadSleep raiiObject4031; | |||
| 4032 | threadFib.join(); | |||
| 4033 | } | |||
| 4034 | ||||
| 4035 | { | |||
| 4036 | AUTO_BASE_PROFILER_MARKER_TEXT("main thread", OTHER, {},::mozilla::baseprofiler::AutoProfilerTextMarker raiiObject4037 ( "main thread", ::mozilla::baseprofiler::category::OTHER, {} , "joining fibonacci-canceller thread") | |||
| 4037 | "joining fibonacci-canceller thread")::mozilla::baseprofiler::AutoProfilerTextMarker raiiObject4037 ( "main thread", ::mozilla::baseprofiler::category::OTHER, {} , "joining fibonacci-canceller thread"); | |||
| 4038 | sStopFibonacci = true; | |||
| 4039 | AUTO_BASE_PROFILER_THREAD_SLEEP::mozilla::baseprofiler::AutoProfilerThreadSleep raiiObject4039; | |||
| 4040 | threadCancelFib.join(); | |||
| 4041 | } | |||
| 4042 | ||||
| 4043 | // Just making sure all payloads know how to (de)serialize and stream. | |||
| 4044 | ||||
| 4045 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker("markers 2.0 without options (omitted)" , mozilla::baseprofiler::category::OTHER))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker("markers 2.0 without options (omitted)" , mozilla::baseprofiler::category::OTHER)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("baseprofiler::AddMarker(\"markers 2.0 without options (omitted)\", mozilla::baseprofiler::category::OTHER)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4047 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker(\"markers 2.0 without options (omitted)\", mozilla::baseprofiler::category::OTHER)" ")"); do { MOZ_CrashSequence(__null, 4047); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4046 | baseprofiler::AddMarker("markers 2.0 without options (omitted)",do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker("markers 2.0 without options (omitted)" , mozilla::baseprofiler::category::OTHER))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker("markers 2.0 without options (omitted)" , mozilla::baseprofiler::category::OTHER)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("baseprofiler::AddMarker(\"markers 2.0 without options (omitted)\", mozilla::baseprofiler::category::OTHER)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4047 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker(\"markers 2.0 without options (omitted)\", mozilla::baseprofiler::category::OTHER)" ")"); do { MOZ_CrashSequence(__null, 4047); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4047 | mozilla::baseprofiler::category::OTHER))do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker("markers 2.0 without options (omitted)" , mozilla::baseprofiler::category::OTHER))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker("markers 2.0 without options (omitted)" , mozilla::baseprofiler::category::OTHER)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("baseprofiler::AddMarker(\"markers 2.0 without options (omitted)\", mozilla::baseprofiler::category::OTHER)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4047 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker(\"markers 2.0 without options (omitted)\", mozilla::baseprofiler::category::OTHER)" ")"); do { MOZ_CrashSequence(__null, 4047); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4048 | ||||
| 4049 | MOZ_RELEASE_ASSERT(baseprofiler::AddMarker(do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "markers 2.0 without options (implicit brace-init)" , mozilla::baseprofiler::category::OTHER, {}))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker( "markers 2.0 without options (implicit brace-init)" , mozilla::baseprofiler::category::OTHER, {})))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"markers 2.0 without options (implicit brace-init)\", mozilla::baseprofiler::category::OTHER, {})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4051 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"markers 2.0 without options (implicit brace-init)\", mozilla::baseprofiler::category::OTHER, {})" ")"); do { MOZ_CrashSequence(__null, 4051); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4050 | "markers 2.0 without options (implicit brace-init)",do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "markers 2.0 without options (implicit brace-init)" , mozilla::baseprofiler::category::OTHER, {}))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker( "markers 2.0 without options (implicit brace-init)" , mozilla::baseprofiler::category::OTHER, {})))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"markers 2.0 without options (implicit brace-init)\", mozilla::baseprofiler::category::OTHER, {})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4051 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"markers 2.0 without options (implicit brace-init)\", mozilla::baseprofiler::category::OTHER, {})" ")"); do { MOZ_CrashSequence(__null, 4051); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4051 | mozilla::baseprofiler::category::OTHER, {}))do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "markers 2.0 without options (implicit brace-init)" , mozilla::baseprofiler::category::OTHER, {}))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker( "markers 2.0 without options (implicit brace-init)" , mozilla::baseprofiler::category::OTHER, {})))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"markers 2.0 without options (implicit brace-init)\", mozilla::baseprofiler::category::OTHER, {})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4051 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"markers 2.0 without options (implicit brace-init)\", mozilla::baseprofiler::category::OTHER, {})" ")"); do { MOZ_CrashSequence(__null, 4051); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4052 | ||||
| 4053 | MOZ_RELEASE_ASSERT(baseprofiler::AddMarker(do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "markers 2.0 without options (explicit init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions()))> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(baseprofiler::AddMarker( "markers 2.0 without options (explicit init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions())))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"markers 2.0 without options (explicit init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions())" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4055 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"markers 2.0 without options (explicit init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions())" ")"); do { MOZ_CrashSequence(__null, 4055); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4054 | "markers 2.0 without options (explicit init)",do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "markers 2.0 without options (explicit init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions()))> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(baseprofiler::AddMarker( "markers 2.0 without options (explicit init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions())))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"markers 2.0 without options (explicit init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions())" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4055 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"markers 2.0 without options (explicit init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions())" ")"); do { MOZ_CrashSequence(__null, 4055); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4055 | mozilla::baseprofiler::category::OTHER, MarkerOptions()))do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "markers 2.0 without options (explicit init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions()))> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(baseprofiler::AddMarker( "markers 2.0 without options (explicit init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions())))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"markers 2.0 without options (explicit init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions())" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4055 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"markers 2.0 without options (explicit init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions())" ")"); do { MOZ_CrashSequence(__null, 4055); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4056 | ||||
| 4057 | MOZ_RELEASE_ASSERT(baseprofiler::AddMarker(do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "markers 2.0 without options (explicit brace-init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions{}))> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(baseprofiler::AddMarker( "markers 2.0 without options (explicit brace-init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions{})))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"markers 2.0 without options (explicit brace-init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions{})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4059 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"markers 2.0 without options (explicit brace-init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions{})" ")"); do { MOZ_CrashSequence(__null, 4059); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4058 | "markers 2.0 without options (explicit brace-init)",do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "markers 2.0 without options (explicit brace-init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions{}))> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(baseprofiler::AddMarker( "markers 2.0 without options (explicit brace-init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions{})))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"markers 2.0 without options (explicit brace-init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions{})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4059 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"markers 2.0 without options (explicit brace-init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions{})" ")"); do { MOZ_CrashSequence(__null, 4059); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4059 | mozilla::baseprofiler::category::OTHER, MarkerOptions{}))do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "markers 2.0 without options (explicit brace-init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions{}))> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(baseprofiler::AddMarker( "markers 2.0 without options (explicit brace-init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions{})))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"markers 2.0 without options (explicit brace-init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions{})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4059 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"markers 2.0 without options (explicit brace-init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions{})" ")"); do { MOZ_CrashSequence(__null, 4059); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4060 | ||||
| 4061 | MOZ_RELEASE_ASSERT(baseprofiler::AddMarker(do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "markers 2.0 with one option (implicit)" , mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId (123)))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(baseprofiler::AddMarker( "markers 2.0 with one option (implicit)" , mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId (123))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("baseprofiler::AddMarker( \"markers 2.0 with one option (implicit)\", mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId(123))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4063 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"markers 2.0 with one option (implicit)\", mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId(123))" ")"); do { MOZ_CrashSequence(__null, 4063); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4062 | "markers 2.0 with one option (implicit)",do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "markers 2.0 with one option (implicit)" , mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId (123)))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(baseprofiler::AddMarker( "markers 2.0 with one option (implicit)" , mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId (123))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("baseprofiler::AddMarker( \"markers 2.0 with one option (implicit)\", mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId(123))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4063 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"markers 2.0 with one option (implicit)\", mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId(123))" ")"); do { MOZ_CrashSequence(__null, 4063); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4063 | mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId(123)))do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "markers 2.0 with one option (implicit)" , mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId (123)))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(baseprofiler::AddMarker( "markers 2.0 with one option (implicit)" , mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId (123))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("baseprofiler::AddMarker( \"markers 2.0 with one option (implicit)\", mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId(123))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4063 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"markers 2.0 with one option (implicit)\", mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId(123))" ")"); do { MOZ_CrashSequence(__null, 4063); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4064 | ||||
| 4065 | MOZ_RELEASE_ASSERT(baseprofiler::AddMarker(do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "markers 2.0 with one option (implicit brace-init)" , mozilla::baseprofiler::category::OTHER, {MarkerInnerWindowId (123)}))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(baseprofiler::AddMarker( "markers 2.0 with one option (implicit brace-init)" , mozilla::baseprofiler::category::OTHER, {MarkerInnerWindowId (123)})))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("baseprofiler::AddMarker( \"markers 2.0 with one option (implicit brace-init)\", mozilla::baseprofiler::category::OTHER, {MarkerInnerWindowId(123)})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4067 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"markers 2.0 with one option (implicit brace-init)\", mozilla::baseprofiler::category::OTHER, {MarkerInnerWindowId(123)})" ")"); do { MOZ_CrashSequence(__null, 4067); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4066 | "markers 2.0 with one option (implicit brace-init)",do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "markers 2.0 with one option (implicit brace-init)" , mozilla::baseprofiler::category::OTHER, {MarkerInnerWindowId (123)}))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(baseprofiler::AddMarker( "markers 2.0 with one option (implicit brace-init)" , mozilla::baseprofiler::category::OTHER, {MarkerInnerWindowId (123)})))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("baseprofiler::AddMarker( \"markers 2.0 with one option (implicit brace-init)\", mozilla::baseprofiler::category::OTHER, {MarkerInnerWindowId(123)})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4067 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"markers 2.0 with one option (implicit brace-init)\", mozilla::baseprofiler::category::OTHER, {MarkerInnerWindowId(123)})" ")"); do { MOZ_CrashSequence(__null, 4067); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4067 | mozilla::baseprofiler::category::OTHER, {MarkerInnerWindowId(123)}))do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "markers 2.0 with one option (implicit brace-init)" , mozilla::baseprofiler::category::OTHER, {MarkerInnerWindowId (123)}))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(baseprofiler::AddMarker( "markers 2.0 with one option (implicit brace-init)" , mozilla::baseprofiler::category::OTHER, {MarkerInnerWindowId (123)})))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("baseprofiler::AddMarker( \"markers 2.0 with one option (implicit brace-init)\", mozilla::baseprofiler::category::OTHER, {MarkerInnerWindowId(123)})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4067 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"markers 2.0 with one option (implicit brace-init)\", mozilla::baseprofiler::category::OTHER, {MarkerInnerWindowId(123)})" ")"); do { MOZ_CrashSequence(__null, 4067); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4068 | ||||
| 4069 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker("markers 2.0 with one option (explicit init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions(MarkerInnerWindowId (123))))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(baseprofiler::AddMarker("markers 2.0 with one option (explicit init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions(MarkerInnerWindowId (123)))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("baseprofiler::AddMarker(\"markers 2.0 with one option (explicit init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions(MarkerInnerWindowId(123)))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4072 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker(\"markers 2.0 with one option (explicit init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions(MarkerInnerWindowId(123)))" ")"); do { MOZ_CrashSequence(__null, 4072); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4070 | baseprofiler::AddMarker("markers 2.0 with one option (explicit init)",do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker("markers 2.0 with one option (explicit init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions(MarkerInnerWindowId (123))))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(baseprofiler::AddMarker("markers 2.0 with one option (explicit init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions(MarkerInnerWindowId (123)))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("baseprofiler::AddMarker(\"markers 2.0 with one option (explicit init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions(MarkerInnerWindowId(123)))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4072 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker(\"markers 2.0 with one option (explicit init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions(MarkerInnerWindowId(123)))" ")"); do { MOZ_CrashSequence(__null, 4072); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4071 | mozilla::baseprofiler::category::OTHER,do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker("markers 2.0 with one option (explicit init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions(MarkerInnerWindowId (123))))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(baseprofiler::AddMarker("markers 2.0 with one option (explicit init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions(MarkerInnerWindowId (123)))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("baseprofiler::AddMarker(\"markers 2.0 with one option (explicit init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions(MarkerInnerWindowId(123)))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4072 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker(\"markers 2.0 with one option (explicit init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions(MarkerInnerWindowId(123)))" ")"); do { MOZ_CrashSequence(__null, 4072); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4072 | MarkerOptions(MarkerInnerWindowId(123))))do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker("markers 2.0 with one option (explicit init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions(MarkerInnerWindowId (123))))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(baseprofiler::AddMarker("markers 2.0 with one option (explicit init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions(MarkerInnerWindowId (123)))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("baseprofiler::AddMarker(\"markers 2.0 with one option (explicit init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions(MarkerInnerWindowId(123)))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4072 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker(\"markers 2.0 with one option (explicit init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions(MarkerInnerWindowId(123)))" ")"); do { MOZ_CrashSequence(__null, 4072); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4073 | ||||
| 4074 | MOZ_RELEASE_ASSERT(baseprofiler::AddMarker(do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "markers 2.0 with one option (explicit brace-init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions{MarkerInnerWindowId (123)}))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(baseprofiler::AddMarker( "markers 2.0 with one option (explicit brace-init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions{MarkerInnerWindowId (123)})))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("baseprofiler::AddMarker( \"markers 2.0 with one option (explicit brace-init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions{MarkerInnerWindowId(123)})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4077 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"markers 2.0 with one option (explicit brace-init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions{MarkerInnerWindowId(123)})" ")"); do { MOZ_CrashSequence(__null, 4077); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4075 | "markers 2.0 with one option (explicit brace-init)",do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "markers 2.0 with one option (explicit brace-init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions{MarkerInnerWindowId (123)}))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(baseprofiler::AddMarker( "markers 2.0 with one option (explicit brace-init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions{MarkerInnerWindowId (123)})))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("baseprofiler::AddMarker( \"markers 2.0 with one option (explicit brace-init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions{MarkerInnerWindowId(123)})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4077 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"markers 2.0 with one option (explicit brace-init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions{MarkerInnerWindowId(123)})" ")"); do { MOZ_CrashSequence(__null, 4077); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4076 | mozilla::baseprofiler::category::OTHER,do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "markers 2.0 with one option (explicit brace-init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions{MarkerInnerWindowId (123)}))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(baseprofiler::AddMarker( "markers 2.0 with one option (explicit brace-init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions{MarkerInnerWindowId (123)})))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("baseprofiler::AddMarker( \"markers 2.0 with one option (explicit brace-init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions{MarkerInnerWindowId(123)})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4077 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"markers 2.0 with one option (explicit brace-init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions{MarkerInnerWindowId(123)})" ")"); do { MOZ_CrashSequence(__null, 4077); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4077 | MarkerOptions{MarkerInnerWindowId(123)}))do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "markers 2.0 with one option (explicit brace-init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions{MarkerInnerWindowId (123)}))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(baseprofiler::AddMarker( "markers 2.0 with one option (explicit brace-init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions{MarkerInnerWindowId (123)})))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("baseprofiler::AddMarker( \"markers 2.0 with one option (explicit brace-init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions{MarkerInnerWindowId(123)})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4077 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"markers 2.0 with one option (explicit brace-init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions{MarkerInnerWindowId(123)})" ")"); do { MOZ_CrashSequence(__null, 4077); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4078 | ||||
| 4079 | MOZ_RELEASE_ASSERT(baseprofiler::AddMarker(do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "markers 2.0 with two options (implicit brace-init)" , mozilla::baseprofiler::category::OTHER, {MarkerInnerWindowId (123), MarkerStack::Capture()}))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker( "markers 2.0 with two options (implicit brace-init)" , mozilla::baseprofiler::category::OTHER, {MarkerInnerWindowId (123), MarkerStack::Capture()})))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"markers 2.0 with two options (implicit brace-init)\", mozilla::baseprofiler::category::OTHER, {MarkerInnerWindowId(123), MarkerStack::Capture()})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4082 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"markers 2.0 with two options (implicit brace-init)\", mozilla::baseprofiler::category::OTHER, {MarkerInnerWindowId(123), MarkerStack::Capture()})" ")"); do { MOZ_CrashSequence(__null, 4082); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4080 | "markers 2.0 with two options (implicit brace-init)",do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "markers 2.0 with two options (implicit brace-init)" , mozilla::baseprofiler::category::OTHER, {MarkerInnerWindowId (123), MarkerStack::Capture()}))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker( "markers 2.0 with two options (implicit brace-init)" , mozilla::baseprofiler::category::OTHER, {MarkerInnerWindowId (123), MarkerStack::Capture()})))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"markers 2.0 with two options (implicit brace-init)\", mozilla::baseprofiler::category::OTHER, {MarkerInnerWindowId(123), MarkerStack::Capture()})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4082 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"markers 2.0 with two options (implicit brace-init)\", mozilla::baseprofiler::category::OTHER, {MarkerInnerWindowId(123), MarkerStack::Capture()})" ")"); do { MOZ_CrashSequence(__null, 4082); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4081 | mozilla::baseprofiler::category::OTHER,do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "markers 2.0 with two options (implicit brace-init)" , mozilla::baseprofiler::category::OTHER, {MarkerInnerWindowId (123), MarkerStack::Capture()}))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker( "markers 2.0 with two options (implicit brace-init)" , mozilla::baseprofiler::category::OTHER, {MarkerInnerWindowId (123), MarkerStack::Capture()})))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"markers 2.0 with two options (implicit brace-init)\", mozilla::baseprofiler::category::OTHER, {MarkerInnerWindowId(123), MarkerStack::Capture()})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4082 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"markers 2.0 with two options (implicit brace-init)\", mozilla::baseprofiler::category::OTHER, {MarkerInnerWindowId(123), MarkerStack::Capture()})" ")"); do { MOZ_CrashSequence(__null, 4082); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4082 | {MarkerInnerWindowId(123), MarkerStack::Capture()}))do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "markers 2.0 with two options (implicit brace-init)" , mozilla::baseprofiler::category::OTHER, {MarkerInnerWindowId (123), MarkerStack::Capture()}))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker( "markers 2.0 with two options (implicit brace-init)" , mozilla::baseprofiler::category::OTHER, {MarkerInnerWindowId (123), MarkerStack::Capture()})))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"markers 2.0 with two options (implicit brace-init)\", mozilla::baseprofiler::category::OTHER, {MarkerInnerWindowId(123), MarkerStack::Capture()})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4082 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"markers 2.0 with two options (implicit brace-init)\", mozilla::baseprofiler::category::OTHER, {MarkerInnerWindowId(123), MarkerStack::Capture()})" ")"); do { MOZ_CrashSequence(__null, 4082); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4083 | ||||
| 4084 | MOZ_RELEASE_ASSERT(baseprofiler::AddMarker(do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "markers 2.0 with two options (explicit init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions(MarkerInnerWindowId (123), MarkerStack::Capture())))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker( "markers 2.0 with two options (explicit init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions(MarkerInnerWindowId (123), MarkerStack::Capture()))))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"markers 2.0 with two options (explicit init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions(MarkerInnerWindowId(123), MarkerStack::Capture()))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4087 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"markers 2.0 with two options (explicit init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions(MarkerInnerWindowId(123), MarkerStack::Capture()))" ")"); do { MOZ_CrashSequence(__null, 4087); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4085 | "markers 2.0 with two options (explicit init)",do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "markers 2.0 with two options (explicit init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions(MarkerInnerWindowId (123), MarkerStack::Capture())))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker( "markers 2.0 with two options (explicit init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions(MarkerInnerWindowId (123), MarkerStack::Capture()))))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"markers 2.0 with two options (explicit init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions(MarkerInnerWindowId(123), MarkerStack::Capture()))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4087 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"markers 2.0 with two options (explicit init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions(MarkerInnerWindowId(123), MarkerStack::Capture()))" ")"); do { MOZ_CrashSequence(__null, 4087); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4086 | mozilla::baseprofiler::category::OTHER,do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "markers 2.0 with two options (explicit init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions(MarkerInnerWindowId (123), MarkerStack::Capture())))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker( "markers 2.0 with two options (explicit init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions(MarkerInnerWindowId (123), MarkerStack::Capture()))))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"markers 2.0 with two options (explicit init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions(MarkerInnerWindowId(123), MarkerStack::Capture()))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4087 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"markers 2.0 with two options (explicit init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions(MarkerInnerWindowId(123), MarkerStack::Capture()))" ")"); do { MOZ_CrashSequence(__null, 4087); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4087 | MarkerOptions(MarkerInnerWindowId(123), MarkerStack::Capture())))do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "markers 2.0 with two options (explicit init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions(MarkerInnerWindowId (123), MarkerStack::Capture())))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker( "markers 2.0 with two options (explicit init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions(MarkerInnerWindowId (123), MarkerStack::Capture()))))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"markers 2.0 with two options (explicit init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions(MarkerInnerWindowId(123), MarkerStack::Capture()))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4087 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"markers 2.0 with two options (explicit init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions(MarkerInnerWindowId(123), MarkerStack::Capture()))" ")"); do { MOZ_CrashSequence(__null, 4087); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4088 | ||||
| 4089 | MOZ_RELEASE_ASSERT(baseprofiler::AddMarker(do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "markers 2.0 with two options (explicit brace-init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions{MarkerInnerWindowId (123), MarkerStack::Capture()}))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker( "markers 2.0 with two options (explicit brace-init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions{MarkerInnerWindowId (123), MarkerStack::Capture()})))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"markers 2.0 with two options (explicit brace-init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions{MarkerInnerWindowId(123), MarkerStack::Capture()})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4092 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"markers 2.0 with two options (explicit brace-init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions{MarkerInnerWindowId(123), MarkerStack::Capture()})" ")"); do { MOZ_CrashSequence(__null, 4092); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4090 | "markers 2.0 with two options (explicit brace-init)",do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "markers 2.0 with two options (explicit brace-init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions{MarkerInnerWindowId (123), MarkerStack::Capture()}))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker( "markers 2.0 with two options (explicit brace-init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions{MarkerInnerWindowId (123), MarkerStack::Capture()})))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"markers 2.0 with two options (explicit brace-init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions{MarkerInnerWindowId(123), MarkerStack::Capture()})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4092 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"markers 2.0 with two options (explicit brace-init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions{MarkerInnerWindowId(123), MarkerStack::Capture()})" ")"); do { MOZ_CrashSequence(__null, 4092); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4091 | mozilla::baseprofiler::category::OTHER,do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "markers 2.0 with two options (explicit brace-init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions{MarkerInnerWindowId (123), MarkerStack::Capture()}))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker( "markers 2.0 with two options (explicit brace-init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions{MarkerInnerWindowId (123), MarkerStack::Capture()})))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"markers 2.0 with two options (explicit brace-init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions{MarkerInnerWindowId(123), MarkerStack::Capture()})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4092 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"markers 2.0 with two options (explicit brace-init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions{MarkerInnerWindowId(123), MarkerStack::Capture()})" ")"); do { MOZ_CrashSequence(__null, 4092); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4092 | MarkerOptions{MarkerInnerWindowId(123), MarkerStack::Capture()}))do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "markers 2.0 with two options (explicit brace-init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions{MarkerInnerWindowId (123), MarkerStack::Capture()}))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker( "markers 2.0 with two options (explicit brace-init)" , mozilla::baseprofiler::category::OTHER, MarkerOptions{MarkerInnerWindowId (123), MarkerStack::Capture()})))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"markers 2.0 with two options (explicit brace-init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions{MarkerInnerWindowId(123), MarkerStack::Capture()})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4092 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"markers 2.0 with two options (explicit brace-init)\", mozilla::baseprofiler::category::OTHER, MarkerOptions{MarkerInnerWindowId(123), MarkerStack::Capture()})" ")"); do { MOZ_CrashSequence(__null, 4092); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4093 | ||||
| 4094 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker("default-templated markers 2.0 without options" , mozilla::baseprofiler::category::OTHER))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker("default-templated markers 2.0 without options" , mozilla::baseprofiler::category::OTHER)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("baseprofiler::AddMarker(\"default-templated markers 2.0 without options\", mozilla::baseprofiler::category::OTHER)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4096 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker(\"default-templated markers 2.0 without options\", mozilla::baseprofiler::category::OTHER)" ")"); do { MOZ_CrashSequence(__null, 4096); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4095 | baseprofiler::AddMarker("default-templated markers 2.0 without options",do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker("default-templated markers 2.0 without options" , mozilla::baseprofiler::category::OTHER))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker("default-templated markers 2.0 without options" , mozilla::baseprofiler::category::OTHER)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("baseprofiler::AddMarker(\"default-templated markers 2.0 without options\", mozilla::baseprofiler::category::OTHER)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4096 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker(\"default-templated markers 2.0 without options\", mozilla::baseprofiler::category::OTHER)" ")"); do { MOZ_CrashSequence(__null, 4096); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4096 | mozilla::baseprofiler::category::OTHER))do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker("default-templated markers 2.0 without options" , mozilla::baseprofiler::category::OTHER))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker("default-templated markers 2.0 without options" , mozilla::baseprofiler::category::OTHER)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("baseprofiler::AddMarker(\"default-templated markers 2.0 without options\", mozilla::baseprofiler::category::OTHER)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4096 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker(\"default-templated markers 2.0 without options\", mozilla::baseprofiler::category::OTHER)" ")"); do { MOZ_CrashSequence(__null, 4096); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4097 | ||||
| 4098 | MOZ_RELEASE_ASSERT(baseprofiler::AddMarker(do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "default-templated markers 2.0 with option" , mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId (123)))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(baseprofiler::AddMarker( "default-templated markers 2.0 with option" , mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId (123))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("baseprofiler::AddMarker( \"default-templated markers 2.0 with option\", mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId(123))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4100 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"default-templated markers 2.0 with option\", mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId(123))" ")"); do { MOZ_CrashSequence(__null, 4100); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4099 | "default-templated markers 2.0 with option",do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "default-templated markers 2.0 with option" , mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId (123)))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(baseprofiler::AddMarker( "default-templated markers 2.0 with option" , mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId (123))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("baseprofiler::AddMarker( \"default-templated markers 2.0 with option\", mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId(123))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4100 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"default-templated markers 2.0 with option\", mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId(123))" ")"); do { MOZ_CrashSequence(__null, 4100); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4100 | mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId(123)))do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "default-templated markers 2.0 with option" , mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId (123)))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(baseprofiler::AddMarker( "default-templated markers 2.0 with option" , mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId (123))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("baseprofiler::AddMarker( \"default-templated markers 2.0 with option\", mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId(123))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4100 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"default-templated markers 2.0 with option\", mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId(123))" ")"); do { MOZ_CrashSequence(__null, 4100); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4101 | ||||
| 4102 | MOZ_RELEASE_ASSERT(baseprofiler::AddMarker(do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "explicitly-default-templated markers 2.0 without options" , mozilla::baseprofiler::category::OTHER, {}, ::mozilla::baseprofiler ::markers::NoPayload{}))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker( "explicitly-default-templated markers 2.0 without options" , mozilla::baseprofiler::category::OTHER, {}, ::mozilla::baseprofiler ::markers::NoPayload{})))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("baseprofiler::AddMarker( \"explicitly-default-templated markers 2.0 without options\", mozilla::baseprofiler::category::OTHER, {}, ::mozilla::baseprofiler::markers::NoPayload{})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4105 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"explicitly-default-templated markers 2.0 without options\", mozilla::baseprofiler::category::OTHER, {}, ::mozilla::baseprofiler::markers::NoPayload{})" ")"); do { MOZ_CrashSequence(__null, 4105); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4103 | "explicitly-default-templated markers 2.0 without options",do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "explicitly-default-templated markers 2.0 without options" , mozilla::baseprofiler::category::OTHER, {}, ::mozilla::baseprofiler ::markers::NoPayload{}))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker( "explicitly-default-templated markers 2.0 without options" , mozilla::baseprofiler::category::OTHER, {}, ::mozilla::baseprofiler ::markers::NoPayload{})))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("baseprofiler::AddMarker( \"explicitly-default-templated markers 2.0 without options\", mozilla::baseprofiler::category::OTHER, {}, ::mozilla::baseprofiler::markers::NoPayload{})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4105 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"explicitly-default-templated markers 2.0 without options\", mozilla::baseprofiler::category::OTHER, {}, ::mozilla::baseprofiler::markers::NoPayload{})" ")"); do { MOZ_CrashSequence(__null, 4105); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4104 | mozilla::baseprofiler::category::OTHER, {},do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "explicitly-default-templated markers 2.0 without options" , mozilla::baseprofiler::category::OTHER, {}, ::mozilla::baseprofiler ::markers::NoPayload{}))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker( "explicitly-default-templated markers 2.0 without options" , mozilla::baseprofiler::category::OTHER, {}, ::mozilla::baseprofiler ::markers::NoPayload{})))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("baseprofiler::AddMarker( \"explicitly-default-templated markers 2.0 without options\", mozilla::baseprofiler::category::OTHER, {}, ::mozilla::baseprofiler::markers::NoPayload{})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4105 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"explicitly-default-templated markers 2.0 without options\", mozilla::baseprofiler::category::OTHER, {}, ::mozilla::baseprofiler::markers::NoPayload{})" ")"); do { MOZ_CrashSequence(__null, 4105); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4105 | ::mozilla::baseprofiler::markers::NoPayload{}))do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "explicitly-default-templated markers 2.0 without options" , mozilla::baseprofiler::category::OTHER, {}, ::mozilla::baseprofiler ::markers::NoPayload{}))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker( "explicitly-default-templated markers 2.0 without options" , mozilla::baseprofiler::category::OTHER, {}, ::mozilla::baseprofiler ::markers::NoPayload{})))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("baseprofiler::AddMarker( \"explicitly-default-templated markers 2.0 without options\", mozilla::baseprofiler::category::OTHER, {}, ::mozilla::baseprofiler::markers::NoPayload{})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4105 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"explicitly-default-templated markers 2.0 without options\", mozilla::baseprofiler::category::OTHER, {}, ::mozilla::baseprofiler::markers::NoPayload{})" ")"); do { MOZ_CrashSequence(__null, 4105); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4106 | ||||
| 4107 | MOZ_RELEASE_ASSERT(baseprofiler::AddMarker(do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "explicitly-default-templated markers 2.0 with option" , mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId (123), ::mozilla::baseprofiler::markers::NoPayload{}))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(baseprofiler::AddMarker( "explicitly-default-templated markers 2.0 with option" , mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId (123), ::mozilla::baseprofiler::markers::NoPayload{})))), 0)) ) { do { } while (false); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"explicitly-default-templated markers 2.0 with option\", mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId(123), ::mozilla::baseprofiler::markers::NoPayload{})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4110 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"explicitly-default-templated markers 2.0 with option\", mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId(123), ::mozilla::baseprofiler::markers::NoPayload{})" ")"); do { MOZ_CrashSequence(__null, 4110); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4108 | "explicitly-default-templated markers 2.0 with option",do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "explicitly-default-templated markers 2.0 with option" , mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId (123), ::mozilla::baseprofiler::markers::NoPayload{}))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(baseprofiler::AddMarker( "explicitly-default-templated markers 2.0 with option" , mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId (123), ::mozilla::baseprofiler::markers::NoPayload{})))), 0)) ) { do { } while (false); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"explicitly-default-templated markers 2.0 with option\", mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId(123), ::mozilla::baseprofiler::markers::NoPayload{})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4110 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"explicitly-default-templated markers 2.0 with option\", mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId(123), ::mozilla::baseprofiler::markers::NoPayload{})" ")"); do { MOZ_CrashSequence(__null, 4110); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4109 | mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId(123),do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "explicitly-default-templated markers 2.0 with option" , mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId (123), ::mozilla::baseprofiler::markers::NoPayload{}))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(baseprofiler::AddMarker( "explicitly-default-templated markers 2.0 with option" , mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId (123), ::mozilla::baseprofiler::markers::NoPayload{})))), 0)) ) { do { } while (false); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"explicitly-default-templated markers 2.0 with option\", mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId(123), ::mozilla::baseprofiler::markers::NoPayload{})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4110 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"explicitly-default-templated markers 2.0 with option\", mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId(123), ::mozilla::baseprofiler::markers::NoPayload{})" ")"); do { MOZ_CrashSequence(__null, 4110); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4110 | ::mozilla::baseprofiler::markers::NoPayload{}))do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "explicitly-default-templated markers 2.0 with option" , mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId (123), ::mozilla::baseprofiler::markers::NoPayload{}))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(baseprofiler::AddMarker( "explicitly-default-templated markers 2.0 with option" , mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId (123), ::mozilla::baseprofiler::markers::NoPayload{})))), 0)) ) { do { } while (false); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"explicitly-default-templated markers 2.0 with option\", mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId(123), ::mozilla::baseprofiler::markers::NoPayload{})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4110 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"explicitly-default-templated markers 2.0 with option\", mozilla::baseprofiler::category::OTHER, MarkerInnerWindowId(123), ::mozilla::baseprofiler::markers::NoPayload{})" ")"); do { MOZ_CrashSequence(__null, 4110); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4111 | ||||
| 4112 | MOZ_RELEASE_ASSERT(baseprofiler::AddMarker(do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "stackmarker", mozilla::baseprofiler ::category::OTHER, {}, mozilla::baseprofiler::markers::StackMarker {}))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(baseprofiler::AddMarker( "stackmarker", mozilla::baseprofiler ::category::OTHER, {}, mozilla::baseprofiler::markers::StackMarker {})))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("baseprofiler::AddMarker( \"stackmarker\", mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::StackMarker{})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4114 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"stackmarker\", mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::StackMarker{})" ")"); do { MOZ_CrashSequence(__null, 4114); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4113 | "stackmarker", mozilla::baseprofiler::category::OTHER, {},do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "stackmarker", mozilla::baseprofiler ::category::OTHER, {}, mozilla::baseprofiler::markers::StackMarker {}))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(baseprofiler::AddMarker( "stackmarker", mozilla::baseprofiler ::category::OTHER, {}, mozilla::baseprofiler::markers::StackMarker {})))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("baseprofiler::AddMarker( \"stackmarker\", mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::StackMarker{})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4114 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"stackmarker\", mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::StackMarker{})" ")"); do { MOZ_CrashSequence(__null, 4114); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4114 | mozilla::baseprofiler::markers::StackMarker{}))do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "stackmarker", mozilla::baseprofiler ::category::OTHER, {}, mozilla::baseprofiler::markers::StackMarker {}))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(baseprofiler::AddMarker( "stackmarker", mozilla::baseprofiler ::category::OTHER, {}, mozilla::baseprofiler::markers::StackMarker {})))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("baseprofiler::AddMarker( \"stackmarker\", mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::StackMarker{})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4114 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"stackmarker\", mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::StackMarker{})" ")"); do { MOZ_CrashSequence(__null, 4114); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4115 | ||||
| 4116 | MOZ_RELEASE_ASSERT(baseprofiler::AddMarker(do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "text", mozilla::baseprofiler ::category::OTHER, {}, mozilla::baseprofiler::markers::TextMarker {}, "text text"))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker( "text" , mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler ::markers::TextMarker{}, "text text")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"text\", mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::TextMarker{}, \"text text\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4118 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"text\", mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::TextMarker{}, \"text text\")" ")"); do { MOZ_CrashSequence(__null, 4118); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4117 | "text", mozilla::baseprofiler::category::OTHER, {},do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "text", mozilla::baseprofiler ::category::OTHER, {}, mozilla::baseprofiler::markers::TextMarker {}, "text text"))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker( "text" , mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler ::markers::TextMarker{}, "text text")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"text\", mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::TextMarker{}, \"text text\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4118 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"text\", mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::TextMarker{}, \"text text\")" ")"); do { MOZ_CrashSequence(__null, 4118); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4118 | mozilla::baseprofiler::markers::TextMarker{}, "text text"))do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "text", mozilla::baseprofiler ::category::OTHER, {}, mozilla::baseprofiler::markers::TextMarker {}, "text text"))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker( "text" , mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler ::markers::TextMarker{}, "text text")))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"text\", mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::TextMarker{}, \"text text\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4118 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"text\", mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::TextMarker{}, \"text text\")" ")"); do { MOZ_CrashSequence(__null, 4118); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4119 | ||||
| 4120 | MOZ_RELEASE_ASSERT(baseprofiler::AddMarker(do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "media sample", mozilla::baseprofiler ::category::OTHER, {}, mozilla::baseprofiler::markers::MediaSampleMarker {}, 123, 456, 789))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker( "media sample" , mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler ::markers::MediaSampleMarker{}, 123, 456, 789)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"media sample\", mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::MediaSampleMarker{}, 123, 456, 789)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4122 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"media sample\", mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::MediaSampleMarker{}, 123, 456, 789)" ")"); do { MOZ_CrashSequence(__null, 4122); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4121 | "media sample", mozilla::baseprofiler::category::OTHER, {},do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "media sample", mozilla::baseprofiler ::category::OTHER, {}, mozilla::baseprofiler::markers::MediaSampleMarker {}, 123, 456, 789))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker( "media sample" , mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler ::markers::MediaSampleMarker{}, 123, 456, 789)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"media sample\", mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::MediaSampleMarker{}, 123, 456, 789)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4122 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"media sample\", mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::MediaSampleMarker{}, 123, 456, 789)" ")"); do { MOZ_CrashSequence(__null, 4122); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4122 | mozilla::baseprofiler::markers::MediaSampleMarker{}, 123, 456, 789))do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "media sample", mozilla::baseprofiler ::category::OTHER, {}, mozilla::baseprofiler::markers::MediaSampleMarker {}, 123, 456, 789))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker( "media sample" , mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler ::markers::MediaSampleMarker{}, 123, 456, 789)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"media sample\", mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::MediaSampleMarker{}, 123, 456, 789)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4122 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"media sample\", mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::MediaSampleMarker{}, 123, 456, 789)" ")"); do { MOZ_CrashSequence(__null, 4122); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4123 | ||||
| 4124 | MOZ_RELEASE_ASSERT(baseprofiler::AddMarker(do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "video falling behind", mozilla ::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers ::VideoFallingBehindMarker{}, 123, 456))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker( "video falling behind" , mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler ::markers::VideoFallingBehindMarker{}, 123, 456)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"video falling behind\", mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::VideoFallingBehindMarker{}, 123, 456)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4126 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"video falling behind\", mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::VideoFallingBehindMarker{}, 123, 456)" ")"); do { MOZ_CrashSequence(__null, 4126); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4125 | "video falling behind", mozilla::baseprofiler::category::OTHER, {},do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "video falling behind", mozilla ::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers ::VideoFallingBehindMarker{}, 123, 456))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker( "video falling behind" , mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler ::markers::VideoFallingBehindMarker{}, 123, 456)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"video falling behind\", mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::VideoFallingBehindMarker{}, 123, 456)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4126 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"video falling behind\", mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::VideoFallingBehindMarker{}, 123, 456)" ")"); do { MOZ_CrashSequence(__null, 4126); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4126 | mozilla::baseprofiler::markers::VideoFallingBehindMarker{}, 123, 456))do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "video falling behind", mozilla ::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers ::VideoFallingBehindMarker{}, 123, 456))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker( "video falling behind" , mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler ::markers::VideoFallingBehindMarker{}, 123, 456)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"video falling behind\", mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::VideoFallingBehindMarker{}, 123, 456)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4126 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"video falling behind\", mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::VideoFallingBehindMarker{}, 123, 456)" ")"); do { MOZ_CrashSequence(__null, 4126); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4127 | ||||
| 4128 | MOZ_RELEASE_ASSERT(baseprofiler::AddMarker(do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "video sink render", mozilla ::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers ::VideoSinkRenderMarker{}, 123))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker( "video sink render" , mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler ::markers::VideoSinkRenderMarker{}, 123)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"video sink render\", mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::VideoSinkRenderMarker{}, 123)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4130 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"video sink render\", mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::VideoSinkRenderMarker{}, 123)" ")"); do { MOZ_CrashSequence(__null, 4130); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4129 | "video sink render", mozilla::baseprofiler::category::OTHER, {},do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "video sink render", mozilla ::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers ::VideoSinkRenderMarker{}, 123))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker( "video sink render" , mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler ::markers::VideoSinkRenderMarker{}, 123)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"video sink render\", mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::VideoSinkRenderMarker{}, 123)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4130 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"video sink render\", mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::VideoSinkRenderMarker{}, 123)" ")"); do { MOZ_CrashSequence(__null, 4130); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4130 | mozilla::baseprofiler::markers::VideoSinkRenderMarker{}, 123))do { static_assert( mozilla::detail::AssertionConditionType< decltype(baseprofiler::AddMarker( "video sink render", mozilla ::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers ::VideoSinkRenderMarker{}, 123))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(baseprofiler::AddMarker( "video sink render" , mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler ::markers::VideoSinkRenderMarker{}, 123)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("baseprofiler::AddMarker( \"video sink render\", mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::VideoSinkRenderMarker{}, 123)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4130 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "baseprofiler::AddMarker( \"video sink render\", mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::VideoSinkRenderMarker{}, 123)" ")"); do { MOZ_CrashSequence(__null, 4130); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4131 | ||||
| 4132 | printf("Sleep 1s...\n"); | |||
| 4133 | { | |||
| 4134 | AUTO_BASE_PROFILER_THREAD_SLEEP::mozilla::baseprofiler::AutoProfilerThreadSleep raiiObject4134; | |||
| 4135 | SleepMilli(1000); | |||
| 4136 | } | |||
| 4137 | ||||
| 4138 | printf("baseprofiler_pause()...\n"); | |||
| 4139 | baseprofiler::profiler_pause(); | |||
| 4140 | ||||
| 4141 | MOZ_RELEASE_ASSERT(!baseprofiler::profiler_thread_is_being_profiled())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!baseprofiler::profiler_thread_is_being_profiled())> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(!baseprofiler::profiler_thread_is_being_profiled())) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!baseprofiler::profiler_thread_is_being_profiled()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4141 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!baseprofiler::profiler_thread_is_being_profiled()" ")"); do { MOZ_CrashSequence(__null, 4141); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4142 | ||||
| 4143 | Maybe<baseprofiler::ProfilerBufferInfo> info = | |||
| 4144 | baseprofiler::profiler_get_buffer_info(); | |||
| 4145 | MOZ_RELEASE_ASSERT(info.isSome())do { static_assert( mozilla::detail::AssertionConditionType< decltype(info.isSome())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(info.isSome()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("info.isSome()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4145 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "info.isSome()" ")"); do { MOZ_CrashSequence(__null, 4145); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4146 | printf("Profiler buffer range: %llu .. %llu (%llu bytes)\n", | |||
| 4147 | static_cast<unsigned long long>(info->mRangeStart), | |||
| 4148 | static_cast<unsigned long long>(info->mRangeEnd), | |||
| 4149 | // sizeof(ProfileBufferEntry) == 9 | |||
| 4150 | (static_cast<unsigned long long>(info->mRangeEnd) - | |||
| 4151 | static_cast<unsigned long long>(info->mRangeStart)) * | |||
| 4152 | 9); | |||
| 4153 | printf("Stats: min(us) .. mean(us) .. max(us) [count]\n"); | |||
| 4154 | printf("- Intervals: %7.1f .. %7.1f .. %7.1f [%u]\n", | |||
| 4155 | info->mIntervalsUs.min, | |||
| 4156 | info->mIntervalsUs.sum / info->mIntervalsUs.n, | |||
| 4157 | info->mIntervalsUs.max, info->mIntervalsUs.n); | |||
| 4158 | printf("- Overheads: %7.1f .. %7.1f .. %7.1f [%u]\n", | |||
| 4159 | info->mOverheadsUs.min, | |||
| 4160 | info->mOverheadsUs.sum / info->mOverheadsUs.n, | |||
| 4161 | info->mOverheadsUs.max, info->mOverheadsUs.n); | |||
| 4162 | printf(" - Locking: %7.1f .. %7.1f .. %7.1f [%u]\n", | |||
| 4163 | info->mLockingsUs.min, info->mLockingsUs.sum / info->mLockingsUs.n, | |||
| 4164 | info->mLockingsUs.max, info->mLockingsUs.n); | |||
| 4165 | printf(" - Clearning: %7.1f .. %7.1f .. %7.1f [%u]\n", | |||
| 4166 | info->mCleaningsUs.min, | |||
| 4167 | info->mCleaningsUs.sum / info->mCleaningsUs.n, | |||
| 4168 | info->mCleaningsUs.max, info->mCleaningsUs.n); | |||
| 4169 | printf(" - Counters: %7.1f .. %7.1f .. %7.1f [%u]\n", | |||
| 4170 | info->mCountersUs.min, info->mCountersUs.sum / info->mCountersUs.n, | |||
| 4171 | info->mCountersUs.max, info->mCountersUs.n); | |||
| 4172 | printf(" - Threads: %7.1f .. %7.1f .. %7.1f [%u]\n", | |||
| 4173 | info->mThreadsUs.min, info->mThreadsUs.sum / info->mThreadsUs.n, | |||
| 4174 | info->mThreadsUs.max, info->mThreadsUs.n); | |||
| 4175 | ||||
| 4176 | printf("baseprofiler_get_profile()...\n"); | |||
| 4177 | UniquePtr<char[]> profile = baseprofiler::profiler_get_profile(); | |||
| 4178 | ||||
| 4179 | // Use a string view over the profile contents, for easier testing. | |||
| 4180 | std::string_view profileSV = profile.get(); | |||
| 4181 | ||||
| 4182 | constexpr const auto svnpos = std::string_view::npos; | |||
| 4183 | // TODO: Properly parse profile and check fields. | |||
| 4184 | // Check for some expected marker schema JSON output. | |||
| 4185 | MOZ_RELEASE_ASSERT(profileSV.find("\"markerSchema\":[") != svnpos)do { static_assert( mozilla::detail::AssertionConditionType< decltype(profileSV.find("\"markerSchema\":[") != svnpos)>:: isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(profileSV.find("\"markerSchema\":[") != svnpos))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("profileSV.find(\"\\\"markerSchema\\\":[\") != svnpos" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4185 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "profileSV.find(\"\\\"markerSchema\\\":[\") != svnpos" ")"); do { MOZ_CrashSequence(__null, 4185); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4186 | MOZ_RELEASE_ASSERT(profileSV.find("\"name\":\"Text\",") != svnpos)do { static_assert( mozilla::detail::AssertionConditionType< decltype(profileSV.find("\"name\":\"Text\",") != svnpos)>:: isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(profileSV.find("\"name\":\"Text\",") != svnpos))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("profileSV.find(\"\\\"name\\\":\\\"Text\\\",\") != svnpos" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4186 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "profileSV.find(\"\\\"name\\\":\\\"Text\\\",\") != svnpos" ")"); do { MOZ_CrashSequence(__null, 4186); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4187 | MOZ_RELEASE_ASSERT(profileSV.find("\"name\":\"StackMarker\",") != svnpos)do { static_assert( mozilla::detail::AssertionConditionType< decltype(profileSV.find("\"name\":\"StackMarker\",") != svnpos )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(profileSV.find("\"name\":\"StackMarker\",") != svnpos ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "profileSV.find(\"\\\"name\\\":\\\"StackMarker\\\",\") != svnpos" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4187 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "profileSV.find(\"\\\"name\\\":\\\"StackMarker\\\",\") != svnpos" ")"); do { MOZ_CrashSequence(__null, 4187); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4188 | MOZ_RELEASE_ASSERT(profileSV.find("\"name\":\"MediaSample\",") != svnpos)do { static_assert( mozilla::detail::AssertionConditionType< decltype(profileSV.find("\"name\":\"MediaSample\",") != svnpos )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(profileSV.find("\"name\":\"MediaSample\",") != svnpos ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "profileSV.find(\"\\\"name\\\":\\\"MediaSample\\\",\") != svnpos" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4188 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "profileSV.find(\"\\\"name\\\":\\\"MediaSample\\\",\") != svnpos" ")"); do { MOZ_CrashSequence(__null, 4188); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4189 | MOZ_RELEASE_ASSERT(profileSV.find("\"display\":[") != svnpos)do { static_assert( mozilla::detail::AssertionConditionType< decltype(profileSV.find("\"display\":[") != svnpos)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(profileSV.find("\"display\":[") != svnpos))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("profileSV.find(\"\\\"display\\\":[\") != svnpos" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4189 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "profileSV.find(\"\\\"display\\\":[\") != svnpos" ")"); do { MOZ_CrashSequence(__null, 4189); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4190 | MOZ_RELEASE_ASSERT(profileSV.find("\"marker-chart\"") != svnpos)do { static_assert( mozilla::detail::AssertionConditionType< decltype(profileSV.find("\"marker-chart\"") != svnpos)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(profileSV.find("\"marker-chart\"") != svnpos))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("profileSV.find(\"\\\"marker-chart\\\"\") != svnpos" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4190 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "profileSV.find(\"\\\"marker-chart\\\"\") != svnpos" ")"); do { MOZ_CrashSequence(__null, 4190); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4191 | MOZ_RELEASE_ASSERT(profileSV.find("\"marker-table\"") != svnpos)do { static_assert( mozilla::detail::AssertionConditionType< decltype(profileSV.find("\"marker-table\"") != svnpos)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(profileSV.find("\"marker-table\"") != svnpos))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("profileSV.find(\"\\\"marker-table\\\"\") != svnpos" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4191 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "profileSV.find(\"\\\"marker-table\\\"\") != svnpos" ")"); do { MOZ_CrashSequence(__null, 4191); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4192 | MOZ_RELEASE_ASSERT(profileSV.find("\"format\":\"unique-string\"") !=do { static_assert( mozilla::detail::AssertionConditionType< decltype(profileSV.find("\"format\":\"unique-string\"") != svnpos )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(profileSV.find("\"format\":\"unique-string\"") != svnpos ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "profileSV.find(\"\\\"format\\\":\\\"unique-string\\\"\") != svnpos" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4193 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "profileSV.find(\"\\\"format\\\":\\\"unique-string\\\"\") != svnpos" ")"); do { MOZ_CrashSequence(__null, 4193); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4193 | svnpos)do { static_assert( mozilla::detail::AssertionConditionType< decltype(profileSV.find("\"format\":\"unique-string\"") != svnpos )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(profileSV.find("\"format\":\"unique-string\"") != svnpos ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "profileSV.find(\"\\\"format\\\":\\\"unique-string\\\"\") != svnpos" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4193 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "profileSV.find(\"\\\"format\\\":\\\"unique-string\\\"\") != svnpos" ")"); do { MOZ_CrashSequence(__null, 4193); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4194 | // TODO: Add more checks for what's expected in the profile. Some of them | |||
| 4195 | // are done in gtest's. | |||
| 4196 | ||||
| 4197 | printf("baseprofiler_save_profile_to_file()...\n"); | |||
| 4198 | baseprofiler::baseprofiler_save_profile_to_file( | |||
| 4199 | "TestProfiler_profile.json"); | |||
| 4200 | ||||
| 4201 | printf("profiler_stop()...\n"); | |||
| 4202 | baseprofiler::profiler_stop(); | |||
| 4203 | ||||
| 4204 | MOZ_RELEASE_ASSERT(!baseprofiler::profiler_is_active())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!baseprofiler::profiler_is_active())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!baseprofiler::profiler_is_active ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!baseprofiler::profiler_is_active()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 4204); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!baseprofiler::profiler_is_active()" ")"); do { MOZ_CrashSequence(__null, 4204); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4205 | MOZ_RELEASE_ASSERT(!baseprofiler::profiler_thread_is_being_profiled())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!baseprofiler::profiler_thread_is_being_profiled())> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(!baseprofiler::profiler_thread_is_being_profiled())) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!baseprofiler::profiler_thread_is_being_profiled()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4205 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!baseprofiler::profiler_thread_is_being_profiled()" ")"); do { MOZ_CrashSequence(__null, 4205); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4206 | MOZ_RELEASE_ASSERT(!baseprofiler::profiler_thread_is_sleeping())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!baseprofiler::profiler_thread_is_sleeping())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(!baseprofiler::profiler_thread_is_sleeping()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!baseprofiler::profiler_thread_is_sleeping()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4206 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!baseprofiler::profiler_thread_is_sleeping()" ")"); do { MOZ_CrashSequence(__null, 4206); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4207 | ||||
| 4208 | printf("profiler_shutdown()...\n"); | |||
| 4209 | } | |||
| 4210 | ||||
| 4211 | printf("TestProfiler done\n"); | |||
| 4212 | } | |||
| 4213 | ||||
| 4214 | // Minimal string escaping, similar to how C++ stringliterals should be entered, | |||
| 4215 | // to help update comparison strings in tests below. | |||
| 4216 | void printEscaped(std::string_view aString) { | |||
| 4217 | for (const char c : aString) { | |||
| 4218 | switch (c) { | |||
| 4219 | case '\n': | |||
| 4220 | fprintf(stderrstderr, "\\n\n"); | |||
| 4221 | break; | |||
| 4222 | case '"': | |||
| 4223 | fprintf(stderrstderr, "\\\""); | |||
| 4224 | break; | |||
| 4225 | case '\\': | |||
| 4226 | fprintf(stderrstderr, "\\\\"); | |||
| 4227 | break; | |||
| 4228 | default: | |||
| 4229 | if (c >= ' ' && c <= '~') { | |||
| 4230 | fprintf(stderrstderr, "%c", c); | |||
| 4231 | } else { | |||
| 4232 | fprintf(stderrstderr, "\\x%02x", unsigned(c)); | |||
| 4233 | } | |||
| 4234 | break; | |||
| 4235 | } | |||
| 4236 | } | |||
| 4237 | } | |||
| 4238 | ||||
| 4239 | // Run aF(SpliceableChunkedJSONWriter&, UniqueJSONStrings&) from inside a JSON | |||
| 4240 | // array, then output the string table, and compare the full output to | |||
| 4241 | // aExpected. | |||
| 4242 | template <typename F> | |||
| 4243 | static void VerifyUniqueStringContents( | |||
| 4244 | F&& aF, std::string_view aExpectedData, | |||
| 4245 | std::string_view aExpectedUniqueStrings, | |||
| 4246 | mozilla::baseprofiler::UniqueJSONStrings* aUniqueStringsOrNull = nullptr) { | |||
| 4247 | mozilla::baseprofiler::SpliceableChunkedJSONWriter writer{ | |||
| 4248 | FailureLatchInfallibleSource::Singleton()}; | |||
| 4249 | ||||
| 4250 | MOZ_RELEASE_ASSERT(!writer.ChunkedWriteFunc().Fallible())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!writer.ChunkedWriteFunc().Fallible())>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(! !(!writer.ChunkedWriteFunc().Fallible()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!writer.ChunkedWriteFunc().Fallible()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4250 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!writer.ChunkedWriteFunc().Fallible()" ")"); do { MOZ_CrashSequence(__null, 4250); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4251 | MOZ_RELEASE_ASSERT(!writer.ChunkedWriteFunc().Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!writer.ChunkedWriteFunc().Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!writer.ChunkedWriteFunc().Failed ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!writer.ChunkedWriteFunc().Failed()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 4251); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!writer.ChunkedWriteFunc().Failed()" ")"); do { MOZ_CrashSequence(__null, 4251); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4252 | MOZ_RELEASE_ASSERT(!writer.ChunkedWriteFunc().GetFailure())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!writer.ChunkedWriteFunc().GetFailure())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(!writer.ChunkedWriteFunc().GetFailure()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!writer.ChunkedWriteFunc().GetFailure()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4252 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!writer.ChunkedWriteFunc().GetFailure()" ")"); do { MOZ_CrashSequence(__null, 4252); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4253 | MOZ_RELEASE_ASSERT(&writer.ChunkedWriteFunc().SourceFailureLatch() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(&writer.ChunkedWriteFunc().SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton())> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(&writer.ChunkedWriteFunc().SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("&writer.ChunkedWriteFunc().SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4254 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&writer.ChunkedWriteFunc().SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" ")"); do { MOZ_CrashSequence(__null, 4254); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4254 | &mozilla::FailureLatchInfallibleSource::Singleton())do { static_assert( mozilla::detail::AssertionConditionType< decltype(&writer.ChunkedWriteFunc().SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton())> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(&writer.ChunkedWriteFunc().SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("&writer.ChunkedWriteFunc().SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4254 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&writer.ChunkedWriteFunc().SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" ")"); do { MOZ_CrashSequence(__null, 4254); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4255 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(&std::as_const(writer.ChunkedWriteFunc()).SourceFailureLatch () == &mozilla::FailureLatchInfallibleSource::Singleton() )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(&std::as_const(writer.ChunkedWriteFunc()).SourceFailureLatch () == &mozilla::FailureLatchInfallibleSource::Singleton() ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "&std::as_const(writer.ChunkedWriteFunc()).SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4257 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&std::as_const(writer.ChunkedWriteFunc()).SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" ")"); do { MOZ_CrashSequence(__null, 4257); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4256 | &std::as_const(writer.ChunkedWriteFunc()).SourceFailureLatch() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(&std::as_const(writer.ChunkedWriteFunc()).SourceFailureLatch () == &mozilla::FailureLatchInfallibleSource::Singleton() )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(&std::as_const(writer.ChunkedWriteFunc()).SourceFailureLatch () == &mozilla::FailureLatchInfallibleSource::Singleton() ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "&std::as_const(writer.ChunkedWriteFunc()).SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4257 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&std::as_const(writer.ChunkedWriteFunc()).SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" ")"); do { MOZ_CrashSequence(__null, 4257); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4257 | &mozilla::FailureLatchInfallibleSource::Singleton())do { static_assert( mozilla::detail::AssertionConditionType< decltype(&std::as_const(writer.ChunkedWriteFunc()).SourceFailureLatch () == &mozilla::FailureLatchInfallibleSource::Singleton() )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(&std::as_const(writer.ChunkedWriteFunc()).SourceFailureLatch () == &mozilla::FailureLatchInfallibleSource::Singleton() ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "&std::as_const(writer.ChunkedWriteFunc()).SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4257 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&std::as_const(writer.ChunkedWriteFunc()).SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" ")"); do { MOZ_CrashSequence(__null, 4257); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4258 | ||||
| 4259 | MOZ_RELEASE_ASSERT(!writer.Fallible())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!writer.Fallible())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!writer.Fallible()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!writer.Fallible()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4259 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!writer.Fallible()" ")"); do { MOZ_CrashSequence(__null, 4259); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4260 | MOZ_RELEASE_ASSERT(!writer.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!writer.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!writer.Failed()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!writer.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4260 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!writer.Failed()" ")"); do { MOZ_CrashSequence(__null, 4260); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4261 | MOZ_RELEASE_ASSERT(!writer.GetFailure())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!writer.GetFailure())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!writer.GetFailure()))), 0)) ) { do { } while (false); MOZ_ReportAssertionFailure("!writer.GetFailure()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4261 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!writer.GetFailure()" ")"); do { MOZ_CrashSequence(__null, 4261); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4262 | MOZ_RELEASE_ASSERT(&writer.SourceFailureLatch() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(&writer.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource ::Singleton())>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(&writer.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("&writer.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4263 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&writer.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" ")"); do { MOZ_CrashSequence(__null, 4263); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4263 | &mozilla::FailureLatchInfallibleSource::Singleton())do { static_assert( mozilla::detail::AssertionConditionType< decltype(&writer.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource ::Singleton())>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(&writer.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("&writer.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4263 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&writer.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" ")"); do { MOZ_CrashSequence(__null, 4263); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4264 | MOZ_RELEASE_ASSERT(&std::as_const(writer).SourceFailureLatch() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(&std::as_const(writer).SourceFailureLatch() == & mozilla::FailureLatchInfallibleSource::Singleton())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(&std::as_const(writer).SourceFailureLatch() == &mozilla ::FailureLatchInfallibleSource::Singleton()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("&std::as_const(writer).SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4265 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&std::as_const(writer).SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" ")"); do { MOZ_CrashSequence(__null, 4265); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4265 | &mozilla::FailureLatchInfallibleSource::Singleton())do { static_assert( mozilla::detail::AssertionConditionType< decltype(&std::as_const(writer).SourceFailureLatch() == & mozilla::FailureLatchInfallibleSource::Singleton())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(&std::as_const(writer).SourceFailureLatch() == &mozilla ::FailureLatchInfallibleSource::Singleton()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("&std::as_const(writer).SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4265 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&std::as_const(writer).SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" ")"); do { MOZ_CrashSequence(__null, 4265); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4266 | ||||
| 4267 | // By default use a local UniqueJSONStrings, otherwise use the one provided. | |||
| 4268 | mozilla::baseprofiler::UniqueJSONStrings localUniqueStrings{ | |||
| 4269 | FailureLatchInfallibleSource::Singleton()}; | |||
| 4270 | MOZ_RELEASE_ASSERT(!localUniqueStrings.Fallible())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!localUniqueStrings.Fallible())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!localUniqueStrings.Fallible ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!localUniqueStrings.Fallible()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 4270); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!localUniqueStrings.Fallible()" ")"); do { MOZ_CrashSequence(__null, 4270); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4271 | MOZ_RELEASE_ASSERT(!localUniqueStrings.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!localUniqueStrings.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!localUniqueStrings.Failed() ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "!localUniqueStrings.Failed()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 4271); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!localUniqueStrings.Failed()" ")"); do { MOZ_CrashSequence(__null, 4271); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4272 | MOZ_RELEASE_ASSERT(!localUniqueStrings.GetFailure())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!localUniqueStrings.GetFailure())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!localUniqueStrings.GetFailure ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!localUniqueStrings.GetFailure()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 4272); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!localUniqueStrings.GetFailure()" ")"); do { MOZ_CrashSequence(__null, 4272); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4273 | MOZ_RELEASE_ASSERT(&localUniqueStrings.SourceFailureLatch() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(&localUniqueStrings.SourceFailureLatch() == & mozilla::FailureLatchInfallibleSource::Singleton())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(&localUniqueStrings.SourceFailureLatch() == &mozilla ::FailureLatchInfallibleSource::Singleton()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("&localUniqueStrings.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4274 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&localUniqueStrings.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" ")"); do { MOZ_CrashSequence(__null, 4274); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4274 | &mozilla::FailureLatchInfallibleSource::Singleton())do { static_assert( mozilla::detail::AssertionConditionType< decltype(&localUniqueStrings.SourceFailureLatch() == & mozilla::FailureLatchInfallibleSource::Singleton())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(&localUniqueStrings.SourceFailureLatch() == &mozilla ::FailureLatchInfallibleSource::Singleton()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("&localUniqueStrings.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4274 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&localUniqueStrings.SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" ")"); do { MOZ_CrashSequence(__null, 4274); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4275 | MOZ_RELEASE_ASSERT(&std::as_const(localUniqueStrings).SourceFailureLatch() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(&std::as_const(localUniqueStrings).SourceFailureLatch () == &mozilla::FailureLatchInfallibleSource::Singleton() )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(&std::as_const(localUniqueStrings).SourceFailureLatch () == &mozilla::FailureLatchInfallibleSource::Singleton() ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "&std::as_const(localUniqueStrings).SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4276 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&std::as_const(localUniqueStrings).SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" ")"); do { MOZ_CrashSequence(__null, 4276); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4276 | &mozilla::FailureLatchInfallibleSource::Singleton())do { static_assert( mozilla::detail::AssertionConditionType< decltype(&std::as_const(localUniqueStrings).SourceFailureLatch () == &mozilla::FailureLatchInfallibleSource::Singleton() )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(&std::as_const(localUniqueStrings).SourceFailureLatch () == &mozilla::FailureLatchInfallibleSource::Singleton() ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "&std::as_const(localUniqueStrings).SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4276 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "&std::as_const(localUniqueStrings).SourceFailureLatch() == &mozilla::FailureLatchInfallibleSource::Singleton()" ")"); do { MOZ_CrashSequence(__null, 4276); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4277 | ||||
| 4278 | mozilla::baseprofiler::UniqueJSONStrings& uniqueStrings = | |||
| 4279 | aUniqueStringsOrNull ? *aUniqueStringsOrNull : localUniqueStrings; | |||
| 4280 | MOZ_RELEASE_ASSERT(!uniqueStrings.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!uniqueStrings.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!uniqueStrings.Failed()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("!uniqueStrings.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4280 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!uniqueStrings.Failed()" ")"); do { MOZ_CrashSequence(__null, 4280); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4281 | MOZ_RELEASE_ASSERT(!uniqueStrings.GetFailure())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!uniqueStrings.GetFailure())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!uniqueStrings.GetFailure()) )), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!uniqueStrings.GetFailure()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4281 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!uniqueStrings.GetFailure()" ")"); do { MOZ_CrashSequence(__null, 4281); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4282 | ||||
| 4283 | writer.Start(); | |||
| 4284 | { | |||
| 4285 | writer.StartArrayProperty("data"); | |||
| 4286 | { | |||
| 4287 | std::forward<F>(aF)(writer, uniqueStrings); | |||
| 4288 | } | |||
| 4289 | writer.EndArray(); | |||
| 4290 | ||||
| 4291 | writer.StartArrayProperty("stringTable"); | |||
| 4292 | { | |||
| 4293 | uniqueStrings.SpliceStringTableElements(writer); | |||
| 4294 | } | |||
| 4295 | writer.EndArray(); | |||
| 4296 | } | |||
| 4297 | writer.End(); | |||
| 4298 | ||||
| 4299 | MOZ_RELEASE_ASSERT(!uniqueStrings.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!uniqueStrings.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!uniqueStrings.Failed()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("!uniqueStrings.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4299 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!uniqueStrings.Failed()" ")"); do { MOZ_CrashSequence(__null, 4299); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4300 | MOZ_RELEASE_ASSERT(!uniqueStrings.GetFailure())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!uniqueStrings.GetFailure())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!uniqueStrings.GetFailure()) )), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!uniqueStrings.GetFailure()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4300 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!uniqueStrings.GetFailure()" ")"); do { MOZ_CrashSequence(__null, 4300); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4301 | ||||
| 4302 | MOZ_RELEASE_ASSERT(!writer.ChunkedWriteFunc().Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!writer.ChunkedWriteFunc().Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!writer.ChunkedWriteFunc().Failed ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("!writer.ChunkedWriteFunc().Failed()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 4302); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!writer.ChunkedWriteFunc().Failed()" ")"); do { MOZ_CrashSequence(__null, 4302); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4303 | MOZ_RELEASE_ASSERT(!writer.ChunkedWriteFunc().GetFailure())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!writer.ChunkedWriteFunc().GetFailure())>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(!writer.ChunkedWriteFunc().GetFailure()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!writer.ChunkedWriteFunc().GetFailure()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4303 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!writer.ChunkedWriteFunc().GetFailure()" ")"); do { MOZ_CrashSequence(__null, 4303); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4304 | ||||
| 4305 | MOZ_RELEASE_ASSERT(!writer.Failed())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!writer.Failed())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!writer.Failed()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!writer.Failed()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4305 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!writer.Failed()" ")"); do { MOZ_CrashSequence(__null, 4305); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4306 | MOZ_RELEASE_ASSERT(!writer.GetFailure())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!writer.GetFailure())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!writer.GetFailure()))), 0)) ) { do { } while (false); MOZ_ReportAssertionFailure("!writer.GetFailure()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4306 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!writer.GetFailure()" ")"); do { MOZ_CrashSequence(__null, 4306); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4307 | ||||
| 4308 | UniquePtr<char[]> jsonString = writer.ChunkedWriteFunc().CopyData(); | |||
| 4309 | MOZ_RELEASE_ASSERT(jsonString)do { static_assert( mozilla::detail::AssertionConditionType< decltype(jsonString)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(jsonString))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("jsonString", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 4309); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "jsonString" ")"); do { MOZ_CrashSequence(__null, 4309); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4310 | std::string_view jsonStringView(jsonString.get()); | |||
| 4311 | const size_t length = writer.ChunkedWriteFunc().Length(); | |||
| 4312 | MOZ_RELEASE_ASSERT(length == jsonStringView.length())do { static_assert( mozilla::detail::AssertionConditionType< decltype(length == jsonStringView.length())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(length == jsonStringView.length ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("length == jsonStringView.length()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 4312); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "length == jsonStringView.length()" ")"); do { MOZ_CrashSequence(__null, 4312); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4313 | std::string expected = "{\"data\":["; | |||
| 4314 | expected += aExpectedData; | |||
| 4315 | expected += "],\"stringTable\":["; | |||
| 4316 | expected += aExpectedUniqueStrings; | |||
| 4317 | expected += "]}"; | |||
| 4318 | if (jsonStringView != expected) { | |||
| 4319 | fprintf(stderrstderr, | |||
| 4320 | "Expected:\n" | |||
| 4321 | "------\n"); | |||
| 4322 | printEscaped(expected); | |||
| 4323 | fprintf(stderrstderr, | |||
| 4324 | "\n" | |||
| 4325 | "------\n" | |||
| 4326 | "Actual:\n" | |||
| 4327 | "------\n"); | |||
| 4328 | printEscaped(jsonStringView); | |||
| 4329 | fprintf(stderrstderr, | |||
| 4330 | "\n" | |||
| 4331 | "------\n"); | |||
| 4332 | } | |||
| 4333 | MOZ_RELEASE_ASSERT(jsonStringView == expected)do { static_assert( mozilla::detail::AssertionConditionType< decltype(jsonStringView == expected)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(jsonStringView == expected)) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("jsonStringView == expected" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4333 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "jsonStringView == expected" ")"); do { MOZ_CrashSequence(__null, 4333); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4334 | } | |||
| 4335 | ||||
| 4336 | void TestUniqueJSONStrings() { | |||
| 4337 | printf("TestUniqueJSONStrings...\n"); | |||
| 4338 | ||||
| 4339 | using SCJW = mozilla::baseprofiler::SpliceableChunkedJSONWriter; | |||
| 4340 | using UJS = mozilla::baseprofiler::UniqueJSONStrings; | |||
| 4341 | ||||
| 4342 | // Empty everything. | |||
| 4343 | VerifyUniqueStringContents([](SCJW& aWriter, UJS& aUniqueStrings) {}, "", ""); | |||
| 4344 | ||||
| 4345 | // Empty unique strings. | |||
| 4346 | VerifyUniqueStringContents( | |||
| 4347 | [](SCJW& aWriter, UJS& aUniqueStrings) { | |||
| 4348 | aWriter.StringElement("string"); | |||
| 4349 | }, | |||
| 4350 | R"("string")", ""); | |||
| 4351 | ||||
| 4352 | // One unique string. | |||
| 4353 | VerifyUniqueStringContents( | |||
| 4354 | [](SCJW& aWriter, UJS& aUniqueStrings) { | |||
| 4355 | aUniqueStrings.WriteElement(aWriter, "string"); | |||
| 4356 | }, | |||
| 4357 | "0", R"("string")"); | |||
| 4358 | ||||
| 4359 | // One unique string twice. | |||
| 4360 | VerifyUniqueStringContents( | |||
| 4361 | [](SCJW& aWriter, UJS& aUniqueStrings) { | |||
| 4362 | aUniqueStrings.WriteElement(aWriter, "string"); | |||
| 4363 | aUniqueStrings.WriteElement(aWriter, "string"); | |||
| 4364 | }, | |||
| 4365 | "0,0", R"("string")"); | |||
| 4366 | ||||
| 4367 | // Two single unique strings. | |||
| 4368 | VerifyUniqueStringContents( | |||
| 4369 | [](SCJW& aWriter, UJS& aUniqueStrings) { | |||
| 4370 | aUniqueStrings.WriteElement(aWriter, "string0"); | |||
| 4371 | aUniqueStrings.WriteElement(aWriter, "string1"); | |||
| 4372 | }, | |||
| 4373 | "0,1", R"("string0","string1")"); | |||
| 4374 | ||||
| 4375 | // Two unique strings with repetition. | |||
| 4376 | VerifyUniqueStringContents( | |||
| 4377 | [](SCJW& aWriter, UJS& aUniqueStrings) { | |||
| 4378 | aUniqueStrings.WriteElement(aWriter, "string0"); | |||
| 4379 | aUniqueStrings.WriteElement(aWriter, "string1"); | |||
| 4380 | aUniqueStrings.WriteElement(aWriter, "string0"); | |||
| 4381 | }, | |||
| 4382 | "0,1,0", R"("string0","string1")"); | |||
| 4383 | ||||
| 4384 | // Mix some object properties, for coverage. | |||
| 4385 | VerifyUniqueStringContents( | |||
| 4386 | [](SCJW& aWriter, UJS& aUniqueStrings) { | |||
| 4387 | aUniqueStrings.WriteElement(aWriter, "string0"); | |||
| 4388 | aWriter.StartObjectElement(); | |||
| 4389 | { | |||
| 4390 | aUniqueStrings.WriteProperty(aWriter, "p0", "prop"); | |||
| 4391 | aUniqueStrings.WriteProperty(aWriter, "p1", "string0"); | |||
| 4392 | aUniqueStrings.WriteProperty(aWriter, "p2", "prop"); | |||
| 4393 | } | |||
| 4394 | aWriter.EndObject(); | |||
| 4395 | aUniqueStrings.WriteElement(aWriter, "string1"); | |||
| 4396 | aUniqueStrings.WriteElement(aWriter, "string0"); | |||
| 4397 | aUniqueStrings.WriteElement(aWriter, "prop"); | |||
| 4398 | }, | |||
| 4399 | R"(0,{"p0":1,"p1":0,"p2":1},2,0,1)", R"("string0","prop","string1")"); | |||
| 4400 | ||||
| 4401 | // Unique string table with pre-existing data. | |||
| 4402 | { | |||
| 4403 | UJS ujs{FailureLatchInfallibleSource::Singleton()}; | |||
| 4404 | { | |||
| 4405 | SCJW writer{FailureLatchInfallibleSource::Singleton()}; | |||
| 4406 | ujs.WriteElement(writer, "external0"); | |||
| 4407 | ujs.WriteElement(writer, "external1"); | |||
| 4408 | ujs.WriteElement(writer, "external0"); | |||
| 4409 | } | |||
| 4410 | VerifyUniqueStringContents( | |||
| 4411 | [](SCJW& aWriter, UJS& aUniqueStrings) { | |||
| 4412 | aUniqueStrings.WriteElement(aWriter, "string0"); | |||
| 4413 | aUniqueStrings.WriteElement(aWriter, "string1"); | |||
| 4414 | aUniqueStrings.WriteElement(aWriter, "string0"); | |||
| 4415 | }, | |||
| 4416 | "2,3,2", R"("external0","external1","string0","string1")", &ujs); | |||
| 4417 | } | |||
| 4418 | ||||
| 4419 | // Unique string table with pre-existing data from another table. | |||
| 4420 | { | |||
| 4421 | UJS ujs{FailureLatchInfallibleSource::Singleton()}; | |||
| 4422 | { | |||
| 4423 | SCJW writer{FailureLatchInfallibleSource::Singleton()}; | |||
| 4424 | ujs.WriteElement(writer, "external0"); | |||
| 4425 | ujs.WriteElement(writer, "external1"); | |||
| 4426 | ujs.WriteElement(writer, "external0"); | |||
| 4427 | } | |||
| 4428 | UJS ujsCopy(FailureLatchInfallibleSource::Singleton(), ujs, | |||
| 4429 | mozilla::ProgressLogger{}); | |||
| 4430 | VerifyUniqueStringContents( | |||
| 4431 | [](SCJW& aWriter, UJS& aUniqueStrings) { | |||
| 4432 | aUniqueStrings.WriteElement(aWriter, "string0"); | |||
| 4433 | aUniqueStrings.WriteElement(aWriter, "string1"); | |||
| 4434 | aUniqueStrings.WriteElement(aWriter, "string0"); | |||
| 4435 | }, | |||
| 4436 | "2,3,2", R"("external0","external1","string0","string1")", &ujs); | |||
| 4437 | } | |||
| 4438 | ||||
| 4439 | // Unique string table through SpliceableJSONWriter. | |||
| 4440 | VerifyUniqueStringContents( | |||
| 4441 | [](SCJW& aWriter, UJS& aUniqueStrings) { | |||
| 4442 | aWriter.SetUniqueStrings(aUniqueStrings); | |||
| 4443 | aWriter.UniqueStringElement("string0"); | |||
| 4444 | aWriter.StartObjectElement(); | |||
| 4445 | { | |||
| 4446 | aWriter.UniqueStringProperty("p0", "prop"); | |||
| 4447 | aWriter.UniqueStringProperty("p1", "string0"); | |||
| 4448 | aWriter.UniqueStringProperty("p2", "prop"); | |||
| 4449 | } | |||
| 4450 | aWriter.EndObject(); | |||
| 4451 | aWriter.UniqueStringElement("string1"); | |||
| 4452 | aWriter.UniqueStringElement("string0"); | |||
| 4453 | aWriter.UniqueStringElement("prop"); | |||
| 4454 | aWriter.ResetUniqueStrings(); | |||
| 4455 | }, | |||
| 4456 | R"(0,{"p0":1,"p1":0,"p2":1},2,0,1)", R"("string0","prop","string1")"); | |||
| 4457 | ||||
| 4458 | printf("TestUniqueJSONStrings done\n"); | |||
| 4459 | } | |||
| 4460 | ||||
| 4461 | void StreamMarkers(const mozilla::ProfileChunkedBuffer& aBuffer, | |||
| 4462 | mozilla::baseprofiler::SpliceableJSONWriter& aWriter) { | |||
| 4463 | aWriter.StartArrayProperty("data"); | |||
| 4464 | { | |||
| 4465 | aBuffer.ReadEach([&](mozilla::ProfileBufferEntryReader& aEntryReader) { | |||
| 4466 | mozilla::ProfileBufferEntryKind entryKind = | |||
| 4467 | aEntryReader.ReadObject<mozilla::ProfileBufferEntryKind>(); | |||
| 4468 | MOZ_RELEASE_ASSERT(entryKind == mozilla::ProfileBufferEntryKind::Marker)do { static_assert( mozilla::detail::AssertionConditionType< decltype(entryKind == mozilla::ProfileBufferEntryKind::Marker )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(entryKind == mozilla::ProfileBufferEntryKind::Marker ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "entryKind == mozilla::ProfileBufferEntryKind::Marker", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 4468); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "entryKind == mozilla::ProfileBufferEntryKind::Marker" ")"); do { MOZ_CrashSequence(__null, 4468); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4469 | ||||
| 4470 | mozilla::base_profiler_markers_detail::DeserializeAfterKindAndStream( | |||
| 4471 | aEntryReader, | |||
| 4472 | [&](const mozilla::baseprofiler::BaseProfilerThreadId&) { | |||
| 4473 | return &aWriter; | |||
| 4474 | }, | |||
| 4475 | [&](mozilla::ProfileChunkedBuffer&) { | |||
| 4476 | aWriter.StringElement("Real backtrace would be here"); | |||
| 4477 | }, | |||
| 4478 | [&](mozilla::base_profiler_markers_detail::Streaming:: | |||
| 4479 | DeserializerTag) {}); | |||
| 4480 | }); | |||
| 4481 | } | |||
| 4482 | aWriter.EndArray(); | |||
| 4483 | } | |||
| 4484 | ||||
| 4485 | void PrintMarkers(const mozilla::ProfileChunkedBuffer& aBuffer) { | |||
| 4486 | mozilla::baseprofiler::SpliceableJSONWriter writer( | |||
| 4487 | mozilla::MakeUnique<mozilla::baseprofiler::OStreamJSONWriteFunc>( | |||
| 4488 | std::cout), | |||
| 4489 | FailureLatchInfallibleSource::Singleton()); | |||
| 4490 | mozilla::baseprofiler::UniqueJSONStrings uniqueStrings{ | |||
| 4491 | FailureLatchInfallibleSource::Singleton()}; | |||
| 4492 | writer.SetUniqueStrings(uniqueStrings); | |||
| 4493 | writer.Start(); | |||
| 4494 | { | |||
| 4495 | StreamMarkers(aBuffer, writer); | |||
| 4496 | ||||
| 4497 | writer.StartArrayProperty("stringTable"); | |||
| 4498 | { | |||
| 4499 | uniqueStrings.SpliceStringTableElements(writer); | |||
| 4500 | } | |||
| 4501 | writer.EndArray(); | |||
| 4502 | } | |||
| 4503 | writer.End(); | |||
| 4504 | writer.ResetUniqueStrings(); | |||
| 4505 | } | |||
| 4506 | ||||
| 4507 | static void SubTestMarkerCategory( | |||
| 4508 | const mozilla::MarkerCategory& aMarkerCategory, | |||
| 4509 | const mozilla::baseprofiler::ProfilingCategoryPair& aProfilingCategoryPair, | |||
| 4510 | const mozilla::baseprofiler::ProfilingCategory& aProfilingCategory) { | |||
| 4511 | MOZ_RELEASE_ASSERT(aMarkerCategory.CategoryPair() == aProfilingCategoryPair,do { static_assert( mozilla::detail::AssertionConditionType< decltype(aMarkerCategory.CategoryPair() == aProfilingCategoryPair )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(aMarkerCategory.CategoryPair() == aProfilingCategoryPair ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "aMarkerCategory.CategoryPair() == aProfilingCategoryPair" " (" "Unexpected MarkerCategory::CategoryPair()" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 4512); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aMarkerCategory.CategoryPair() == aProfilingCategoryPair" ") (" "Unexpected MarkerCategory::CategoryPair()" ")"); do { MOZ_CrashSequence(__null, 4512); __attribute__((nomerge)) :: abort(); } while (false); } } while (false) | |||
| 4512 | "Unexpected MarkerCategory::CategoryPair()")do { static_assert( mozilla::detail::AssertionConditionType< decltype(aMarkerCategory.CategoryPair() == aProfilingCategoryPair )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(aMarkerCategory.CategoryPair() == aProfilingCategoryPair ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "aMarkerCategory.CategoryPair() == aProfilingCategoryPair" " (" "Unexpected MarkerCategory::CategoryPair()" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 4512); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aMarkerCategory.CategoryPair() == aProfilingCategoryPair" ") (" "Unexpected MarkerCategory::CategoryPair()" ")"); do { MOZ_CrashSequence(__null, 4512); __attribute__((nomerge)) :: abort(); } while (false); } } while (false); | |||
| 4513 | ||||
| 4514 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::MarkerCategory(aProfilingCategoryPair).CategoryPair () == aProfilingCategoryPair)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mozilla::MarkerCategory(aProfilingCategoryPair ).CategoryPair() == aProfilingCategoryPair))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("mozilla::MarkerCategory(aProfilingCategoryPair).CategoryPair() == aProfilingCategoryPair" " (" "MarkerCategory(<name>).CategoryPair() should return <name>" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 4517); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::MarkerCategory(aProfilingCategoryPair).CategoryPair() == aProfilingCategoryPair" ") (" "MarkerCategory(<name>).CategoryPair() should return <name>" ")"); do { MOZ_CrashSequence(__null, 4517); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4515 | mozilla::MarkerCategory(aProfilingCategoryPair).CategoryPair() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::MarkerCategory(aProfilingCategoryPair).CategoryPair () == aProfilingCategoryPair)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mozilla::MarkerCategory(aProfilingCategoryPair ).CategoryPair() == aProfilingCategoryPair))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("mozilla::MarkerCategory(aProfilingCategoryPair).CategoryPair() == aProfilingCategoryPair" " (" "MarkerCategory(<name>).CategoryPair() should return <name>" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 4517); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::MarkerCategory(aProfilingCategoryPair).CategoryPair() == aProfilingCategoryPair" ") (" "MarkerCategory(<name>).CategoryPair() should return <name>" ")"); do { MOZ_CrashSequence(__null, 4517); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4516 | aProfilingCategoryPair,do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::MarkerCategory(aProfilingCategoryPair).CategoryPair () == aProfilingCategoryPair)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mozilla::MarkerCategory(aProfilingCategoryPair ).CategoryPair() == aProfilingCategoryPair))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("mozilla::MarkerCategory(aProfilingCategoryPair).CategoryPair() == aProfilingCategoryPair" " (" "MarkerCategory(<name>).CategoryPair() should return <name>" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 4517); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::MarkerCategory(aProfilingCategoryPair).CategoryPair() == aProfilingCategoryPair" ") (" "MarkerCategory(<name>).CategoryPair() should return <name>" ")"); do { MOZ_CrashSequence(__null, 4517); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4517 | "MarkerCategory(<name>).CategoryPair() should return <name>")do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::MarkerCategory(aProfilingCategoryPair).CategoryPair () == aProfilingCategoryPair)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mozilla::MarkerCategory(aProfilingCategoryPair ).CategoryPair() == aProfilingCategoryPair))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("mozilla::MarkerCategory(aProfilingCategoryPair).CategoryPair() == aProfilingCategoryPair" " (" "MarkerCategory(<name>).CategoryPair() should return <name>" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 4517); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::MarkerCategory(aProfilingCategoryPair).CategoryPair() == aProfilingCategoryPair" ") (" "MarkerCategory(<name>).CategoryPair() should return <name>" ")"); do { MOZ_CrashSequence(__null, 4517); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4518 | ||||
| 4519 | MOZ_RELEASE_ASSERT(aMarkerCategory.GetCategory() == aProfilingCategory,do { static_assert( mozilla::detail::AssertionConditionType< decltype(aMarkerCategory.GetCategory() == aProfilingCategory) >::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(aMarkerCategory.GetCategory() == aProfilingCategory) )), 0))) { do { } while (false); MOZ_ReportAssertionFailure("aMarkerCategory.GetCategory() == aProfilingCategory" " (" "Unexpected MarkerCategory::GetCategory()" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 4520); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aMarkerCategory.GetCategory() == aProfilingCategory" ") (" "Unexpected MarkerCategory::GetCategory()" ")"); do { MOZ_CrashSequence (__null, 4520); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false) | |||
| 4520 | "Unexpected MarkerCategory::GetCategory()")do { static_assert( mozilla::detail::AssertionConditionType< decltype(aMarkerCategory.GetCategory() == aProfilingCategory) >::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(aMarkerCategory.GetCategory() == aProfilingCategory) )), 0))) { do { } while (false); MOZ_ReportAssertionFailure("aMarkerCategory.GetCategory() == aProfilingCategory" " (" "Unexpected MarkerCategory::GetCategory()" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 4520); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aMarkerCategory.GetCategory() == aProfilingCategory" ") (" "Unexpected MarkerCategory::GetCategory()" ")"); do { MOZ_CrashSequence (__null, 4520); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 4521 | ||||
| 4522 | mozilla::ProfileBufferChunkManagerSingle chunkManager(512); | |||
| 4523 | mozilla::ProfileChunkedBuffer buffer( | |||
| 4524 | mozilla::ProfileChunkedBuffer::ThreadSafety::WithoutMutex, chunkManager); | |||
| 4525 | mozilla::ProfileBufferBlockIndex i = buffer.PutObject(aMarkerCategory); | |||
| 4526 | MOZ_RELEASE_ASSERT(i != mozilla::ProfileBufferBlockIndex{},do { static_assert( mozilla::detail::AssertionConditionType< decltype(i != mozilla::ProfileBufferBlockIndex{})>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(i != mozilla::ProfileBufferBlockIndex{}))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("i != mozilla::ProfileBufferBlockIndex{}" " (" "Failed serialization" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 4527); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "i != mozilla::ProfileBufferBlockIndex{}" ") (" "Failed serialization" ")"); do { MOZ_CrashSequence(__null , 4527); __attribute__((nomerge)) ::abort(); } while (false); } } while (false) | |||
| 4527 | "Failed serialization")do { static_assert( mozilla::detail::AssertionConditionType< decltype(i != mozilla::ProfileBufferBlockIndex{})>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(i != mozilla::ProfileBufferBlockIndex{}))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("i != mozilla::ProfileBufferBlockIndex{}" " (" "Failed serialization" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 4527); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "i != mozilla::ProfileBufferBlockIndex{}" ") (" "Failed serialization" ")"); do { MOZ_CrashSequence(__null , 4527); __attribute__((nomerge)) ::abort(); } while (false); } } while (false); | |||
| 4528 | buffer.ReadEach([&](mozilla::ProfileBufferEntryReader& aER, | |||
| 4529 | mozilla::ProfileBufferBlockIndex aIndex) { | |||
| 4530 | MOZ_RELEASE_ASSERT(aIndex == i, "Unexpected deserialization index")do { static_assert( mozilla::detail::AssertionConditionType< decltype(aIndex == i)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(aIndex == i))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("aIndex == i" " (" "Unexpected deserialization index" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 4530); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aIndex == i" ") (" "Unexpected deserialization index" ")"); do { MOZ_CrashSequence (__null, 4530); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 4531 | const auto readCategory = aER.ReadObject<mozilla::MarkerCategory>(); | |||
| 4532 | MOZ_RELEASE_ASSERT(aER.RemainingBytes() == 0,do { static_assert( mozilla::detail::AssertionConditionType< decltype(aER.RemainingBytes() == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(aER.RemainingBytes() == 0))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("aER.RemainingBytes() == 0" " (" "Unexpected extra serialized bytes" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 4533); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aER.RemainingBytes() == 0" ") (" "Unexpected extra serialized bytes" ")"); do { MOZ_CrashSequence (__null, 4533); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false) | |||
| 4533 | "Unexpected extra serialized bytes")do { static_assert( mozilla::detail::AssertionConditionType< decltype(aER.RemainingBytes() == 0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(aER.RemainingBytes() == 0))) , 0))) { do { } while (false); MOZ_ReportAssertionFailure("aER.RemainingBytes() == 0" " (" "Unexpected extra serialized bytes" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 4533); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "aER.RemainingBytes() == 0" ") (" "Unexpected extra serialized bytes" ")"); do { MOZ_CrashSequence (__null, 4533); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 4534 | MOZ_RELEASE_ASSERT(readCategory.CategoryPair() == aProfilingCategoryPair,do { static_assert( mozilla::detail::AssertionConditionType< decltype(readCategory.CategoryPair() == aProfilingCategoryPair )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(readCategory.CategoryPair() == aProfilingCategoryPair ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "readCategory.CategoryPair() == aProfilingCategoryPair" " (" "Incorrect deserialization value" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 4535); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "readCategory.CategoryPair() == aProfilingCategoryPair" ") (" "Incorrect deserialization value" ")"); do { MOZ_CrashSequence (__null, 4535); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false) | |||
| 4535 | "Incorrect deserialization value")do { static_assert( mozilla::detail::AssertionConditionType< decltype(readCategory.CategoryPair() == aProfilingCategoryPair )>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(readCategory.CategoryPair() == aProfilingCategoryPair ))), 0))) { do { } while (false); MOZ_ReportAssertionFailure( "readCategory.CategoryPair() == aProfilingCategoryPair" " (" "Incorrect deserialization value" ")", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 4535); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "readCategory.CategoryPair() == aProfilingCategoryPair" ") (" "Incorrect deserialization value" ")"); do { MOZ_CrashSequence (__null, 4535); __attribute__((nomerge)) ::abort(); } while ( false); } } while (false); | |||
| 4536 | }); | |||
| 4537 | } | |||
| 4538 | ||||
| 4539 | void TestMarkerCategory() { | |||
| 4540 | printf("TestMarkerCategory...\n"); | |||
| 4541 | ||||
| 4542 | mozilla::ProfileBufferChunkManagerSingle chunkManager(512); | |||
| 4543 | mozilla::ProfileChunkedBuffer buffer( | |||
| 4544 | mozilla::ProfileChunkedBuffer::ThreadSafety::WithoutMutex, chunkManager); | |||
| 4545 | ||||
| 4546 | #define CATEGORY_ENUM_BEGIN_CATEGORY(name, labelAsString, color) | |||
| 4547 | #define CATEGORY_ENUM_SUBCATEGORY(supercategory, name, labelAsString) \ | |||
| 4548 | static_assert( \ | |||
| 4549 | std::is_same_v<decltype(mozilla::baseprofiler::category::name), \ | |||
| 4550 | const mozilla::MarkerCategory>, \ | |||
| 4551 | "baseprofiler::category::<name> should be a const MarkerCategory"); \ | |||
| 4552 | \ | |||
| 4553 | SubTestMarkerCategory( \ | |||
| 4554 | mozilla::baseprofiler::category::name, \ | |||
| 4555 | mozilla::baseprofiler::ProfilingCategoryPair::name, \ | |||
| 4556 | mozilla::baseprofiler::ProfilingCategory::supercategory); | |||
| 4557 | #define CATEGORY_ENUM_END_CATEGORY | |||
| 4558 | MOZ_PROFILING_CATEGORY_LIST(CATEGORY_ENUM_BEGIN_CATEGORY,CATEGORY_ENUM_BEGIN_CATEGORY(IDLE, "Idle", "transparent") CATEGORY_ENUM_SUBCATEGORY (IDLE, IDLE, "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (OTHER, "Other", "grey") CATEGORY_ENUM_SUBCATEGORY(OTHER, OTHER , "Other") CATEGORY_ENUM_SUBCATEGORY(OTHER, OTHER_PreferenceRead , "Preference Read") CATEGORY_ENUM_SUBCATEGORY(OTHER, OTHER_Profiling , "Profiling") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (TEST, "Test", "darkgray") CATEGORY_ENUM_SUBCATEGORY(TEST, TEST , "Test") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (LAYOUT, "Layout", "purple") CATEGORY_ENUM_SUBCATEGORY(LAYOUT , LAYOUT, "Other") CATEGORY_ENUM_SUBCATEGORY(LAYOUT, LAYOUT_FrameConstruction , "Frame construction") CATEGORY_ENUM_SUBCATEGORY(LAYOUT, LAYOUT_Reflow , "Reflow") CATEGORY_ENUM_SUBCATEGORY(LAYOUT, LAYOUT_CSSParsing , "CSS parsing") CATEGORY_ENUM_SUBCATEGORY(LAYOUT, LAYOUT_SelectorQuery , "Selector query") CATEGORY_ENUM_SUBCATEGORY(LAYOUT, LAYOUT_StyleComputation , "Style computation") CATEGORY_ENUM_SUBCATEGORY(LAYOUT, LAYOUT_Destroy , "Layout cleanup") CATEGORY_ENUM_SUBCATEGORY(LAYOUT, LAYOUT_Printing , "Printing") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (JS, "JavaScript", "yellow") CATEGORY_ENUM_SUBCATEGORY(JS, JS , "Other") CATEGORY_ENUM_SUBCATEGORY(JS, JS_Parsing, "Parsing" ) CATEGORY_ENUM_SUBCATEGORY(JS, JS_BaselineCompilation, "JIT Compile (baseline)" ) CATEGORY_ENUM_SUBCATEGORY(JS, JS_IonCompilation, "JIT Compile (ion)" ) CATEGORY_ENUM_SUBCATEGORY(JS, JS_Interpreter, "Interpreter" ) CATEGORY_ENUM_SUBCATEGORY(JS, JS_BaselineInterpret, "JIT (baseline-interpreter)" ) CATEGORY_ENUM_SUBCATEGORY(JS, JS_Baseline, "JIT (baseline)" ) CATEGORY_ENUM_SUBCATEGORY(JS, JS_IonMonkey, "JIT (ion)") CATEGORY_ENUM_SUBCATEGORY (JS, JS_Builtin, "Builtin API") CATEGORY_ENUM_SUBCATEGORY(JS, JS_WasmIon, "Wasm (ion)") CATEGORY_ENUM_SUBCATEGORY(JS, JS_WasmBaseline , "Wasm (baseline)") CATEGORY_ENUM_SUBCATEGORY(JS, JS_WasmOther , "Wasm (other)") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (GCCC, "GC / CC", "orange") CATEGORY_ENUM_SUBCATEGORY(GCCC, GCCC , "Other") CATEGORY_ENUM_SUBCATEGORY(GCCC, GCCC_MinorGC, "Minor GC" ) CATEGORY_ENUM_SUBCATEGORY(GCCC, GCCC_MajorGC, "Major GC (Other)" ) CATEGORY_ENUM_SUBCATEGORY(GCCC, GCCC_MajorGC_Mark, "Major GC (Mark)" ) CATEGORY_ENUM_SUBCATEGORY(GCCC, GCCC_MajorGC_Sweep, "Major GC (Sweep)" ) CATEGORY_ENUM_SUBCATEGORY(GCCC, GCCC_MajorGC_Compact, "Major GC (Compact)" ) CATEGORY_ENUM_SUBCATEGORY(GCCC, GCCC_UnmarkGray, "Unmark Gray" ) CATEGORY_ENUM_SUBCATEGORY(GCCC, GCCC_Barrier, "Barrier") CATEGORY_ENUM_SUBCATEGORY (GCCC, GCCC_FreeSnowWhite, "CC (Free Snow White)") CATEGORY_ENUM_SUBCATEGORY (GCCC, GCCC_BuildGraph, "CC (Build Graph)") CATEGORY_ENUM_SUBCATEGORY (GCCC, GCCC_ScanRoots, "CC (Scan Roots)") CATEGORY_ENUM_SUBCATEGORY (GCCC, GCCC_CollectWhite, "CC (Collect White)") CATEGORY_ENUM_SUBCATEGORY (GCCC, GCCC_Finalize, "CC (Finalize)") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY(NETWORK, "Network", "lightblue" ) CATEGORY_ENUM_SUBCATEGORY(NETWORK, NETWORK, "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY(GRAPHICS, "Graphics", "green") CATEGORY_ENUM_SUBCATEGORY (GRAPHICS, GRAPHICS, "Other") CATEGORY_ENUM_SUBCATEGORY(GRAPHICS , GRAPHICS_DisplayListBuilding, "DisplayList building") CATEGORY_ENUM_SUBCATEGORY (GRAPHICS, GRAPHICS_DisplayListMerging, "DisplayList merging" ) CATEGORY_ENUM_SUBCATEGORY(GRAPHICS, GRAPHICS_LayerBuilding, "Layer building") CATEGORY_ENUM_SUBCATEGORY(GRAPHICS, GRAPHICS_TileAllocation , "Tile allocation") CATEGORY_ENUM_SUBCATEGORY(GRAPHICS, GRAPHICS_WRDisplayList , "WebRender display list") CATEGORY_ENUM_SUBCATEGORY(GRAPHICS , GRAPHICS_Rasterization, "Rasterization") CATEGORY_ENUM_SUBCATEGORY (GRAPHICS, GRAPHICS_FlushingAsyncPaints, "Flushing async paints" ) CATEGORY_ENUM_SUBCATEGORY(GRAPHICS, GRAPHICS_ImageDecoding, "Image decoding") CATEGORY_ENUM_SUBCATEGORY(GRAPHICS, GRAPHICS_WebGPU , "WebGPU") CATEGORY_ENUM_SUBCATEGORY(GRAPHICS, GRAPHICS_VSync , "VSync triggered animation") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (DOM, "DOM", "blue") CATEGORY_ENUM_SUBCATEGORY(DOM, DOM, "Other" ) CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY(JAVA_ANDROID , "Android", "yellow") CATEGORY_ENUM_SUBCATEGORY(JAVA_ANDROID , JAVA_ANDROID, "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (JAVA_ANDROIDX, "AndroidX", "orange") CATEGORY_ENUM_SUBCATEGORY (JAVA_ANDROIDX, JAVA_ANDROIDX, "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY(JAVA_LANGUAGE, "Java", "blue") CATEGORY_ENUM_SUBCATEGORY (JAVA_LANGUAGE, JAVA_LANGUAGE, "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY(JAVA_MOZILLA, "Mozilla", "green" ) CATEGORY_ENUM_SUBCATEGORY(JAVA_MOZILLA, JAVA_MOZILLA, "Other" ) CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY(JAVA_KOTLIN , "Kotlin", "purple") CATEGORY_ENUM_SUBCATEGORY(JAVA_KOTLIN, JAVA_KOTLIN , "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (JAVA_BLOCKED, "Blocked", "lightblue") CATEGORY_ENUM_SUBCATEGORY (JAVA_BLOCKED, JAVA_BLOCKED, "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY(MAILNEWS, "Mailnews", "brown") CATEGORY_ENUM_SUBCATEGORY (MAILNEWS, MAILNEWS, "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (IPC, "IPC", "lightgreen") CATEGORY_ENUM_SUBCATEGORY(IPC, IPC , "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (MEDIA, "Media", "orange") CATEGORY_ENUM_SUBCATEGORY(MEDIA, MEDIA , "Other") CATEGORY_ENUM_SUBCATEGORY(MEDIA, MEDIA_CUBEB, "Cubeb" ) CATEGORY_ENUM_SUBCATEGORY(MEDIA, MEDIA_PLAYBACK, "Playback" ) CATEGORY_ENUM_SUBCATEGORY(MEDIA, MEDIA_RT, "Real-time rendering" ) CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY(A11Y , "Accessibility", "brown") CATEGORY_ENUM_SUBCATEGORY(A11Y, A11Y , "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (PROFILER, "Profiler", "lightred") CATEGORY_ENUM_SUBCATEGORY( PROFILER, PROFILER, "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (TIMER, "Timer", "grey") CATEGORY_ENUM_SUBCATEGORY(TIMER, TIMER , "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (REMOTE_PROTOCOL, "Remote-Protocol", "grey") CATEGORY_ENUM_SUBCATEGORY (REMOTE_PROTOCOL, REMOTE_PROTOCOL, "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY(SANDBOX, "Sandbox", "grey") CATEGORY_ENUM_SUBCATEGORY (SANDBOX, SANDBOX, "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (TELEMETRY, "Telemetry", "grey") CATEGORY_ENUM_SUBCATEGORY(TELEMETRY , TELEMETRY, "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (ML, "ML", "magenta") CATEGORY_ENUM_SUBCATEGORY(ML, ML, "Other" ) CATEGORY_ENUM_SUBCATEGORY(ML, ML_INFERENCE, "Inference") CATEGORY_ENUM_SUBCATEGORY (ML, ML_SETUP, "Setup") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (LOGS, "Logs", "lightblue") CATEGORY_ENUM_SUBCATEGORY(LOGS, LOGS , "Other") CATEGORY_ENUM_END_CATEGORY | |||
| 4559 | CATEGORY_ENUM_SUBCATEGORY,CATEGORY_ENUM_BEGIN_CATEGORY(IDLE, "Idle", "transparent") CATEGORY_ENUM_SUBCATEGORY (IDLE, IDLE, "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (OTHER, "Other", "grey") CATEGORY_ENUM_SUBCATEGORY(OTHER, OTHER , "Other") CATEGORY_ENUM_SUBCATEGORY(OTHER, OTHER_PreferenceRead , "Preference Read") CATEGORY_ENUM_SUBCATEGORY(OTHER, OTHER_Profiling , "Profiling") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (TEST, "Test", "darkgray") CATEGORY_ENUM_SUBCATEGORY(TEST, TEST , "Test") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (LAYOUT, "Layout", "purple") CATEGORY_ENUM_SUBCATEGORY(LAYOUT , LAYOUT, "Other") CATEGORY_ENUM_SUBCATEGORY(LAYOUT, LAYOUT_FrameConstruction , "Frame construction") CATEGORY_ENUM_SUBCATEGORY(LAYOUT, LAYOUT_Reflow , "Reflow") CATEGORY_ENUM_SUBCATEGORY(LAYOUT, LAYOUT_CSSParsing , "CSS parsing") CATEGORY_ENUM_SUBCATEGORY(LAYOUT, LAYOUT_SelectorQuery , "Selector query") CATEGORY_ENUM_SUBCATEGORY(LAYOUT, LAYOUT_StyleComputation , "Style computation") CATEGORY_ENUM_SUBCATEGORY(LAYOUT, LAYOUT_Destroy , "Layout cleanup") CATEGORY_ENUM_SUBCATEGORY(LAYOUT, LAYOUT_Printing , "Printing") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (JS, "JavaScript", "yellow") CATEGORY_ENUM_SUBCATEGORY(JS, JS , "Other") CATEGORY_ENUM_SUBCATEGORY(JS, JS_Parsing, "Parsing" ) CATEGORY_ENUM_SUBCATEGORY(JS, JS_BaselineCompilation, "JIT Compile (baseline)" ) CATEGORY_ENUM_SUBCATEGORY(JS, JS_IonCompilation, "JIT Compile (ion)" ) CATEGORY_ENUM_SUBCATEGORY(JS, JS_Interpreter, "Interpreter" ) CATEGORY_ENUM_SUBCATEGORY(JS, JS_BaselineInterpret, "JIT (baseline-interpreter)" ) CATEGORY_ENUM_SUBCATEGORY(JS, JS_Baseline, "JIT (baseline)" ) CATEGORY_ENUM_SUBCATEGORY(JS, JS_IonMonkey, "JIT (ion)") CATEGORY_ENUM_SUBCATEGORY (JS, JS_Builtin, "Builtin API") CATEGORY_ENUM_SUBCATEGORY(JS, JS_WasmIon, "Wasm (ion)") CATEGORY_ENUM_SUBCATEGORY(JS, JS_WasmBaseline , "Wasm (baseline)") CATEGORY_ENUM_SUBCATEGORY(JS, JS_WasmOther , "Wasm (other)") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (GCCC, "GC / CC", "orange") CATEGORY_ENUM_SUBCATEGORY(GCCC, GCCC , "Other") CATEGORY_ENUM_SUBCATEGORY(GCCC, GCCC_MinorGC, "Minor GC" ) CATEGORY_ENUM_SUBCATEGORY(GCCC, GCCC_MajorGC, "Major GC (Other)" ) CATEGORY_ENUM_SUBCATEGORY(GCCC, GCCC_MajorGC_Mark, "Major GC (Mark)" ) CATEGORY_ENUM_SUBCATEGORY(GCCC, GCCC_MajorGC_Sweep, "Major GC (Sweep)" ) CATEGORY_ENUM_SUBCATEGORY(GCCC, GCCC_MajorGC_Compact, "Major GC (Compact)" ) CATEGORY_ENUM_SUBCATEGORY(GCCC, GCCC_UnmarkGray, "Unmark Gray" ) CATEGORY_ENUM_SUBCATEGORY(GCCC, GCCC_Barrier, "Barrier") CATEGORY_ENUM_SUBCATEGORY (GCCC, GCCC_FreeSnowWhite, "CC (Free Snow White)") CATEGORY_ENUM_SUBCATEGORY (GCCC, GCCC_BuildGraph, "CC (Build Graph)") CATEGORY_ENUM_SUBCATEGORY (GCCC, GCCC_ScanRoots, "CC (Scan Roots)") CATEGORY_ENUM_SUBCATEGORY (GCCC, GCCC_CollectWhite, "CC (Collect White)") CATEGORY_ENUM_SUBCATEGORY (GCCC, GCCC_Finalize, "CC (Finalize)") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY(NETWORK, "Network", "lightblue" ) CATEGORY_ENUM_SUBCATEGORY(NETWORK, NETWORK, "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY(GRAPHICS, "Graphics", "green") CATEGORY_ENUM_SUBCATEGORY (GRAPHICS, GRAPHICS, "Other") CATEGORY_ENUM_SUBCATEGORY(GRAPHICS , GRAPHICS_DisplayListBuilding, "DisplayList building") CATEGORY_ENUM_SUBCATEGORY (GRAPHICS, GRAPHICS_DisplayListMerging, "DisplayList merging" ) CATEGORY_ENUM_SUBCATEGORY(GRAPHICS, GRAPHICS_LayerBuilding, "Layer building") CATEGORY_ENUM_SUBCATEGORY(GRAPHICS, GRAPHICS_TileAllocation , "Tile allocation") CATEGORY_ENUM_SUBCATEGORY(GRAPHICS, GRAPHICS_WRDisplayList , "WebRender display list") CATEGORY_ENUM_SUBCATEGORY(GRAPHICS , GRAPHICS_Rasterization, "Rasterization") CATEGORY_ENUM_SUBCATEGORY (GRAPHICS, GRAPHICS_FlushingAsyncPaints, "Flushing async paints" ) CATEGORY_ENUM_SUBCATEGORY(GRAPHICS, GRAPHICS_ImageDecoding, "Image decoding") CATEGORY_ENUM_SUBCATEGORY(GRAPHICS, GRAPHICS_WebGPU , "WebGPU") CATEGORY_ENUM_SUBCATEGORY(GRAPHICS, GRAPHICS_VSync , "VSync triggered animation") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (DOM, "DOM", "blue") CATEGORY_ENUM_SUBCATEGORY(DOM, DOM, "Other" ) CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY(JAVA_ANDROID , "Android", "yellow") CATEGORY_ENUM_SUBCATEGORY(JAVA_ANDROID , JAVA_ANDROID, "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (JAVA_ANDROIDX, "AndroidX", "orange") CATEGORY_ENUM_SUBCATEGORY (JAVA_ANDROIDX, JAVA_ANDROIDX, "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY(JAVA_LANGUAGE, "Java", "blue") CATEGORY_ENUM_SUBCATEGORY (JAVA_LANGUAGE, JAVA_LANGUAGE, "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY(JAVA_MOZILLA, "Mozilla", "green" ) CATEGORY_ENUM_SUBCATEGORY(JAVA_MOZILLA, JAVA_MOZILLA, "Other" ) CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY(JAVA_KOTLIN , "Kotlin", "purple") CATEGORY_ENUM_SUBCATEGORY(JAVA_KOTLIN, JAVA_KOTLIN , "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (JAVA_BLOCKED, "Blocked", "lightblue") CATEGORY_ENUM_SUBCATEGORY (JAVA_BLOCKED, JAVA_BLOCKED, "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY(MAILNEWS, "Mailnews", "brown") CATEGORY_ENUM_SUBCATEGORY (MAILNEWS, MAILNEWS, "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (IPC, "IPC", "lightgreen") CATEGORY_ENUM_SUBCATEGORY(IPC, IPC , "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (MEDIA, "Media", "orange") CATEGORY_ENUM_SUBCATEGORY(MEDIA, MEDIA , "Other") CATEGORY_ENUM_SUBCATEGORY(MEDIA, MEDIA_CUBEB, "Cubeb" ) CATEGORY_ENUM_SUBCATEGORY(MEDIA, MEDIA_PLAYBACK, "Playback" ) CATEGORY_ENUM_SUBCATEGORY(MEDIA, MEDIA_RT, "Real-time rendering" ) CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY(A11Y , "Accessibility", "brown") CATEGORY_ENUM_SUBCATEGORY(A11Y, A11Y , "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (PROFILER, "Profiler", "lightred") CATEGORY_ENUM_SUBCATEGORY( PROFILER, PROFILER, "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (TIMER, "Timer", "grey") CATEGORY_ENUM_SUBCATEGORY(TIMER, TIMER , "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (REMOTE_PROTOCOL, "Remote-Protocol", "grey") CATEGORY_ENUM_SUBCATEGORY (REMOTE_PROTOCOL, REMOTE_PROTOCOL, "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY(SANDBOX, "Sandbox", "grey") CATEGORY_ENUM_SUBCATEGORY (SANDBOX, SANDBOX, "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (TELEMETRY, "Telemetry", "grey") CATEGORY_ENUM_SUBCATEGORY(TELEMETRY , TELEMETRY, "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (ML, "ML", "magenta") CATEGORY_ENUM_SUBCATEGORY(ML, ML, "Other" ) CATEGORY_ENUM_SUBCATEGORY(ML, ML_INFERENCE, "Inference") CATEGORY_ENUM_SUBCATEGORY (ML, ML_SETUP, "Setup") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (LOGS, "Logs", "lightblue") CATEGORY_ENUM_SUBCATEGORY(LOGS, LOGS , "Other") CATEGORY_ENUM_END_CATEGORY | |||
| 4560 | CATEGORY_ENUM_END_CATEGORY)CATEGORY_ENUM_BEGIN_CATEGORY(IDLE, "Idle", "transparent") CATEGORY_ENUM_SUBCATEGORY (IDLE, IDLE, "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (OTHER, "Other", "grey") CATEGORY_ENUM_SUBCATEGORY(OTHER, OTHER , "Other") CATEGORY_ENUM_SUBCATEGORY(OTHER, OTHER_PreferenceRead , "Preference Read") CATEGORY_ENUM_SUBCATEGORY(OTHER, OTHER_Profiling , "Profiling") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (TEST, "Test", "darkgray") CATEGORY_ENUM_SUBCATEGORY(TEST, TEST , "Test") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (LAYOUT, "Layout", "purple") CATEGORY_ENUM_SUBCATEGORY(LAYOUT , LAYOUT, "Other") CATEGORY_ENUM_SUBCATEGORY(LAYOUT, LAYOUT_FrameConstruction , "Frame construction") CATEGORY_ENUM_SUBCATEGORY(LAYOUT, LAYOUT_Reflow , "Reflow") CATEGORY_ENUM_SUBCATEGORY(LAYOUT, LAYOUT_CSSParsing , "CSS parsing") CATEGORY_ENUM_SUBCATEGORY(LAYOUT, LAYOUT_SelectorQuery , "Selector query") CATEGORY_ENUM_SUBCATEGORY(LAYOUT, LAYOUT_StyleComputation , "Style computation") CATEGORY_ENUM_SUBCATEGORY(LAYOUT, LAYOUT_Destroy , "Layout cleanup") CATEGORY_ENUM_SUBCATEGORY(LAYOUT, LAYOUT_Printing , "Printing") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (JS, "JavaScript", "yellow") CATEGORY_ENUM_SUBCATEGORY(JS, JS , "Other") CATEGORY_ENUM_SUBCATEGORY(JS, JS_Parsing, "Parsing" ) CATEGORY_ENUM_SUBCATEGORY(JS, JS_BaselineCompilation, "JIT Compile (baseline)" ) CATEGORY_ENUM_SUBCATEGORY(JS, JS_IonCompilation, "JIT Compile (ion)" ) CATEGORY_ENUM_SUBCATEGORY(JS, JS_Interpreter, "Interpreter" ) CATEGORY_ENUM_SUBCATEGORY(JS, JS_BaselineInterpret, "JIT (baseline-interpreter)" ) CATEGORY_ENUM_SUBCATEGORY(JS, JS_Baseline, "JIT (baseline)" ) CATEGORY_ENUM_SUBCATEGORY(JS, JS_IonMonkey, "JIT (ion)") CATEGORY_ENUM_SUBCATEGORY (JS, JS_Builtin, "Builtin API") CATEGORY_ENUM_SUBCATEGORY(JS, JS_WasmIon, "Wasm (ion)") CATEGORY_ENUM_SUBCATEGORY(JS, JS_WasmBaseline , "Wasm (baseline)") CATEGORY_ENUM_SUBCATEGORY(JS, JS_WasmOther , "Wasm (other)") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (GCCC, "GC / CC", "orange") CATEGORY_ENUM_SUBCATEGORY(GCCC, GCCC , "Other") CATEGORY_ENUM_SUBCATEGORY(GCCC, GCCC_MinorGC, "Minor GC" ) CATEGORY_ENUM_SUBCATEGORY(GCCC, GCCC_MajorGC, "Major GC (Other)" ) CATEGORY_ENUM_SUBCATEGORY(GCCC, GCCC_MajorGC_Mark, "Major GC (Mark)" ) CATEGORY_ENUM_SUBCATEGORY(GCCC, GCCC_MajorGC_Sweep, "Major GC (Sweep)" ) CATEGORY_ENUM_SUBCATEGORY(GCCC, GCCC_MajorGC_Compact, "Major GC (Compact)" ) CATEGORY_ENUM_SUBCATEGORY(GCCC, GCCC_UnmarkGray, "Unmark Gray" ) CATEGORY_ENUM_SUBCATEGORY(GCCC, GCCC_Barrier, "Barrier") CATEGORY_ENUM_SUBCATEGORY (GCCC, GCCC_FreeSnowWhite, "CC (Free Snow White)") CATEGORY_ENUM_SUBCATEGORY (GCCC, GCCC_BuildGraph, "CC (Build Graph)") CATEGORY_ENUM_SUBCATEGORY (GCCC, GCCC_ScanRoots, "CC (Scan Roots)") CATEGORY_ENUM_SUBCATEGORY (GCCC, GCCC_CollectWhite, "CC (Collect White)") CATEGORY_ENUM_SUBCATEGORY (GCCC, GCCC_Finalize, "CC (Finalize)") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY(NETWORK, "Network", "lightblue" ) CATEGORY_ENUM_SUBCATEGORY(NETWORK, NETWORK, "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY(GRAPHICS, "Graphics", "green") CATEGORY_ENUM_SUBCATEGORY (GRAPHICS, GRAPHICS, "Other") CATEGORY_ENUM_SUBCATEGORY(GRAPHICS , GRAPHICS_DisplayListBuilding, "DisplayList building") CATEGORY_ENUM_SUBCATEGORY (GRAPHICS, GRAPHICS_DisplayListMerging, "DisplayList merging" ) CATEGORY_ENUM_SUBCATEGORY(GRAPHICS, GRAPHICS_LayerBuilding, "Layer building") CATEGORY_ENUM_SUBCATEGORY(GRAPHICS, GRAPHICS_TileAllocation , "Tile allocation") CATEGORY_ENUM_SUBCATEGORY(GRAPHICS, GRAPHICS_WRDisplayList , "WebRender display list") CATEGORY_ENUM_SUBCATEGORY(GRAPHICS , GRAPHICS_Rasterization, "Rasterization") CATEGORY_ENUM_SUBCATEGORY (GRAPHICS, GRAPHICS_FlushingAsyncPaints, "Flushing async paints" ) CATEGORY_ENUM_SUBCATEGORY(GRAPHICS, GRAPHICS_ImageDecoding, "Image decoding") CATEGORY_ENUM_SUBCATEGORY(GRAPHICS, GRAPHICS_WebGPU , "WebGPU") CATEGORY_ENUM_SUBCATEGORY(GRAPHICS, GRAPHICS_VSync , "VSync triggered animation") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (DOM, "DOM", "blue") CATEGORY_ENUM_SUBCATEGORY(DOM, DOM, "Other" ) CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY(JAVA_ANDROID , "Android", "yellow") CATEGORY_ENUM_SUBCATEGORY(JAVA_ANDROID , JAVA_ANDROID, "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (JAVA_ANDROIDX, "AndroidX", "orange") CATEGORY_ENUM_SUBCATEGORY (JAVA_ANDROIDX, JAVA_ANDROIDX, "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY(JAVA_LANGUAGE, "Java", "blue") CATEGORY_ENUM_SUBCATEGORY (JAVA_LANGUAGE, JAVA_LANGUAGE, "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY(JAVA_MOZILLA, "Mozilla", "green" ) CATEGORY_ENUM_SUBCATEGORY(JAVA_MOZILLA, JAVA_MOZILLA, "Other" ) CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY(JAVA_KOTLIN , "Kotlin", "purple") CATEGORY_ENUM_SUBCATEGORY(JAVA_KOTLIN, JAVA_KOTLIN , "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (JAVA_BLOCKED, "Blocked", "lightblue") CATEGORY_ENUM_SUBCATEGORY (JAVA_BLOCKED, JAVA_BLOCKED, "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY(MAILNEWS, "Mailnews", "brown") CATEGORY_ENUM_SUBCATEGORY (MAILNEWS, MAILNEWS, "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (IPC, "IPC", "lightgreen") CATEGORY_ENUM_SUBCATEGORY(IPC, IPC , "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (MEDIA, "Media", "orange") CATEGORY_ENUM_SUBCATEGORY(MEDIA, MEDIA , "Other") CATEGORY_ENUM_SUBCATEGORY(MEDIA, MEDIA_CUBEB, "Cubeb" ) CATEGORY_ENUM_SUBCATEGORY(MEDIA, MEDIA_PLAYBACK, "Playback" ) CATEGORY_ENUM_SUBCATEGORY(MEDIA, MEDIA_RT, "Real-time rendering" ) CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY(A11Y , "Accessibility", "brown") CATEGORY_ENUM_SUBCATEGORY(A11Y, A11Y , "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (PROFILER, "Profiler", "lightred") CATEGORY_ENUM_SUBCATEGORY( PROFILER, PROFILER, "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (TIMER, "Timer", "grey") CATEGORY_ENUM_SUBCATEGORY(TIMER, TIMER , "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (REMOTE_PROTOCOL, "Remote-Protocol", "grey") CATEGORY_ENUM_SUBCATEGORY (REMOTE_PROTOCOL, REMOTE_PROTOCOL, "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY(SANDBOX, "Sandbox", "grey") CATEGORY_ENUM_SUBCATEGORY (SANDBOX, SANDBOX, "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (TELEMETRY, "Telemetry", "grey") CATEGORY_ENUM_SUBCATEGORY(TELEMETRY , TELEMETRY, "Other") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (ML, "ML", "magenta") CATEGORY_ENUM_SUBCATEGORY(ML, ML, "Other" ) CATEGORY_ENUM_SUBCATEGORY(ML, ML_INFERENCE, "Inference") CATEGORY_ENUM_SUBCATEGORY (ML, ML_SETUP, "Setup") CATEGORY_ENUM_END_CATEGORY CATEGORY_ENUM_BEGIN_CATEGORY (LOGS, "Logs", "lightblue") CATEGORY_ENUM_SUBCATEGORY(LOGS, LOGS , "Other") CATEGORY_ENUM_END_CATEGORY | |||
| 4561 | #undef CATEGORY_ENUM_BEGIN_CATEGORY | |||
| 4562 | #undef CATEGORY_ENUM_SUBCATEGORY | |||
| 4563 | #undef CATEGORY_ENUM_END_CATEGORY | |||
| 4564 | ||||
| 4565 | printf("TestMarkerCategory done\n"); | |||
| 4566 | } | |||
| 4567 | ||||
| 4568 | void TestMarkerThreadId() { | |||
| 4569 | printf("TestMarkerThreadId...\n"); | |||
| 4570 | ||||
| 4571 | MOZ_RELEASE_ASSERT(MarkerThreadId{}.IsUnspecified())do { static_assert( mozilla::detail::AssertionConditionType< decltype(MarkerThreadId{}.IsUnspecified())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(MarkerThreadId{}.IsUnspecified ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("MarkerThreadId{}.IsUnspecified()", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 4571); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "MarkerThreadId{}.IsUnspecified()" ")"); do { MOZ_CrashSequence(__null, 4571); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4572 | MOZ_RELEASE_ASSERT(!MarkerThreadId::MainThread().IsUnspecified())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!MarkerThreadId::MainThread().IsUnspecified())>:: isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(!MarkerThreadId::MainThread().IsUnspecified()))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("!MarkerThreadId::MainThread().IsUnspecified()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4572 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!MarkerThreadId::MainThread().IsUnspecified()" ")"); do { MOZ_CrashSequence(__null, 4572); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4573 | MOZ_RELEASE_ASSERT(!MarkerThreadId::CurrentThread().IsUnspecified())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!MarkerThreadId::CurrentThread().IsUnspecified())> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(!MarkerThreadId::CurrentThread().IsUnspecified()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!MarkerThreadId::CurrentThread().IsUnspecified()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4573 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!MarkerThreadId::CurrentThread().IsUnspecified()" ")"); do { MOZ_CrashSequence(__null, 4573); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4574 | ||||
| 4575 | MOZ_RELEASE_ASSERT(!MarkerThreadId{do { static_assert( mozilla::detail::AssertionConditionType< decltype(!MarkerThreadId{ mozilla::baseprofiler::BaseProfilerThreadId ::FromNumber(42)} .IsUnspecified())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!MarkerThreadId{ mozilla::baseprofiler ::BaseProfilerThreadId::FromNumber(42)} .IsUnspecified()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("!MarkerThreadId{ mozilla::baseprofiler::BaseProfilerThreadId::FromNumber(42)} .IsUnspecified()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4577 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!MarkerThreadId{ mozilla::baseprofiler::BaseProfilerThreadId::FromNumber(42)} .IsUnspecified()" ")"); do { MOZ_CrashSequence(__null, 4577); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4576 | mozilla::baseprofiler::BaseProfilerThreadId::FromNumber(42)}do { static_assert( mozilla::detail::AssertionConditionType< decltype(!MarkerThreadId{ mozilla::baseprofiler::BaseProfilerThreadId ::FromNumber(42)} .IsUnspecified())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!MarkerThreadId{ mozilla::baseprofiler ::BaseProfilerThreadId::FromNumber(42)} .IsUnspecified()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("!MarkerThreadId{ mozilla::baseprofiler::BaseProfilerThreadId::FromNumber(42)} .IsUnspecified()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4577 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!MarkerThreadId{ mozilla::baseprofiler::BaseProfilerThreadId::FromNumber(42)} .IsUnspecified()" ")"); do { MOZ_CrashSequence(__null, 4577); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4577 | .IsUnspecified())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!MarkerThreadId{ mozilla::baseprofiler::BaseProfilerThreadId ::FromNumber(42)} .IsUnspecified())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(!MarkerThreadId{ mozilla::baseprofiler ::BaseProfilerThreadId::FromNumber(42)} .IsUnspecified()))), 0 ))) { do { } while (false); MOZ_ReportAssertionFailure("!MarkerThreadId{ mozilla::baseprofiler::BaseProfilerThreadId::FromNumber(42)} .IsUnspecified()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4577 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!MarkerThreadId{ mozilla::baseprofiler::BaseProfilerThreadId::FromNumber(42)} .IsUnspecified()" ")"); do { MOZ_CrashSequence(__null, 4577); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4578 | MOZ_RELEASE_ASSERT(do { static_assert( mozilla::detail::AssertionConditionType< decltype(MarkerThreadId{ mozilla::baseprofiler::BaseProfilerThreadId ::FromNumber(42)} .ThreadId() .ToNumber() == 42)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(MarkerThreadId{ mozilla::baseprofiler::BaseProfilerThreadId ::FromNumber(42)} .ThreadId() .ToNumber() == 42))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("MarkerThreadId{ mozilla::baseprofiler::BaseProfilerThreadId::FromNumber(42)} .ThreadId() .ToNumber() == 42" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4582 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "MarkerThreadId{ mozilla::baseprofiler::BaseProfilerThreadId::FromNumber(42)} .ThreadId() .ToNumber() == 42" ")"); do { MOZ_CrashSequence(__null, 4582); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4579 | MarkerThreadId{do { static_assert( mozilla::detail::AssertionConditionType< decltype(MarkerThreadId{ mozilla::baseprofiler::BaseProfilerThreadId ::FromNumber(42)} .ThreadId() .ToNumber() == 42)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(MarkerThreadId{ mozilla::baseprofiler::BaseProfilerThreadId ::FromNumber(42)} .ThreadId() .ToNumber() == 42))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("MarkerThreadId{ mozilla::baseprofiler::BaseProfilerThreadId::FromNumber(42)} .ThreadId() .ToNumber() == 42" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4582 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "MarkerThreadId{ mozilla::baseprofiler::BaseProfilerThreadId::FromNumber(42)} .ThreadId() .ToNumber() == 42" ")"); do { MOZ_CrashSequence(__null, 4582); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4580 | mozilla::baseprofiler::BaseProfilerThreadId::FromNumber(42)}do { static_assert( mozilla::detail::AssertionConditionType< decltype(MarkerThreadId{ mozilla::baseprofiler::BaseProfilerThreadId ::FromNumber(42)} .ThreadId() .ToNumber() == 42)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(MarkerThreadId{ mozilla::baseprofiler::BaseProfilerThreadId ::FromNumber(42)} .ThreadId() .ToNumber() == 42))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("MarkerThreadId{ mozilla::baseprofiler::BaseProfilerThreadId::FromNumber(42)} .ThreadId() .ToNumber() == 42" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4582 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "MarkerThreadId{ mozilla::baseprofiler::BaseProfilerThreadId::FromNumber(42)} .ThreadId() .ToNumber() == 42" ")"); do { MOZ_CrashSequence(__null, 4582); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4581 | .ThreadId()do { static_assert( mozilla::detail::AssertionConditionType< decltype(MarkerThreadId{ mozilla::baseprofiler::BaseProfilerThreadId ::FromNumber(42)} .ThreadId() .ToNumber() == 42)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(MarkerThreadId{ mozilla::baseprofiler::BaseProfilerThreadId ::FromNumber(42)} .ThreadId() .ToNumber() == 42))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("MarkerThreadId{ mozilla::baseprofiler::BaseProfilerThreadId::FromNumber(42)} .ThreadId() .ToNumber() == 42" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4582 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "MarkerThreadId{ mozilla::baseprofiler::BaseProfilerThreadId::FromNumber(42)} .ThreadId() .ToNumber() == 42" ")"); do { MOZ_CrashSequence(__null, 4582); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4582 | .ToNumber() == 42)do { static_assert( mozilla::detail::AssertionConditionType< decltype(MarkerThreadId{ mozilla::baseprofiler::BaseProfilerThreadId ::FromNumber(42)} .ThreadId() .ToNumber() == 42)>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(MarkerThreadId{ mozilla::baseprofiler::BaseProfilerThreadId ::FromNumber(42)} .ThreadId() .ToNumber() == 42))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("MarkerThreadId{ mozilla::baseprofiler::BaseProfilerThreadId::FromNumber(42)} .ThreadId() .ToNumber() == 42" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4582 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "MarkerThreadId{ mozilla::baseprofiler::BaseProfilerThreadId::FromNumber(42)} .ThreadId() .ToNumber() == 42" ")"); do { MOZ_CrashSequence(__null, 4582); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4583 | ||||
| 4584 | // We'll assume that this test runs in the main thread (which should be true | |||
| 4585 | // when called from the `main` function). | |||
| 4586 | MOZ_RELEASE_ASSERT(MarkerThreadId::MainThread().ThreadId() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(MarkerThreadId::MainThread().ThreadId() == mozilla:: baseprofiler::profiler_main_thread_id())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(MarkerThreadId::MainThread() .ThreadId() == mozilla::baseprofiler::profiler_main_thread_id ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("MarkerThreadId::MainThread().ThreadId() == mozilla::baseprofiler::profiler_main_thread_id()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4587 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "MarkerThreadId::MainThread().ThreadId() == mozilla::baseprofiler::profiler_main_thread_id()" ")"); do { MOZ_CrashSequence(__null, 4587); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4587 | mozilla::baseprofiler::profiler_main_thread_id())do { static_assert( mozilla::detail::AssertionConditionType< decltype(MarkerThreadId::MainThread().ThreadId() == mozilla:: baseprofiler::profiler_main_thread_id())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(MarkerThreadId::MainThread() .ThreadId() == mozilla::baseprofiler::profiler_main_thread_id ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("MarkerThreadId::MainThread().ThreadId() == mozilla::baseprofiler::profiler_main_thread_id()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4587 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "MarkerThreadId::MainThread().ThreadId() == mozilla::baseprofiler::profiler_main_thread_id()" ")"); do { MOZ_CrashSequence(__null, 4587); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4588 | ||||
| 4589 | MOZ_RELEASE_ASSERT(MarkerThreadId::CurrentThread().ThreadId() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(MarkerThreadId::CurrentThread().ThreadId() == mozilla ::baseprofiler::profiler_current_thread_id())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(MarkerThreadId::CurrentThread ().ThreadId() == mozilla::baseprofiler::profiler_current_thread_id ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("MarkerThreadId::CurrentThread().ThreadId() == mozilla::baseprofiler::profiler_current_thread_id()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4590 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "MarkerThreadId::CurrentThread().ThreadId() == mozilla::baseprofiler::profiler_current_thread_id()" ")"); do { MOZ_CrashSequence(__null, 4590); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4590 | mozilla::baseprofiler::profiler_current_thread_id())do { static_assert( mozilla::detail::AssertionConditionType< decltype(MarkerThreadId::CurrentThread().ThreadId() == mozilla ::baseprofiler::profiler_current_thread_id())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(MarkerThreadId::CurrentThread ().ThreadId() == mozilla::baseprofiler::profiler_current_thread_id ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("MarkerThreadId::CurrentThread().ThreadId() == mozilla::baseprofiler::profiler_current_thread_id()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4590 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "MarkerThreadId::CurrentThread().ThreadId() == mozilla::baseprofiler::profiler_current_thread_id()" ")"); do { MOZ_CrashSequence(__null, 4590); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4591 | ||||
| 4592 | MOZ_RELEASE_ASSERT(MarkerThreadId::CurrentThread().ThreadId() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(MarkerThreadId::CurrentThread().ThreadId() == mozilla ::baseprofiler::profiler_main_thread_id())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(MarkerThreadId::CurrentThread ().ThreadId() == mozilla::baseprofiler::profiler_main_thread_id ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("MarkerThreadId::CurrentThread().ThreadId() == mozilla::baseprofiler::profiler_main_thread_id()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4593 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "MarkerThreadId::CurrentThread().ThreadId() == mozilla::baseprofiler::profiler_main_thread_id()" ")"); do { MOZ_CrashSequence(__null, 4593); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4593 | mozilla::baseprofiler::profiler_main_thread_id())do { static_assert( mozilla::detail::AssertionConditionType< decltype(MarkerThreadId::CurrentThread().ThreadId() == mozilla ::baseprofiler::profiler_main_thread_id())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(MarkerThreadId::CurrentThread ().ThreadId() == mozilla::baseprofiler::profiler_main_thread_id ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("MarkerThreadId::CurrentThread().ThreadId() == mozilla::baseprofiler::profiler_main_thread_id()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4593 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "MarkerThreadId::CurrentThread().ThreadId() == mozilla::baseprofiler::profiler_main_thread_id()" ")"); do { MOZ_CrashSequence(__null, 4593); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4594 | ||||
| 4595 | std::thread testThread([]() { | |||
| 4596 | MOZ_RELEASE_ASSERT(!MarkerThreadId::MainThread().IsUnspecified())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!MarkerThreadId::MainThread().IsUnspecified())>:: isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(!MarkerThreadId::MainThread().IsUnspecified()))), 0) )) { do { } while (false); MOZ_ReportAssertionFailure("!MarkerThreadId::MainThread().IsUnspecified()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4596 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!MarkerThreadId::MainThread().IsUnspecified()" ")"); do { MOZ_CrashSequence(__null, 4596); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4597 | MOZ_RELEASE_ASSERT(!MarkerThreadId::CurrentThread().IsUnspecified())do { static_assert( mozilla::detail::AssertionConditionType< decltype(!MarkerThreadId::CurrentThread().IsUnspecified())> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(!MarkerThreadId::CurrentThread().IsUnspecified()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!MarkerThreadId::CurrentThread().IsUnspecified()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4597 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "!MarkerThreadId::CurrentThread().IsUnspecified()" ")"); do { MOZ_CrashSequence(__null, 4597); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4598 | ||||
| 4599 | MOZ_RELEASE_ASSERT(MarkerThreadId::MainThread().ThreadId() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(MarkerThreadId::MainThread().ThreadId() == mozilla:: baseprofiler::profiler_main_thread_id())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(MarkerThreadId::MainThread() .ThreadId() == mozilla::baseprofiler::profiler_main_thread_id ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("MarkerThreadId::MainThread().ThreadId() == mozilla::baseprofiler::profiler_main_thread_id()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4600 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "MarkerThreadId::MainThread().ThreadId() == mozilla::baseprofiler::profiler_main_thread_id()" ")"); do { MOZ_CrashSequence(__null, 4600); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4600 | mozilla::baseprofiler::profiler_main_thread_id())do { static_assert( mozilla::detail::AssertionConditionType< decltype(MarkerThreadId::MainThread().ThreadId() == mozilla:: baseprofiler::profiler_main_thread_id())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(MarkerThreadId::MainThread() .ThreadId() == mozilla::baseprofiler::profiler_main_thread_id ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("MarkerThreadId::MainThread().ThreadId() == mozilla::baseprofiler::profiler_main_thread_id()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4600 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "MarkerThreadId::MainThread().ThreadId() == mozilla::baseprofiler::profiler_main_thread_id()" ")"); do { MOZ_CrashSequence(__null, 4600); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4601 | ||||
| 4602 | MOZ_RELEASE_ASSERT(MarkerThreadId::CurrentThread().ThreadId() ==do { static_assert( mozilla::detail::AssertionConditionType< decltype(MarkerThreadId::CurrentThread().ThreadId() == mozilla ::baseprofiler::profiler_current_thread_id())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(MarkerThreadId::CurrentThread ().ThreadId() == mozilla::baseprofiler::profiler_current_thread_id ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("MarkerThreadId::CurrentThread().ThreadId() == mozilla::baseprofiler::profiler_current_thread_id()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4603 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "MarkerThreadId::CurrentThread().ThreadId() == mozilla::baseprofiler::profiler_current_thread_id()" ")"); do { MOZ_CrashSequence(__null, 4603); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4603 | mozilla::baseprofiler::profiler_current_thread_id())do { static_assert( mozilla::detail::AssertionConditionType< decltype(MarkerThreadId::CurrentThread().ThreadId() == mozilla ::baseprofiler::profiler_current_thread_id())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(MarkerThreadId::CurrentThread ().ThreadId() == mozilla::baseprofiler::profiler_current_thread_id ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("MarkerThreadId::CurrentThread().ThreadId() == mozilla::baseprofiler::profiler_current_thread_id()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4603 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "MarkerThreadId::CurrentThread().ThreadId() == mozilla::baseprofiler::profiler_current_thread_id()" ")"); do { MOZ_CrashSequence(__null, 4603); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4604 | ||||
| 4605 | MOZ_RELEASE_ASSERT(MarkerThreadId::CurrentThread().ThreadId() !=do { static_assert( mozilla::detail::AssertionConditionType< decltype(MarkerThreadId::CurrentThread().ThreadId() != mozilla ::baseprofiler::profiler_main_thread_id())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(MarkerThreadId::CurrentThread ().ThreadId() != mozilla::baseprofiler::profiler_main_thread_id ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("MarkerThreadId::CurrentThread().ThreadId() != mozilla::baseprofiler::profiler_main_thread_id()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4606 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "MarkerThreadId::CurrentThread().ThreadId() != mozilla::baseprofiler::profiler_main_thread_id()" ")"); do { MOZ_CrashSequence(__null, 4606); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4606 | mozilla::baseprofiler::profiler_main_thread_id())do { static_assert( mozilla::detail::AssertionConditionType< decltype(MarkerThreadId::CurrentThread().ThreadId() != mozilla ::baseprofiler::profiler_main_thread_id())>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(MarkerThreadId::CurrentThread ().ThreadId() != mozilla::baseprofiler::profiler_main_thread_id ()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("MarkerThreadId::CurrentThread().ThreadId() != mozilla::baseprofiler::profiler_main_thread_id()" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4606 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "MarkerThreadId::CurrentThread().ThreadId() != mozilla::baseprofiler::profiler_main_thread_id()" ")"); do { MOZ_CrashSequence(__null, 4606); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4607 | }); | |||
| 4608 | testThread.join(); | |||
| 4609 | ||||
| 4610 | printf("TestMarkerThreadId done\n"); | |||
| 4611 | } | |||
| 4612 | ||||
| 4613 | void TestMarkerNoPayload() { | |||
| 4614 | printf("TestMarkerNoPayload...\n"); | |||
| 4615 | ||||
| 4616 | mozilla::ProfileBufferChunkManagerSingle chunkManager(512); | |||
| 4617 | mozilla::ProfileChunkedBuffer buffer( | |||
| 4618 | mozilla::ProfileChunkedBuffer::ThreadSafety::WithoutMutex, chunkManager); | |||
| 4619 | ||||
| 4620 | mozilla::ProfileBufferBlockIndex i0 = | |||
| 4621 | mozilla::baseprofiler::AddMarkerToBuffer( | |||
| 4622 | buffer, "literal", mozilla::baseprofiler::category::OTHER_Profiling); | |||
| 4623 | MOZ_RELEASE_ASSERT(i0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(i0)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(i0))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("i0", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 4623); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "i0" ")"); do { MOZ_CrashSequence(__null, 4623); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4624 | ||||
| 4625 | const std::string dynamic = "dynamic"; | |||
| 4626 | mozilla::ProfileBufferBlockIndex i1 = | |||
| 4627 | mozilla::baseprofiler::AddMarkerToBuffer( | |||
| 4628 | buffer, dynamic, | |||
| 4629 | mozilla::baseprofiler::category::GRAPHICS_FlushingAsyncPaints, {}); | |||
| 4630 | MOZ_RELEASE_ASSERT(i1)do { static_assert( mozilla::detail::AssertionConditionType< decltype(i1)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(i1))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("i1", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 4630); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "i1" ")"); do { MOZ_CrashSequence(__null, 4630); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4631 | MOZ_RELEASE_ASSERT(i1 > i0)do { static_assert( mozilla::detail::AssertionConditionType< decltype(i1 > i0)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(i1 > i0))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("i1 > i0", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 4631); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "i1 > i0" ")"); do { MOZ_CrashSequence(__null, 4631); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4632 | ||||
| 4633 | mozilla::ProfileBufferBlockIndex i2 = | |||
| 4634 | mozilla::baseprofiler::AddMarkerToBuffer( | |||
| 4635 | buffer, std::string_view("string_view"), | |||
| 4636 | mozilla::baseprofiler::category::GRAPHICS_FlushingAsyncPaints, {}); | |||
| 4637 | MOZ_RELEASE_ASSERT(i2)do { static_assert( mozilla::detail::AssertionConditionType< decltype(i2)>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(i2))), 0))) { do { } while (false ); MOZ_ReportAssertionFailure("i2", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 4637); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "i2" ")"); do { MOZ_CrashSequence(__null, 4637); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4638 | MOZ_RELEASE_ASSERT(i2 > i1)do { static_assert( mozilla::detail::AssertionConditionType< decltype(i2 > i1)>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(i2 > i1))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("i2 > i1", "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp" , 4638); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "i2 > i1" ")"); do { MOZ_CrashSequence(__null, 4638); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4639 | ||||
| 4640 | #ifdef DEBUG1 | |||
| 4641 | buffer.Dump(); | |||
| 4642 | #endif | |||
| 4643 | ||||
| 4644 | PrintMarkers(buffer); | |||
| 4645 | ||||
| 4646 | printf("TestMarkerNoPayload done\n"); | |||
| 4647 | } | |||
| 4648 | ||||
| 4649 | void TestUserMarker() { | |||
| 4650 | printf("TestUserMarker...\n"); | |||
| 4651 | ||||
| 4652 | // User-defined marker type with text. | |||
| 4653 | // It's fine to define it right in the function where it's used. | |||
| 4654 | struct MarkerTypeTestMinimal { | |||
| 4655 | static constexpr Span<const char> MarkerTypeName() { | |||
| 4656 | return MakeStringSpan("test-minimal"); | |||
| 4657 | } | |||
| 4658 | static void StreamJSONMarkerData( | |||
| 4659 | mozilla::baseprofiler::SpliceableJSONWriter& aWriter, | |||
| 4660 | const std::string& aText) { | |||
| 4661 | aWriter.StringProperty("text", aText); | |||
| 4662 | } | |||
| 4663 | static mozilla::MarkerSchema MarkerTypeDisplay() { | |||
| 4664 | using MS = mozilla::MarkerSchema; | |||
| 4665 | MS schema{MS::Location::MarkerChart, MS::Location::MarkerTable}; | |||
| 4666 | schema.SetTooltipLabel("tooltip for test-minimal"); | |||
| 4667 | schema.AddKeyLabelFormat("text", "Text", MS::Format::String); | |||
| 4668 | return schema; | |||
| 4669 | } | |||
| 4670 | }; | |||
| 4671 | ||||
| 4672 | mozilla::ProfileBufferChunkManagerSingle chunkManager(1024); | |||
| 4673 | mozilla::ProfileChunkedBuffer buffer( | |||
| 4674 | mozilla::ProfileChunkedBuffer::ThreadSafety::WithoutMutex, chunkManager); | |||
| 4675 | ||||
| 4676 | MOZ_RELEASE_ASSERT(mozilla::baseprofiler::AddMarkerToBuffer(do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, {}, MarkerTypeTestMinimal {}, std::string("payload text")))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer ( buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling , {}, MarkerTypeTestMinimal{}, std::string("payload text")))) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, {}, MarkerTypeTestMinimal{}, std::string(\"payload text\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4678 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, {}, MarkerTypeTestMinimal{}, std::string(\"payload text\"))" ")"); do { MOZ_CrashSequence(__null, 4678); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4677 | buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling, {},do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, {}, MarkerTypeTestMinimal {}, std::string("payload text")))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer ( buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling , {}, MarkerTypeTestMinimal{}, std::string("payload text")))) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, {}, MarkerTypeTestMinimal{}, std::string(\"payload text\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4678 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, {}, MarkerTypeTestMinimal{}, std::string(\"payload text\"))" ")"); do { MOZ_CrashSequence(__null, 4678); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4678 | MarkerTypeTestMinimal{}, std::string("payload text")))do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, {}, MarkerTypeTestMinimal {}, std::string("payload text")))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer ( buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling , {}, MarkerTypeTestMinimal{}, std::string("payload text")))) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, {}, MarkerTypeTestMinimal{}, std::string(\"payload text\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4678 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, {}, MarkerTypeTestMinimal{}, std::string(\"payload text\"))" ")"); do { MOZ_CrashSequence(__null, 4678); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4679 | ||||
| 4680 | MOZ_RELEASE_ASSERT(mozilla::baseprofiler::AddMarkerToBuffer(do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerThreadId( mozilla::baseprofiler::BaseProfilerThreadId:: FromNumber(123)), MarkerTypeTestMinimal{}, std::string("ThreadId(123)" )))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerThreadId( mozilla::baseprofiler::BaseProfilerThreadId:: FromNumber(123)), MarkerTypeTestMinimal{}, std::string("ThreadId(123)" ))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerThreadId( mozilla::baseprofiler::BaseProfilerThreadId::FromNumber(123)), MarkerTypeTestMinimal{}, std::string(\"ThreadId(123)\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4684 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerThreadId( mozilla::baseprofiler::BaseProfilerThreadId::FromNumber(123)), MarkerTypeTestMinimal{}, std::string(\"ThreadId(123)\"))" ")"); do { MOZ_CrashSequence(__null, 4684); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4681 | buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling,do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerThreadId( mozilla::baseprofiler::BaseProfilerThreadId:: FromNumber(123)), MarkerTypeTestMinimal{}, std::string("ThreadId(123)" )))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerThreadId( mozilla::baseprofiler::BaseProfilerThreadId:: FromNumber(123)), MarkerTypeTestMinimal{}, std::string("ThreadId(123)" ))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerThreadId( mozilla::baseprofiler::BaseProfilerThreadId::FromNumber(123)), MarkerTypeTestMinimal{}, std::string(\"ThreadId(123)\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4684 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerThreadId( mozilla::baseprofiler::BaseProfilerThreadId::FromNumber(123)), MarkerTypeTestMinimal{}, std::string(\"ThreadId(123)\"))" ")"); do { MOZ_CrashSequence(__null, 4684); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4682 | mozilla::MarkerThreadId(do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerThreadId( mozilla::baseprofiler::BaseProfilerThreadId:: FromNumber(123)), MarkerTypeTestMinimal{}, std::string("ThreadId(123)" )))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerThreadId( mozilla::baseprofiler::BaseProfilerThreadId:: FromNumber(123)), MarkerTypeTestMinimal{}, std::string("ThreadId(123)" ))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerThreadId( mozilla::baseprofiler::BaseProfilerThreadId::FromNumber(123)), MarkerTypeTestMinimal{}, std::string(\"ThreadId(123)\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4684 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerThreadId( mozilla::baseprofiler::BaseProfilerThreadId::FromNumber(123)), MarkerTypeTestMinimal{}, std::string(\"ThreadId(123)\"))" ")"); do { MOZ_CrashSequence(__null, 4684); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4683 | mozilla::baseprofiler::BaseProfilerThreadId::FromNumber(123)),do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerThreadId( mozilla::baseprofiler::BaseProfilerThreadId:: FromNumber(123)), MarkerTypeTestMinimal{}, std::string("ThreadId(123)" )))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerThreadId( mozilla::baseprofiler::BaseProfilerThreadId:: FromNumber(123)), MarkerTypeTestMinimal{}, std::string("ThreadId(123)" ))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerThreadId( mozilla::baseprofiler::BaseProfilerThreadId::FromNumber(123)), MarkerTypeTestMinimal{}, std::string(\"ThreadId(123)\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4684 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerThreadId( mozilla::baseprofiler::BaseProfilerThreadId::FromNumber(123)), MarkerTypeTestMinimal{}, std::string(\"ThreadId(123)\"))" ")"); do { MOZ_CrashSequence(__null, 4684); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4684 | MarkerTypeTestMinimal{}, std::string("ThreadId(123)")))do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerThreadId( mozilla::baseprofiler::BaseProfilerThreadId:: FromNumber(123)), MarkerTypeTestMinimal{}, std::string("ThreadId(123)" )))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerThreadId( mozilla::baseprofiler::BaseProfilerThreadId:: FromNumber(123)), MarkerTypeTestMinimal{}, std::string("ThreadId(123)" ))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerThreadId( mozilla::baseprofiler::BaseProfilerThreadId::FromNumber(123)), MarkerTypeTestMinimal{}, std::string(\"ThreadId(123)\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4684 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerThreadId( mozilla::baseprofiler::BaseProfilerThreadId::FromNumber(123)), MarkerTypeTestMinimal{}, std::string(\"ThreadId(123)\"))" ")"); do { MOZ_CrashSequence(__null, 4684); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4685 | ||||
| 4686 | auto start = mozilla::TimeStamp::Now(); | |||
| 4687 | ||||
| 4688 | MOZ_RELEASE_ASSERT(mozilla::baseprofiler::AddMarkerToBuffer(do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerTiming::InstantAt(start), MarkerTypeTestMinimal{}, std:: string("InstantAt(start)")))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer ( buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling , mozilla::MarkerTiming::InstantAt(start), MarkerTypeTestMinimal {}, std::string("InstantAt(start)"))))), 0))) { do { } while ( false); MOZ_ReportAssertionFailure("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::InstantAt(start), MarkerTypeTestMinimal{}, std::string(\"InstantAt(start)\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4691 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::InstantAt(start), MarkerTypeTestMinimal{}, std::string(\"InstantAt(start)\"))" ")"); do { MOZ_CrashSequence(__null, 4691); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4689 | buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling,do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerTiming::InstantAt(start), MarkerTypeTestMinimal{}, std:: string("InstantAt(start)")))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer ( buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling , mozilla::MarkerTiming::InstantAt(start), MarkerTypeTestMinimal {}, std::string("InstantAt(start)"))))), 0))) { do { } while ( false); MOZ_ReportAssertionFailure("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::InstantAt(start), MarkerTypeTestMinimal{}, std::string(\"InstantAt(start)\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4691 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::InstantAt(start), MarkerTypeTestMinimal{}, std::string(\"InstantAt(start)\"))" ")"); do { MOZ_CrashSequence(__null, 4691); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4690 | mozilla::MarkerTiming::InstantAt(start), MarkerTypeTestMinimal{},do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerTiming::InstantAt(start), MarkerTypeTestMinimal{}, std:: string("InstantAt(start)")))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer ( buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling , mozilla::MarkerTiming::InstantAt(start), MarkerTypeTestMinimal {}, std::string("InstantAt(start)"))))), 0))) { do { } while ( false); MOZ_ReportAssertionFailure("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::InstantAt(start), MarkerTypeTestMinimal{}, std::string(\"InstantAt(start)\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4691 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::InstantAt(start), MarkerTypeTestMinimal{}, std::string(\"InstantAt(start)\"))" ")"); do { MOZ_CrashSequence(__null, 4691); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4691 | std::string("InstantAt(start)")))do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerTiming::InstantAt(start), MarkerTypeTestMinimal{}, std:: string("InstantAt(start)")))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer ( buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling , mozilla::MarkerTiming::InstantAt(start), MarkerTypeTestMinimal {}, std::string("InstantAt(start)"))))), 0))) { do { } while ( false); MOZ_ReportAssertionFailure("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::InstantAt(start), MarkerTypeTestMinimal{}, std::string(\"InstantAt(start)\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4691 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::InstantAt(start), MarkerTypeTestMinimal{}, std::string(\"InstantAt(start)\"))" ")"); do { MOZ_CrashSequence(__null, 4691); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4692 | ||||
| 4693 | auto then = mozilla::TimeStamp::Now(); | |||
| 4694 | ||||
| 4695 | MOZ_RELEASE_ASSERT(mozilla::baseprofiler::AddMarkerToBuffer(do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerTiming::IntervalStart(start), MarkerTypeTestMinimal{}, std ::string("IntervalStart(start)")))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer ( buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling , mozilla::MarkerTiming::IntervalStart(start), MarkerTypeTestMinimal {}, std::string("IntervalStart(start)"))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::IntervalStart(start), MarkerTypeTestMinimal{}, std::string(\"IntervalStart(start)\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4698 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::IntervalStart(start), MarkerTypeTestMinimal{}, std::string(\"IntervalStart(start)\"))" ")"); do { MOZ_CrashSequence(__null, 4698); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4696 | buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling,do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerTiming::IntervalStart(start), MarkerTypeTestMinimal{}, std ::string("IntervalStart(start)")))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer ( buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling , mozilla::MarkerTiming::IntervalStart(start), MarkerTypeTestMinimal {}, std::string("IntervalStart(start)"))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::IntervalStart(start), MarkerTypeTestMinimal{}, std::string(\"IntervalStart(start)\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4698 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::IntervalStart(start), MarkerTypeTestMinimal{}, std::string(\"IntervalStart(start)\"))" ")"); do { MOZ_CrashSequence(__null, 4698); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4697 | mozilla::MarkerTiming::IntervalStart(start), MarkerTypeTestMinimal{},do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerTiming::IntervalStart(start), MarkerTypeTestMinimal{}, std ::string("IntervalStart(start)")))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer ( buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling , mozilla::MarkerTiming::IntervalStart(start), MarkerTypeTestMinimal {}, std::string("IntervalStart(start)"))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::IntervalStart(start), MarkerTypeTestMinimal{}, std::string(\"IntervalStart(start)\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4698 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::IntervalStart(start), MarkerTypeTestMinimal{}, std::string(\"IntervalStart(start)\"))" ")"); do { MOZ_CrashSequence(__null, 4698); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4698 | std::string("IntervalStart(start)")))do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerTiming::IntervalStart(start), MarkerTypeTestMinimal{}, std ::string("IntervalStart(start)")))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer ( buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling , mozilla::MarkerTiming::IntervalStart(start), MarkerTypeTestMinimal {}, std::string("IntervalStart(start)"))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::IntervalStart(start), MarkerTypeTestMinimal{}, std::string(\"IntervalStart(start)\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4698 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::IntervalStart(start), MarkerTypeTestMinimal{}, std::string(\"IntervalStart(start)\"))" ")"); do { MOZ_CrashSequence(__null, 4698); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4699 | ||||
| 4700 | MOZ_RELEASE_ASSERT(mozilla::baseprofiler::AddMarkerToBuffer(do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerTiming::IntervalEnd(then), MarkerTypeTestMinimal{}, std ::string("IntervalEnd(then)")))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer ( buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling , mozilla::MarkerTiming::IntervalEnd(then), MarkerTypeTestMinimal {}, std::string("IntervalEnd(then)"))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::IntervalEnd(then), MarkerTypeTestMinimal{}, std::string(\"IntervalEnd(then)\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4703 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::IntervalEnd(then), MarkerTypeTestMinimal{}, std::string(\"IntervalEnd(then)\"))" ")"); do { MOZ_CrashSequence(__null, 4703); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4701 | buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling,do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerTiming::IntervalEnd(then), MarkerTypeTestMinimal{}, std ::string("IntervalEnd(then)")))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer ( buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling , mozilla::MarkerTiming::IntervalEnd(then), MarkerTypeTestMinimal {}, std::string("IntervalEnd(then)"))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::IntervalEnd(then), MarkerTypeTestMinimal{}, std::string(\"IntervalEnd(then)\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4703 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::IntervalEnd(then), MarkerTypeTestMinimal{}, std::string(\"IntervalEnd(then)\"))" ")"); do { MOZ_CrashSequence(__null, 4703); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4702 | mozilla::MarkerTiming::IntervalEnd(then), MarkerTypeTestMinimal{},do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerTiming::IntervalEnd(then), MarkerTypeTestMinimal{}, std ::string("IntervalEnd(then)")))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer ( buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling , mozilla::MarkerTiming::IntervalEnd(then), MarkerTypeTestMinimal {}, std::string("IntervalEnd(then)"))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::IntervalEnd(then), MarkerTypeTestMinimal{}, std::string(\"IntervalEnd(then)\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4703 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::IntervalEnd(then), MarkerTypeTestMinimal{}, std::string(\"IntervalEnd(then)\"))" ")"); do { MOZ_CrashSequence(__null, 4703); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4703 | std::string("IntervalEnd(then)")))do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerTiming::IntervalEnd(then), MarkerTypeTestMinimal{}, std ::string("IntervalEnd(then)")))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer ( buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling , mozilla::MarkerTiming::IntervalEnd(then), MarkerTypeTestMinimal {}, std::string("IntervalEnd(then)"))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::IntervalEnd(then), MarkerTypeTestMinimal{}, std::string(\"IntervalEnd(then)\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4703 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::IntervalEnd(then), MarkerTypeTestMinimal{}, std::string(\"IntervalEnd(then)\"))" ")"); do { MOZ_CrashSequence(__null, 4703); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4704 | ||||
| 4705 | MOZ_RELEASE_ASSERT(mozilla::baseprofiler::AddMarkerToBuffer(do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerTiming::Interval(start, then), MarkerTypeTestMinimal{}, std::string("Interval(start, then)")))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer ( buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling , mozilla::MarkerTiming::Interval(start, then), MarkerTypeTestMinimal {}, std::string("Interval(start, then)"))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::Interval(start, then), MarkerTypeTestMinimal{}, std::string(\"Interval(start, then)\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4708 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::Interval(start, then), MarkerTypeTestMinimal{}, std::string(\"Interval(start, then)\"))" ")"); do { MOZ_CrashSequence(__null, 4708); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4706 | buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling,do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerTiming::Interval(start, then), MarkerTypeTestMinimal{}, std::string("Interval(start, then)")))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer ( buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling , mozilla::MarkerTiming::Interval(start, then), MarkerTypeTestMinimal {}, std::string("Interval(start, then)"))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::Interval(start, then), MarkerTypeTestMinimal{}, std::string(\"Interval(start, then)\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4708 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::Interval(start, then), MarkerTypeTestMinimal{}, std::string(\"Interval(start, then)\"))" ")"); do { MOZ_CrashSequence(__null, 4708); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4707 | mozilla::MarkerTiming::Interval(start, then), MarkerTypeTestMinimal{},do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerTiming::Interval(start, then), MarkerTypeTestMinimal{}, std::string("Interval(start, then)")))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer ( buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling , mozilla::MarkerTiming::Interval(start, then), MarkerTypeTestMinimal {}, std::string("Interval(start, then)"))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::Interval(start, then), MarkerTypeTestMinimal{}, std::string(\"Interval(start, then)\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4708 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::Interval(start, then), MarkerTypeTestMinimal{}, std::string(\"Interval(start, then)\"))" ")"); do { MOZ_CrashSequence(__null, 4708); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4708 | std::string("Interval(start, then)")))do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerTiming::Interval(start, then), MarkerTypeTestMinimal{}, std::string("Interval(start, then)")))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer ( buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling , mozilla::MarkerTiming::Interval(start, then), MarkerTypeTestMinimal {}, std::string("Interval(start, then)"))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::Interval(start, then), MarkerTypeTestMinimal{}, std::string(\"Interval(start, then)\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4708 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::Interval(start, then), MarkerTypeTestMinimal{}, std::string(\"Interval(start, then)\"))" ")"); do { MOZ_CrashSequence(__null, 4708); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4709 | ||||
| 4710 | MOZ_RELEASE_ASSERT(mozilla::baseprofiler::AddMarkerToBuffer(do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerTiming::IntervalUntilNowFrom(start), MarkerTypeTestMinimal {}, std::string("IntervalUntilNowFrom(start)")))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming ::IntervalUntilNowFrom(start), MarkerTypeTestMinimal{}, std:: string("IntervalUntilNowFrom(start)"))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::IntervalUntilNowFrom(start), MarkerTypeTestMinimal{}, std::string(\"IntervalUntilNowFrom(start)\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4713 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::IntervalUntilNowFrom(start), MarkerTypeTestMinimal{}, std::string(\"IntervalUntilNowFrom(start)\"))" ")"); do { MOZ_CrashSequence(__null, 4713); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4711 | buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling,do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerTiming::IntervalUntilNowFrom(start), MarkerTypeTestMinimal {}, std::string("IntervalUntilNowFrom(start)")))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming ::IntervalUntilNowFrom(start), MarkerTypeTestMinimal{}, std:: string("IntervalUntilNowFrom(start)"))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::IntervalUntilNowFrom(start), MarkerTypeTestMinimal{}, std::string(\"IntervalUntilNowFrom(start)\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4713 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::IntervalUntilNowFrom(start), MarkerTypeTestMinimal{}, std::string(\"IntervalUntilNowFrom(start)\"))" ")"); do { MOZ_CrashSequence(__null, 4713); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4712 | mozilla::MarkerTiming::IntervalUntilNowFrom(start),do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerTiming::IntervalUntilNowFrom(start), MarkerTypeTestMinimal {}, std::string("IntervalUntilNowFrom(start)")))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming ::IntervalUntilNowFrom(start), MarkerTypeTestMinimal{}, std:: string("IntervalUntilNowFrom(start)"))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::IntervalUntilNowFrom(start), MarkerTypeTestMinimal{}, std::string(\"IntervalUntilNowFrom(start)\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4713 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::IntervalUntilNowFrom(start), MarkerTypeTestMinimal{}, std::string(\"IntervalUntilNowFrom(start)\"))" ")"); do { MOZ_CrashSequence(__null, 4713); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4713 | MarkerTypeTestMinimal{}, std::string("IntervalUntilNowFrom(start)")))do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerTiming::IntervalUntilNowFrom(start), MarkerTypeTestMinimal {}, std::string("IntervalUntilNowFrom(start)")))>::isValid , "invalid assertion condition"); if ((__builtin_expect(!!(!( !!(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming ::IntervalUntilNowFrom(start), MarkerTypeTestMinimal{}, std:: string("IntervalUntilNowFrom(start)"))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::IntervalUntilNowFrom(start), MarkerTypeTestMinimal{}, std::string(\"IntervalUntilNowFrom(start)\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4713 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerTiming::IntervalUntilNowFrom(start), MarkerTypeTestMinimal{}, std::string(\"IntervalUntilNowFrom(start)\"))" ")"); do { MOZ_CrashSequence(__null, 4713); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4714 | ||||
| 4715 | MOZ_RELEASE_ASSERT(mozilla::baseprofiler::AddMarkerToBuffer(do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerStack::NoStack(), MarkerTypeTestMinimal{}, std::string( "NoStack")))>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer ( buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling , mozilla::MarkerStack::NoStack(), MarkerTypeTestMinimal{}, std ::string("NoStack"))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerStack::NoStack(), MarkerTypeTestMinimal{}, std::string(\"NoStack\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4718 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerStack::NoStack(), MarkerTypeTestMinimal{}, std::string(\"NoStack\"))" ")"); do { MOZ_CrashSequence(__null, 4718); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4716 | buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling,do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerStack::NoStack(), MarkerTypeTestMinimal{}, std::string( "NoStack")))>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer ( buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling , mozilla::MarkerStack::NoStack(), MarkerTypeTestMinimal{}, std ::string("NoStack"))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerStack::NoStack(), MarkerTypeTestMinimal{}, std::string(\"NoStack\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4718 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerStack::NoStack(), MarkerTypeTestMinimal{}, std::string(\"NoStack\"))" ")"); do { MOZ_CrashSequence(__null, 4718); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4717 | mozilla::MarkerStack::NoStack(), MarkerTypeTestMinimal{},do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerStack::NoStack(), MarkerTypeTestMinimal{}, std::string( "NoStack")))>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer ( buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling , mozilla::MarkerStack::NoStack(), MarkerTypeTestMinimal{}, std ::string("NoStack"))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerStack::NoStack(), MarkerTypeTestMinimal{}, std::string(\"NoStack\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4718 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerStack::NoStack(), MarkerTypeTestMinimal{}, std::string(\"NoStack\"))" ")"); do { MOZ_CrashSequence(__null, 4718); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4718 | std::string("NoStack")))do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerStack::NoStack(), MarkerTypeTestMinimal{}, std::string( "NoStack")))>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer ( buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling , mozilla::MarkerStack::NoStack(), MarkerTypeTestMinimal{}, std ::string("NoStack"))))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerStack::NoStack(), MarkerTypeTestMinimal{}, std::string(\"NoStack\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4718 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerStack::NoStack(), MarkerTypeTestMinimal{}, std::string(\"NoStack\"))" ")"); do { MOZ_CrashSequence(__null, 4718); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4719 | // Note: We cannot test stack-capture here, because the profiler is not | |||
| 4720 | // initialized. | |||
| 4721 | ||||
| 4722 | MOZ_RELEASE_ASSERT(mozilla::baseprofiler::AddMarkerToBuffer(do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerInnerWindowId(123), MarkerTypeTestMinimal{}, std::string ("InnerWindowId(123)")))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer ( buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling , mozilla::MarkerInnerWindowId(123), MarkerTypeTestMinimal{}, std::string("InnerWindowId(123)"))))), 0))) { do { } while ( false); MOZ_ReportAssertionFailure("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerInnerWindowId(123), MarkerTypeTestMinimal{}, std::string(\"InnerWindowId(123)\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4725 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerInnerWindowId(123), MarkerTypeTestMinimal{}, std::string(\"InnerWindowId(123)\"))" ")"); do { MOZ_CrashSequence(__null, 4725); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4723 | buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling,do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerInnerWindowId(123), MarkerTypeTestMinimal{}, std::string ("InnerWindowId(123)")))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer ( buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling , mozilla::MarkerInnerWindowId(123), MarkerTypeTestMinimal{}, std::string("InnerWindowId(123)"))))), 0))) { do { } while ( false); MOZ_ReportAssertionFailure("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerInnerWindowId(123), MarkerTypeTestMinimal{}, std::string(\"InnerWindowId(123)\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4725 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerInnerWindowId(123), MarkerTypeTestMinimal{}, std::string(\"InnerWindowId(123)\"))" ")"); do { MOZ_CrashSequence(__null, 4725); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4724 | mozilla::MarkerInnerWindowId(123), MarkerTypeTestMinimal{},do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerInnerWindowId(123), MarkerTypeTestMinimal{}, std::string ("InnerWindowId(123)")))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer ( buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling , mozilla::MarkerInnerWindowId(123), MarkerTypeTestMinimal{}, std::string("InnerWindowId(123)"))))), 0))) { do { } while ( false); MOZ_ReportAssertionFailure("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerInnerWindowId(123), MarkerTypeTestMinimal{}, std::string(\"InnerWindowId(123)\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4725 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerInnerWindowId(123), MarkerTypeTestMinimal{}, std::string(\"InnerWindowId(123)\"))" ")"); do { MOZ_CrashSequence(__null, 4725); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4725 | std::string("InnerWindowId(123)")))do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, "test2" , mozilla::baseprofiler::category::OTHER_Profiling, mozilla:: MarkerInnerWindowId(123), MarkerTypeTestMinimal{}, std::string ("InnerWindowId(123)")))>::isValid, "invalid assertion condition" ); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer ( buffer, "test2", mozilla::baseprofiler::category::OTHER_Profiling , mozilla::MarkerInnerWindowId(123), MarkerTypeTestMinimal{}, std::string("InnerWindowId(123)"))))), 0))) { do { } while ( false); MOZ_ReportAssertionFailure("mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerInnerWindowId(123), MarkerTypeTestMinimal{}, std::string(\"InnerWindowId(123)\"))" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4725 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, \"test2\", mozilla::baseprofiler::category::OTHER_Profiling, mozilla::MarkerInnerWindowId(123), MarkerTypeTestMinimal{}, std::string(\"InnerWindowId(123)\"))" ")"); do { MOZ_CrashSequence(__null, 4725); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4726 | ||||
| 4727 | #ifdef DEBUG1 | |||
| 4728 | buffer.Dump(); | |||
| 4729 | #endif | |||
| 4730 | ||||
| 4731 | PrintMarkers(buffer); | |||
| 4732 | ||||
| 4733 | printf("TestUserMarker done\n"); | |||
| 4734 | } | |||
| 4735 | ||||
| 4736 | void TestPredefinedMarkers() { | |||
| 4737 | printf("TestPredefinedMarkers...\n"); | |||
| 4738 | ||||
| 4739 | mozilla::ProfileBufferChunkManagerSingle chunkManager(1024); | |||
| 4740 | mozilla::ProfileChunkedBuffer buffer( | |||
| 4741 | mozilla::ProfileChunkedBuffer::ThreadSafety::WithoutMutex, chunkManager); | |||
| 4742 | ||||
| 4743 | MOZ_RELEASE_ASSERT(mozilla::baseprofiler::AddMarkerToBuffer(do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, std ::string_view("stackmarker"), mozilla::baseprofiler::category ::OTHER, {}, mozilla::baseprofiler::markers::StackMarker{}))> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer( buffer, std ::string_view("stackmarker"), mozilla::baseprofiler::category ::OTHER, {}, mozilla::baseprofiler::markers::StackMarker{}))) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("mozilla::baseprofiler::AddMarkerToBuffer( buffer, std::string_view(\"stackmarker\"), mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::StackMarker{})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4746 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, std::string_view(\"stackmarker\"), mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::StackMarker{})" ")"); do { MOZ_CrashSequence(__null, 4746); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4744 | buffer, std::string_view("stackmarker"),do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, std ::string_view("stackmarker"), mozilla::baseprofiler::category ::OTHER, {}, mozilla::baseprofiler::markers::StackMarker{}))> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer( buffer, std ::string_view("stackmarker"), mozilla::baseprofiler::category ::OTHER, {}, mozilla::baseprofiler::markers::StackMarker{}))) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("mozilla::baseprofiler::AddMarkerToBuffer( buffer, std::string_view(\"stackmarker\"), mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::StackMarker{})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4746 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, std::string_view(\"stackmarker\"), mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::StackMarker{})" ")"); do { MOZ_CrashSequence(__null, 4746); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4745 | mozilla::baseprofiler::category::OTHER, {},do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, std ::string_view("stackmarker"), mozilla::baseprofiler::category ::OTHER, {}, mozilla::baseprofiler::markers::StackMarker{}))> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer( buffer, std ::string_view("stackmarker"), mozilla::baseprofiler::category ::OTHER, {}, mozilla::baseprofiler::markers::StackMarker{}))) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("mozilla::baseprofiler::AddMarkerToBuffer( buffer, std::string_view(\"stackmarker\"), mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::StackMarker{})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4746 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, std::string_view(\"stackmarker\"), mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::StackMarker{})" ")"); do { MOZ_CrashSequence(__null, 4746); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4746 | mozilla::baseprofiler::markers::StackMarker{}))do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, std ::string_view("stackmarker"), mozilla::baseprofiler::category ::OTHER, {}, mozilla::baseprofiler::markers::StackMarker{}))> ::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer( buffer, std ::string_view("stackmarker"), mozilla::baseprofiler::category ::OTHER, {}, mozilla::baseprofiler::markers::StackMarker{}))) ), 0))) { do { } while (false); MOZ_ReportAssertionFailure("mozilla::baseprofiler::AddMarkerToBuffer( buffer, std::string_view(\"stackmarker\"), mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::StackMarker{})" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4746 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, std::string_view(\"stackmarker\"), mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::StackMarker{})" ")"); do { MOZ_CrashSequence(__null, 4746); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4747 | ||||
| 4748 | MOZ_RELEASE_ASSERT(mozilla::baseprofiler::AddMarkerToBuffer(do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, std ::string_view("text"), mozilla::baseprofiler::category::OTHER , {}, mozilla::baseprofiler::markers::TextMarker{}, "text text" ))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer( buffer, std ::string_view("text"), mozilla::baseprofiler::category::OTHER , {}, mozilla::baseprofiler::markers::TextMarker{}, "text text" )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("mozilla::baseprofiler::AddMarkerToBuffer( buffer, std::string_view(\"text\"), mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::TextMarker{}, \"text text\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4750 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, std::string_view(\"text\"), mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::TextMarker{}, \"text text\")" ")"); do { MOZ_CrashSequence(__null, 4750); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4749 | buffer, std::string_view("text"), mozilla::baseprofiler::category::OTHER,do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, std ::string_view("text"), mozilla::baseprofiler::category::OTHER , {}, mozilla::baseprofiler::markers::TextMarker{}, "text text" ))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer( buffer, std ::string_view("text"), mozilla::baseprofiler::category::OTHER , {}, mozilla::baseprofiler::markers::TextMarker{}, "text text" )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("mozilla::baseprofiler::AddMarkerToBuffer( buffer, std::string_view(\"text\"), mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::TextMarker{}, \"text text\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4750 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, std::string_view(\"text\"), mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::TextMarker{}, \"text text\")" ")"); do { MOZ_CrashSequence(__null, 4750); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4750 | {}, mozilla::baseprofiler::markers::TextMarker{}, "text text"))do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, std ::string_view("text"), mozilla::baseprofiler::category::OTHER , {}, mozilla::baseprofiler::markers::TextMarker{}, "text text" ))>::isValid, "invalid assertion condition"); if ((__builtin_expect (!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer( buffer, std ::string_view("text"), mozilla::baseprofiler::category::OTHER , {}, mozilla::baseprofiler::markers::TextMarker{}, "text text" )))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("mozilla::baseprofiler::AddMarkerToBuffer( buffer, std::string_view(\"text\"), mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::TextMarker{}, \"text text\")" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4750 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, std::string_view(\"text\"), mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::TextMarker{}, \"text text\")" ")"); do { MOZ_CrashSequence(__null, 4750); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4751 | ||||
| 4752 | MOZ_RELEASE_ASSERT(mozilla::baseprofiler::AddMarkerToBuffer(do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, std ::string_view("media"), mozilla::baseprofiler::category::OTHER , {}, mozilla::baseprofiler::markers::MediaSampleMarker{}, 123 , 456, 789))>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer ( buffer, std::string_view("media"), mozilla::baseprofiler::category ::OTHER, {}, mozilla::baseprofiler::markers::MediaSampleMarker {}, 123, 456, 789)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("mozilla::baseprofiler::AddMarkerToBuffer( buffer, std::string_view(\"media\"), mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::MediaSampleMarker{}, 123, 456, 789)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4754 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, std::string_view(\"media\"), mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::MediaSampleMarker{}, 123, 456, 789)" ")"); do { MOZ_CrashSequence(__null, 4754); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4753 | buffer, std::string_view("media"), mozilla::baseprofiler::category::OTHER,do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, std ::string_view("media"), mozilla::baseprofiler::category::OTHER , {}, mozilla::baseprofiler::markers::MediaSampleMarker{}, 123 , 456, 789))>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer ( buffer, std::string_view("media"), mozilla::baseprofiler::category ::OTHER, {}, mozilla::baseprofiler::markers::MediaSampleMarker {}, 123, 456, 789)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("mozilla::baseprofiler::AddMarkerToBuffer( buffer, std::string_view(\"media\"), mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::MediaSampleMarker{}, 123, 456, 789)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4754 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, std::string_view(\"media\"), mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::MediaSampleMarker{}, 123, 456, 789)" ")"); do { MOZ_CrashSequence(__null, 4754); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4754 | {}, mozilla::baseprofiler::markers::MediaSampleMarker{}, 123, 456, 789))do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, std ::string_view("media"), mozilla::baseprofiler::category::OTHER , {}, mozilla::baseprofiler::markers::MediaSampleMarker{}, 123 , 456, 789))>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer ( buffer, std::string_view("media"), mozilla::baseprofiler::category ::OTHER, {}, mozilla::baseprofiler::markers::MediaSampleMarker {}, 123, 456, 789)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("mozilla::baseprofiler::AddMarkerToBuffer( buffer, std::string_view(\"media\"), mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::MediaSampleMarker{}, 123, 456, 789)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4754 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, std::string_view(\"media\"), mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::MediaSampleMarker{}, 123, 456, 789)" ")"); do { MOZ_CrashSequence(__null, 4754); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4755 | ||||
| 4756 | MOZ_RELEASE_ASSERT(mozilla::baseprofiler::AddMarkerToBuffer(do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, std ::string_view("media"), mozilla::baseprofiler::category::OTHER , {}, mozilla::baseprofiler::markers::VideoFallingBehindMarker {}, 123, 456))>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer ( buffer, std::string_view("media"), mozilla::baseprofiler::category ::OTHER, {}, mozilla::baseprofiler::markers::VideoFallingBehindMarker {}, 123, 456)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("mozilla::baseprofiler::AddMarkerToBuffer( buffer, std::string_view(\"media\"), mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::VideoFallingBehindMarker{}, 123, 456)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4759 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, std::string_view(\"media\"), mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::VideoFallingBehindMarker{}, 123, 456)" ")"); do { MOZ_CrashSequence(__null, 4759); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4757 | buffer, std::string_view("media"), mozilla::baseprofiler::category::OTHER,do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, std ::string_view("media"), mozilla::baseprofiler::category::OTHER , {}, mozilla::baseprofiler::markers::VideoFallingBehindMarker {}, 123, 456))>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer ( buffer, std::string_view("media"), mozilla::baseprofiler::category ::OTHER, {}, mozilla::baseprofiler::markers::VideoFallingBehindMarker {}, 123, 456)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("mozilla::baseprofiler::AddMarkerToBuffer( buffer, std::string_view(\"media\"), mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::VideoFallingBehindMarker{}, 123, 456)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4759 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, std::string_view(\"media\"), mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::VideoFallingBehindMarker{}, 123, 456)" ")"); do { MOZ_CrashSequence(__null, 4759); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4758 | {}, mozilla::baseprofiler::markers::VideoFallingBehindMarker{}, 123,do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, std ::string_view("media"), mozilla::baseprofiler::category::OTHER , {}, mozilla::baseprofiler::markers::VideoFallingBehindMarker {}, 123, 456))>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer ( buffer, std::string_view("media"), mozilla::baseprofiler::category ::OTHER, {}, mozilla::baseprofiler::markers::VideoFallingBehindMarker {}, 123, 456)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("mozilla::baseprofiler::AddMarkerToBuffer( buffer, std::string_view(\"media\"), mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::VideoFallingBehindMarker{}, 123, 456)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4759 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, std::string_view(\"media\"), mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::VideoFallingBehindMarker{}, 123, 456)" ")"); do { MOZ_CrashSequence(__null, 4759); __attribute__((nomerge )) ::abort(); } while (false); } } while (false) | |||
| 4759 | 456))do { static_assert( mozilla::detail::AssertionConditionType< decltype(mozilla::baseprofiler::AddMarkerToBuffer( buffer, std ::string_view("media"), mozilla::baseprofiler::category::OTHER , {}, mozilla::baseprofiler::markers::VideoFallingBehindMarker {}, 123, 456))>::isValid, "invalid assertion condition"); if ((__builtin_expect(!!(!(!!(mozilla::baseprofiler::AddMarkerToBuffer ( buffer, std::string_view("media"), mozilla::baseprofiler::category ::OTHER, {}, mozilla::baseprofiler::markers::VideoFallingBehindMarker {}, 123, 456)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure ("mozilla::baseprofiler::AddMarkerToBuffer( buffer, std::string_view(\"media\"), mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::VideoFallingBehindMarker{}, 123, 456)" , "/root/firefox-clang/mozglue/tests/TestBaseProfiler.cpp", 4759 ); AnnotateMozCrashReason("MOZ_RELEASE_ASSERT" "(" "mozilla::baseprofiler::AddMarkerToBuffer( buffer, std::string_view(\"media\"), mozilla::baseprofiler::category::OTHER, {}, mozilla::baseprofiler::markers::VideoFallingBehindMarker{}, 123, 456)" ")"); do { MOZ_CrashSequence(__null, 4759); __attribute__((nomerge )) ::abort(); } while (false); } } while (false); | |||
| 4760 | ||||
| 4761 | #ifdef DEBUG1 | |||
| 4762 | buffer.Dump(); | |||
| 4763 | #endif | |||
| 4764 | ||||
| 4765 | PrintMarkers(buffer); | |||
| 4766 | ||||
| 4767 | printf("TestPredefinedMarkers done\n"); | |||
| 4768 | } | |||
| 4769 | ||||
| 4770 | void TestProfilerMarkers() { | |||
| 4771 | printf( | |||
| 4772 | "TestProfilerMarkers -- pid: %" PRIu64"l" "u" ", tid: %" PRIu64"l" "u" "\n", | |||
| 4773 | uint64_t(mozilla::baseprofiler::profiler_current_process_id().ToNumber()), | |||
| 4774 | uint64_t(mozilla::baseprofiler::profiler_current_thread_id().ToNumber())); | |||
| 4775 | // ::SleepMilli(10000); | |||
| 4776 | ||||
| 4777 | TestUniqueJSONStrings(); | |||
| 4778 | TestMarkerCategory(); | |||
| 4779 | TestMarkerThreadId(); | |||
| 4780 | TestMarkerNoPayload(); | |||
| 4781 | TestUserMarker(); | |||
| 4782 | TestPredefinedMarkers(); | |||
| 4783 | ||||
| 4784 | printf("TestProfilerMarkers done\n"); | |||
| 4785 | } | |||
| 4786 | ||||
| 4787 | #if defined(XP_WIN) | |||
| 4788 | int wmain() | |||
| 4789 | #else | |||
| 4790 | int main() | |||
| 4791 | #endif // defined(XP_WIN) | |||
| 4792 | { | |||
| 4793 | printf("BaseTestProfiler -- pid: %" PRIu64"l" "u" ", tid: %" PRIu64"l" "u" "\n", | |||
| 4794 | uint64_t(baseprofiler::profiler_current_process_id().ToNumber()), | |||
| 4795 | uint64_t(baseprofiler::profiler_current_thread_id().ToNumber())); | |||
| 4796 | // ::SleepMilli(10000); | |||
| 4797 | ||||
| 4798 | TestFailureLatch(); | |||
| 4799 | TestProfilerUtils(); | |||
| 4800 | TestBaseAndProfilerDetail(); | |||
| 4801 | TestSharedMutex(); | |||
| 4802 | TestProportionValue(); | |||
| 4803 | TestProgressLogger(); | |||
| 4804 | ||||
| 4805 | { | |||
| 4806 | printf("profiler_init()...\n"); | |||
| 4807 | AUTO_BASE_PROFILER_INIT::mozilla::baseprofiler::AutoProfilerInit raiiObject4807; | |||
| 4808 | ||||
| 4809 | TestProfiler(); | |||
| 4810 | TestProfilerMarkers(); | |||
| 4811 | } | |||
| 4812 | ||||
| 4813 | return 0; | |||
| 4814 | } |