took a break and started to figure out worker codenames for fun
This commit is contained in:
0
code/grime/arena_fixed.odin
Normal file
0
code/grime/arena_fixed.odin
Normal file
0
code/grime/arena_vchaining.odin
Normal file
0
code/grime/arena_vchaining.odin
Normal file
@ -47,7 +47,7 @@ DLL_NodePN :: struct ( $ Type : typeid ) {
|
||||
prev, next : ^Type,
|
||||
}
|
||||
DLL_NodeFL :: struct ( $ Type : typeid ) {
|
||||
first, last : ^Type,
|
||||
first, last : ^Type,
|
||||
}
|
||||
DLL_NodeBT :: struct ($Type: typeid) {
|
||||
bottom, top: ^Type,
|
||||
|
0
code/grime/pool_virtual.odin
Normal file
0
code/grime/pool_virtual.odin
Normal file
@ -1,5 +1,9 @@
|
||||
package grime
|
||||
|
||||
/*
|
||||
This is just a snippet file, do not use directly.
|
||||
*/
|
||||
|
||||
import "base:runtime"
|
||||
import "core:prof/spall"
|
||||
|
||||
@ -8,26 +12,30 @@ SpallProfiler :: struct {
|
||||
buffer : spall.Buffer,
|
||||
}
|
||||
|
||||
@(private)
|
||||
Module_Context : ^SpallProfiler
|
||||
// The rest is a snippet to implement in the target codebase.
|
||||
when false
|
||||
{
|
||||
@(private)
|
||||
Module_Context : ^SpallProfiler
|
||||
|
||||
set_profiler_module_context :: #force_inline proc "contextless" ( ctx : ^SpallProfiler ) {
|
||||
Module_Context = ctx
|
||||
}
|
||||
set_profiler_module_context :: #force_inline proc "contextless" ( ctx : ^SpallProfiler ) {
|
||||
Module_Context = ctx
|
||||
}
|
||||
|
||||
DISABLE_PROFILING :: true
|
||||
DISABLE_PROFILING :: true
|
||||
|
||||
@(deferred_none = profile_end, disabled = DISABLE_PROFILING)
|
||||
profile :: #force_inline proc "contextless" ( name : string, loc := #caller_location ) {
|
||||
spall._buffer_begin( & Module_Context.ctx, & Module_Context.buffer, name, "", loc )
|
||||
}
|
||||
@(deferred_none = profile_end, disabled = DISABLE_PROFILING)
|
||||
profile :: #force_inline proc "contextless" ( name : string, loc := #caller_location ) {
|
||||
spall._buffer_begin( & Module_Context.ctx, & Module_Context.buffer, name, "", loc )
|
||||
}
|
||||
|
||||
@(disabled = DISABLE_PROFILING)
|
||||
profile_begin :: #force_inline proc "contextless" ( name : string, loc := #caller_location ) {
|
||||
spall._buffer_begin( & Module_Context.ctx, & Module_Context.buffer, name, "", loc )
|
||||
}
|
||||
@(disabled = DISABLE_PROFILING)
|
||||
profile_begin :: #force_inline proc "contextless" ( name : string, loc := #caller_location ) {
|
||||
spall._buffer_begin( & Module_Context.ctx, & Module_Context.buffer, name, "", loc )
|
||||
}
|
||||
|
||||
@(disabled = DISABLE_PROFILING)
|
||||
profile_end :: #force_inline proc "contextless" () {
|
||||
spall._buffer_end( & Module_Context.ctx, & Module_Context.buffer)
|
||||
}
|
||||
@(disabled = DISABLE_PROFILING)
|
||||
profile_end :: #force_inline proc "contextless" () {
|
||||
spall._buffer_end( & Module_Context.ctx, & Module_Context.buffer)
|
||||
}
|
||||
}
|
@ -10,7 +10,7 @@ Currently the prototype has hot-reload always enabled, eventually there will be
|
||||
*/
|
||||
package sectr_host
|
||||
|
||||
//region Grime & Dependencies
|
||||
//region pkg_mappings
|
||||
import "base:runtime"
|
||||
Byte :: runtime.Byte
|
||||
Kilobyte :: runtime.Kilobyte
|
||||
@ -88,7 +88,7 @@ file_status :: proc {
|
||||
to_str :: proc {
|
||||
builder_to_string,
|
||||
}
|
||||
//endregion Grime & Dependencies
|
||||
//endregion pkg_mappings
|
||||
|
||||
Path_Snapshot :: "VMemChunk_1.snapshot"
|
||||
Path_Logs :: "../logs"
|
||||
@ -111,6 +111,9 @@ RuntimeState :: struct {
|
||||
job_system: JobSystemContext,
|
||||
}
|
||||
|
||||
@thread_local
|
||||
worker_thread: sectr.ThreadWorkerContext
|
||||
|
||||
ClientMemory :: struct {
|
||||
persistent : VArena,
|
||||
frame : VArena,
|
||||
|
5
code/host/readme.md
Normal file
5
code/host/readme.md
Normal file
@ -0,0 +1,5 @@
|
||||
# Host: OS Sandbox Manager
|
||||
|
||||
The host is the final downstream module and is responsible for handling the launch of application, its persistent memory tracking, and the multi-threaded job system including its worker threads.
|
||||
For debug builds the host supports hot-reloading the client module (Sectr).
|
||||
Maxmimum orchestration is designated to the client module, which only defers launch and the initial job setup to the Host.
|
2
code/sectr/app/app.odin
Normal file
2
code/sectr/app/app.odin
Normal file
@ -0,0 +1,2 @@
|
||||
package sectr
|
||||
|
4
code/sectr/app/readme.md
Normal file
4
code/sectr/app/readme.md
Normal file
@ -0,0 +1,4 @@
|
||||
# App: Application Orchestration
|
||||
|
||||
The user-level features are managed here down-stream of engine orchestration.
|
||||
For this prototype these involve mainly the screen UI, the project workspace UIs, and the codebase backend.
|
0
code/sectr/engine/engine.odin
Normal file
0
code/sectr/engine/engine.odin
Normal file
@ -23,6 +23,7 @@ Job :: struct {
|
||||
group: ^JobGroup,
|
||||
ignored: IgnoredThreads,
|
||||
dbg_lbl: string,
|
||||
// scratch: CArena,
|
||||
}
|
||||
|
||||
JobList :: struct {
|
||||
@ -44,6 +45,161 @@ ThreadWorkerContext :: struct {
|
||||
index: int,
|
||||
}
|
||||
|
||||
WorkerID :: enum u32 {
|
||||
Master_Prepper = 0,
|
||||
|
||||
API_Apologist,
|
||||
Artifical_Sweetener,
|
||||
Assertion_Avenger,
|
||||
Async_Antagonist,
|
||||
Atomic_Accountant,
|
||||
Black_Box_Provider,
|
||||
Bit_Rot_Repacker,
|
||||
Big_O_Admirer,
|
||||
Blitting_Bandit,
|
||||
Blockchain_Believer,
|
||||
Blue_Caller,
|
||||
Blue_Screen_Shopper,
|
||||
Branch_Mispredictor,
|
||||
Breakpoint_Bandit,
|
||||
Buffer_Baron,
|
||||
Cache_Concierge,
|
||||
Cafecito_Barista,
|
||||
Callback_Operator,
|
||||
Callstack_Canopy,
|
||||
Carpe_Datum,
|
||||
Chief_Synergy_Officer,
|
||||
Cipher_Clerk,
|
||||
Conscripted_Camper,
|
||||
Dean_Of_Misplaced_Delegation,
|
||||
Dereference_Doctorate,
|
||||
Checkbox_Boi,
|
||||
Credible_Threat,
|
||||
Dead_Drop_Delegate,
|
||||
Deadline_Denialist,
|
||||
Deadlock_Daemon,
|
||||
DMA_Desperado,
|
||||
Dump_Curator,
|
||||
Edge_Case_Evangelist,
|
||||
Enterprise_Entangler,
|
||||
Exception_Excavator,
|
||||
Git_Blame_Archaeologist,
|
||||
Feature_Creeper,
|
||||
Feature_Freeze_Fighter,
|
||||
Fencepost_Fiddler,
|
||||
Fitness_Unpacker,
|
||||
Flop_Flipper,
|
||||
Floating_Point_Propoganda,
|
||||
Forgets_To_Check,
|
||||
Global_Guardian,
|
||||
Goto_Goon,
|
||||
Ghost_Protocols,
|
||||
Halting_Solver,
|
||||
Handshake_Hypeman,
|
||||
Headcount_Hoarder,
|
||||
Heisenbug_Hunter,
|
||||
Heuristic_Hypnotist,
|
||||
Hotfix_Hooligan,
|
||||
Hot_Path_Hitchhiker,
|
||||
Idle_Malware,
|
||||
Implementation_Detailer,
|
||||
Interrupt_Ignorer,
|
||||
Interrupt_Insurgent,
|
||||
Jank_Jockey,
|
||||
Jefe_De_Errores,
|
||||
Kickoff_Holiday,
|
||||
Kilobyte_Kingpin,
|
||||
KPI_Keeper,
|
||||
Latency_Lover,
|
||||
Leeroy_Jenkins,
|
||||
Legacy_Liaison,
|
||||
Loop_Lobbyist,
|
||||
Linter_Lamenter,
|
||||
Lock_Free_Liar,
|
||||
Low_Hanging_Fruit_Picker,
|
||||
Malloc_Maverick,
|
||||
Malpractice_Mitigator,
|
||||
Merge_Conflict_Mediator,
|
||||
Memory_Mangler,
|
||||
Mañana_Manager,
|
||||
Minimum_Wage_Multiplexer,
|
||||
Monad_Masquerader,
|
||||
NaN_Propagator,
|
||||
NDA_Negotiator,
|
||||
Null_Pointer_Enthusiast,
|
||||
Off_By_One_Offender,
|
||||
On_Call_Intern,
|
||||
Onboarding_Overlord,
|
||||
Overflow_Investor,
|
||||
Out_Of_Bounds_Outlaw,
|
||||
Page_Fault_Pioneer,
|
||||
Panic_As_A_Service,
|
||||
Paradigm_Pivoter,
|
||||
Patient_Zero_Pollinator,
|
||||
Payload_Plunderer,
|
||||
Perpetual_Peon,
|
||||
Phishing_Pharmacist,
|
||||
Pipeline_Plumber,
|
||||
Pointer_Pilgrim,
|
||||
Production_Pusher,
|
||||
Quiet_Quitter,
|
||||
Query_Gremlin,
|
||||
Race_Condition_Gambler,
|
||||
Rebase_Renegade,
|
||||
Red_Tape_Renderer,
|
||||
Resting_Receptionist,
|
||||
Quantum_Quibbler,
|
||||
Regex_Rancher,
|
||||
Register_Riveter,
|
||||
Register_Spill_Rancher,
|
||||
Roadmap_Revisionist,
|
||||
Rootkit_Realtor,
|
||||
Runtime_Ruffian,
|
||||
Sabbatical_Scheduler,
|
||||
Shift_Manager,
|
||||
Speculative_Skeptic,
|
||||
Segfault_Stretcher,
|
||||
Siesta_Scheduler,
|
||||
Singleton_Sinner,
|
||||
Sleeper_Cell_Spammer,
|
||||
Spaghetti_Chef,
|
||||
Spinlock_Spelunker,
|
||||
Stack_Smuggler,
|
||||
Stakeholder_Simulator,
|
||||
TCP_Tango,
|
||||
Techdebt_Treasurer,
|
||||
Tenured_Trapper,
|
||||
Thread_Local_Tourist,
|
||||
Triage_Technician,
|
||||
Tunnel_Fisherman,
|
||||
Type_Theorist,
|
||||
UDP_Unicycle,
|
||||
Unattended_Child,
|
||||
Undefined_Behavior_Brokerage,
|
||||
Unreachable_Utopian,
|
||||
Unicode_Usurper,
|
||||
Unsafe_Advocate,
|
||||
Unsigned_Vigilante,
|
||||
Unwind_Understudy,
|
||||
Voltage_Vampire,
|
||||
Vibe_Checker,
|
||||
Virtual_Vagrant,
|
||||
Volatile_Vandal,
|
||||
Void_Voyager,
|
||||
Waiting_Room_Warden,
|
||||
Weltschmerz_Worker,
|
||||
While_True_Wanderer,
|
||||
Write_Barrier_Warden,
|
||||
XORcist,
|
||||
YAGNI_Yeller,
|
||||
Yellowpage_Dialer,
|
||||
Zeroring_Comissioner,
|
||||
Zero_Cost_Commando,
|
||||
Zero_Day_Dreamer,
|
||||
Zombie_Zookeeper,
|
||||
Zombo_Vistor,
|
||||
}
|
||||
|
||||
// Hard constraint for Windows
|
||||
JOB_SYSTEM_MAX_WORKER_THREADS :: 64
|
||||
|
||||
|
3
code/sectr/engine/profiler.odin
Normal file
3
code/sectr/engine/profiler.odin
Normal file
@ -0,0 +1,3 @@
|
||||
package sectr
|
||||
|
||||
|
3
code/sectr/engine/readme.md
Normal file
3
code/sectr/engine/readme.md
Normal file
@ -0,0 +1,3 @@
|
||||
# Engine: Technical Orchestration
|
||||
|
||||
All aspects of technical operations are handled as conceptually the engine of the application.
|
@ -327,6 +327,7 @@ import "codebase:grime"
|
||||
|
||||
to_str_runes_pair_via_string :: grime.to_str_runes_pair_via_string
|
||||
to_str_runes_pair_via_runes :: grime.to_str_runes_pair_via_runes
|
||||
|
||||
// profiler
|
||||
SpallProfiler :: grime.SpallProfiler
|
||||
|
||||
|
Reference in New Issue
Block a user