Module profiler

Source
Expand description

§Overlay profiler

§Profiler UI string syntax

Comma-separated list of of tokens with trailing and leading spaces trimmed. Each tokens can be:

  • A counter name with an optional prefix. The name corresponds to the displayed name (see the counters vector below.
    • By default (no prefix) the counter is shown as average + max over half a second.
    • With a ‘#’ prefix the counter is shown as a graph.
    • With a ‘*’ prefix the counter is shown as a change indicator.
    • Some special counters such as GPU time queries have specific visualizations ignoring prefixes.
  • A preset name to append the preset to the UI (see PROFILER_PRESETS).
  • An empty token to insert a bit of vertical space.
  • A ‘|’ token to start a new column.
  • A ‘_’ token to start a new row.

Macros§

profile_marker 🔒
A helper macro to define profile scopes.
set_text 🔒

Structs§

Counter
CounterDescriptor
CpuFrameTimings
Expected
Ranges of expected value for a profile counter.
GpuProfileTag
Graph
GraphStats
ProfileScope
A simple RAII style struct to manage a profile scope.
Profiler
ProfilerFrame 🔒
ProfilerFrameCollection 🔒
TransactionProfile
A container for profiling information that moves along the rendering pipeline and is handed off to the profiler at the end.

Enums§

Event
Item 🔒
ShowAs

Constants§

ALPHA_PASSES
ALPHA_TARGETS_SAMPLERS
API_SEND_TIME
ATLAS_A8_GLYPHS_PIXELS
ATLAS_A8_GLYPHS_TEXTURES
ATLAS_A8_PIXELS
ATLAS_A8_TEXTURES
ATLAS_A16_PIXELS
ATLAS_A16_TEXTURES
ATLAS_ALPHA8_GLYPHS_PRESSURE
ATLAS_ALPHA8_PRESSURE
ATLAS_ALPHA16_PRESSURE
ATLAS_COLOR8_GLYPHS_PRESSURE
ATLAS_COLOR8_LINEAR_PRESSURE
ATLAS_COLOR8_NEAREST_PRESSURE
ATLAS_ITEMS_MEM
ATLAS_RGBA8_GLYPHS_PIXELS
ATLAS_RGBA8_GLYPHS_TEXTURES
ATLAS_RGBA8_LINEAR_PIXELS
ATLAS_RGBA8_LINEAR_TEXTURES
ATLAS_RGBA8_NEAREST_PIXELS
ATLAS_RGBA8_NEAREST_TEXTURES
ATLAS_STANDALONE_PRESSURE
ATLAS_TEXTURES_MEM
BACKGROUND_COLOR 🔒
BLOB_RASTERIZATION_TIME
COLOR_PASSES
COMPOSITOR_SURFACE_BLITS
COMPOSITOR_SURFACE_OVERLAYS
COMPOSITOR_SURFACE_UNDERLAYS
CONTENT_SEND_TIME
CPU_TEXTURE_ALLOCATION_TIME
CREATED_TARGETS
CREATE_CACHE_TEXTURE_TIME
DELETE_CACHE_TEXTURE_TIME
DEPTH_TARGETS_MEM
DISPLAY_LIST_BUILD_TIME
DISPLAY_LIST_MEM
DRAW_CALLS
EXTERNAL_IMAGE_BYTES
FONT_TEMPLATES
FONT_TEMPLATES_MEM
FRAME_BATCHING_TIME
FRAME_BUILDING_TIME
FRAME_PREPARE_TIME
FRAME_SEND_TIME
FRAME_TIME
FRAME_VISIBILITY_TIME
GLYPH_RESOLVE_TIME
GPU_BUFFER_MEM
GPU_CACHE_BLOCKS_SAVED
GPU_CACHE_BLOCKS_TOTAL
GPU_CACHE_BLOCKS_UPDATED
GPU_CACHE_MEM
GPU_CACHE_PREPARE_TIME
GPU_CACHE_ROWS_TOTAL
GPU_CACHE_ROWS_UPDATED
GPU_CACHE_UPLOAD_TIME
GPU_TIME
GPU_TOTAL_MEM
GRAPH_FRAME_HEIGHT 🔒
GRAPH_HEIGHT 🔒
GRAPH_PADDING 🔒
GRAPH_WIDTH 🔒
IMAGE_TEMPLATES
IMAGE_TEMPLATES_MEM
INTERNED_BACKDROP_CAPTURES
INTERNED_BACKDROP_RENDERS
INTERNED_BOX_SHADOWS
INTERNED_CLIPS
INTERNED_CONIC_GRADIENTS
INTERNED_FILTER_DATA
INTERNED_IMAGES
INTERNED_IMAGE_BORDERS
INTERNED_LINEAR_GRADIENTS
INTERNED_LINE_DECORATIONS
INTERNED_NORMAL_BORDERS
INTERNED_PICTURES
INTERNED_POLYGONS
INTERNED_PRIMITIVES
INTERNED_RADIAL_GRADIENTS
INTERNED_TEXT_RUNS
INTERNED_YUV_IMAGES
NUM_PROFILER_EVENTS
ONE_SECOND_NS 🔒
OPAQUE_PASS_SAMPLERS
PICTURE_CACHE_SLICES
PICTURE_TILES
PICTURE_TILES_MEM
PRIMITIVES
PROFILE_PADDING 🔒
PROFILE_SPACING 🔒
RASTERIZED_BLOBS
RASTERIZED_BLOBS_PX
RASTERIZED_BLOB_TILES
RASTERIZED_GLYPHS
RENDERED_PICTURE_TILES
RENDERER_TIME
RENDER_REASON_ANIMATED_PROPERTY
RENDER_REASON_APZ
RENDER_REASON_ASYNC_IMAGE
RENDER_REASON_CLEAR_RESOURCES
RENDER_REASON_CONFIG_CHANGE
RENDER_REASON_CONTENT_SYNC
RENDER_REASON_FIRST
RENDER_REASON_FLUSH
RENDER_REASON_OTHER
RENDER_REASON_POST_RESOURCE_UPDATE_HOOKS
RENDER_REASON_RESIZE
RENDER_REASON_RESOURCE_UPDATE
RENDER_REASON_SCENE
RENDER_REASON_SNAPSHOT
RENDER_REASON_TESTING
RENDER_REASON_TEXTURE_CACHE_FLUSH
RENDER_REASON_VSYNC
RENDER_REASON_WIDGET
RENDER_TARGET_MEM
SCENE_BUILD_TIME
SHADER_BUILD_TIME
SLOW_BLOB_COUNT
SLOW_DRAW_CALLS_COUNT
SLOW_FRAME
SLOW_FRAME_BUILD_COUNT
SLOW_FRAME_CPU_COUNT
SLOW_FRAME_GPU_COUNT
SLOW_RENDER_COUNT
SLOW_SCROLL_AFTER_SCENE_COUNT
SLOW_TARGETS_COUNT
SLOW_TXN
SLOW_UPLOAD_COUNT
STAGING_TEXTURE_ALLOCATION_TIME
STANDALONE_TEXTURES_MEM
TEXTURES_CREATED
TEXTURES_DELETED
TEXTURE_CACHE_EVICTION_COUNT
TEXTURE_CACHE_UPDATE_TIME
TEXTURE_CACHE_YOUNGEST_EVICTION
TEXTURE_UPLOADS
TEXTURE_UPLOADS_MEM
TOTAL_FRAME_CPU_TIME
TOTAL_SAMPLERS
TOTAL_UPLOAD_TIME
TRANSPARENT_PASS_SAMPLERS
UPDATE_DOCUMENT_TIME
UPLOAD_CPU_COPY_TIME
UPLOAD_GPU_COPY_TIME
UPLOAD_NUM_COPY_BATCHES
UPLOAD_TIME
USED_TARGETS
VERTICES
VISIBLE_PRIMITIVES

Statics§

PROFILER_HOOKS
The current global profiler callbacks, if set by embedder.
PROFILER_PRESETS 🔒
Profiler UI string presets. Defined in the profiler UI string syntax, can contain other presets.

Traits§

EventValue
ProfilerHooks
Defines the interface for hooking up an external profiler to WR.

Functions§

add_event_marker
Records a marker of the given duration that just ended.
add_text_marker
Records a marker of the given duration that just ended.
bytes_to_mb
expected 🔒
find_preset 🔒
ms_to_ns
ns_to_ms
register_thread
Register a thread with the Gecko Profiler.
set_profiler_hooks
Set the profiler callbacks, or None to disable the profiler. This function must only ever be called before any WR instances have been created, or the hooks will not be set.
thread_is_being_profiled
Returns true if the current thread is being profiled.
unregister_thread
Unregister a thread with the Gecko Profiler.