Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  ProfileBufferEntryKinds.h   Sprache: C

 
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */


#ifndef ProfileBufferEntryKinds_h
#define ProfileBufferEntryKinds_h

#include "mozilla/BaseProfilerUtils.h"

#include <cstdint>

namespace mozilla {

// This is equal to sizeof(double), which is the largest non-char variant in
// |u|.
static constexpr size_t ProfileBufferEntryNumChars = 8;

// NOTE!  If you add entries, you need to verify if they need to be added to the
// switch statement in DuplicateLastSample!
// This will evaluate the MACRO with (KIND, TYPE, SIZE)
#define FOR_EACH_PROFILE_BUFFER_ENTRY_KIND(MACRO)                 \
  MACRO(CategoryPair, intsizeof(int))                           \
  MACRO(CollectionStart, doublesizeof(double))                  \
  MACRO(CollectionEnd, doublesizeof(double))                    \
  MACRO(Label, const char*, sizeof(const char*))                  \
  MACRO(FrameFlags, uint64_t, sizeof(uint64_t))                   \
  MACRO(DynamicStringFragment, char*, ProfileBufferEntryNumChars) \
  MACRO(JitReturnAddr, void*, sizeof(void*))                      \
  MACRO(InnerWindowID, uint64_t, sizeof(uint64_t))                \
  MACRO(LineNumber, intsizeof(int))                             \
  MACRO(ColumnNumber, intsizeof(int))                           \
  MACRO(NativeLeafAddr, void*, sizeof(void*))                     \
  MACRO(Pause, doublesizeof(double))                            \
  MACRO(Resume, doublesizeof(double))                           \
  MACRO(PauseSampling, doublesizeof(double))                    \
  MACRO(ResumeSampling, doublesizeof(double))                   \
  MACRO(Responsiveness, doublesizeof(double))                   \
  MACRO(ThreadId, ::mozilla::baseprofiler::BaseProfilerThreadId,  \
        sizeof(::mozilla::baseprofiler::BaseProfilerThreadId))    \
  MACRO(Time, doublesizeof(double))                             \
  MACRO(TimeBeforeCompactStack, doublesizeof(double))           \
  MACRO(TimeBeforeSameSample, doublesizeof(double))             \
  MACRO(CounterId, void*, sizeof(void*))                          \
  MACRO(Number, uint64_t, sizeof(uint64_t))                       \
  MACRO(Count, int64_t, sizeof(int64_t))                          \
  MACRO(ProfilerOverheadTime, doublesizeof(double))             \
  MACRO(ProfilerOverheadDuration, doublesizeof(double))

// The `Kind` is a single byte identifying the type of data that is actually
// stored in a `ProfileBufferEntry`, as per the list in
// `FOR_EACH_PROFILE_BUFFER_ENTRY_KIND`.
//
// This byte is also used to identify entries in ProfileChunkedBuffer blocks,
// for both "legacy" entries that do contain a `ProfileBufferEntry`, and for
// new types of entries that may carry more data of different types.
// TODO: Eventually each type of "legacy" entry should be replaced with newer,
// more efficient kinds of entries (e.g., stack frames could be stored in one
// bigger entry, instead of multiple `ProfileBufferEntry`s); then we could
// discard `ProfileBufferEntry` and move this enum to a more appropriate spot.
enum class ProfileBufferEntryKind : uint8_t {
  INVALID = 0,
#define KIND(KIND, TYPE, SIZE) KIND,
  FOR_EACH_PROFILE_BUFFER_ENTRY_KIND(KIND)
#undef KIND

  // Any value under `LEGACY_LIMIT` represents a `ProfileBufferEntry`.
  LEGACY_LIMIT,

  // Any value starting here does *not* represent a `ProfileBufferEntry` and
  // requires separate decoding and handling.

  // Markers and their data.
  Marker = LEGACY_LIMIT,

  // Entry with "running times", such as CPU usage measurements.
  // Optional between TimeBeforeX and X.
  RunningTimes,

  // Optional between TimeBeforeX and X.
  UnresponsiveDurationMs,

  // Collection of legacy stack entries, must follow a ThreadId and
  // TimeBeforeCompactStack (which are not included in the CompactStack;
  // TimeBeforeCompactStack is equivalent to Time, but indicates that a
  // CompactStack follows shortly afterwards).
  CompactStack,

  // Indicates that this sample is identical to the previous one, must follow a
  // ThreadId and TimeBeforeSameSample.
  SameSample,

  MODERN_LIMIT
};

enum class MarkerPayloadType : uint8_t {
  Cpp,
  Rust,
};

}  // namespace mozilla

#endif  // ProfileBufferEntryKinds_h

Messung V0.5
C=96 H=97 G=96

¤ Dauer der Verarbeitung: 0.12 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge