modus
Menu
On this page

The entry processor_frame

The source src/modules/demonstrations/processor_frame built with the setting DRAWING_THROUGH_MODULE=true. The text after this paragraph is the comment of that source.

Log_Only: no window; modustool measure starts it and reads its measures.

The cost of a frame at 1920 x 1080 on the processor, with no GPU. The design: .

What it is for. It gives the numbers from which the thresholds of the processor profile of the quality profile come. The process draws into canvases of the reference screen in memory of its own budget, apart from the screen of the compositor, with the code that the compositor calls: graphics.clear, graphics.copy and the drawing module. It measures three parts, each 21 times after one frame that pays the pages on first use:

  1. 1. A clear of the frame, then its copy into a screen page: the bound of the memory bandwidth.
  2. 2. A frame of the compositor with four windows, in its phases: the background, one call of the drawing module for each window and one for the bar, then the copy into a screen page. Once in full, once in the damage of one Present and of the clock of the bar.
  3. 3. The execution of a draw table that fills the screen with the records of a desktop: gradients, rectangles, texts in both fonts, opaque pictures, pictures and rectangles with alpha.

What a reader sees. No window. modustool measure starts it after the other measures of its measure run, with start("processor_frame"). The log gets one line for each part, processor_frame: measure: <part>: least <time> us, median <time> us, <count> frames in one second at the median, over 21 frames, then processor_frame: ok, ... or processor_frame: wrong: .... A time is a measure: no test compares it to a bound.

Its grants: none.

What it does not prove. The records of each window are in the form of the compositor, not its code: the compositor keeps its procedures. The pointer, the rings and the page flip are not in the frame.

See: From the desktop of today to a light web browser: The first measure: a frame at 1920 × 1080 on the processor in the repository

processor_frame module with an entry

Hash
1f74020c298ebce162b3bc09a4655a12a4b6352ca7c975beb80e8e3a1d866928
Size
95018 bytes
Exports
0
Imports
1
Imported by
0
License
MIT

The cost of a frame at 1920 x 1080 on the processor, with no GPU

FactValue
KindModules with an entry
Sourcesrc/modules/demonstrations/processor_frame
Boot imageyes: in the boot image, 95018 bytes in this build
Build settings
  • DRAWING_THROUGH_MODULE=true
Imports
Imported bynone

Neighbours

What it imports, at its left, and what imports it, at its right: the part of the module graph that touches it.

processor_frame drawing

Exports

ExportWhat it does
entry()makes the canvases, the surfaces and the pictures, measures each part, checks a pixel that each part writes, and stops

entry

entry()

entry makes the canvases, the surfaces and the pictures, measures each part, checks a pixel that each part writes, and stops. A refused memory stops it with Failed and a line.

Form
The entry of the module: one parameter, an address, fixed by the contract.
Source
src/modules/demonstrations/processor_frame/main.odin:453

Read from the source of the module, as the build reads it to describe the exports (tools/modustool/build/describe.odin).

What the root service gives it

WhatValueAs the root service says
GrantsnoneA frame at 1920 x 1080 drawn into memory of its own budget.
Other terms of its start grant setnone
Budget that it asks for
  • working memory pages 9169
  • pages of its threads 72
  • pages of the pictures of its window 0
  • pages of the module and its imports from the files of the build
  • processes 1
  • threads 1
The three canvases of the screen, the four surfaces, the pictures, the process and its page tables, and the glyph memory of the copy of the text rendering of the drawing module, which draws each glyph of its text and reserves that memory at its first glyph. The tool reads a literal only, so the assert ties it to the parts.

The start grant set is read from start_grant_sets in src/modules/system/root/start_grant_sets.odin. The stated budget is read from the constant MODULE_BUDGET of the source of the module (its line); the build adds the counted parts and writes the sum in the module (tools/modustool/build/budget_count.odin); the root service accepts it up to the largest budget of a process, and adds the limits of processor time and of log records (src/modules/system/root/budgets.odin).

clear procedure of the package graphics

clear :: proc "contextless" (canvas: Canvas, color: Color)

clear paints the whole canvas in one color.

src/library/modus/graphics/graphics.odin:75

copy procedure of the package graphics

copy :: proc "contextless" (canvas: Canvas, x, y: int, source: Canvas)

copy draws all of source at (x, y) of canvas.

src/library/modus/graphics/graphics.odin:126