Skip to content

0.2.0 --- openkal 0.20: a measurement of an image (okprof), the name of an address, and an okb's admission remembered - #16

Merged
Sunrisepeak merged 2 commits into
mainfrom
openkal-0.20
Nov 1, 2026
Merged

Sunrisepeak merged 2 commits into
mainfrom
openkal-0.20

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

openkal-ld, openkal-run, openkal-tools and openkal-bind 0.2.0, over openkal 0.20 and its implementations (openkal-linux 0.21.0, openkal-macos 0.18.0, openkal-windows 0.16.0). Design: mcpp .agents/docs/2026-11-02-ecosystem-part3-ok-image-performance-parity-design.md §8.

  • A measurement of an image. okrun provides openkal.prof and openkal.debug to the images it binds (SPEC 12.3).
    • It is enabled with okrun --prof=calls,counters,perfmap[:dir] or with OKRUN_PROF, for an image another program starts.
    • calls counts every kal_* call through a counted binding table. counters reads what the program registers (kal_prof_counter) and the phases it marks. perfmap writes /tmp/perf-<pid>.map on Linux, so that the system's perf names the image's functions.
    • The report is okprof-<id>.json. The new tool okprof records (record -- <cmd>), reports by interface and phase (report), and compares two reports (diff).
  • The name of an address. kal_debug_symbolize answers from the image's symbol table (okld_symbols).
  • An okb's admission remembered. After the chunked verification succeeds, okrun writes a record under its cache directory, keyed by the manifest's digest. The record holds the file's identity, size and modification time. A later start of the same file skips the chunked verification, and still checks the manifest's signature. A replaced or modified file changes the identity or the time, and the record no longer applies.
  • okld_interface_of names openkal.map, openkal.region, openkal.prof and openkal.debug.

Co-authored-by: speak-agent 248744407+speak-agent@users.noreply.github.com

Sunrisepeak and others added 2 commits November 2, 2026 04:00
…of an address, and an okb's admission remembered

- The runner answers openkal.prof and openkal.debug, a loader's interfaces (SPEC 12.3), and states them in kal_interfaces beside the implementation's. OKRUN_PROF, or `okrun --prof=<what>[:dir]' (okrun_profile), measures an image: `calls' binds each name through a counting entry (an unmeasured image is bound as before), `counters' keeps the counters and phases the program registers, `perfmap' writes /tmp/perf-<pid>.map on Linux; the report, okprof-<id>.json, is written where the program ends (its entry returns, kal_exit, kal_abort).
- kal_debug_symbolize names an address from the symbol table of the image that holds it, read from the image's file again when first asked (libokld: okld_symbols).
- okprof (openkal-tools): `record' runs a program with OKRUN_PROF set, `report' groups the calls by interface and by name with the counters and phases, `diff' sets two reports side by side by how their time moved.
- An okb's admission is remembered per user (okrun/admitted in the cache directory), by the manifest's SHA-256 and the member, with the file's identity, length and modification time: a later start of the same file admits a member by its shape alone.
- okld_interface_of knows openkal.map (missing since 0.18), region, prof and debug; okld and okrun name them.
- openkal 0.20.0; openkal-linux 0.21.0, openkal-macos 0.18.0, openkal-windows 0.16.0.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…is not a Windows program's)

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
@Sunrisepeak
Sunrisepeak merged commit 7d4db2c into main Nov 1, 2026
5 checks passed
@Sunrisepeak
Sunrisepeak deleted the openkal-0.20 branch November 1, 2026 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant