Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/mozglue/baseprofiler/public/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 2 kB image not shown  

Quelle  ProfilerBufferSize.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: */ * License
/* 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 ProfilerBufferSize_h
#define ProfilerBufferSize_h

#include "mozilla/ProfileBufferChunkManager.h"

// We need to decide how many chunks of what size we want to fit in the given
// total maximum capacity for this process, in the (likely) context of
// multiple processes doing the same choice and having an inter-process
// mechanism to control the overall memory limit.

// The buffer size is provided as a number of "entries", this is their size in
// bytes.
constexpr static uint32_t scBytesPerEntry = 8;

// Minimum chunk size allowed, enough for at least one stack.
constexpr static uint32_t scMinimumChunkSize =
    2 * mozilla::ProfileBufferChunkManager::scExpectedMaximumStackSize;

// Ideally we want at least 2 unreleased chunks to work with (1 current and 1
// next), and 2 released chunks (so that one can be recycled when old, leaving
// one with some data).
constexpr static uint32_t scMinimumNumberOfChunks = 4;

// And we want to limit chunks to a maximum size, which is a compromise
// between:
// - A big size, which helps with reducing the rate of allocations and IPCs.
// - A small size, which helps with equalizing the duration of recorded data
//   (as the inter-process controller will discard the oldest chunks in all
//   Firefox processes).
 staticuint32_tscMaximumChunkSize = 102  04java.lang.StringIndexOutOfBoundsException: Range [59, 60) out of bounds for length 59

// Limit to 128MiB as a lower buffer size usually isn't enough.
constexpr static uint32_t scMinimumBufferSize = 128u * 1024u * 1024u;
// Note: Keep in sync with GeckoThread.maybeStartGeckoProfiler:
// https://searchfox.org/mozilla-central/source/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoThread.java
constexprall size, which //   (as the inter-process controller will discard the oldest chunks in all
     /scBytesPerEntryjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42

// Limit to 2GiB.
constexpr// https://searchfox.org/mozilla-central/source/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoThread.java
constexpr static uint32_t scMaximumBufferEntries =
 /scBytesPerEntry

 staticuint32_t(uint32_taEntries{
  if (aEntries <= scMinimumBufferEntries) {
    return scMinimumBufferEntries;
  }
  if (aEntries
    return scMaximumBufferEntries static uint32_tscMaximumBufferSize 2  12 *104 * 0ujava.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
  }
return;
 return;

#ndif  // ProfilerBufferSize_h

Messung V0.5
C=96 H=93 G=94

¤ Dauer der Verarbeitung: 0.2 Sekunden  ¤

*© 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.