Repository navigation
fix: Deflater dictionary data loss, PATH lookup and other review findings, and narrower PR test runs #72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Deflater dictionary data loss, PATH lookup and other review findings, and narrower PR test runs #72
Changes from all commits
5068394
adff6ea
5afe92c
02a2b75
1599cab
dab97a1
94566f2
8587e44
6d24d2c
0a00400
d5e86f9
029d2de
8eb887f
f8dcadd
191ee79
c0dd40d
0d09383
0a75ecf
dd7285c
92676ef
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| ## What this changes | ||
|
|
||
| <!-- What the change does and why, in a few sentences. List the behavior changes. --> | ||
|
|
||
| ## Tests | ||
|
|
||
| <!-- What was run: unit tests, programs compared with HotSpot, OpenJDK tests added to passing.txt. For performance work, the numbers (median and spread, master against branch). --> | ||
|
|
||
| ## Noticed, not fixed | ||
|
|
||
| <!-- Problems found along the way that this PR leaves alone. Delete this section if there are none. --> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -136,6 +136,17 @@ function procValue(file: string, label: string, field = 1): number { | |
| } | ||
|
|
||
| const orElse = (x: number, fallback: number) => (Number.isFinite(x) ? x : fallback); | ||
|
|
||
| // the soft limit, as HotSpot reads getrlimit's rlim_cur; an unlimited one is -1 after its jlong cast | ||
| function maxOpenFiles(): bigint { | ||
|
project516-review-bot[bot] marked this conversation as resolved.
Resolved
|
||
| try { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Answered on the earlier thread (r4503863066): the VM presents Linux to Java, as the Linux HotSpot it follows does, other host reads already use |
||
| const line = host("node:fs").readFileSync("/proc/self/limits", "utf8").split("\n").find((l: string) => l.startsWith("Max open files")); | ||
| const soft = line.trim().split(/\s+/)[3]; | ||
| return soft === "unlimited" ? -1n : BigInt(soft); | ||
| } catch { | ||
| return 1024n; | ||
| } | ||
| } | ||
| const KB = 1024; | ||
|
|
||
| // The VM options java-web can state, as HotSpot reports them with G1 | ||
|
|
@@ -636,7 +647,7 @@ export const natives: Natives = { | |
|
|
||
| [`${OS}initialize0()V`]: () => undefined, | ||
| [`${OS}getOpenFileDescriptorCount0()J`]: (t) => BigInt(openFdCount(t.vm)), | ||
| [`${OS}getMaxFileDescriptorCount0()J`]: () => BigInt(orElse(procValue("/proc/self/limits", "Max open files", 3), 1024)), | ||
| [`${OS}getMaxFileDescriptorCount0()J`]: () => maxOpenFiles(), | ||
| [`${OS}getCommittedVirtualMemorySize0()J`]: () => BigInt(orElse(procValue("/proc/self/statm", "", 0) * 4096, (globalThis as any).process?.memoryUsage?.().rss ?? -1)), | ||
| [`${OS}getTotalMemorySize0()J`]: () => BigInt(host("node:os")?.totalmem() ?? MAX_HEAP), | ||
| [`${OS}getFreeMemorySize0()J`]: () => BigInt(host("node:os")?.freemem() ?? 0), | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Select tests removed from
locale-data.txt.If a passing test is removed from
locale-data.txt, the runner stops giving that test--locale-data. This branch collects only added lines. A PR that only removes the entry therefore emits no shards, so CI never checks the changed invocation. Include removed locale entries that remain inpassing.txtin the filters. (raw.githubusercontent.com)As per coding guidelines, “Prove it with tests: programs whose output must match HotSpot exactly, and OpenJDK's own regression tests where they can run.”
Source: Coding guidelines