| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
input_push_fd() called sys_input_cvt() for every script on z/OS, and that
routine converts to the program's own CCSID. In an ASCII build reading
an IBM-1047 system it therefore either asked for EBCDIC-to-EBCDIC
conversion, which is a no-op that returns 0, or read the bytes
unconverted; SETCVTON on a descriptor that sys_dupfd() has renumbered
returns 0 and converts nothing on this system either. The parser then
saw EBCDIC and dropped the script.
An EBCDIC build reads IBM-1047 natively and never wanted the call. With
the conversion left to ASCII builds, posix/traps and scripts/signals pass
on z/OS: 93 passed, 4 skipped, 0 failed.
The untagged-file case still depends on SETCVTON with an explicit fccsid,
which is unverified, so the VERIFY note stays.
|
| |\
| |
| | |
web: a Hugo site for zash
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A site in web/, built with Hugo and no theme module, so it builds offline
from one Go binary:
hugo server --source web preview on localhost:1313
hugo --source web --minify -> web/public, which is ignored
Pages: a home page with the shell's pitch, a terminal card, the four
properties that define it and a short benchmark table, plus three docs
pages (building, development, status) in a section with a sidebar. The
palette comes from packaging/zash-logo.svg: mainframe navy, periwinkle, a
signal blue. Dark only, monospace where a shell would be monospaced.
Highlighting uses classes (`markup.highlight.noClasses = false`) against
assets/css/chroma.css generated with `hugo gen chromastyles --style=
tokyonight-night`, so code sits in the page instead of a monokai box.
site.css and copy.js go through Hugo's minify+fingerprint pipeline.
Two .gitignore fixes this needed: `docs/` matched web/content/docs/ (the
generated Doxygen output is at the root, so it is `/docs/` now), and
Hugo's .hugo_build.lock is ignored.
Not published yet: zash is private and Pages is not available for a
private repository on a free plan, so web/README.md records the options.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
nullptr in every place a null pointer constant was meant; NULL is gone
from src/.
constexpr where it improves on #define without costing anything: the
IGGCSI00 work-area offsets and sizes, and the scalar sizes MVS_DSN_MAX,
CSI_FIELD_LEN, CSI_WORK_MIN, PDS_DIRBLK, CSI_WORK, CSI_MAX_CALLS. A
constexpr in C is a constant expression, so it still bounds the arrays
that use it, and it now carries a type and can be checked with
static_assert. Feature switches (#if), the CSIETYPE/EBCDIC byte
constants read as octets, and the related-constant enum sets stay as
they were.
|
| |
|
|
|
|
|
| |
patches/ held one file, a byte-identical copy of LICENSE; no port
patches anything (ZOPEN_TYPE=LOCAL builds the checkout). The single
script was the typst spec builder, which is a build step, so it lives
beside the other build machinery.
|
| |\
| |
| | |
C23: compile as C23 and use its spelling
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The z/OS toolchain would not take C23 when this was first written; IBM
Open XL C/C++ 2.2 does (clang 21.1, __STDC_VERSION__ 202311), and so
does the clang on Linux. -std=c23 in the Makefile, and the standard
attributes in place of the ones that were macros:
_Noreturn -> [[noreturn]] (on declarations and definitions)
_Static_assert -> static_assert
_Alignas -> alignas
NODISCARD -> [[nodiscard]]
FALLTHROUGH -> [[fallthrough]]
PRINTFLIKE and UNREACHABLE() stay macros: [[gnu::format]] and
[[gnu::unreachable]] are vendor attributes, and the standard has no
[[format]] or [[unreachable]] for a header-only project yet.
Standard-library additions newer than the libc of either system
(<stdbit.h>, <stdckdint.h>) are not used, so gcc -std=c2x still builds
the tree warning-free. The suite, ASan/UBSan and the z/OS lint pass as
before; linux/i-dscomplete remains the one local failure it was on
main.
|
| |\
| |
| | |
build/zos 64bit
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The 31-bit choice existed for one reason: a 64-bit start cost 29 ms
against 1 ms and a 64-bit fork() 4.2 ms against 0.10. That was the
64-bit C run-time being loaded out of CEE.SCEERUN2 on the linklist on
every start; with CELQ* in the dynamic LPA both widths cost 1.5 ms and
fork() 0.10 ms (notes/investigation.md has the before and after).
So build the shell at the width IBM builds for: -m64 for both the
ASCII and the EBCDIC build, and for the debug build.
OS_UPSTACK does not exist at -m64, so the two AMODE 31 services
(IGGCSI00, BPXWDY2) are declared with plain OS linkage, which is what
the 64-bit glue implements. IGGCSI00's VL bit is set from the width of
a pointer now, not with 0x80000000. Neither module loads on this
system, so the linkage itself stays unverified; csi_call() still traps a
program check and retires the catalog if it abends.
|
| |\
| |
| | |
docs: name the system by release, not by its hostname
|
| |/ |
|
| |\
| |
| | |
notes: 64-bit before and after the LPA change, side by side with 31-bit
|
| |/ |
|
| | |
|
| |\
| |
| | |
notes: make the 64-bit runtime LPA residency permanent
|
| |/
|
|
|
|
|
|
| |
PROGLE already puts the 31-bit runtime in the dynamic LPA with three
LPA ADD statements, so the 64-bit one is a fourth statement there,
activated with SET PROG=LE and no IPL. Say where this LPAR keeps the
statements (LOADC3 -> SYS3.CBT.PARMLIB.V3R1, IEASYS01, PROGLE) and add
the SDSF exec and its batch JCL for re-applying them after an IPL.
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
* 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/probes
|
| |/
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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: measure start-up wall time against the other shells
|
| | |
| |
| |
| |
| | |
The harness chdirs to a work directory, so `./zash`, the form the usage
line shows, resolved to nothing.
|
| | |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| |
| |
| | |
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.
|
| |\|
| |
| | |
test: fail when zash leaks under LE's heap checker
|
| | |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |\|
| |
| | |
docs: the 64-bit start-up cost is LE, not the address mode
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |\ \
| |/
|/| |
zopen: run checks in the foreground and package on z/OS
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |/ |
|
| |\
| |
| | |
build: add zopen build configuration
|
| | | |
|
| |/ |
|
| |\
| |
| | |
Fix IBM make parse failure on z/OS
|
| |/
|
|
| |
Remove ?= and $(shell) from the docs browser lookup, use $(MAKE) for recursion, and make the z/OS default naming explicit.
|
| |\
| |
| | |
README: the z/OS comparison column is IBM's /bin/sh
|
| | |
| |
| |
| |
| | |
Drops the ksh88 lineage claim; the shell is /bin/sh, and the ksh93
contrast stays where it explains the n/a row.
|
| | | |
|