summaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAgeFilesLines
...
| * bench: keep the start-up and fork probes in bench/probesSean Kurtz5 days7-73/+129
|/ | | | | | | | | 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.
* Wording pass on the 64-bit start-up write-up (#17)Sean Kurtz5 days2-39/+37
| | | | | | | | | * notes: plainer wording in the 64-bit start-up write-up Same findings, less staging: no dash-as-connector, no bold cell, no "not X but Y" contrast, and one space after a full stop like the rest of the file. Also fixes "4-5 orders of magnitude" for a 5x difference. * tests: clang-format spawn.c
* Measure why 64-bit start-up is slow, and record the answer (#16)Sean Kurtz6 days6-6/+423
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Merge pull request #15 from skurtz97/bench/startupSean Kurtz6 days6-15/+195
|\ | | | | bench: measure start-up wall time against the other shells
| * 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 days4-2/+121
| | | | | | | | | | | | | | | | | | | | | | 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.
| * test: keep child reports out of the leak comparisonSean Kurtz6 days1-2/+15
| | | | | | | | | | | | | | | | A child inherits _CEE_DMPTARG and writes its own heap report, so the substitution and the pipeline added a report per iteration: growth measured 2 MB over 900 children, none of it zash's. The forked commands now turn heap checking off for themselves, and the test fails if anything but one report came back.
| * test: leak-check the spawn, redirection and pipeline paths tooSean Kurtz6 days1-1/+6
| | | | | | | | | | | | | | The loop body had builtins only, so nothing but parsing, expansion and variables was measured. A substitution, a redirection, a forked command and a pipeline per iteration put the storage those paths keep under the same comparison.
* | Merge pull request #14 from skurtz97/test/zos-leakcheckSean Kurtz6 days3-2/+94
|\| | | | | test: fail when zash leaks under LE's heap checker
| * test: report leak checking as a verdict, not an exact figureSean Kurtz6 days2-2/+6
| | | | | | | | | | | | | | | | The growth over 10x the work is 0 or 8 bytes depending on how the environment copy lands on an 8-byte boundary, so printing it made the expectation depend on the caller's environment. Print the finding only when the limit is exceeded; the reports in build/leaks keep the numbers.
| * test: fail when zash leaks under LE's heap checkerSean Kurtz6 days3-2/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HEAPCHK with a call depth and no per-call walk makes LE write the heap storage diagnostics into a CEEDUMP at normal termination: every allocation still live at exit, with the traceback that made it. A shell leaves working storage live on purpose, so the total says nothing by itself; a leak shows as the total growing with the work done. tests/zos/leak.sh therefore runs one builtin-only loop body at 100 and 1000 iterations in the same shell, sums the live bytes out of each report, and fails if the second run is more than 2 KiB larger. `make zos-leakcheck` is the target: it points _CEE_DMPTARG at build/leaks and skips zash/limits, which recurses deep enough to run out of storage under the checker.
* | Merge pull request #13 from skurtz97/docs/startup-probeSean Kurtz6 days4-183/+331
|\| | | | | docs: the 64-bit start-up cost is LE, not the address mode
| * docs: humanize the markdown docsdocs/startup-probeSean Kurtz6 days4-215/+219
| | | | | | | | | | | | | | | | | | 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 days3-27/+114
| | | | | | | | | | | | 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 days2-18/+75
| | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #12 from skurtz97/fix/zopen-check-harnessSean Kurtz6 days5-3/+142
|\ \ | |/ |/| zopen: run checks in the foreground and package on z/OS
| * docs: describe the zopen build and ship patches/LICENSESean Kurtz6 days2-0/+128
| |
| * fix: stop make check after the z/OS test passesSean Kurtz6 days1-2/+5
| |
| * test: check the PATH suffix without a line-length-limited grepSean Kurtz6 days1-1/+1
| |
| * fix: make zopen checks run in the foreground and tolerate a long CFLAGSSean Kurtz6 days1-0/+2
| |
| * fix: run zopen check in the foreground without injected compiler flagsSean Kurtz6 days1-0/+6
|/
* Merge pull request #11 from skurtz97/feat/zopen-portSean Kurtz6 days3-6/+59
|\ | | | | build: add zopen build configuration
| * fix: make the zopen build use GNU make and install without rebuildingSean Kurtz6 days2-1/+8
| |
| * feat: add zopen build configurationSean Kurtz6 days2-5/+51
|/
* Merge pull request #10 from skurtz97/fix/zos-make-posixSean Kurtz6 days3-17/+24
|\ | | | | Fix IBM make parse failure on z/OS
| * fix: keep the Makefile readable by IBM makeSean Kurtz6 days3-17/+24
|/ | | | Remove ?= and $(shell) from the docs browser lookup, use $(MAKE) for recursion, and make the z/OS default naming explicit.
* Merge pull request #9 from skurtz97/docs/no-ksh88Sean Kurtz7 days3-26/+28
|\ | | | | README: the z/OS comparison column is IBM's /bin/sh
| * README: the z/OS comparison column is IBM's /bin/shSean Kurtz7 days1-3/+2
| | | | | | | | | | Drops the ksh88 lineage claim; the shell is /bin/sh, and the ksh93 contrast stays where it explains the n/a row.
| * 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 days3-6/+6
| |
| * docs: label the z/OS bench column "z/OS sh"Sean Kurtz7 days1-13/+13
| |
| * docs: say why (( )) is n/a on IBM shSean Kurtz7 days1-3/+4
| |
| * docs: name the z/OS baseline shell as IBM's sh, not ksh88Sean Kurtz7 days1-14/+15
| | | | | | | | | | | | The column is /bin/sh on z/OS. Calling it ksh88 in the table implies a shell release z/OS does not ship; the prose now says what it is, notes the lineage, and says that run.sh prints the label ksh88.
* | Merge pull request #7 from skurtz97/docs/readme-currentSean Kurtz7 days1-15/+23
|\| | | | | docs: bring README up to date with the Makefile
| * docs: bring README up to date with the MakefileSean Kurtz7 days1-15/+23
| | | | | | | | | | | | | | | | Clang only on Linux (GCC reports -Wclobbered, so "builds it cleanly" was not true any more), drop the claim that make is never invoked recursively (all, check and doc re-enter it), note the targets the list was missing (install, spec, other-docs, zos-lint, mvs-asan) and the typst dependency, and stop calling [[ ]] planned — it is implemented, tested and benchmarked.
* | Merge pull request #6 from skurtz97/chore/editor-and-lint-hintsSean Kurtz7 days3-47/+182
|\ \ | |/ |/| chore: clangd sysroot note, shellcheck header, typst formatting
| * chore: clangd sysroot note, shellcheck header, typst formattingchore/editor-and-lint-hintsSean Kurtz7 days3-47/+182
|/
* Merge pull request #5 from skurtz97/license/triple-licenseSean Kurtz7 days3-21/+122
|\ | | | | license: MIT OR Apache-2.0 OR BSD-2-Clause
| * license: MIT OR Apache-2.0 OR BSD-2-Clauselicense/triple-licenseSean Kurtz7 days3-21/+122
|/
* Merge pull request #4 from skurtz97/docs/logo-and-cleanSean Kurtz7 days9-2605/+2815
|\ | | | | docs: one centred logo, and clean removes what the makefile builds
| * Merge origin/main into docs/logo-and-cleandocs/logo-and-cleanSean Kurtz7 days28-327/+1427
| |\ | |/ |/| | | | | | | | | Resolutions: README.md and DESIGN.md keep the new colour logo (packaging/zash-logo.svg) at width 220; the Makefile keeps main's newer shellcheck header, lists `make docs` in the usage block, and `clean` removes docs, cov and $(ZTOOLS) along with the branch's new tools.
* | Merge pull request #3 from skurtz97/fix/zos-spawn-fdmapSean Kurtz7 days28-329/+1441
|\ \ | | | | | | z/OS: keep a close-on-exec pipe out of the child's fd map
| * | z/OS: keep a close-on-exec pipe out of the child's fd mapSean Kurtz7 days3-5/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sys_pipe() duplicates the shell's pipe ends above SYS_NFD and marks them FD_CLOEXEC, so that other children do not inherit them. spawn()'s fd_map hands the child the parent's descriptor as it is, without clearing the flag the way dup2() would, so a mapping onto the child's 0..2 carried FD_CLOEXEC into the child. The child could still write, but the next exec inside it lost stdout: ps printed FSUM6004 write error on standard output: EDC5113I Bad file descriptor and a #!/bin/sh shim lost the pipe it was given. Pass a plain duplicate, which fcntl F_DUPFD makes above SYS_NFD without the flag, for every map entry that names a different descriptor, and close the duplicates once spawn() has made the child. Entries that map a descriptor onto itself are untouched. tests/zos/fdmap.sh records the case: a pipe the shell made, read by a child that execs. Reported in #1.
| * | z/OS: run 31-bit and load IGGCSI00 through the C librarySean Kurtz7 days26-324/+1401
|/ / | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * make: add other-docs, and bring the usage comment up to dateSean Kurtz7 days1-5/+25
| | | | | | | | | | | | | | | | | | | | | | make other-docs runs the documentation that needs a tool z/OS does not have: the specification through typst, the source reference through Doxygen. The comment at the top listed fourteen of the targets and missed the rest; it lists them all now, grouped the way the file is, with the argument each one takes where it takes one. Doxygen's output is doc/, not docs/, which the comment had wrong.
| * formal: typeset the spec from a script, and with the new coverSean Kurtz7 days3-2577/+2755
| | | | | | | | | | | | | | | | | | | | formal/zash-spec.pdf could not be rebuilt from anything in the tree. scripts/spec-pdf.sh does it: the typst CLI when present, the Python package otherwise, with the repository root as typst's root so the cover can reach ../packaging/zash-logo.svg. `make spec` runs it. The PDF is rebuilt from the same source, so the cover carries the new logo; the page count is unchanged at 27.
| * packaging: new logo, theme glyphs and iconSean Kurtz7 days4-11/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mark is a 512px glowing screen with the `>z` prompt; the two small glyphs are 16px marks for light and dark backgrounds, and the .ico is now a six-size Windows icon. EOF2 formal: typeset the spec from a script, and with the new cover formal/zash-spec.pdf could not be rebuilt from anything in the tree. scripts/spec-pdf.sh does it: typst CLI when present, the Python package otherwise, with the repository root as typst's root so the cover can reach ../packaging/zash-logo.svg. `make spec` runs it. The PDF is rebuilt from the same source, so the cover carries the new logo; page count is unchanged at 27.
| * docs: one centred logo, and clean removes what this makefile buildsSean Kurtz7 days3-8/+12
|/ | | | | | | | | | | README and DESIGN.md showed a light/dark <picture> pair, copied from a layout that had no centring; both now use packaging/zash-logo.svg inside a centred paragraph, the same header the typst spec already uses. make clean listed neither zash-debug nor fuzz-mvsfmt, so both survived a clean. The shellcheck directive at the top of the makefile now also covers the $(OBJS)-style expansions and the recipe `if` it reads as shell syntax.