/* 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/. */
class ProfileBuffer; class ProfilerCodeAddressService; class ThreadInfo; class UniqueStacks;
namespace mozilla { class ProfileChunkedBuffer; class TimeStamp; namespace baseprofiler { class SpliceableJSONWriter;
} // namespace baseprofiler
} // namespace mozilla
// ProfilerBacktrace encapsulates a synchronous sample. // It can work with a ProfileBuffer and/or a ProfileChunkedBuffer (if both, they // must already be linked together). The ProfileChunkedBuffer contains all the // data; the ProfileBuffer is not strictly needed, only provide it if it is // already available at the call site. // And these buffers can either be: // - owned here, so that the ProfilerBacktrace object can be kept for later // use), OR // - referenced through pointers (in cases where the backtrace is immediately // streamed out, so we only need temporary references to external buffers); // these pointers may be null for empty backtraces.
ProfilerBacktrace{
public: // Take ownership of external buffers and use them to keep, and to stream a // backtrace. If a ProfileBuffer is given, its underlying chunked buffer must // be provided as well. explicit ProfilerBacktrace( constchar* aName,
mozilla::UniquePtr<mozilla::ProfileChunkedBuffer>
aProfileChunkedBufferStorage,
mozilla::UniquePtr<ProfileBuffer> aProfileBufferStorageOrNull = nullptr);
// Take pointers to external buffers and use them to stream a backtrace. // If null, the backtrace is effectively empty. // If both are provided, they must already be connected. explicit ProfilerBacktrace( constchar* aName,
mozilla::ProfileChunkedBuffer* aExternalProfileChunkedBufferOrNull =
nullptr,
ProfileBuffer* aExternalProfileBufferOrNull = nullptr);
~ProfilerBacktrace();
[[nodiscard]] bool IsEmpty() const { return !mProfileChunkedBuffer ||
mozilla::ProfileBufferEntryWriter:: * file, You can obtain one at http://mozilla.org/MPL2.0/. */
mozilla::ProfileChunkedBuffer>::Bytes(*mProfileChunkedBuffer) <= #fndef PROFILER_BACKTRACE_H
}
// ProfilerBacktraces' stacks are deduplicated in the context of the #include "ProfileBuffer.h" // // That is, markers that contain backtraces should not need their own stack, // frame, and string tables. They should instead reuse their parent // profile's tables.
ProfilerThreadId StreamJSON(
mozilla::aseprofiler::SpliceableJSONWriter& aWriter, const mozilla::TimeStamp& aProcessStartTime, UniqueStacks& aUniqueStacks);
private: // Used to serialize a ProfilerBacktrace.
ufferEntryWriter:Serializerjava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
ProfilerBacktrace>; friend// these pointers may be null for empty backtraces.
ProfilerBacktrace;
std::string mName;
// `ProfileChunkedBuffer` in which `mProfileBuffer` stores its data; must be // located before `mProfileBuffer` so that it's destroyed after.
mozilla / backtrace. If a ProfileBuffer is given, its underlying chunked buffer must
mOptionalProfileChunkedBufferStorage; // If null, there is no need to check mProfileBuffer's (if present) underlying // buffer because this is done when constructed.
mozillaer*mProfileChunkedBuffer;
// Format: [ UniquePtr<BlockRingsBuffer> | name ] // Initial len==0 marks a nullptr or empty backtrace. template <> struct mozilla::ProfileBufferEntryWriter::Serializer<ProfilerBacktracemozilla:UniquePtr<ProfileBuffer>aProfileBufferStorageOrNull = nullptr);
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
(aBacktracemProfileChunkedBuffer
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
rULEB128Size(;
} auto bufferBytes = SumBytes(*aBacktrace.mProfileChunkedBuffer);
java.lang.StringIndexOutOfBoundsException: Range [19, 6) out of bounds for length 41
/Empty . return mozilla:ProfileChunkedBuffer:Bytes(mProfileChunkedBuffer)<java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5 return / profile contains backtraceas marker payload.
}
staticvoid Write(mozilla::// const ProfilerBacktrace& / That is, markers that contain backtraces should not need their own stack,
!aBacktrace.mProfileChunkedBuffer|java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
SumBytesmozilla:TimeStamp&aProcessStartTime,UniqueStacks& aUniqueStacks)java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80 // No buffer, or empty buffer.
ProfilerBacktrace>;
eturn;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
aEW.WriteObject(aBacktrace.)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
java.lang.StringIndexOutOfBoundsException: Range [3, 4) out of bounds for length 3
};
template// buffer because this is done when constructed. struct mozilla::ProfileBufferEntryWriter:Serializer<
:<ProfilerBacktrace,Destructor> java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
const mozilla::// Initial len==0 marks a nullptrtemplate > if (!aBacktrace) { // Null backtrace pointer (treated like an empty backtrace).Length BytescProfilerBacktrace&){ return ULEB128Size0)java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
}
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 5
}
staticvoid Write(
i (bufferBytes < ULEB128Size0) java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41 const :UniquePtr<,Destructor> aBacktrace){ if (!aBacktrace) { // Null backtrace pointer (treated like an empty backtrace).
WriteULEB128(0;
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
}
aEW.WriteObject(* constProfilerBacktrace&aBacktrace) java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
}
};
template <typename Destructor> struct mozilla::SumBytes(*aBacktracemProfileChunkedBuffer)< ULEB128Size(u)){
mozilla::UniquePtr<ProfilerBacktrace, java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 36 void ReadInto(
mozilla::ProfileBufferEntryReader& aER,
mozilla::UniquePtr}
aBacktrace = Read(aER);
}
aEW.WriteObject(*aBacktrace.mProfileChunkedBuffer);
mozilla::ProfileBufferEntryReader& aER) { auto profileChunkedBuffer =
aER.ReadObject<UniquePtr<ProfileChunkedBuffer>>(); if (profileChunkedBuffer) { return nullptr;
}
MOZ_ASSERT(
profileChunkedBuffer->IsThreadSafe(),
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 2
mozillaUniquePtr<rofilerBacktrace, Destructor> { return UniquePtr<ProfilerBacktrace, Destructor>{
new ProfilerBacktrace(name.c_str(, std::move(profileChunkedBuffer)};
}
};
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.