Skip to content

prof: the profiling device is #K, and prof(1) has a /prof to bind on - #1037

Merged
pdfinn merged 1 commit into
masterfrom
fix/prof-to-k
Oct 31, 2026
Merged

pdfinn merged 1 commit into
masterfrom
fix/prof-to-k

Conversation

@pdfinn

@pdfinn pdfinn commented Oct 31, 2026

Copy link
Copy Markdown
Member

Two fixes, both found while aligning device letters (#1036).

1. prof(1) had not worked in this tree.

  • appl/lib/profile.b binds the profiling device on /prof, but the emulators' root had no /prof; upstream Inferno's does. On master, for any command, it fails with prof: cannot initialize profile device: cannot bind prof device to /prof: '/prof' file does not exist.
  • Every emulator config that builds the profiler (14 of them) now has /prof in its root again.

2. The profiler moves from #P to #K.

  • #K is kprof's letter in Plan 9, 9front and Inferno's native kernels. After the move, #P is arch everywhere, as in all three.
  • On a native kernel, profile.b's bind of #P used to succeed onto the arch device.
  • Changed: emu/port/devprof.c, profile.b, prof(3).

For hosted users: a script that binds #P itself must now bind #K. Nothing in this tree does, apart from profile.b.

Test: tests/host/prof_test.sh, in CI host tests.

  • What it checks: #K is the profiler, /prof exists, #P is not the profiler in the emulator, and prof -e samples a running sh.
  • On master it fails. Here it passes, three runs of three, on the Linux arm64 emulator.

Order with #1036: whichever merges second must update the registry's #K row (prof, hosted) and its #P row (arch only). The registry check will say so.

🤖 Generated with Claude Code

https://claude.ai/code/session_01T5tjh7MFpJjYJnvTT33utv

prof(1) had not worked in this tree: profile.b binds the profiling
device on /prof, and the emulators' root had no /prof, which upstream
Inferno's has -- "cannot bind prof device to /prof: '/prof' file does
not exist", on master, for any command. Every emulator config that
builds the profiler has /prof in its root again.

And the device moves from #P to #K, kprof's letter in Plan 9, 9front and
Inferno's native kernels (docs/DEVICE-LETTERS.md), so that #P is arch
everywhere: on a native kernel profile.b's bind of #P succeeded onto the
arch device. devprof.c, profile.b, prof(3).

tests/host/prof_test.sh, in CI: #K is the profiler, /prof exists, #P is
not the profiler in the emulator, and prof -e samples a running sh. On
master it fails; here it passes, three runs of three.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T5tjh7MFpJjYJnvTT33utv
@pdfinn
pdfinn merged commit 38cb2be into master Oct 31, 2026
38 of 39 checks passed
@pdfinn
pdfinn deleted the fix/prof-to-k branch October 31, 2026 23:59
pdfinn pushed a commit that referenced this pull request Nov 1, 2026
…y moved to

devletters.py --check failed on master: #1037 and #1039 moved the
devices and #1036, landing after, had them only as planned.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0195u6z8JjsAy9yrE5TqKxzx
pdfinn pushed a commit that referenced this pull request Nov 1, 2026
#1037, #1038, #1039 and #1040 merged around the registry (#1036), so
master's devletters_test failed: #K prof, #X vm, #x bench, #z wmsz and
#h tfa were in use and still "reserved" here. Their rows are in use;
#P is arch only; #b, #w and #F are free here, at their precedents'
meanings, #w and #F now reserved for a watchdog and flash. The planned
moves are the moves made.

tools/devletters.py --check: PASS, 36 letters in use across 20 builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T5tjh7MFpJjYJnvTT33utv
(cherry picked from commit d147d1b)
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.

2 participants