wip(assembler): round L1 -- Linux baseline on abyss: Linux world identical to Windows
Headless Linux benchmark/hash tool (Clang 19 / GCC 14) sharing the viewer's plan builder and streaming pipeline (moved verbatim into StreamBenchmarkPipeline.h / WorldAssemblyPrototype.h). Owner Round17 view: density/mesh/payload/topology hashes equal the Windows S13 reference at W1/W8/W12 (Clang, 3 runs each) and W8 (GCC), with -ffp-contract=off. No output change. Baseline (i9-12900H, CPUs 0-11, powersave/balance_performance): whole view W8 3.562 s median, W12 3.512 s, W1 16.555 s; peak RSS < 605 MiB. Review: the default-stack crash is 17.3 MiB of static TLS per thread (glibc puts it in the thread stack; HeightfieldColumnCache 6.8 MB), not recursion -- open, after S14. MSVC compile of the viewer refactor not verified (no MSVC here). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ec2afe9c93
commit
1276fd11e3
11 files changed
+1308
-760
No files matched your search
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Run one child and report its wait4 peak RSS without /usr/bin/time."""
|
||||
import os
|
||||
import resource
|
||||
import sys
|
||||
import time
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
raise SystemExit("usage: MeasureProcess.py executable [arguments ...]")
|
||||
|
||||
address_limit, _ = resource.getrlimit(resource.RLIMIT_AS)
|
||||
stack_limit, _ = resource.getrlimit(resource.RLIMIT_STACK)
|
||||
if address_limit in (resource.RLIM_INFINITY, -1) or address_limit > 6 * 1024**3:
|
||||
raise SystemExit("run under prlimit --as=6442450944")
|
||||
if stack_limit in (resource.RLIM_INFINITY, -1) or stack_limit < 64 * 1024**2:
|
||||
raise SystemExit("run under prlimit --stack=67108864:67108864")
|
||||
if not os.sched_getaffinity(0).issubset(set(range(12))):
|
||||
raise SystemExit("run under taskset -c 0-11")
|
||||
print(f"[ProcessLimits] address_limit={address_limit} stack_limit={stack_limit} affinity={sorted(os.sched_getaffinity(0))}", flush=True)
|
||||
|
||||
started = time.monotonic()
|
||||
pid = os.fork()
|
||||
if pid == 0:
|
||||
try:
|
||||
os.execvp(sys.argv[1], sys.argv[1:])
|
||||
except OSError as error:
|
||||
print(f"MeasureProcess: exec failed: {error}", file=sys.stderr, flush=True)
|
||||
os._exit(127)
|
||||
|
||||
_, status, usage = os.wait4(pid, 0)
|
||||
wall = time.monotonic() - started
|
||||
exit_code = os.waitstatus_to_exitcode(status)
|
||||
print(f"[ProcessResources] exit_code={exit_code} wall_s={wall:.6f} peak_rss_kib={usage.ru_maxrss}", flush=True)
|
||||
raise SystemExit(exit_code)
|
||||
Reference in new issue
Block a user