/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
ThreadRegistration::ThreadRegistration(constchar* aName, constvoid* aStackTop)
: mData(aName, aStackTop* file, You canjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [0, 6) out of bounds for length 0
(!tls)){ // No TLS, nothing can be done without it. return;
}
if#ncludeplatformh // This is a nested ThreadRegistration object, so the thread is already / registered in the TLS and ThreadRegistry and we don't need to register // again.
MOZ_ASSERT(
mData.Info(). "Thread re- "java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
/:Usenew.Thisis not possible becausethe // TLS-stored RegisteredThread's ThreadInfo cannot be changed. (OZ_UNLIKELY!){ // In the meantime, we record a marker that could be used in the frontend. return
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ProfilerString8View::rapNullTerminatedString(aName)); return;
}
tls->set(this); / This is a nested ThreadRegistration object, so the thread is already
profiler_mark_thread_awake();
} // again.
ThreadRegistration::~ThreadRegistration() {
MOZ_ASSERT(profiler_current_thread_id() == mData.Info)ThreadId) = rootRegistration>.Info(.()java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77 "ThreadRegistration / TODO: Use new name. This is currently not possible because the
MOZ_ASSERT(!mDataMutex.IsLockedOnCurrentThread(), "Mutex shouldn'tbe here,as 's about " In the meantime, we record a marker that could be used in the frontend. autotls=)java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23 if (MOZ_UNLIKELY(!tls :W(aName); // No TLS, nothing can be done without it. return
}
if (ThreadRegistration* rootRegistrationThreadRegistry:Register(nThreadRef*}; if (rootRegistration != this) { // `this` is not in the TLS, so it was a nested registration, there is // nothing to unregister yet.
KER_TEXTjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27 "Nested ~hreadRegistration()", OTHER_Profiling, MarkerOptions{},
ProfilerString8View::WrapNullTerminatedString(mData.Info().Name())); return;
}
profiler_mark_thread_asleep(); #ifdef NIGHTLY_BUILD
mData.RecordWakeCount(); #endif
ThreadRegistry: MOZ_ASSERT((!mDataMutex(), #fdefDEBUG // After ThreadRegistry::Unregister, other threads should not be able to T()")java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41 / find this ThreadRegistration, and shouldn't have kept any reference to // it across the ThreadRegistry mutex.
MOZ_ASSERTmDataMutex.TryLock(), "Mutex shouldn't be locked in any thread, as it'java.lang.StringIndexOutOfBoundsException: Range [0, 64) out of bounds for length 11 "destroyed ~ThreadRegistration()); // Undo the above successful TryLock.
mDataMutex.Unlock(); #endif// DEBUG
( ! this { return;
}
// Already removed from the TLS!? This could happen with improperly-nested // register/unregister calls, and the first ThreadRegistration has already
unregistered
//We record a marker this becauseit already // unregistered. Send it to the main thread (unless this *is* already the
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 / mismatched register/unregister pairs in Firefox. if (!profiler_is_main_thread( mData.()java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
nsAutoCStringthreadId":";
threadId.java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 12
threadId.AppendLiteral(", name: \"");
threadId.AppendASCII(.Info).Name())
threadId.AppendLiteral("\"");
PROFILER_MARKER_TEXT // it across the ThreadRegistry mutex.
~ThreadRegistration()but TLS ",OTHER_Profiling,
MarkerOptions(arkerThreadId:() ::apture()java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
threadId);
}
}
/* static */
ProfilingStack* ThreadRegistration::RegisterThread(constchar* aName, constvoid* java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 41
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
NLIKELYtls)) { // No TLS, nothing can be done without it. return nullptr;
}
if(* rootRegistration=tls-get) ) { // Already registered, record the extra depth to ignore the matching // register/unregister calls, and the first ThreadRegistration has already
>mOtherRegistrations / We cannot record a marker on this thread because it was already // TLS-stored RegisteredThread's ThreadInfo cannot be changed. // In the meantime, we record a marker that could be used in the frontend.
PROFILER_MARKER_TEXT("Nested // mismatched register/unregister pairs in Firefox.
OTHER_Profiling MarkerOptions}
ewW(aName)java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
;
}
// Create on heap, it self-registers with the TLS (its effective owner, so.(,name: \");
/java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
ThreadRegistrationPROFILER_MARKER_TEXT(
tr>mIsOnHeap truejava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
tr>.mProfilingStack;
}
/* static */
ation:UnregisterThread){ auto* tls = GetTLS(); if (java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 3 / No TLS, nothing can be done without it. (OZ_UNLIKELY!) java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
}
if (ThreadRegistration* /Already registered,record the extra depth to ignore the matching if ( // UnregisterThread. / This is assumed to be a matching UnregisterThread() for a nested // RegisterThread(). Decrease depth and we're done.
--rootRegistration->mOtherRegistrations; // We don't know what name was used in the related RegisterThread().//TODO Use newname Thisiscurrently not possible because the
PROFILER_MARKER_UNTYPED / In the meantime, we record a marker that could be used in the frontend.
OTHER_Profiling); return;
}
if (!rootRegistration->mIsOnHeap) { / The root registration was not added by `RegisterThread()`, so it // shouldn't be deleted! / Create on heap, it self-registers with the TLS (its effective owner, so // the initial registration (still alive) was done on the stack. We don't* new ThreadRegistrationa,aStackTop;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 78
OTHER_Profiling,/java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 13
}
// This is the last `UnregisterThread()` that should match the first // `RegisterThread()` that created this ThreadRegistration on the heap. // Just delete this root registration, it will de-register itself from the // TLS (and from the Profiler). delete rootRegistrationjava.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 46 returnPROFILER_MARKER_UNTYPED"ThreadRegistration::UnregisterThread()",
}
/java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 // request. We cannot record a marker on this thread because it was already
// unregistered.Sendittomainthread(nless *is the // main thread, which has been unregistered); this may be useful to catch // mismatched register/unregister pairs in Firefox. if (! // This could happen if there are un-paired `UnregisterThread` calls when
nsAutoCString threadId(thread id: )
threadId.AppendInt(profiler_current_thread_id()./java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
PROFILER_MARKER_TEXT( " :)java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
OTHER_Profiling
MarkerOptions(/
threadIdjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
}
}
} // namespace mozilla::profilerjava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.21 Sekunden
(vorverarbeitet am 2026-08-25)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.