Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/js/src/jit-test/tests/profiler/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 1 kB image not shown  

Quelle  bug2002982.js

  Sprache: JAVA
 

// Test that script sources are properly registered on consecutive profiler runs.
// Bug 2002982: When the profiler is disabled and re-enabled, script sources
// need to be re-registered because the profiler's ScriptSources hashset is
// cleared on stop. Previously, ensureProfileString would return early if
// profileString_ was already set. And that was causing us to never re-insert
// the script source.

// Set a low warmup threshold to trigger baseline compilation.
setJitCompilerOption("baseline.warmup.trigger"5);

// A simple function that will be JIT'ed.
function compute(x) {
  return x * x;
}

enableGeckoProfiling();

// Warm up with the profiler enabled. It creates JitScripts and registers
// their sources.
for (let i = 0; i < 10; i++) {
  compute(i);
}

// Get how many sources are registered so far.
const countBefore = getGeckoProfilingScriptSourcesCount();
assertEq(countBefore > 0true,
  "Expected to have at least one registered script source");

disableGeckoProfiling();
enableGeckoProfiling();

// Run the same code
for (let i = 0; i < 10; i++) {
  compute(i);
}

// Get how many sources are registered so far again, and compare the before and
// after values. The numbers have to be the same.
const countAfter = getGeckoProfilingScriptSourcesCount();
assertEq(countAfter, countBefore,
  `Expected the same amount of script sources to be registered. Before: ${countBefore}, After: ${countAfter}`);

disableGeckoProfiling();

Messung V0.5 in Prozent
C=82 H=93 G=87

¤ Dauer der Verarbeitung: 0.17 Sekunden  (vorverarbeitet am  2026-08-26) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

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.