summaryrefslogtreecommitdiffhomepage
path: root/bench
Commit message (Collapse)AuthorAgeFilesLines
* build: make the 64-bit z/OS build the defaultSean Kurtz5 days1-20/+33
| | | | | | | | | | | | | | | | | | | | | | zash is built 64-bit on z/OS now: -m64 for the ASCII and the EBCDIC build and for the debug build, and `make` as well as `make zash` land on zos-ascii there. The 31-bit build existed for the 64-bit start and fork costs, which were the C run-time being loaded out of the linklist; with CELQ* in the LPA the widths measure the same and the shell is built at the width IBM builds for. The catalog and dynamic-allocation modules are AMODE 31 and OS_UPSTACK does not exist at -m64, so both are declared with plain OS linkage, which is the 64-bit glue for an AMODE 31 callee. Neither module is installed on the test system, so that path is unverified there; csi_call() still catches a program check and retires the catalog. IGGCSI00's VL bit comes from the width of a pointer, not 0x80000000. Documentation follows: README gains a Recommendations section for the LPA change and loses the 31-bit rationale; DESIGN.md's cost model, catalog linkage and open questions match the measurements; bench/README states the current width and the rerun numbers; investigation.md records the decision.
* docs: name the system by release, not by its hostnameSean Kurtz5 days1-2/+2
|
* bench: the 64-bit start-up cost was the runtime not being in the LPA (#20)Sean Kurtz5 days1-0/+32
| | | | | | | Adding the CELQ members of CEE.SCEERUN2 to the dynamic LPA takes a trivial 64-bit start from 5.83 ms to 1.63 ms, the fork() cost from 4.20 ms to 0.10 ms, and /bin/zsh from 31.4 ms to 3.6 ms. The 27x ratio this repo has been explaining since PR #15 was a system not following IBM's own advice for the 64-bit runtime.
* notes: the 64-bit runtime is loaded from the linklist, not the LPA (#19)Sean Kurtz5 days2-4/+6
| | | | | | | * bench: keep the HLASM probe comments out of the continue column Also fixes the tiny64.s header, which named tiny31.s. * notes: the 64-bit runtime is loaded from the linklist, not the LPA
* bench: keep the start-up and fork probes in bench/probesSean Kurtz5 days6-57/+124
| | | | | | | | | The probe sources only existed inline in the docs and in a scratch directory on the z/OS box, so the numbers in bench/README.md could not be reproduced from the repository. fk3.c (fork cost against parent storage), tiny.c (start-up cost) and the HLASM pair tiny31.s/tiny64.s (start-up with no C runtime) now live in bench/probes/, with run.sh building and timing them at both widths; the docs point at them instead of repeating them.
* Measure why 64-bit start-up is slow, and record the answer (#16)Sean Kurtz5 days3-2/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bench: time one start with a parent that is not an LE program `bench/startup.sh` times a shell loop, so on z/OS every child pays the 31-bit shell's own price and the 64-bit start-up cost cannot be separated from it. `tests/tools/spawn` forks one child at a time and reports wall and child CPU per start, and `bench/le-init.sh` builds the 31-bit, 64-bit and HLASM programs it times in a work directory, so the table needs nothing checked in but the script. The child's environment is built by hand and passed to `execve`: `putenv` after LE has initialized is not handed to the child, and `_CEE_RUNOPTS` exported to an LE parent makes that parent's `execl` fail, which a fork loop that does not check exit status reports as a fast start. * notes: the 64-bit start-up cost is LE waiting, not the address mode Measured on the CBT z/OS 29.00 system: a 64-bit HLASM program with no LE starts in 1.39 ms, the same source at -m32 in 1.5-1.8 ms, so the address space, the loader and XPLINK are free. A -m64 start spends 4.5-28 ms before the first instruction of main, of which only 1.0-1.25 ms is charged to the child: the rest is wall time on something shared, which does not overlap between concurrent starts while it is at 28 ms and does once it drops to 5.8 ms. No _CEE_RUNOPTS option moves it. That retracts an earlier POSIX(OFF) result in these notes: exporting the option to an LE parent makes its execl fail, so the run timed failed execs. Applied to the child, POSIX(OFF) changes nothing.
* bench: take a shell path that is relative to where run.sh was calledbench/startupSean Kurtz6 days1-0/+1
| | | | | The harness chdirs to a work directory, so `./zash`, the form the usage line shows, resolved to nothing.
* bench: start-up table in the README, measured on z/OS and LinuxSean Kurtz6 days1-12/+54
| | | | | | bench/startup.sh had to exist before the README could stop saying the number was missing. On z/OS zash starts in 1.33 ms against 2.20 ms for /bin/sh and 31.4 ms for zsh.
* bench: measure start-up wall time against the other shellsSean Kurtz6 days2-1/+84
| | | | | | | | | | | run.sh times CPU, so the milliseconds a process spends before it runs anything never appear in it: zash can read 0.00 in a subshell row while zash -c : costs a few ms of wall time. bench/startup.sh measures that directly, one start per command, and bench/README.md now has a table instead of a warning that the number is missing. The clock is tests/tools/now.c, ten lines, because /bin/date on z/OS has no sub-second format.
* docs: humanize the markdown docsdocs/startup-probeSean Kurtz6 days1-67/+72
| | | | | | | | | Plain sentences where the prose had decorative bold lead-ins, em dashes and one-line closers. Claims, numbers and commands are unchanged, except two corrections that the startup probe settled: README said the remaining z/OS gap was the price of the address mode, and DESIGN's open question on `a | b &` said the gain depended on the address mode. Both are the 64-bit C run-time, not the address mode.
* docs: keep the probe write-up in notes/investigation.mdSean Kurtz6 days1-25/+7
| | | | | | The assembler-vs-C experiment, its method and the questions it leaves open get a tracked home outside the generated docs/ tree; bench/README keeps the result table and points there.
* docs: the 64-bit start-up cost is LE, not the address modeSean Kurtz6 days1-9/+62
| | | | | | | | | An AMODE 64 HLASM program that returns 0 without any C run-time starts in 0.8 ms, the same as the AMODE 31 copy, while the same empty program in C costs 29.4 ms at -m64 and 2.0 ms at -m32. So the 28 ms is Language Environment's 64-bit initialization, not the address space, and the 31-bit LE start is about 1 ms. Records the probe and corrects the claims in bench/README.md and DESIGN.md.
* bench: name the baseline shell /bin/sh, not ksh88, in prosedocs/readme-currentSean Kurtz7 days1-3/+3
|
* bench: keep a label with a space in one columnSean Kurtz7 days1-5/+6
|
* bench: label the z/OS baseline column "z/OS sh"Sean Kurtz7 days2-4/+4
|
* z/OS: run 31-bit and load IGGCSI00 through the C librarySean Kurtz7 days1-0/+297
| | | | | | | | | | | | | zash was AMODE 64, so calling the AMODE 31 IGGCSI00 needed assembler glue (zos_csi.s) that switched addressing mode around the branch. Built with -m32 the program is 31-bit itself: the call goes through a plain function pointer, the work area and the saved registers live in one 31-bit block in C, and the glue is gone. The rest of the tree follows the change: the build, the off-z/OS lint shim, DESIGN.md and README.md, the benches, the Lean spec of the pattern matcher, and the tests that recorded what the extra address bits had changed.
* added new benches, the logo, and a formal spec for possible verification.Sean Kurtz10 days7-0/+81
|
* bench: 200 background jobs, which is what z/OS lets a shell forkSean Kurtz11 days1-1/+1
|
* bench: more of what a script actually doesSean Kurtz11 days11-0/+128
| | | | | | | | | | | | | Eleven more benchmarks, each one a subsystem rather than a syntax form: here-documents, getopts, redirections, subshells, background jobs, printf, parameter expansion, IFS field splitting, case dispatch, recursion, and bash-style ${v/a/b} substitution. They print one line that every shell must agree on, so they are tests too, and the harness reports n/a where the shell lacks the feature. .pi-lens.json turns off its reserved-identifier rule: every match in this tree is a C11 keyword (_Static_assert, _Noreturn, _Alignas) or a runtime name (_exit, __malloc31, _CVSCSID) that has to be spelled that way.
* bench: a probe must fail when the feature is missingSean Kurtz11 days1-1/+3
| | | | | | An if with no else clause answers 0 even when its condition failed, so dbracket's probe reported success on dash and the row said differs instead of n/a. The probe now says so itself.
* bench: keep the arithmetic totals inside 32 bitsSean Kurtz11 days14-2/+17
| | | | | | | ksh88 works in 32-bit integers, so summing i*2 over 200000 iterations overflowed and the benchmark reported "differs" instead of a time: the same script, two answers. Summing (i % 100) * 2 does the same work and fits in 31 bits.
* bench: name the columns, and run the ksh features against ksh88Sean Kurtz11 days4-16/+65
| | | | | | | | | | | | The column for z/OS /bin/sh said sh, which hid that it is IBM's ksh88 port, and two benchmarks skipped it for the wrong reason: dbracket probed [[ ]] with eval, which ksh88 rejects even though [[ ]] works, and arithcmd used (( )) as a command, which is ksh93 and not ksh88. run.sh now takes shell=label arguments and labels /bin/sh as ksh88 on z/OS, and BENCH selects a subset. dbracket probes the form it uses. arithcmd keeps to typeset -i, let and $(( )), so ksh88 runs it, and the (( )) command form moved to dparen.sh.
* Readme icon and contents, a security test, realistic bench scriptsSean Kurtz12 days2-0/+49
| | | | | | | | | | | | | | | | | README.md shows the shell's icon on a light or dark background, has a table of contents, and says C17 rather than C11 (the tree has built C17 since b4d6bf1). tests/zos/security.sh is the security-relevant half of the suite: a file created by redirection or mkdir takes the umask, a redirect into a directory without write permission fails, the current directory is not searched for a command, ENV is not read by a non-interactive shell, and neither an expansion nor a file name is re-parsed. bench/report.sh counts a generated log by level and hour, and bench/deploy.sh renders and verifies 100 configs from a template. Both are realistic scripts and both are compared for output against other shells by bench/run.sh, so they fail as tests as well as being timed.
* bench: read every shell's times output, and feed scripts on stdinSean Kurtz12 days1-6/+20
| | | | | | | | z/OS `times` differs per shell (ksh88 `0m 1.16s`, bash `0m1.160s`, oksh `0m01.16s`), and the old parser assumed bash's shape, multiplying ksh88's seconds by 60. z/OS zsh cannot open an ASCII-tagged script by name, so benchmarks go in on stdin. The probe list also looks for zsh and oksh now.
* Docs: tagging, CSI completion, z/OS options, off-z/OS checking; tagging benchSean Kurtz2026-11-151-0/+65
| | | | | | DESIGN.md gains the reference for file tags and conversion, MVS name completion and the CSI glue's storage layout, the per-command z/OS options, and how z/OS code is checked on Linux. bench/tagging.sh measures tagging cost on z/OS (n/a elsewhere).
* Add [[ ]], make coverage, and fixes found by edge-case testsSean Kurtz2026-11-152-0/+18
| | | | | | | [[ ]] is parsed into a tree and evaluated without argv or lookup. Fixes: errexit inside a tested subshell, the ${x:?} message, arithmetic on variables holding expressions, printf %c of an empty argument, job text for arithmetic, and \n and \e prompt escapes.
* Tests and benchmarks for the extensions and the interactive layerSean Kurtz2026-11-132-2/+17
| | | | | | | | New zash/ tests for each extension, a proc/ test showing they create no processes, and linux/i-*.sh tests that drive the interactive shell on a pseudo-terminal (tests/tools/ptydrive.py; skipped without python3). The runner counts exit status 77 as "skipped". Adds a benchmark for the arithmetic commands and removes a stray file from tests/posix.
* zash: scripting core, test suite and benchmarksSean Kurtz2026-11-128-0/+102
A clean-slate POSIX shell for z/OS UNIX in the Almquist tradition, written in C23 for Clang (Linux) and IBM Open XL C/C++ (z/OS). - Parser, expansion, arithmetic, redirection, traps and builtins. - Spawn-first execution: fd plans instead of fork+dup2, in-shell pure builtins for pipelines and command substitution, $(a | b) without a subshell. - Flat .POSIX Makefile; asan, valgrind, bench, compdb and z/OS targets. - Tests: posix (dash-generated), zash, process accounting, linux, zos. Nothing has been compiled or run on z/OS yet.