Cursor indicator + HB-ON/HB-OFF runtime DoE instrumentation toggle
Cursor (Captain Bob: "the only thing we need is a cursor"): vt100_draw_cursor() draws a solid block at the terminal's current position, called from repl.c after the prompt prints and after every keystroke/backspace. vt100_erase_cursor() cleans up the one gap a static cursor has -- Enter/newline moves away from the cursor cell without a character draw ever overwriting it, which left a stray block behind until this fix. HB-ON/HB-OFF (Captain Bob: run a program with or without instrumentation without rebuilding): Converted per-tick DoE logging from a build-time flag (HEARTBEAT_DOE_LOG) to a runtime one. doe_log_tick_row() now self-gates on g_doe_log_enabled (default 1, matching the old default) instead of being compiled out entirely; the call site in vm_runtime.c is unconditional. Two new FORTH words, HB-ON and HB-OFF, flip the flag live. Removed the now-dead HEARTBEAT_DOE_LOG plumbing: the Kconfig symbol, and the -D forwarding in both LOADER_CFLAGS and KERNEL_CFLAGS. Verified: three-arch clean QEMU boot + logs; dictionary word count 466 (463 baseline + ALT+TAB + HB-ON + HB-OFF, exactly the three words added across this session); amd64 screendump confirms the cursor renders correctly after real interactive typing. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
af20efaa15
commit
59458a0a16
@@ -33,15 +33,6 @@ config SK_PARITY_DEBUG
|
||||
treatment as every other previously-unwired constant in this
|
||||
migration.
|
||||
|
||||
config HEARTBEAT_DOE_LOG
|
||||
bool "Per-tick heartbeat DoE logging (HEARTBEAT_DOE_LOG)"
|
||||
default y
|
||||
help
|
||||
Emits per-heartbeat-tick DoE observation records used by the
|
||||
bare-metal Design-of-Experiments campaigns
|
||||
(experiments/bare_metal/). On by default; the DoE tooling expects
|
||||
this log to be present.
|
||||
|
||||
config STADIUM_MAX_VM_COUNT
|
||||
int "Outer Stadium VM population bound (STADIUM_MAX_VM_COUNT)"
|
||||
default 4
|
||||
|
||||
+2
-5
@@ -228,9 +228,6 @@ else
|
||||
LOADER_BASE_CFLAGS := $(COMMON_CFLAGS)
|
||||
endif
|
||||
|
||||
# HEARTBEAT_DOE_LOG is blanket-forwarded (unlike the opt-in-only knobs
|
||||
# below), so it's repointed through the Kconfig bridge (Phase 6).
|
||||
$(eval $(call kconfig_bool,HEARTBEAT_DOE_LOG,1))
|
||||
DOE_INJECT ?= 0
|
||||
DOE_REPS ?= 3
|
||||
DOE_SEED ?= 12345
|
||||
@@ -238,8 +235,8 @@ DOE_SEED ?= 12345
|
||||
# knobs below), so it's repointed through the Kconfig bridge the same way
|
||||
# as the hosted Makefile's STRICT_PTR (Phase 3) -- Phase 4 heartbeat family.
|
||||
$(eval $(call kconfig_bool,EMERGENCY_CONSOLE_ENABLED,1))
|
||||
LOADER_CFLAGS := $(LOADER_BASE_CFLAGS) -I$(KERNEL_SRC)/vm -DHEARTBEAT_DOE_LOG=$(HEARTBEAT_DOE_LOG)
|
||||
KERNEL_CFLAGS := $(COMMON_CFLAGS) -D__STARKERNEL__ -I$(KERNEL_SRC)/vm -DHEARTBEAT_DOE_LOG=$(HEARTBEAT_DOE_LOG)
|
||||
LOADER_CFLAGS := $(LOADER_BASE_CFLAGS) -I$(KERNEL_SRC)/vm
|
||||
KERNEL_CFLAGS := $(COMMON_CFLAGS) -D__STARKERNEL__ -I$(KERNEL_SRC)/vm
|
||||
|
||||
# Linker flags
|
||||
ifeq ($(ARCH),aarch64)
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
tick_number,elapsed_ns,tick_interval_ns,cache_hits_delta,bucket_hits_delta,word_executions_delta,hot_word_count,avg_word_heat_q48,window_width,actual_window_size,predicted_label_hits,jitter_bits,apic_ticks,time_trust_q48,variance_q48,vm_call_depth_max,hera_heat_q48,hermes_heat_q48,artemis_heat_q48
|
||||
1,10000,10000,0,0,183,4,45,731,731,0,0,0,65536,0,0,65536,0,0
|
||||
2,20000,10000,0,0,173,5,44,582,582,0,0,0,65536,0,0,65536,0,0
|
||||
3,30000,10000,0,0,184,6,60,582,582,0,0,0,65536,0,0,65536,0,0
|
||||
4,40000,10000,0,0,174,8,71,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
5,50000,10000,0,0,150,9,78,582,582,0,0,0,65536,0,0,65536,0,0
|
||||
6,60000,10000,0,0,159,11,73,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
7,70000,10000,0,0,188,15,71,685,685,0,0,0,65536,0,0,65536,0,0
|
||||
8,80000,10000,0,0,214,16,83,685,685,0,0,0,65536,0,0,65536,0,0
|
||||
9,90000,10000,0,0,216,19,82,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
10,100000,10000,0,0,222,21,84,567,567,0,0,0,65536,0,0,65536,0,0
|
||||
11,110000,10000,0,0,207,23,86,731,731,0,0,0,65536,0,0,65536,0,0
|
||||
12,120000,10000,0,0,189,26,83,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
13,130000,10000,0,0,221,28,80,731,731,0,0,0,65536,0,0,65536,0,0
|
||||
14,140000,10000,0,0,204,29,83,685,685,0,0,0,65536,0,0,65536,0,0
|
||||
15,150000,10000,0,0,203,30,82,731,731,0,0,0,65536,0,0,65536,0,0
|
||||
16,160000,10000,0,0,201,32,83,567,567,0,0,0,65536,0,0,65536,0,0
|
||||
17,170000,10000,0,0,190,34,86,731,731,0,0,0,65536,0,0,65536,0,0
|
||||
18,180000,10000,0,0,170,35,73,582,582,0,0,0,65536,0,0,65536,0,0
|
||||
19,190000,10000,0,0,154,35,40,731,731,0,0,0,65536,0,0,65536,0,0
|
||||
20,200000,10000,0,0,154,35,38,567,567,0,0,0,65536,0,0,65536,0,0
|
||||
21,210000,10000,0,0,153,38,37,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
22,220000,10000,0,0,167,40,38,582,582,0,0,0,65536,0,0,65536,0,0
|
||||
23,230000,10000,0,0,176,17,38,685,685,0,0,0,65536,0,0,65536,0,0
|
||||
24,240000,10000,0,0,175,10,25,731,731,0,0,0,65536,0,0,65536,0,0
|
||||
25,250000,10000,0,0,196,11,23,731,731,0,0,0,65536,0,0,65536,0,0
|
||||
26,260000,10000,0,0,192,14,24,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
27,270000,10000,0,0,158,16,30,685,685,0,0,0,65536,0,0,65536,0,0
|
||||
28,280000,10000,0,0,158,17,23,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
29,290000,10000,0,0,164,17,27,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
30,300000,10000,0,0,154,18,26,685,685,0,0,0,65536,0,0,65536,0,0
|
||||
31,310000,10000,0,0,172,6,25,582,582,0,0,0,65536,0,0,65536,0,0
|
||||
32,320000,10000,0,0,180,9,22,567,567,0,0,0,65536,0,0,65536,0,0
|
||||
33,330000,10000,0,0,145,11,29,567,567,0,0,0,65536,0,0,65536,0,0
|
||||
34,340000,10000,0,0,203,14,30,582,582,0,0,0,65536,0,0,65536,0,0
|
||||
35,350000,10000,0,0,154,16,36,731,731,0,0,0,65536,0,0,65536,0,0
|
||||
36,360000,10000,0,0,144,18,32,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
37,370000,10000,0,0,144,18,29,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
38,380000,10000,0,0,132,18,28,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
39,390000,10000,0,0,180,18,24,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
40,400000,10000,0,0,220,23,20,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
41,410000,10000,0,0,215,25,19,4096,24,0,0,0,65536,0,0,65536,0,0
|
||||
42,420000,10000,0,0,208,32,20,4096,24,0,0,0,65536,0,0,65536,0,0
|
||||
43,430000,10000,0,0,177,36,19,4096,24,0,0,0,65536,0,0,65536,0,0
|
||||
44,440000,10000,0,0,199,42,20,4096,24,0,0,0,65536,0,0,65536,0,0
|
||||
45,450000,10000,0,0,223,47,19,4096,30,0,0,0,65536,0,0,65536,0,0
|
||||
46,460000,10000,0,0,202,50,17,4096,67,0,0,0,65536,0,0,65536,0,0
|
||||
47,470000,10000,0,0,218,57,18,4096,198,0,0,0,65536,0,0,65536,0,0
|
||||
48,480000,10000,0,0,221,60,20,4096,350,0,0,0,65536,0,0,65536,0,0
|
||||
49,490000,10000,0,0,225,66,20,4096,528,0,0,0,65536,0,0,65536,0,0
|
||||
50,500000,10000,0,0,214,69,21,4096,694,0,0,0,65536,0,0,65536,0,0
|
||||
51,510000,10000,0,0,227,71,23,4096,883,0,0,0,65536,0,0,65536,0,0
|
||||
52,520000,10000,0,0,208,71,23,4096,1043,0,0,0,65536,0,0,65536,0,0
|
||||
53,530000,10000,0,0,207,71,25,4096,1202,0,0,0,65536,0,0,65536,0,0
|
||||
54,540000,10000,0,0,200,71,26,4096,1319,0,0,0,65536,0,0,65536,0,0
|
||||
55,550000,10000,0,0,205,72,27,4096,1464,0,0,0,65536,0,0,65536,0,0
|
||||
56,560000,10000,0,0,211,73,27,4096,1620,0,0,0,65536,0,0,65536,0,0
|
||||
57,570000,10000,0,0,193,80,28,4096,1712,0,0,0,65536,0,0,65536,0,0
|
||||
58,580000,10000,0,0,185,4,61,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
59,590000,10000,0,0,81,7,32,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
60,600000,10000,0,0,52,10,28,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
61,610000,10000,0,0,63,17,25,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
62,620000,10000,0,0,85,19,24,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
63,630000,10000,0,0,68,20,23,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
64,640000,10000,0,0,39,20,23,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
65,650000,10000,0,0,45,20,25,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
66,660000,10000,0,0,42,20,29,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
67,670000,10000,0,0,47,20,31,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
68,680000,10000,0,0,43,20,34,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
69,690000,10000,0,0,48,20,35,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
70,700000,10000,0,0,48,21,38,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
71,710000,10000,0,0,44,22,39,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
72,720000,10000,0,0,130,24,27,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
73,730000,10000,0,0,134,26,21,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
1,10000,18446744073708831616,0,0,117,4,4,4096,0,0,4895412794951728796,15,65536,0,0,65536,0,0
|
||||
2,20000,10000,0,0,78,10,7,4096,0,0,0,19,65536,0,0,65536,0,0
|
||||
3,30000,10000,0,0,101,13,7,4096,0,0,0,21,65536,0,0,65536,0,0
|
||||
4,40000,10000,0,0,63,19,8,4096,0,0,0,22,65536,0,0,65536,0,0
|
||||
5,50000,10000,0,0,92,25,8,4096,2,0,0,25,65536,0,0,65536,0,0
|
||||
6,60000,10000,0,0,64,27,8,4096,2,0,0,29,65536,0,0,65536,0,0
|
||||
7,70000,10000,0,0,228,32,8,4096,210,0,0,34,65536,0,0,65536,0,0
|
||||
8,80000,10000,0,0,256,34,9,4096,466,0,0,35,65536,0,0,65536,0,0
|
||||
9,90000,10000,0,0,256,36,10,4096,722,0,0,36,65536,0,0,65536,0,0
|
||||
10,100000,10000,0,0,256,36,11,4096,978,0,0,37,65536,0,0,65536,0,0
|
||||
11,110000,10000,0,0,256,36,11,4096,1234,0,0,37,65536,0,0,65536,0,0
|
||||
12,120000,10000,0,0,256,36,12,4096,1490,0,0,38,65536,0,0,65536,0,0
|
||||
13,130000,10000,0,0,256,37,12,4096,1746,0,0,39,65536,0,0,65536,0,0
|
||||
14,140000,10000,0,0,230,39,12,4096,1949,0,0,42,65536,0,0,65536,0,0
|
||||
15,150000,10000,0,0,256,39,13,4096,2204,0,0,43,65536,0,0,65536,0,0
|
||||
16,160000,10000,0,0,256,39,14,4096,2459,0,0,43,65536,0,0,65536,0,0
|
||||
17,170000,10000,0,0,256,39,15,4096,2713,0,0,46,65536,0,0,65536,0,0
|
||||
18,180000,10000,0,0,256,39,15,4096,2969,0,0,47,65536,0,0,65536,0,0
|
||||
19,190000,10000,0,0,256,39,16,4096,3224,0,0,50,65536,0,1,65536,0,0
|
||||
20,200000,10000,0,0,256,41,17,4096,3480,0,0,50,65536,0,1,65536,0,0
|
||||
21,210000,10000,0,0,256,41,17,4096,3736,0,0,51,65536,0,1,65536,0,0
|
||||
22,220000,10000,0,0,256,41,18,4096,3992,0,0,52,65536,0,1,65536,0,0
|
||||
23,230000,10000,0,0,256,41,19,4096,4096,0,0,54,65536,0,1,65536,0,0
|
||||
24,240000,10000,0,0,256,41,20,4096,4096,0,0,55,65536,0,1,65536,0,0
|
||||
25,250000,10000,0,0,256,43,20,2048,2048,0,0,56,65536,0,1,65536,0,0
|
||||
26,260000,10000,0,0,256,45,21,2048,2048,0,0,57,65536,0,1,65536,0,0
|
||||
27,270000,10000,0,0,256,45,22,1024,1024,0,0,58,65536,0,1,65536,0,0
|
||||
28,280000,10000,0,0,256,45,23,1024,1024,0,0,60,65536,0,1,65536,0,0
|
||||
29,290000,10000,0,0,256,45,24,512,512,0,0,60,65536,0,1,65536,0,0
|
||||
30,300000,10000,0,0,256,45,24,512,512,0,0,61,65536,0,1,65536,0,0
|
||||
31,310000,10000,0,0,256,45,25,256,256,0,0,62,65536,0,1,65536,0,0
|
||||
32,320000,10000,0,0,255,45,26,256,256,0,0,65,65536,0,1,65536,0,0
|
||||
33,330000,10000,0,0,256,45,27,256,256,0,0,66,65536,0,1,65536,0,0
|
||||
34,340000,10000,0,0,256,45,27,256,256,0,0,68,65536,0,1,65536,0,0
|
||||
35,350000,10000,0,0,256,45,28,256,256,0,0,69,65536,0,1,65536,0,0
|
||||
36,360000,10000,0,0,256,45,29,256,256,0,0,70,65536,0,1,65536,0,0
|
||||
|
@@ -0,0 +1,110 @@
|
||||
tick_number,elapsed_ns,tick_interval_ns,cache_hits_delta,bucket_hits_delta,word_executions_delta,hot_word_count,avg_word_heat_q48,window_width,actual_window_size,predicted_label_hits,jitter_bits,apic_ticks,time_trust_q48,variance_q48,vm_call_depth_max,hera_heat_q48,hermes_heat_q48,artemis_heat_q48
|
||||
1,10000,10000,0,0,183,4,45,731,731,0,0,0,65536,0,0,65536,0,0
|
||||
2,20000,10000,0,0,173,5,44,582,582,0,0,0,65536,0,0,65536,0,0
|
||||
3,30000,10000,0,0,184,6,60,582,582,0,0,0,65536,0,0,65536,0,0
|
||||
4,40000,10000,0,0,174,8,71,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
5,50000,10000,0,0,150,9,78,582,582,0,0,0,65536,0,0,65536,0,0
|
||||
6,60000,10000,0,0,159,11,73,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
7,70000,10000,0,0,188,15,71,685,685,0,0,0,65536,0,0,65536,0,0
|
||||
8,80000,10000,0,0,214,16,83,685,685,0,0,0,65536,0,0,65536,0,0
|
||||
9,90000,10000,0,0,216,19,82,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
10,100000,10000,0,0,222,21,84,567,567,0,0,0,65536,0,0,65536,0,0
|
||||
11,110000,10000,0,0,207,23,86,731,731,0,0,0,65536,0,0,65536,0,0
|
||||
12,120000,10000,0,0,189,26,83,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
13,130000,10000,0,0,221,28,80,731,731,0,0,0,65536,0,0,65536,0,0
|
||||
14,140000,10000,0,0,204,29,83,685,685,0,0,0,65536,0,0,65536,0,0
|
||||
15,150000,10000,0,0,203,30,82,731,731,0,0,0,65536,0,0,65536,0,0
|
||||
16,160000,10000,0,0,201,32,83,567,567,0,0,0,65536,0,0,65536,0,0
|
||||
17,170000,10000,0,0,190,34,86,731,731,0,0,0,65536,0,0,65536,0,0
|
||||
18,180000,10000,0,0,170,35,73,582,582,0,0,0,65536,0,0,65536,0,0
|
||||
19,190000,10000,0,0,154,35,40,731,731,0,0,0,65536,0,0,65536,0,0
|
||||
20,200000,10000,0,0,154,35,38,567,567,0,0,0,65536,0,0,65536,0,0
|
||||
21,210000,10000,0,0,153,38,37,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
22,220000,10000,0,0,167,40,38,582,582,0,0,0,65536,0,0,65536,0,0
|
||||
23,230000,10000,0,0,176,17,38,685,685,0,0,0,65536,0,0,65536,0,0
|
||||
24,240000,10000,0,0,175,10,25,731,731,0,0,0,65536,0,0,65536,0,0
|
||||
25,250000,10000,0,0,196,11,23,731,731,0,0,0,65536,0,0,65536,0,0
|
||||
26,260000,10000,0,0,192,14,24,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
27,270000,10000,0,0,158,16,30,685,685,0,0,0,65536,0,0,65536,0,0
|
||||
28,280000,10000,0,0,158,17,23,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
29,290000,10000,0,0,164,17,27,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
30,300000,10000,0,0,154,18,26,685,685,0,0,0,65536,0,0,65536,0,0
|
||||
31,310000,10000,0,0,172,6,25,582,582,0,0,0,65536,0,0,65536,0,0
|
||||
32,320000,10000,0,0,180,9,22,567,567,0,0,0,65536,0,0,65536,0,0
|
||||
33,330000,10000,0,0,145,11,29,567,567,0,0,0,65536,0,0,65536,0,0
|
||||
34,340000,10000,0,0,203,14,30,582,582,0,0,0,65536,0,0,65536,0,0
|
||||
35,350000,10000,0,0,154,16,36,731,731,0,0,0,65536,0,0,65536,0,0
|
||||
36,360000,10000,0,0,144,18,32,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
37,370000,10000,0,0,144,18,29,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
38,380000,10000,0,0,132,18,28,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
39,390000,10000,0,0,180,18,24,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
40,400000,10000,0,0,220,23,20,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
41,410000,10000,0,0,215,25,19,4096,24,0,0,0,65536,0,0,65536,0,0
|
||||
42,420000,10000,0,0,208,32,20,4096,24,0,0,0,65536,0,0,65536,0,0
|
||||
43,430000,10000,0,0,177,36,19,4096,24,0,0,0,65536,0,0,65536,0,0
|
||||
44,440000,10000,0,0,199,42,20,4096,24,0,0,0,65536,0,0,65536,0,0
|
||||
45,450000,10000,0,0,223,47,19,4096,30,0,0,0,65536,0,0,65536,0,0
|
||||
46,460000,10000,0,0,202,50,17,4096,67,0,0,0,65536,0,0,65536,0,0
|
||||
47,470000,10000,0,0,218,57,18,4096,198,0,0,0,65536,0,0,65536,0,0
|
||||
48,480000,10000,0,0,221,60,20,4096,350,0,0,0,65536,0,0,65536,0,0
|
||||
49,490000,10000,0,0,225,66,20,4096,528,0,0,0,65536,0,0,65536,0,0
|
||||
50,500000,10000,0,0,214,69,21,4096,694,0,0,0,65536,0,0,65536,0,0
|
||||
51,510000,10000,0,0,227,71,23,4096,883,0,0,0,65536,0,0,65536,0,0
|
||||
52,520000,10000,0,0,208,71,23,4096,1043,0,0,0,65536,0,0,65536,0,0
|
||||
53,530000,10000,0,0,207,71,25,4096,1202,0,0,0,65536,0,0,65536,0,0
|
||||
54,540000,10000,0,0,200,71,26,4096,1319,0,0,0,65536,0,0,65536,0,0
|
||||
55,550000,10000,0,0,205,72,27,4096,1464,0,0,0,65536,0,0,65536,0,0
|
||||
56,560000,10000,0,0,211,73,27,4096,1620,0,0,0,65536,0,0,65536,0,0
|
||||
57,570000,10000,0,0,193,80,28,4096,1712,0,0,0,65536,0,0,65536,0,0
|
||||
58,580000,10000,0,0,185,4,61,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
59,590000,10000,0,0,81,7,32,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
60,600000,10000,0,0,52,10,28,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
61,610000,10000,0,0,63,17,25,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
62,620000,10000,0,0,85,19,24,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
63,630000,10000,0,0,68,20,23,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
64,640000,10000,0,0,39,20,23,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
65,650000,10000,0,0,45,20,25,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
66,660000,10000,0,0,42,20,29,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
67,670000,10000,0,0,47,20,31,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
68,680000,10000,0,0,43,20,34,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
69,690000,10000,0,0,48,20,35,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
70,700000,10000,0,0,48,21,38,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
71,710000,10000,0,0,44,22,39,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
72,720000,10000,0,0,130,24,27,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
73,730000,10000,0,0,134,26,21,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
1,10000,18446744073708831616,0,0,117,4,4,4096,0,0,4895412794951728796,5,65536,0,0,65536,0,0
|
||||
2,20000,10000,0,0,78,10,7,4096,0,0,0,6,65536,0,0,65536,0,0
|
||||
3,30000,10000,0,0,101,13,7,4096,0,0,0,8,65536,0,0,65536,0,0
|
||||
4,40000,10000,0,0,63,19,8,4096,0,0,0,8,65536,0,0,65536,0,0
|
||||
5,50000,10000,0,0,92,25,8,4096,2,0,0,10,65536,0,0,65536,0,0
|
||||
6,60000,10000,0,0,64,27,8,4096,2,0,0,12,65536,0,0,65536,0,0
|
||||
7,70000,10000,0,0,228,32,8,4096,210,0,0,15,65536,0,0,65536,0,0
|
||||
8,80000,10000,0,0,256,34,9,4096,466,0,0,15,65536,0,0,65536,0,0
|
||||
9,90000,10000,0,0,256,36,10,4096,722,0,0,16,65536,0,0,65536,0,0
|
||||
10,100000,10000,0,0,256,36,11,4096,978,0,0,16,65536,0,0,65536,0,0
|
||||
11,110000,10000,0,0,256,36,11,4096,1234,0,0,16,65536,0,0,65536,0,0
|
||||
12,120000,10000,0,0,256,36,12,4096,1490,0,0,17,65536,0,0,65536,0,0
|
||||
13,130000,10000,0,0,256,37,12,4096,1746,0,0,17,65536,0,0,65536,0,0
|
||||
14,140000,10000,0,0,230,39,12,4096,1949,0,0,19,65536,0,0,65536,0,0
|
||||
15,150000,10000,0,0,256,39,13,4096,2204,0,0,20,65536,0,0,65536,0,0
|
||||
16,160000,10000,0,0,256,39,14,4096,2459,0,0,20,65536,0,0,65536,0,0
|
||||
17,170000,10000,0,0,256,39,15,4096,2713,0,0,22,65536,0,0,65536,0,0
|
||||
18,180000,10000,0,0,256,39,15,4096,2969,0,0,22,65536,0,0,65536,0,0
|
||||
19,190000,10000,0,0,256,39,16,4096,3224,0,0,23,65536,0,1,65536,0,0
|
||||
20,200000,10000,0,0,256,41,17,4096,3480,0,0,24,65536,0,1,65536,0,0
|
||||
21,210000,10000,0,0,256,41,17,4096,3736,0,0,24,65536,0,1,65536,0,0
|
||||
22,220000,10000,0,0,256,41,18,4096,3992,0,0,25,65536,0,1,65536,0,0
|
||||
23,230000,10000,0,0,256,41,19,4096,4096,0,0,26,65536,0,1,65536,0,0
|
||||
24,240000,10000,0,0,256,41,20,4096,4096,0,0,26,65536,0,1,65536,0,0
|
||||
25,250000,10000,0,0,256,43,20,2048,2048,0,0,27,65536,0,1,65536,0,0
|
||||
26,260000,10000,0,0,256,45,21,2048,2048,0,0,28,65536,0,1,65536,0,0
|
||||
27,270000,10000,0,0,256,45,22,1024,1024,0,0,29,65536,0,1,65536,0,0
|
||||
28,280000,10000,0,0,256,45,23,1024,1024,0,0,30,65536,0,1,65536,0,0
|
||||
29,290000,10000,0,0,256,45,24,512,512,0,0,30,65536,0,1,65536,0,0
|
||||
30,300000,10000,0,0,256,45,24,512,512,0,0,31,65536,0,1,65536,0,0
|
||||
31,310000,10000,0,0,256,45,25,256,256,0,0,31,65536,0,1,65536,0,0
|
||||
32,320000,10000,0,0,255,45,26,256,256,0,0,33,65536,0,1,65536,0,0
|
||||
33,330000,10000,0,0,256,45,27,256,256,0,0,33,65536,0,1,65536,0,0
|
||||
34,340000,10000,0,0,256,45,27,256,256,0,0,34,65536,0,1,65536,0,0
|
||||
35,350000,10000,0,0,256,45,28,256,256,0,0,35,65536,0,1,65536,0,0
|
||||
36,360000,10000,0,0,256,45,29,256,256,0,0,35,65536,0,1,65536,0,0
|
||||
|
@@ -0,0 +1,110 @@
|
||||
tick_number,elapsed_ns,tick_interval_ns,cache_hits_delta,bucket_hits_delta,word_executions_delta,hot_word_count,avg_word_heat_q48,window_width,actual_window_size,predicted_label_hits,jitter_bits,apic_ticks,time_trust_q48,variance_q48,vm_call_depth_max,hera_heat_q48,hermes_heat_q48,artemis_heat_q48
|
||||
1,10000,10000,0,0,183,4,45,731,731,0,0,0,65536,0,0,65536,0,0
|
||||
2,20000,10000,0,0,173,5,44,582,582,0,0,0,65536,0,0,65536,0,0
|
||||
3,30000,10000,0,0,184,6,60,582,582,0,0,0,65536,0,0,65536,0,0
|
||||
4,40000,10000,0,0,174,8,71,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
5,50000,10000,0,0,150,9,78,582,582,0,0,0,65536,0,0,65536,0,0
|
||||
6,60000,10000,0,0,159,11,73,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
7,70000,10000,0,0,188,15,71,685,685,0,0,0,65536,0,0,65536,0,0
|
||||
8,80000,10000,0,0,214,16,83,685,685,0,0,0,65536,0,0,65536,0,0
|
||||
9,90000,10000,0,0,216,19,82,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
10,100000,10000,0,0,222,21,84,567,567,0,0,0,65536,0,0,65536,0,0
|
||||
11,110000,10000,0,0,207,23,86,731,731,0,0,0,65536,0,0,65536,0,0
|
||||
12,120000,10000,0,0,189,26,83,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
13,130000,10000,0,0,221,28,80,731,731,0,0,0,65536,0,0,65536,0,0
|
||||
14,140000,10000,0,0,204,29,83,685,685,0,0,0,65536,0,0,65536,0,0
|
||||
15,150000,10000,0,0,203,30,82,731,731,0,0,0,65536,0,0,65536,0,0
|
||||
16,160000,10000,0,0,201,32,83,567,567,0,0,0,65536,0,0,65536,0,0
|
||||
17,170000,10000,0,0,190,34,86,731,731,0,0,0,65536,0,0,65536,0,0
|
||||
18,180000,10000,0,0,170,35,73,582,582,0,0,0,65536,0,0,65536,0,0
|
||||
19,190000,10000,0,0,154,35,40,731,731,0,0,0,65536,0,0,65536,0,0
|
||||
20,200000,10000,0,0,154,35,38,567,567,0,0,0,65536,0,0,65536,0,0
|
||||
21,210000,10000,0,0,153,38,37,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
22,220000,10000,0,0,167,40,38,582,582,0,0,0,65536,0,0,65536,0,0
|
||||
23,230000,10000,0,0,176,17,38,685,685,0,0,0,65536,0,0,65536,0,0
|
||||
24,240000,10000,0,0,175,10,25,731,731,0,0,0,65536,0,0,65536,0,0
|
||||
25,250000,10000,0,0,196,11,23,731,731,0,0,0,65536,0,0,65536,0,0
|
||||
26,260000,10000,0,0,192,14,24,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
27,270000,10000,0,0,158,16,30,685,685,0,0,0,65536,0,0,65536,0,0
|
||||
28,280000,10000,0,0,158,17,23,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
29,290000,10000,0,0,164,17,27,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
30,300000,10000,0,0,154,18,26,685,685,0,0,0,65536,0,0,65536,0,0
|
||||
31,310000,10000,0,0,172,6,25,582,582,0,0,0,65536,0,0,65536,0,0
|
||||
32,320000,10000,0,0,180,9,22,567,567,0,0,0,65536,0,0,65536,0,0
|
||||
33,330000,10000,0,0,145,11,29,567,567,0,0,0,65536,0,0,65536,0,0
|
||||
34,340000,10000,0,0,203,14,30,582,582,0,0,0,65536,0,0,65536,0,0
|
||||
35,350000,10000,0,0,154,16,36,731,731,0,0,0,65536,0,0,65536,0,0
|
||||
36,360000,10000,0,0,144,18,32,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
37,370000,10000,0,0,144,18,29,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
38,380000,10000,0,0,132,18,28,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
39,390000,10000,0,0,180,18,24,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
40,400000,10000,0,0,220,23,20,4096,0,0,0,0,65536,0,0,65536,0,0
|
||||
41,410000,10000,0,0,215,25,19,4096,24,0,0,0,65536,0,0,65536,0,0
|
||||
42,420000,10000,0,0,208,32,20,4096,24,0,0,0,65536,0,0,65536,0,0
|
||||
43,430000,10000,0,0,177,36,19,4096,24,0,0,0,65536,0,0,65536,0,0
|
||||
44,440000,10000,0,0,199,42,20,4096,24,0,0,0,65536,0,0,65536,0,0
|
||||
45,450000,10000,0,0,223,47,19,4096,30,0,0,0,65536,0,0,65536,0,0
|
||||
46,460000,10000,0,0,202,50,17,4096,67,0,0,0,65536,0,0,65536,0,0
|
||||
47,470000,10000,0,0,218,57,18,4096,198,0,0,0,65536,0,0,65536,0,0
|
||||
48,480000,10000,0,0,221,60,20,4096,350,0,0,0,65536,0,0,65536,0,0
|
||||
49,490000,10000,0,0,225,66,20,4096,528,0,0,0,65536,0,0,65536,0,0
|
||||
50,500000,10000,0,0,214,69,21,4096,694,0,0,0,65536,0,0,65536,0,0
|
||||
51,510000,10000,0,0,227,71,23,4096,883,0,0,0,65536,0,0,65536,0,0
|
||||
52,520000,10000,0,0,208,71,23,4096,1043,0,0,0,65536,0,0,65536,0,0
|
||||
53,530000,10000,0,0,207,71,25,4096,1202,0,0,0,65536,0,0,65536,0,0
|
||||
54,540000,10000,0,0,200,71,26,4096,1319,0,0,0,65536,0,0,65536,0,0
|
||||
55,550000,10000,0,0,205,72,27,4096,1464,0,0,0,65536,0,0,65536,0,0
|
||||
56,560000,10000,0,0,211,73,27,4096,1620,0,0,0,65536,0,0,65536,0,0
|
||||
57,570000,10000,0,0,193,80,28,4096,1712,0,0,0,65536,0,0,65536,0,0
|
||||
58,580000,10000,0,0,185,4,61,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
59,590000,10000,0,0,81,7,32,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
60,600000,10000,0,0,52,10,28,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
61,610000,10000,0,0,63,17,25,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
62,620000,10000,0,0,85,19,24,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
63,630000,10000,0,0,68,20,23,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
64,640000,10000,0,0,39,20,23,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
65,650000,10000,0,0,45,20,25,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
66,660000,10000,0,0,42,20,29,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
67,670000,10000,0,0,47,20,31,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
68,680000,10000,0,0,43,20,34,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
69,690000,10000,0,0,48,20,35,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
70,700000,10000,0,0,48,21,38,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
71,710000,10000,0,0,44,22,39,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
72,720000,10000,0,0,130,24,27,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
73,730000,10000,0,0,134,26,21,4096,1757,0,0,0,65536,0,0,65536,0,0
|
||||
1,10000,18446744073708831616,0,0,117,4,4,4096,0,0,4895412794951728796,7,65536,0,0,65536,0,0
|
||||
2,20000,10000,0,0,78,10,7,4096,0,0,0,9,65536,0,0,65536,0,0
|
||||
3,30000,10000,0,0,101,13,7,4096,0,0,0,10,65536,0,0,65536,0,0
|
||||
4,40000,10000,0,0,63,19,8,4096,0,0,0,11,65536,0,0,65536,0,0
|
||||
5,50000,10000,0,0,92,25,8,4096,2,0,0,13,65536,0,0,65536,0,0
|
||||
6,60000,10000,0,0,64,27,8,4096,2,0,0,15,65536,0,0,65536,0,0
|
||||
7,70000,10000,0,0,228,32,8,4096,210,0,0,16,65536,0,0,65536,0,0
|
||||
8,80000,10000,0,0,256,34,9,4096,466,0,0,17,65536,0,0,65536,0,0
|
||||
9,90000,10000,0,0,256,36,10,4096,722,0,0,17,65536,0,0,65536,0,0
|
||||
10,100000,10000,0,0,256,36,11,4096,978,0,0,17,65536,0,0,65536,0,0
|
||||
11,110000,10000,0,0,256,36,11,4096,1234,0,0,18,65536,0,0,65536,0,0
|
||||
12,120000,10000,0,0,256,36,12,4096,1490,0,0,18,65536,0,0,65536,0,0
|
||||
13,130000,10000,0,0,256,37,12,4096,1746,0,0,18,65536,0,0,65536,0,0
|
||||
14,140000,10000,0,0,230,39,12,4096,1949,0,0,19,65536,0,0,65536,0,0
|
||||
15,150000,10000,0,0,256,39,13,4096,2204,0,0,20,65536,0,0,65536,0,0
|
||||
16,160000,10000,0,0,256,39,14,4096,2459,0,0,20,65536,0,0,65536,0,0
|
||||
17,170000,10000,0,0,256,39,15,4096,2713,0,0,21,65536,0,0,65536,0,0
|
||||
18,180000,10000,0,0,256,39,15,4096,2969,0,0,21,65536,0,0,65536,0,0
|
||||
19,190000,10000,0,0,256,39,16,4096,3224,0,0,22,65536,0,1,65536,0,0
|
||||
20,200000,10000,0,0,256,41,17,4096,3480,0,0,22,65536,0,1,65536,0,0
|
||||
21,210000,10000,0,0,256,41,17,4096,3736,0,0,23,65536,0,1,65536,0,0
|
||||
22,220000,10000,0,0,256,41,18,4096,3992,0,0,23,65536,0,1,65536,0,0
|
||||
23,230000,10000,0,0,256,41,19,4096,4096,0,0,24,65536,0,1,65536,0,0
|
||||
24,240000,10000,0,0,256,41,20,4096,4096,0,0,24,65536,0,1,65536,0,0
|
||||
25,250000,10000,0,0,256,43,20,2048,2048,0,0,24,65536,0,1,65536,0,0
|
||||
26,260000,10000,0,0,256,45,21,2048,2048,0,0,25,65536,0,1,65536,0,0
|
||||
27,270000,10000,0,0,256,45,22,1024,1024,0,0,25,65536,0,1,65536,0,0
|
||||
28,280000,10000,0,0,256,45,23,1024,1024,0,0,25,65536,0,1,65536,0,0
|
||||
29,290000,10000,0,0,256,45,24,512,512,0,0,26,65536,0,1,65536,0,0
|
||||
30,300000,10000,0,0,256,45,24,512,512,0,0,26,65536,0,1,65536,0,0
|
||||
31,310000,10000,0,0,256,45,25,256,256,0,0,26,65536,0,1,65536,0,0
|
||||
32,320000,10000,0,0,255,45,26,256,256,0,0,27,65536,0,1,65536,0,0
|
||||
33,330000,10000,0,0,256,45,27,256,256,0,0,27,65536,0,1,65536,0,0
|
||||
34,340000,10000,0,0,256,45,27,256,256,0,0,28,65536,0,1,65536,0,0
|
||||
35,350000,10000,0,0,256,45,28,256,256,0,0,28,65536,0,1,65536,0,0
|
||||
36,360000,10000,0,0,256,45,29,256,256,0,0,29,65536,0,1,65536,0,0
|
||||
|
@@ -98,6 +98,20 @@ void console_fb_scroll_fwd(uint32_t n);
|
||||
*/
|
||||
void console_fb_toggle_graphics(void);
|
||||
|
||||
/**
|
||||
* Thin wrapper over vt100_draw_cursor() -- see that function's doc
|
||||
* comment for the full contract (a static block cursor at the terminal's
|
||||
* current position). No-op if the framebuffer console was never
|
||||
* initialized.
|
||||
*/
|
||||
void console_fb_draw_cursor(void);
|
||||
|
||||
/**
|
||||
* Thin wrapper over vt100_erase_cursor(). No-op if the framebuffer
|
||||
* console was never initialized.
|
||||
*/
|
||||
void console_fb_erase_cursor(void);
|
||||
|
||||
/**
|
||||
* Write a single character to serial console
|
||||
*/
|
||||
|
||||
@@ -19,8 +19,11 @@
|
||||
*
|
||||
* A header row is printed automatically before the first data row.
|
||||
*
|
||||
* Compiled in when HEARTBEAT_DOE_LOG=1 (default in KERNEL_CFLAGS).
|
||||
* Call sites in vm_runtime.c are gated with the same macro.
|
||||
* Always compiled in -- gating moved from a build-time flag
|
||||
* (HEARTBEAT_DOE_LOG) to a runtime one (g_doe_log_enabled below) so the
|
||||
* same build can run with or without per-tick instrumentation, toggled
|
||||
* live via the HB-ON/HB-OFF FORTH words (register_doe_log_words()),
|
||||
* no rebuild required.
|
||||
*/
|
||||
|
||||
#ifndef STARKERNEL_DOE_LOG_H
|
||||
@@ -29,13 +32,30 @@
|
||||
#include "vm.h"
|
||||
|
||||
/**
|
||||
* Emit one CSV row for the current heartbeat tick.
|
||||
* Pulls APIC TimeTrustState via heartbeat_state().
|
||||
* Prints the column header automatically on the first call.
|
||||
* Runtime enable flag for doe_log_tick_row() below. Defaults to 1
|
||||
* (matches the old HEARTBEAT_DOE_LOG=1 default -- instrumentation on
|
||||
* unless explicitly turned off). Toggled by HB-ON/HB-OFF; read, not
|
||||
* meant to be written directly outside those two words.
|
||||
*/
|
||||
extern int g_doe_log_enabled;
|
||||
|
||||
/**
|
||||
* Emit one CSV row for the current heartbeat tick, unless
|
||||
* g_doe_log_enabled is 0 (a no-op then). Pulls APIC TimeTrustState via
|
||||
* heartbeat_state(). Prints the column header once, before the first row
|
||||
* ever emitted -- not re-printed on every HB-ON, so a session toggled
|
||||
* off and back on stays one continuous CSV rather than getting a second
|
||||
* header embedded partway through.
|
||||
*
|
||||
* @param vm VM instance (used for snapshot data)
|
||||
* @param snap Populated HeartbeatTickSnapshot from heartbeat_capture_tick_snapshot()
|
||||
*/
|
||||
void doe_log_tick_row(VM *vm, const HeartbeatTickSnapshot *snap);
|
||||
|
||||
/**
|
||||
* Registers HB-ON ( -- ) and HB-OFF ( -- ), which set g_doe_log_enabled
|
||||
* to 1 and 0 respectively.
|
||||
*/
|
||||
void register_doe_log_words(VM *vm);
|
||||
|
||||
#endif /* STARKERNEL_DOE_LOG_H */
|
||||
|
||||
@@ -110,6 +110,22 @@ void vt100_puts(const char *s);
|
||||
*/
|
||||
void vt100_toggle_graphics(void);
|
||||
|
||||
/**
|
||||
* Draw a solid block cursor at the terminal's current position. Static,
|
||||
* not blinking. Idempotent -- safe to call after every keystroke, since
|
||||
* whatever gets typed next naturally overwrites it. No-op before TTF mode
|
||||
* is active or while in graphics mode (vt100_toggle_graphics()).
|
||||
*/
|
||||
void vt100_draw_cursor(void);
|
||||
|
||||
/**
|
||||
* Erases whatever vt100_draw_cursor() last drew, restoring the cell to
|
||||
* plain background. Call before moving away from a cursor-drawn cell
|
||||
* without also drawing a character there (e.g. Enter/newline). No-op
|
||||
* before TTF mode is active or while in graphics mode.
|
||||
*/
|
||||
void vt100_erase_cursor(void);
|
||||
|
||||
/* -----------------------------------------------------------------------
|
||||
* Queries
|
||||
* --------------------------------------------------------------------- */
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 7.3 KiB |
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1 @@
|
||||
qemu: terminating on signal 15 from pid 168335 (/bin/bash)
|
||||
@@ -57,6 +57,9 @@
|
||||
#include "starkernel/capsule_birth.h"
|
||||
#include "starkernel/capsule_vm_physics.h"
|
||||
#include "freestanding/stdio.h"
|
||||
#include "word_registry.h"
|
||||
|
||||
int g_doe_log_enabled = 1;
|
||||
|
||||
#define DOE_PREFIX "\x1b[36m[HADES][DOE ]\x1b[0m "
|
||||
#define DOE_BUF_SIZE 512
|
||||
@@ -81,6 +84,8 @@ static uint64_t doe_log_heat_by_name(const char *name)
|
||||
|
||||
void doe_log_tick_row(VM *vm, const HeartbeatTickSnapshot *snap)
|
||||
{
|
||||
if (!g_doe_log_enabled)
|
||||
return;
|
||||
if (!snap)
|
||||
return;
|
||||
|
||||
@@ -141,3 +146,23 @@ void doe_log_tick_row(VM *vm, const HeartbeatTickSnapshot *snap)
|
||||
console_puts(buf);
|
||||
console_puts("\r\n");
|
||||
}
|
||||
|
||||
/* HB-ON ( -- ): enable per-tick DoE instrumentation (g_doe_log_enabled=1). */
|
||||
static void doe_word_hb_on(VM *vm)
|
||||
{
|
||||
(void)vm;
|
||||
g_doe_log_enabled = 1;
|
||||
}
|
||||
|
||||
/* HB-OFF ( -- ): disable per-tick DoE instrumentation (g_doe_log_enabled=0). */
|
||||
static void doe_word_hb_off(VM *vm)
|
||||
{
|
||||
(void)vm;
|
||||
g_doe_log_enabled = 0;
|
||||
}
|
||||
|
||||
void register_doe_log_words(VM *vm)
|
||||
{
|
||||
register_word(vm, "HB-ON", doe_word_hb_on);
|
||||
register_word(vm, "HB-OFF", doe_word_hb_off);
|
||||
}
|
||||
|
||||
@@ -324,6 +324,20 @@ void console_fb_toggle_graphics(void)
|
||||
}
|
||||
}
|
||||
|
||||
void console_fb_draw_cursor(void)
|
||||
{
|
||||
if (fb_is_available()) {
|
||||
vt100_draw_cursor();
|
||||
}
|
||||
}
|
||||
|
||||
void console_fb_erase_cursor(void)
|
||||
{
|
||||
if (fb_is_available()) {
|
||||
vt100_erase_cursor();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Read a single character from serial console (non-blocking)
|
||||
* Returns -1 if no character available
|
||||
|
||||
@@ -313,6 +313,33 @@ static void draw_cursor_glyph(uint8_t ch)
|
||||
}
|
||||
}
|
||||
|
||||
/* Solid block cursor at the current position (g_vt.cx, g_vt.cy). Not
|
||||
* blinking -- a static indicator, simplest thing that actually shows
|
||||
* where typed input lands, callable as often as the caller likes since
|
||||
* it is idempotent (always draws the same thing at the current position).
|
||||
* A character typed at this position naturally overwrites it --
|
||||
* draw_cursor_glyph() always fills the whole cell with bg before drawing
|
||||
* a glyph -- but *leaving* this position without drawing a character
|
||||
* (Enter/newline) does not, which is what vt100_erase_cursor() below is
|
||||
* for. No-op outside TTF mode or graphics mode (4.4ab's
|
||||
* g_terminal_visible), matching every other draw call in this file. */
|
||||
void vt100_draw_cursor(void)
|
||||
{
|
||||
if (!g_terminal_visible || g_glyph_mode != VT_GLYPH_TTF) return;
|
||||
fb_fill_rect(px_of(g_vt.cx), py_of(g_vt.cy), cell_w(), cell_h(), eff_fg());
|
||||
}
|
||||
|
||||
/* Erases whatever vt100_draw_cursor() last drew at the current position,
|
||||
* restoring it to plain background -- call this before moving away from
|
||||
* a cursor-drawn cell without also drawing a character there (the
|
||||
* newline case in sk_readline: Enter moves to a new line, and nothing
|
||||
* else would ever overwrite the stray block left behind). */
|
||||
void vt100_erase_cursor(void)
|
||||
{
|
||||
if (!g_terminal_visible || g_glyph_mode != VT_GLYPH_TTF) return;
|
||||
fb_fill_rect(px_of(g_vt.cx), py_of(g_vt.cy), cell_w(), cell_h(), eff_bg());
|
||||
}
|
||||
|
||||
static void reset_attrs(void)
|
||||
{
|
||||
g_vt.fg = g_vt.def_fg;
|
||||
|
||||
@@ -190,6 +190,7 @@ static int sk_readline(char *buf, int size)
|
||||
int n = 0;
|
||||
|
||||
buf[0] = '\0';
|
||||
console_fb_draw_cursor(); /* show the cursor at the bare prompt, before any input */
|
||||
|
||||
for (;;) {
|
||||
int c = console_getc(); /* non-blocking poll */
|
||||
@@ -223,6 +224,7 @@ static int sk_readline(char *buf, int size)
|
||||
}
|
||||
|
||||
if (c == '\r' || c == '\n') {
|
||||
console_fb_erase_cursor(); /* leaving this cell without drawing a char over it */
|
||||
console_putc('\n');
|
||||
break;
|
||||
}
|
||||
@@ -235,6 +237,7 @@ static int sk_readline(char *buf, int size)
|
||||
console_putc('\b');
|
||||
console_putc(' ');
|
||||
console_putc('\b');
|
||||
console_fb_draw_cursor();
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -244,6 +247,7 @@ static int sk_readline(char *buf, int size)
|
||||
buf[n++] = (char)c;
|
||||
buf[n] = '\0';
|
||||
console_putc((char)c); /* echo */
|
||||
console_fb_draw_cursor();
|
||||
}
|
||||
|
||||
buf[n] = '\0';
|
||||
|
||||
@@ -47,9 +47,7 @@
|
||||
#include "../include/inference_engine.h"
|
||||
#include "../include/physics_metadata.h"
|
||||
#include "../include/physics_hotwords_cache.h"
|
||||
#if defined(HEARTBEAT_DOE_LOG) && HEARTBEAT_DOE_LOG
|
||||
#include "starkernel/doe_log.h"
|
||||
#endif
|
||||
#include "../include/ssm_jacquard.h"
|
||||
#include "vm_internal.h"
|
||||
#include "starkernel/capsule_vm_physics.h"
|
||||
@@ -516,9 +514,9 @@ void vm_heartbeat_run_cycle(VM *vm)
|
||||
#if defined(HEARTBEAT_CSV_ENABLED) && HEARTBEAT_CSV_ENABLED
|
||||
heartbeat_emit_tick_row(vm, &tick_snapshot);
|
||||
#endif
|
||||
#if defined(HEARTBEAT_DOE_LOG) && HEARTBEAT_DOE_LOG
|
||||
/* Always compiled in; g_doe_log_enabled (default 1) is the runtime
|
||||
* gate now, toggled live by HB-ON/HB-OFF -- see doe_log.h. */
|
||||
doe_log_tick_row(vm, &tick_snapshot);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if HEARTBEAT_THREAD_ENABLED
|
||||
|
||||
@@ -77,6 +77,9 @@
|
||||
#include "word_source/include/keyboard_words.h"
|
||||
#include "word_source/include/ttf_words.h"
|
||||
#include "word_source/include/scroll_words.h"
|
||||
#ifdef __STARKERNEL__
|
||||
#include "starkernel/doe_log.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Registers a single FORTH word in the virtual machine
|
||||
@@ -136,6 +139,9 @@ void register_forth79_words(VM *vm) {
|
||||
register_keyboard_words(vm); /* Module 29: Console fabric -- raw keyboard scancode diagnostic */
|
||||
register_ttf_words(vm); /* Module 30: TrueType text entry point */
|
||||
register_scroll_words(vm); /* Module 31: REPL scrollback (FABRIC.md 4.4q) */
|
||||
#ifdef __STARKERNEL__
|
||||
register_doe_log_words(vm); /* Module 32: DoE instrumentation runtime toggle (HB-ON/HB-OFF) */
|
||||
#endif
|
||||
|
||||
log_message(LOG_INFO, "FORTH-79 Standard word set registration complete");
|
||||
}
|
||||
Reference in New Issue
Block a user